|
|
|
@ -1856,8 +1856,8 @@ |
|
|
|
|
|
|
|
<!-- 新增IPQC主记录信息 --> |
|
|
|
<insert id="saveIPQCRecord" parameterType="QcFAIRecordData"> |
|
|
|
INSERT INTO qc_ipqc_record (inspection_no, site, bu_no, state, task_date, inspection_type_no, inspection_cycle, order_no, operation_desc, resource_id, part_no, roll_qty, sampling_qty, ssr_id, seq_no, batch_roll_no, special_requirements, work_center_no, roll_no, um_id) |
|
|
|
VALUES(#{inspectionNo}, #{site}, #{buNo}, #{state}, getDate(), #{inspectionTypeNo}, #{inspectionCycle,jdbcType=DECIMAL}, #{orderNo}, #{operationDesc}, #{resourceId}, #{partNo}, #{rollQty}, #{samplingQty,jdbcType=DECIMAL}, #{ssrId}, #{seqNo}, #{batchRollNo}, #{specialRequirements}, #{workCenterNo}, #{rollNo}, #{umId}) |
|
|
|
INSERT INTO qc_ipqc_record (inspection_no, site, bu_no, state, task_date, inspection_type_no, inspection_cycle, order_no, operation_desc, resource_id, part_no, roll_qty, sampling_qty, ssr_id, seq_no, batch_roll_no, special_requirements, work_center_no, roll_no, um_id, pass_qty) |
|
|
|
VALUES(#{inspectionNo}, #{site}, #{buNo}, #{state}, getDate(), #{inspectionTypeNo}, #{inspectionCycle,jdbcType=DECIMAL}, #{orderNo}, #{operationDesc}, #{resourceId}, #{partNo}, #{rollQty}, #{samplingQty,jdbcType=DECIMAL}, #{ssrId}, #{seqNo}, #{batchRollNo}, #{specialRequirements}, #{workCenterNo}, #{rollNo}, #{umId}, #{samplingQty}) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<!-- 查询IPQC主记录信息 --> |
|
|
|
@ -1878,7 +1878,6 @@ |
|
|
|
dbo.qc_get_resource_desc(site, resource_id, work_center_no) as resourceDesc, |
|
|
|
part_no, |
|
|
|
dbo.qc_get_part_desc(part_no) as part_desc, |
|
|
|
dbo.qc_get_cinv_source_code(part_no) as cinvSourceCode, |
|
|
|
inspection_remark, |
|
|
|
roll_qty, |
|
|
|
sampling_qty, |
|
|
|
@ -1890,7 +1889,6 @@ |
|
|
|
ssr_id, |
|
|
|
unqualified_qty, |
|
|
|
submit_flag, |
|
|
|
dbo.qc_get_sku(part_no) as sku, |
|
|
|
dbo.qc_get_spec(part_no) as spec, |
|
|
|
seq_no, |
|
|
|
batch_roll_no, |
|
|
|
@ -1904,7 +1902,9 @@ |
|
|
|
isnull(dbo.joint_id(site, bu_no, inspection_no, 'coordination'), '') as operator, |
|
|
|
isnull(dbo.joint_name(site, bu_no, inspection_no, 'coordination'), '') as operatorName, |
|
|
|
isnull(dbo.joint_id(site, bu_no, inspection_no, 'responsible'), '') as responsiblePerson, |
|
|
|
isnull(dbo.joint_name(site, bu_no, inspection_no, 'responsible'), '') as responsiblePersonName |
|
|
|
isnull(dbo.joint_name(site, bu_no, inspection_no, 'responsible'), '') as responsiblePersonName, |
|
|
|
pass_qty, |
|
|
|
not_pass_qty |
|
|
|
FROM qc_ipqc_record |
|
|
|
<where> |
|
|
|
site in (select site from eam_access_site where username = #{query.userName}) |
|
|
|
@ -1921,12 +1921,6 @@ |
|
|
|
<if test = "query.partDesc != null and query.partDesc != ''"> |
|
|
|
AND dbo.qc_get_part_desc(part_no) LIKE '%' + #{query.partDesc} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.cinvSourceCode != null and query.cinvSourceCode != ''"> |
|
|
|
AND dbo.qc_get_cinv_source_code(part_no) LIKE '%' + #{query.cinvSourceCode} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.sku != null and query.sku != ''"> |
|
|
|
AND dbo.qc_get_sku(part_no) LIKE '%' + #{query.sku} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.states != null and query.states.size > 0"> |
|
|
|
AND state in |
|
|
|
<foreach item="item" collection="query.states" open="(" separator="," close=")"> |
|
|
|
@ -2047,7 +2041,9 @@ |
|
|
|
inspector_date = getDate(), |
|
|
|
sampling_qty = #{samplingQty,jdbcType=DECIMAL}, |
|
|
|
roll_qty = #{rollQty,jdbcType=DECIMAL}, |
|
|
|
unqualified_qty = #{unqualifiedQty,jdbcType=DECIMAL} |
|
|
|
unqualified_qty = #{unqualifiedQty,jdbcType=DECIMAL}, |
|
|
|
pass_qty = #{passQty,jdbcType=DECIMAL}, |
|
|
|
not_pass_qty = #{notPassQty, jdbcType=DECIMAL} |
|
|
|
WHERE site = #{site} and inspection_no = #{inspectionNo} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
@ -2130,21 +2126,18 @@ |
|
|
|
<select id="getOperationList" parameterType="QcFAIRecordData" resultType="QcFAIRecordData"> |
|
|
|
SELECT |
|
|
|
DISTINCT |
|
|
|
a.seqno as seqNo, |
|
|
|
a.orderno as orderNo, |
|
|
|
j.partNo, |
|
|
|
dbo.Get_Part_DescSpec(j.site, j.partNo) as part_desc, |
|
|
|
a.SeqNo as seqNo, |
|
|
|
a.OrderNo as orderNo, |
|
|
|
a.partNo, |
|
|
|
dbo.Get_Part_DescSpec(a.site, a.partNo) as part_desc, |
|
|
|
j.spec, |
|
|
|
j.sku, |
|
|
|
c.operation_desc as operationDesc, |
|
|
|
a.itemno as operationNo, |
|
|
|
a.s_resourceid as resourceId, |
|
|
|
DBO.getResourceDesc(a.site, a.s_resourceid) as resourceDesc, |
|
|
|
c.work_center_no |
|
|
|
FROM soscheduledrouting as a |
|
|
|
LEFT JOIN so_routing as c ON c.order_no = a.orderno and a.itemno = c.item_no |
|
|
|
LEFT JOIN part j ON a.part_no = j.partNo |
|
|
|
WHERE a.seqno = #{seqNo} |
|
|
|
a.operationDesc as operationDesc, |
|
|
|
a.s_ResourceID as resourceId, |
|
|
|
DBO.getResourceDesc(a.site, a.s_ResourceID) as resourceDesc, |
|
|
|
a.S_workCenterNo as workCenterNo |
|
|
|
FROM view_virtual_SOScheduledRouting as a |
|
|
|
LEFT JOIN part j ON a.partNo = j.partNo and a.site = j.site |
|
|
|
WHERE a.SeqNo = #{seqNo} |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 根据工单号和工序号查出所有数据 --> |
|
|
|
@ -2218,7 +2211,9 @@ |
|
|
|
sampling_qty = #{samplingQty}, |
|
|
|
inspection_cycle = #{inspectionCycle}, |
|
|
|
part_desc = #{partDesc}, |
|
|
|
detail_flag = 'Y' |
|
|
|
detail_flag = 'Y', |
|
|
|
pass_qty = sampling_qty, |
|
|
|
not_pass_qty = 0 |
|
|
|
WHERE inspection_no = #{inspectionNo} and site = #{site} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
@ -2252,7 +2247,7 @@ |
|
|
|
po_orderNo, |
|
|
|
po_itemNo, |
|
|
|
roll_count, |
|
|
|
'采购订单' as orderType, |
|
|
|
'' as orderType, |
|
|
|
action_date, |
|
|
|
action_by, |
|
|
|
isnull(dbo.joint_id(site, bu_no, inspection_no, 'coordination'), '') as operator, |
|
|
|
@ -2262,7 +2257,11 @@ |
|
|
|
receipt_no, |
|
|
|
receipt_item_no, |
|
|
|
pass_qty, |
|
|
|
not_pass_qty |
|
|
|
not_pass_qty, |
|
|
|
ref_info1, |
|
|
|
ref_info2, |
|
|
|
ref_info3, |
|
|
|
ref_info4 |
|
|
|
FROM qc_iqc_record |
|
|
|
<where> |
|
|
|
site in (select site from eam_access_site where username = #{query.userName}) |
|
|
|
@ -3124,24 +3123,15 @@ |
|
|
|
</select> |
|
|
|
<select id="searchSeqInfo" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
SELECT DISTINCT |
|
|
|
a.seqno, |
|
|
|
a.orderno, |
|
|
|
J.partNo, |
|
|
|
dbo.Get_Part_DescSpec(j.site, j.partNo) as part_desc, |
|
|
|
a.SeqNo, |
|
|
|
a.OrderNo, |
|
|
|
a.PartNo, |
|
|
|
dbo.Get_Part_DescSpec(a.site, a.partNo) as part_desc, |
|
|
|
t.lotsize, |
|
|
|
a.qtyrequired, |
|
|
|
c.operation_desc, |
|
|
|
J.sku, |
|
|
|
(select sum(roll_qty) from qc_ipqc_record where order_no = #{query.orderNo}) as sjzs |
|
|
|
FROM |
|
|
|
soscheduledrouting AS a |
|
|
|
inner JOIN so_routing AS c ON c.order_no = a.orderno |
|
|
|
AND a.itemno = c.item_no |
|
|
|
AND c.site = a.site |
|
|
|
inner JOIN part AS J ON a.site = J.site |
|
|
|
AND a.part_no = J.partNo |
|
|
|
inner JOIN shoporder AS t ON t.orderno = a.orderno |
|
|
|
AND a.site = t.site |
|
|
|
a.operationDesc |
|
|
|
FROM view_virtual_SOScheduledRouting AS a |
|
|
|
inner JOIN shoporder AS t ON t.OrderNo = a.OrderNo AND a.site = t.site |
|
|
|
WHERE |
|
|
|
a.site = #{query.site} |
|
|
|
<if test="query.status != null and query.status != ''"> |
|
|
|
@ -3154,13 +3144,13 @@ |
|
|
|
AND a.seqno LIKE '%' + #{query.seqNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.partNo != null and query.partNo != ''"> |
|
|
|
AND J.partNo LIKE '%' + #{query.partNo} + '%' |
|
|
|
AND a.partNo LIKE '%' + #{query.partNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.partDesc != null and query.partDesc != ''"> |
|
|
|
AND dbo.Get_Part_DescSpec(j.site, j.partNo) LIKE '%' + #{query.partDesc} + '%' |
|
|
|
AND dbo.Get_Part_DescSpec(a.site, a.partNo) LIKE '%' + #{query.partDesc} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.operationDesc != null and query.operationDesc != ''"> |
|
|
|
AND c.operation_desc LIKE '%' + #{query.operationDesc} + '%' |
|
|
|
AND a.operationDesc LIKE '%' + #{query.operationDesc} + '%' |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
<select id="searchPartInfo" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
@ -3505,7 +3495,9 @@ |
|
|
|
sampling_qty = #{samplingQty}, |
|
|
|
inspection_cycle = #{inspectionCycle}, |
|
|
|
part_desc = #{partDesc}, |
|
|
|
detail_flag = 'Y' |
|
|
|
detail_flag = 'Y', |
|
|
|
pass_qty = sampling_qty, |
|
|
|
not_pass_qty = 0 |
|
|
|
WHERE inspection_no = #{inspectionNo} and site = #{site} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
@ -3542,7 +3534,8 @@ |
|
|
|
isnull(dbo.joint_id(site, bu_no, inspection_no, 'responsible'), '') as responsiblePerson, |
|
|
|
isnull(dbo.joint_name(site, bu_no, inspection_no, 'responsible'), '') as responsiblePersonName, |
|
|
|
pass_qty, |
|
|
|
not_pass_qty |
|
|
|
not_pass_qty, |
|
|
|
order_ref_type |
|
|
|
FROM qc_stock_record |
|
|
|
<where> |
|
|
|
site in (select site from eam_access_site where username = #{query.userName}) |
|
|
|
|