|
|
|
@ -993,7 +993,14 @@ |
|
|
|
qa.update_date, |
|
|
|
qa.update_by, |
|
|
|
dbo.getOperatorDesc(qa.site, qa.update_by) as updateByDesc, |
|
|
|
qa.exempt_inspection |
|
|
|
qa.exempt_inspection, |
|
|
|
qa.First_IPQC_Patrol_time as firstIPQCPatrolTime, |
|
|
|
qa.Last_IPQC_Patrol_time as lastIPQCPatrolTime, |
|
|
|
qa.Cycle_IPQC_Patrol_time as cycleIPQCPatrolTime, |
|
|
|
qa.defaultValue, |
|
|
|
qa.standardValue, |
|
|
|
qa.maxValue, |
|
|
|
qa.minValue |
|
|
|
FROM qc_part_attribute qa |
|
|
|
LEFT JOIN part p on qa.attribute_no = p.PartNo and qa.site = p.site |
|
|
|
<where> |
|
|
|
@ -1029,8 +1036,8 @@ |
|
|
|
|
|
|
|
<!-- 新增物料属性 --> |
|
|
|
<insert id="qcPartAttributeSave" parameterType="com.heai.modules.pms.data.QcPartAttributeData"> |
|
|
|
INSERT INTO qc_part_attribute (attribute_no, supplier_no, attribute_remark, create_time, create_by, attribute_type, site, exempt_inspection, bu_no) |
|
|
|
VALUES(#{partNo}, #{supplierNo}, #{attributeRemark}, getDate(), #{createBy}, #{attributeType}, #{site}, #{exemptInspection}, #{buNo}) |
|
|
|
INSERT INTO qc_part_attribute (attribute_no, supplier_no, attribute_remark, create_time, create_by, attribute_type, site, exempt_inspection, bu_no,First_IPQC_Patrol_time,Last_IPQC_Patrol_time,Cycle_IPQC_Patrol_time,defaultValue,standardValue,maxValue,minValue) |
|
|
|
VALUES(#{partNo}, #{supplierNo}, #{attributeRemark}, getDate(), #{createBy}, #{attributeType}, #{site}, #{exemptInspection}, #{buNo},#{firstIPQCPatrolTime},#{lastIPQCPatrolTime},#{cycleIPQCPatrolTime},#{defaultValue},#{standardValue},#{maxValue},#{minValue}) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<!-- 物料属性修改 --> |
|
|
|
@ -1039,7 +1046,14 @@ |
|
|
|
SET attribute_remark = #{attributeRemark}, |
|
|
|
exempt_inspection = #{exemptInspection}, |
|
|
|
update_date = getDate(), |
|
|
|
update_by = #{updateBy} |
|
|
|
update_by = #{updateBy}, |
|
|
|
defaultValue = #{defaultValue}, |
|
|
|
standardValue = #{standardValue}, |
|
|
|
maxValue = #{maxValue}, |
|
|
|
minValue = #{minValue}, |
|
|
|
First_IPQC_Patrol_time = #{firstIPQCPatrolTime}, |
|
|
|
Last_IPQC_Patrol_time = #{lastIPQCPatrolTime}, |
|
|
|
Cycle_IPQC_Patrol_time = #{cycleIPQCPatrolTime} |
|
|
|
WHERE site = #{site} and attribute_no = #{partNo} and attribute_type = #{attributeType} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
@ -1969,7 +1983,7 @@ |
|
|
|
a.resource_id, |
|
|
|
r.resource_desc, |
|
|
|
a.part_no, |
|
|
|
d.PartDescription, |
|
|
|
d.PartDescription as partDesc, |
|
|
|
d.cinv_source_code as cinvSourceCode, |
|
|
|
d.sku as sku, |
|
|
|
d.invdefinetype as invdefinetype, |
|
|
|
@ -2001,7 +2015,7 @@ |
|
|
|
a.not_pass_qty, |
|
|
|
a.batch_qualified_qty |
|
|
|
FROM qc_ipqc_record as a |
|
|
|
left join part as d on a.site = d.site and a.bu_no = d.sourceBu and a.part_no = d.partNo |
|
|
|
left join part as d on a.site = d.site and a.part_no = d.partNo |
|
|
|
left join sys_user as u on a.inspector_no = u.username |
|
|
|
left join resource as r on a.site = r.site and a.resource_id = r.resource_id and a.work_center_no = r.work_center_no |
|
|
|
left join UM as um on a.site = um.site and a.um_id = um.UMID |
|
|
|
@ -3323,22 +3337,20 @@ |
|
|
|
a.seqno, |
|
|
|
a.orderno, |
|
|
|
J.PartNo, |
|
|
|
J.PartDescription, |
|
|
|
J.PartDescription as partDesc, |
|
|
|
t.lotsize, |
|
|
|
a.qtyrequired, |
|
|
|
c.OperationDesc, |
|
|
|
J.sku, |
|
|
|
sum(roll_qty) as sjzs |
|
|
|
sum(roll_qty) as sjzs, |
|
|
|
sum(roll_qty) as roll_qty |
|
|
|
FROM soscheduledrouting AS a |
|
|
|
inner JOIN RoutingDetail AS c ON c.site = a.site AND a.itemno = c.itemNo |
|
|
|
inner JOIN RoutingDetail AS c ON c.site = a.site and a.partNO = C.PartNo AND a.itemno = c.itemNo |
|
|
|
inner JOIN part AS J ON a.site = J.site AND a.partNo = J.PartNo |
|
|
|
inner JOIN shoporder AS t ON a.site = t.site AND t.orderno = a.orderno |
|
|
|
left join qc_ipqc_record as r on a.site = r.site and a.seqno = r.seq_no |
|
|
|
WHERE |
|
|
|
a.site = #{query.site} |
|
|
|
<if test="query.status != null and query.status != ''"> |
|
|
|
AND t.status = #{query.status} |
|
|
|
</if> |
|
|
|
<if test="query.orderNo != null and query.orderNo != ''"> |
|
|
|
AND a.orderno LIKE '%' + #{query.orderNo} + '%' |
|
|
|
</if> |
|
|
|
@ -4245,6 +4257,11 @@ |
|
|
|
left join qc_pqc_record_operation qro on a.operation = qro.code |
|
|
|
GROUP BY qro.description |
|
|
|
</select> |
|
|
|
<select id="getQcIPQCInspection" resultType="com.heai.modules.pms.data.QcFAIRecordData"> |
|
|
|
select * |
|
|
|
from qc_ipqc_record |
|
|
|
where site = #{site} and seq_no = #{seqNo} and order_no = #{orderNo} and inspection_type_no = #{inspectionTypeNo} |
|
|
|
</select> |
|
|
|
<update id="updateEquipmentFolderLocation"> |
|
|
|
UPDATE Equipment_folder_location |
|
|
|
SET |
|
|
|
|