|
|
|
@ -2177,7 +2177,7 @@ |
|
|
|
a.SeqNo as seqNo, |
|
|
|
a.OrderNo as orderNo, |
|
|
|
a.partNo, |
|
|
|
dbo.Get_Part_DescSpec(a.site, a.partNo) as part_desc, |
|
|
|
j.PartDescription + Isnull(j.Spec,'') as part_desc, |
|
|
|
j.spec, |
|
|
|
a.operationDesc as operationDesc, |
|
|
|
a.ResourceID as resourceId, |
|
|
|
@ -3237,43 +3237,133 @@ |
|
|
|
</where> |
|
|
|
</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,--> |
|
|
|
<!-- a.PartNo,--> |
|
|
|
<!-- p.PartDescription + Isnull(p.Spec,'') as part_desc,--> |
|
|
|
<!-- t.lotsize,--> |
|
|
|
<!-- a.qtyrequired,--> |
|
|
|
<!-- a.operationDesc,--> |
|
|
|
<!-- p.UMID as umId,--> |
|
|
|
<!-- t.status--> |
|
|
|
<!-- FROM view_virtual_SOScheduledRouting AS a--> |
|
|
|
<!-- inner JOIN shoporder AS t ON t.OrderNo = a.OrderNo AND a.site = t.site--> |
|
|
|
<!-- left join part as p on a.site = p.site and a.partNo = p.partNo--> |
|
|
|
<!-- WHERE--> |
|
|
|
<!-- a.site = #{query.site}--> |
|
|
|
<!-- <if test="query.status != null and query.status != ''">--> |
|
|
|
<!-- AND t.status = #{query.status}--> |
|
|
|
<!-- </if>--> |
|
|
|
<!-- <if test="(query.status == null or query.status == '') and query.cancelFlag == ''">--> |
|
|
|
<!-- AND t.status <![CDATA[<>]]> '已取消'--> |
|
|
|
<!-- </if>--> |
|
|
|
<!-- <if test="query.orderNo != null and query.orderNo != ''">--> |
|
|
|
<!-- AND a.orderno LIKE '%' + #{query.orderNo} + '%'--> |
|
|
|
<!-- </if>--> |
|
|
|
<!-- <if test="query.seqNo != null and query.seqNo != ''">--> |
|
|
|
<!-- AND a.seqno LIKE '%' + #{query.seqNo} + '%'--> |
|
|
|
<!-- </if>--> |
|
|
|
<!-- <if test="query.partNo != null and query.partNo != ''">--> |
|
|
|
<!-- AND a.partNo LIKE '%' + #{query.partNo} + '%'--> |
|
|
|
<!-- </if>--> |
|
|
|
<!-- <if test="query.partDesc != null and query.partDesc != ''">--> |
|
|
|
<!-- AND dbo.Get_Part_DescSpec(a.site, a.partNo) LIKE '%' + #{query.partDesc} + '%'--> |
|
|
|
<!-- </if>--> |
|
|
|
<!-- <if test="query.operationDesc != null and query.operationDesc != ''">--> |
|
|
|
<!-- AND a.operationDesc LIKE '%' + #{query.operationDesc} + '%'--> |
|
|
|
<!-- </if>--> |
|
|
|
<!-- </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, |
|
|
|
a.PartNo, |
|
|
|
p.PartDescription + Isnull(p.Spec,'') as part_desc, |
|
|
|
t.lotsize, |
|
|
|
a.qtyrequired, |
|
|
|
a.operationDesc, |
|
|
|
p.UMID as umId, |
|
|
|
t.status |
|
|
|
FROM view_virtual_SOScheduledRouting AS a |
|
|
|
inner JOIN shoporder AS t ON t.OrderNo = a.OrderNo AND a.site = t.site |
|
|
|
SELECT |
|
|
|
a.site, |
|
|
|
a.BarcodeID as seqNo, |
|
|
|
a.SOOrderNo as orderNo, |
|
|
|
a.PartNo, |
|
|
|
p.PartDescription + Isnull(p.Spec,'') as part_desc, |
|
|
|
t.lotsize, |
|
|
|
a.QtyRequired as qtyrequired, |
|
|
|
a.OperationDesc as operationDesc, |
|
|
|
p.UMID as umId, |
|
|
|
t.status, |
|
|
|
p.spec, |
|
|
|
a.S_ResourceID as resourceId, |
|
|
|
w.ResourceDesc as resourceDesc, |
|
|
|
a.S_workCenterNo as workCenterNo |
|
|
|
FROM SOScheduledRouting AS a |
|
|
|
inner join ShopOrder as t ON t.Site = a.Site AND t.OrderNo = a.SOOrderNo |
|
|
|
inner join WorkCenterResource as w ON w.Site = a.Site AND w.WorkCenterNo = a.S_WorkCenterNo and w.ResourceID = a.S_ResourceID |
|
|
|
left join part as p on a.site = p.site and a.partNo = p.partNo |
|
|
|
WHERE |
|
|
|
a.site = #{query.site} |
|
|
|
<if test="query.status != null and query.status != ''"> |
|
|
|
AND t.status = #{query.status} |
|
|
|
</if> |
|
|
|
<if test="(query.status == null or query.status == '') and query.cancelFlag == ''"> |
|
|
|
AND t.status <![CDATA[<>]]> '已取消' |
|
|
|
</if> |
|
|
|
<if test="query.orderNo != null and query.orderNo != ''"> |
|
|
|
AND a.orderno LIKE '%' + #{query.orderNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.seqNo != null and query.seqNo != ''"> |
|
|
|
AND a.seqno LIKE '%' + #{query.seqNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.partNo != null and query.partNo != ''"> |
|
|
|
AND a.partNo LIKE '%' + #{query.partNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.partDesc != null and query.partDesc != ''"> |
|
|
|
AND dbo.Get_Part_DescSpec(a.site, a.partNo) LIKE '%' + #{query.partDesc} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.operationDesc != null and query.operationDesc != ''"> |
|
|
|
AND a.operationDesc LIKE '%' + #{query.operationDesc} + '%' |
|
|
|
</if> |
|
|
|
a.site = #{query.site} |
|
|
|
<if test="query.status != null and query.status != ''"> |
|
|
|
AND t.status = #{query.status} |
|
|
|
</if> |
|
|
|
<if test="(query.status == null or query.status == '') and (query.cancelFlag == null or query.cancelFlag == '')"> |
|
|
|
AND t.status <![CDATA[<>]]> '已取消' |
|
|
|
</if> |
|
|
|
<if test="query.orderNo != null and query.orderNo != ''"> |
|
|
|
AND a.SOOrderNo LIKE '%' + #{query.orderNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.seqNo != null and query.seqNo != ''"> |
|
|
|
AND a.BarcodeID LIKE '%' + #{query.seqNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.partNo != null and query.partNo != ''"> |
|
|
|
AND a.partNo LIKE '%' + #{query.partNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.partDesc != null and query.partDesc != ''"> |
|
|
|
AND (p.PartDescription + Isnull(p.Spec,'')) LIKE '%' + #{query.partDesc} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.operationDesc != null and query.operationDesc != ''"> |
|
|
|
AND a.operationDesc LIKE '%' + #{query.operationDesc} + '%' |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="searchSeqInfo2" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
SELECT |
|
|
|
a.site, |
|
|
|
a.BarcodeID as seqNo, |
|
|
|
a.SOOrderNo as orderNo, |
|
|
|
a.PartNo, |
|
|
|
p.PartDescription + Isnull(p.Spec,'') as part_desc, |
|
|
|
t.lotsize, |
|
|
|
a.QtyRequired as qtyrequired, |
|
|
|
a.OperationDesc as operationDesc, |
|
|
|
p.UMID as umId, |
|
|
|
t.status, |
|
|
|
p.spec, |
|
|
|
a.S_ResourceID as resourceId, |
|
|
|
w.ResourceDesc as resourceDesc, |
|
|
|
a.S_workCenterNo as workCenterNo |
|
|
|
FROM SOScheduledRouting AS a |
|
|
|
inner join ShopOrder as t ON t.Site = a.Site AND t.OrderNo = a.SOOrderNo |
|
|
|
inner join WorkCenterResource as w ON w.Site = a.Site AND w.WorkCenterNo = a.S_WorkCenterNo and w.ResourceID = a.S_ResourceID |
|
|
|
left join part as p on a.site = p.site and a.partNo = p.partNo |
|
|
|
WHERE |
|
|
|
a.site in (select site from eam_access_site where username = #{query.userName}) |
|
|
|
<if test="query.status != null and query.status != ''"> |
|
|
|
AND t.status = #{query.status} |
|
|
|
</if> |
|
|
|
<if test="(query.status == null or query.status == '') and (query.cancelFlag == null or query.cancelFlag == '')"> |
|
|
|
AND t.status <![CDATA[<>]]> '已取消' |
|
|
|
</if> |
|
|
|
<if test="query.orderNo != null and query.orderNo != ''"> |
|
|
|
AND a.SOOrderNo LIKE '%' + #{query.orderNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.seqNo != null and query.seqNo != ''"> |
|
|
|
AND a.BarcodeID LIKE '%' + #{query.seqNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.partNo != null and query.partNo != ''"> |
|
|
|
AND a.partNo LIKE '%' + #{query.partNo} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.partDesc != null and query.partDesc != ''"> |
|
|
|
AND (p.PartDescription + Isnull(p.Spec,'')) LIKE '%' + #{query.partDesc} + '%' |
|
|
|
</if> |
|
|
|
<if test="query.operationDesc != null and 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"> |
|
|
|
@ -4231,6 +4321,20 @@ |
|
|
|
FROM Supplier |
|
|
|
WHERE site = #{site} and SupplierID = #{supplierID} and Active = #{active} |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 修改IQC明细记录信息 --> |
|
|
|
<update id="updateIQCDetailedRecordByNos" parameterType="QcFAIRecordData"> |
|
|
|
UPDATE qc_iqc_detailed_record |
|
|
|
SET item_result = #{itemResult}, |
|
|
|
text_value = #{textValue}, |
|
|
|
number_value = #{numberValue,jdbcType=DECIMAL} |
|
|
|
WHERE inspection_no in (#{inspectionNo}) and item_no = #{itemNo} and site = #{site} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<delete id="deleteInspectionFiles" parameterType="QcFAIRecordData"> |
|
|
|
delete sys_oss |
|
|
|
where order_ref1 = #{site} and order_ref2 = #{inspectionNo} and order_ref4 = #{buNo} |
|
|
|
</delete> |
|
|
|
</mapper> |
|
|
|
|
|
|
|
|
|
|
|
|