|
|
|
@ -3105,7 +3105,7 @@ |
|
|
|
</delete> |
|
|
|
|
|
|
|
<!-- 模糊查询标签号 --> |
|
|
|
<select id="getRollNo" resultType="QcFAIRecordData" parameterType="QcFAIRecordData"> |
|
|
|
<select id="getRollNo" resultType="com.xujie.sys.modules.pms.data.QcFAIRecordData" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
SELECT DISTINCT top 3 |
|
|
|
a.seqno, |
|
|
|
a.orderno, |
|
|
|
@ -3116,7 +3116,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 标签号回车事件 --> |
|
|
|
<select id="rollNoEnter" resultType="QcFAIRecordData" parameterType="QcFAIRecordData"> |
|
|
|
<select id="rollNoEnter" resultType="com.xujie.sys.modules.pms.data.QcFAIRecordData" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
SELECT |
|
|
|
a.site, |
|
|
|
a.seqno as seqNo, |
|
|
|
@ -3128,7 +3128,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 查询物料列表 --> |
|
|
|
<select id="queryPartList" resultType="QcFAIRecordData" parameterType="QcFAIRecordData"> |
|
|
|
<select id="queryPartList" resultType="com.xujie.sys.modules.pms.data.QcFAIRecordData" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
SELECT |
|
|
|
site, |
|
|
|
part_no, |
|
|
|
@ -3151,7 +3151,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 查询单位列表 --> |
|
|
|
<select id="umSearch" resultType="QcFAIRecordData" parameterType="QcFAIRecordData"> |
|
|
|
<select id="umSearch" resultType="com.xujie.sys.modules.pms.data.QcFAIRecordData" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
SELECT |
|
|
|
site, |
|
|
|
UMID as umId, |
|
|
|
@ -3161,7 +3161,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 查询单位列表 --> |
|
|
|
<select id="checkItem" resultType="SubDetailValues" parameterType="SubDetailValues"> |
|
|
|
<select id="checkItem" resultType="com.xujie.sys.modules.pms.data.SubDetailValues" parameterType="com.xujie.sys.modules.pms.data.SubDetailValues"> |
|
|
|
SELECT |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
@ -3188,7 +3188,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 查询检验方法列表 --> |
|
|
|
<select id="queryMethodList" resultType="QcMethodData" parameterType="QcMethodData"> |
|
|
|
<select id="queryMethodList" resultType="com.xujie.sys.modules.pms.data.QcMethodData" parameterType="com.xujie.sys.modules.pms.data.QcMethodData"> |
|
|
|
SELECT |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
@ -3215,14 +3215,14 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 修改detailFlag字段为N --> |
|
|
|
<update id="updateIQCDetailFlag" parameterType="QcFAIRecordData"> |
|
|
|
<update id="updateIQCDetailFlag" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
UPDATE qc_iqc_record |
|
|
|
SET detail_flag = 'N' |
|
|
|
WHERE inspection_no = #{inspectionNo} and site = #{site} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<!-- 查询检验方法唯一 --> |
|
|
|
<select id="checkMethodOnlyOne" resultType="QcMethodData" parameterType="QcMethodData"> |
|
|
|
<select id="checkMethodOnlyOne" resultType="com.xujie.sys.modules.pms.data.QcMethodData" parameterType="com.xujie.sys.modules.pms.data.QcMethodData"> |
|
|
|
SELECT |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
@ -3234,7 +3234,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 查询检验项目唯一 --> |
|
|
|
<select id="checkItemOnlyOne" resultType="QcItemData" parameterType="QcItemData"> |
|
|
|
<select id="checkItemOnlyOne" resultType="com.xujie.sys.modules.pms.data.QcItemData" parameterType="com.xujie.sys.modules.pms.data.QcItemData"> |
|
|
|
SELECT |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
@ -3247,7 +3247,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 查询检验项目唯一 --> |
|
|
|
<select id="checkTemplateOnlyOne" resultType="QcTemplateData" parameterType="QcTemplateData"> |
|
|
|
<select id="checkTemplateOnlyOne" resultType="com.xujie.sys.modules.pms.data.QcTemplateData" parameterType="com.xujie.sys.modules.pms.data.QcTemplateData"> |
|
|
|
SELECT |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
@ -3324,7 +3324,7 @@ |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getInterfaceTimeData" parameterType="String" resultType="InterfaceTimeData"> |
|
|
|
<select id="getInterfaceTimeData" parameterType="String" resultType="com.xujie.sys.modules.pms.data.InterfaceTimeData"> |
|
|
|
SELECT |
|
|
|
id, |
|
|
|
start_time, |
|
|
|
@ -3334,7 +3334,7 @@ |
|
|
|
WHERE del_flag = 'N' and site = #{site} |
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="updateInterfaceTimeData" parameterType="InterfaceTimeData"> |
|
|
|
<update id="updateInterfaceTimeData" parameterType="com.xujie.sys.modules.pms.data.InterfaceTimeData"> |
|
|
|
UPDATE interface_time |
|
|
|
set |
|
|
|
updated_by = #{updatedBy}, |
|
|
|
@ -3342,7 +3342,7 @@ |
|
|
|
del_flag = #{delFlag} |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="getInterfaceRdStyleData" parameterType="String" resultType="RdStyleData"> |
|
|
|
<select id="getInterfaceRdStyleData" parameterType="String" resultType="com.xujie.sys.modules.pms.data.RdStyleData"> |
|
|
|
SELECT |
|
|
|
crdcode, |
|
|
|
crdname, |
|
|
|
@ -3353,7 +3353,7 @@ |
|
|
|
WHERE crdname = #{crdName} |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertHardtagPurchaseInStorageData" parameterType="HardtagPurchaseInStorageCountData" useGeneratedKeys="true" keyProperty="id"> |
|
|
|
<insert id="insertHardtagPurchaseInStorageData" parameterType="com.xujie.sys.modules.pms.data.HardtagPurchaseInStorageCountData" useGeneratedKeys="true" keyProperty="id"> |
|
|
|
INSERT INTO purchase_in_storage_count |
|
|
|
(site, trans_no, created_date, created_by, erp_flag, toacc, logindate, cordercode, cdepcode, cwhcode, crdcode, coutcode, ddate, bredvouch, |
|
|
|
cmemo, verify, irowno, cinvcode, iquantity, citemcode, erp_remark, trans_date, csource, trans_type) |
|
|
|
@ -3361,7 +3361,7 @@ |
|
|
|
#{cmemo}, #{verify}, #{irowno}, #{cinvcode}, #{iquantity}, #{citemcode}, #{erpRemark}, #{transDate}, #{csource}, #{transType}) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<insert id="batchSaveHrdtagTransHeader" parameterType="HardtagTransHeaderData"> |
|
|
|
<insert id="batchSaveHrdtagTransHeader" parameterType="com.xujie.sys.modules.pms.data.HardtagTransHeaderData"> |
|
|
|
insert into TransHeader |
|
|
|
(TransNo, Site, WarehouseID, TransDate, TransType_DB, TransType, UserName, Receiver, TransYear, TransMonth, PartnerID, PartnerType, AuthorizeFlag, AuthorizeDate, Authorizor, TransferFlag, TransferDate, |
|
|
|
TransferGuys, VoucherDate, ProjectID, EnterDate, Remark, UseLocation, OrderRef1, LinkOrderFlag, DelAddID, Status, ProjectName, PartnerName, erp_warehouse_id, ERP, |
|
|
|
@ -3371,14 +3371,14 @@ |
|
|
|
#{departmentNo}, #{pickingStatus}, #{scanType}, #{inCategory}, #{pmProject}, #{remarks}, #{itemNoMat}, #{remark3}, #{locationId}, #{countId}) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<insert id="batchSaveHardtagTransDetail" parameterType="HardtagTransDetailData"> |
|
|
|
<insert id="batchSaveHardtagTransDetail" parameterType="com.xujie.sys.modules.pms.data.HardtagTransDetailData"> |
|
|
|
INSERT INTO TransDetail |
|
|
|
(TransNo, Site, PartNo, LocationID, TransQty, Direction, OrderRef1, ItemNo, OrderRef2, OrderRef3, OrderRef5, Remark, citem_code) |
|
|
|
values |
|
|
|
(#{TransNo}, #{Site}, #{PartNo}, #{LocationID}, #{TransQty}, #{Direction}, #{OrderRef1}, #{ItemNo}, #{OrderRef2}, #{OrderRef3}, #{OrderRef5}, #{Remark}, #{citemCode}) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<select id="getSendMailAddress" parameterType="String" resultType="MailAddressData"> |
|
|
|
<select id="getSendMailAddress" parameterType="String" resultType="com.xujie.sys.modules.pms.data.MailAddressData"> |
|
|
|
SELECT |
|
|
|
id, |
|
|
|
site, |
|
|
|
@ -3392,7 +3392,7 @@ |
|
|
|
WHERE site = #{site} and send_type = #{type} and del_flag = 'N' |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getSendMailFromAddress" resultType="MailSendAddressData"> |
|
|
|
<select id="getSendMailFromAddress" resultType="com.xujie.sys.modules.pms.data.MailSendAddressData"> |
|
|
|
SELECT |
|
|
|
port, |
|
|
|
host, |
|
|
|
@ -3407,20 +3407,20 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 新增发送邮件记录 --> |
|
|
|
<insert id="saveSendMailRecord" parameterType="SendMailRecord"> |
|
|
|
<insert id="saveSendMailRecord" parameterType="com.xujie.sys.modules.pms.data.SendMailRecord"> |
|
|
|
insert into send_mail_record |
|
|
|
(site, bu_no, document_no, sender, recipient, send_date, type) |
|
|
|
values |
|
|
|
(#{site}, #{buNo}, #{documentNo}, #{sender}, #{recipient}, getDate(), #{type}) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<select id="orderTypeSearch" resultType="QcFAIRecordData"> |
|
|
|
<select id="orderTypeSearch" resultType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
SELECT distinct |
|
|
|
order_type |
|
|
|
FROM view_po_order |
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="actionIQCInspection" parameterType="EamObjectInData"> |
|
|
|
<update id="actionIQCInspection" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
update qc_iqc_record |
|
|
|
set action_date = getDate(), |
|
|
|
action_by = #{actionBy}, |
|
|
|
@ -3428,7 +3428,7 @@ |
|
|
|
where site = #{site} and bu_no = #{buNo} and inspection_no = #{inspectionNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="actionFAIInspection" parameterType="EamObjectInData"> |
|
|
|
<update id="actionFAIInspection" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
update qc_fai_record |
|
|
|
set action_date = getDate(), |
|
|
|
action_by = #{actionBy}, |
|
|
|
@ -3436,7 +3436,7 @@ |
|
|
|
where site = #{site} and bu_no = #{buNo} and inspection_no = #{inspectionNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="actionIPQCInspection" parameterType="EamObjectInData"> |
|
|
|
<update id="actionIPQCInspection" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
update qc_ipqc_record |
|
|
|
set action_date = getDate(), |
|
|
|
action_by = #{actionBy}, |
|
|
|
@ -3444,7 +3444,7 @@ |
|
|
|
where site = #{site} and bu_no = #{buNo} and inspection_no = #{inspectionNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="actionFQCInspection" parameterType="EamObjectInData"> |
|
|
|
<update id="actionFQCInspection" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
update qc_fqc_record |
|
|
|
set action_date = getDate(), |
|
|
|
action_by = #{actionBy}, |
|
|
|
@ -3472,12 +3472,12 @@ |
|
|
|
</insert> |
|
|
|
|
|
|
|
<!-- 删除之前的人员--> |
|
|
|
<delete id="delOperator" parameterType="QcFAIRecordData"> |
|
|
|
<delete id="delOperator" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
DELETE FROM eam_actual_operator |
|
|
|
WHERE site = #{site} and order_no = #{inspectionNo} and bu_no = #{buNo} |
|
|
|
</delete> |
|
|
|
|
|
|
|
<select id="getInspectionNo" parameterType="QcFAIRecordData" resultType="EquipmentDataAcquisitionData"> |
|
|
|
<select id="getInspectionNo" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.EquipmentDataAcquisitionData"> |
|
|
|
select distinct |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
@ -3490,7 +3490,7 @@ |
|
|
|
where site = #{site} and bu_no = #{buNo} and inspection_no = #{inspectionNo} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getInspectionNoByItem" parameterType="QcFAIRecordData" resultType="EquipmentDataAcquisitionData"> |
|
|
|
<select id="getInspectionNoByItem" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.EquipmentDataAcquisitionData"> |
|
|
|
select distinct |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
@ -3503,7 +3503,7 @@ |
|
|
|
where site = #{site} and bu_no = #{buNo} and inspection_no = #{inspectionNo} and item_no = #{itemNo} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="dataAcquisition" parameterType="EquipmentDataAcquisitionData" resultType="SubDetailValues"> |
|
|
|
<select id="dataAcquisition" parameterType="com.xujie.sys.modules.pms.data.EquipmentDataAcquisitionData" resultType="com.xujie.sys.modules.pms.data.SubDetailValues"> |
|
|
|
select |
|
|
|
id, |
|
|
|
site, |
|
|
|
@ -3542,7 +3542,7 @@ |
|
|
|
and batch_no = (select MAX(batch_no) from Equipment_data_detail where site = #{site} and bu_no = #{buNo} and equipment_no = #{equipmentNo}) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="dataAcquisitionB" parameterType="EquipmentDataAcquisitionData" resultType="SubDetailValues"> |
|
|
|
<select id="dataAcquisitionB" parameterType="com.xujie.sys.modules.pms.data.EquipmentDataAcquisitionData" resultType="com.xujie.sys.modules.pms.data.SubDetailValues"> |
|
|
|
select |
|
|
|
id, |
|
|
|
site, |
|
|
|
@ -3563,7 +3563,7 @@ |
|
|
|
and batch_no = (select MAX(batch_no) from Equipment_data_detail where site = #{site} and bu_no = #{buNo} and equipment_no = #{equipmentNo}) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="dataAcquisition2" parameterType="EquipmentDataAcquisitionData" resultType="SysOssEntity"> |
|
|
|
<select id="dataAcquisition2" parameterType="com.xujie.sys.modules.pms.data.EquipmentDataAcquisitionData" resultType="SysOssEntity"> |
|
|
|
select |
|
|
|
site as orderRef1, |
|
|
|
bu_no as orderRef4, |
|
|
|
@ -3575,7 +3575,7 @@ |
|
|
|
and batch_no = (select MAX(batch_no) from Equipment_data_detail where site = #{site} and bu_no = #{buNo} and equipment_no = #{equipmentNo}) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getIQCDetail" parameterType="QcFAIRecordData" resultType="EquipmentDataAcquisitionData"> |
|
|
|
<select id="getIQCDetail" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.EquipmentDataAcquisitionData"> |
|
|
|
select |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3591,7 +3591,7 @@ |
|
|
|
order by a.order_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getFAIDetail" parameterType="QcFAIRecordData" resultType="EquipmentDataAcquisitionData"> |
|
|
|
<select id="getFAIDetail" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.EquipmentDataAcquisitionData"> |
|
|
|
select |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3608,7 +3608,7 @@ |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getIPQCDetail" parameterType="QcFAIRecordData" resultType="EquipmentDataAcquisitionData"> |
|
|
|
<select id="getIPQCDetail" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.EquipmentDataAcquisitionData"> |
|
|
|
select |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3624,7 +3624,7 @@ |
|
|
|
order by a.order_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getFQCDetail" parameterType="QcFAIRecordData" resultType="EquipmentDataAcquisitionData"> |
|
|
|
<select id="getFQCDetail" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.EquipmentDataAcquisitionData"> |
|
|
|
select |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3640,7 +3640,7 @@ |
|
|
|
order by a.order_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="querySubDetails" parameterType="QcFAIRecordData" resultType="SubDetailValues"> |
|
|
|
<select id="querySubDetails" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.SubDetailValues"> |
|
|
|
select |
|
|
|
b.site, |
|
|
|
b.bu_no, |
|
|
|
@ -3680,7 +3680,7 @@ |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<select id="getEquipmentNoList" parameterType="EquipmentFolderLocationData" resultType="EquipmentFolderLocationData"> |
|
|
|
<select id="getEquipmentNoList" parameterType="com.xujie.sys.modules.pms.data.EquipmentFolderLocationData" resultType="com.xujie.sys.modules.pms.data.EquipmentFolderLocationData"> |
|
|
|
select |
|
|
|
equipment_no |
|
|
|
from Equipment_folder_location |
|
|
|
@ -3688,7 +3688,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 获取责任人员列表 --> |
|
|
|
<select id="getResponsibleOperatorList" resultType="EamAdminData" parameterType="EamAdminData"> |
|
|
|
<select id="getResponsibleOperatorList" resultType="com.xujie.sys.modules.pms.data.EamAdminData" parameterType="com.xujie.sys.modules.pms.data.EamAdminData"> |
|
|
|
SELECT |
|
|
|
operator_id as adminID, |
|
|
|
operator_name as adminName |
|
|
|
@ -3704,14 +3704,14 @@ |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getDataContentList" parameterType="QcCollectionDataContentData" resultType="QcCollectionDataContentData"> |
|
|
|
<select id="getDataContentList" parameterType="com.xujie.sys.modules.pms.data.QcCollectionDataContentData" resultType="com.xujie.sys.modules.pms.data.QcCollectionDataContentData"> |
|
|
|
select |
|
|
|
content_desc |
|
|
|
from qc_collection_data_content |
|
|
|
where site = #{site} and bu_no = #{buNo} and active = 'Y' |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getItemCollectionDataContent" parameterType="SubDetailValues" resultType="string"> |
|
|
|
<select id="getItemCollectionDataContent" parameterType="com.xujie.sys.modules.pms.data.SubDetailValues" resultType="string"> |
|
|
|
select |
|
|
|
collection_data_content |
|
|
|
from eam_properties_item |
|
|
|
@ -3719,7 +3719,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 获取当前项目不包含的设备 --> |
|
|
|
<select id="getObjectList1" resultType="EamObjectInData" parameterType="EamObjectInData"> |
|
|
|
<select id="getObjectList1" resultType="com.xujie.sys.modules.pms.data.EamObjectInData" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
SELECT |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3731,7 +3731,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 获取当前项目所包含的设备 --> |
|
|
|
<select id="getObjectList2" resultType="EamObjectInData" parameterType="EamObjectInData"> |
|
|
|
<select id="getObjectList2" resultType="com.xujie.sys.modules.pms.data.EamObjectInData" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
SELECT |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3744,7 +3744,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 获取当前项目不包含的设备 --> |
|
|
|
<select id="getObjectListBy" resultType="EamObjectInData" parameterType="EamObjectInData"> |
|
|
|
<select id="getObjectListBy" resultType="com.xujie.sys.modules.pms.data.EamObjectInData" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
SELECT |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3787,7 +3787,7 @@ |
|
|
|
WHERE site = #{site} and bu_no = #{buNo} and ItemNo = #{itemNo} and ObjectID = #{objectID} |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="getIQCInspectionDetail" parameterType="EamObjectInData" resultType="EamObjectInData"> |
|
|
|
<select id="getIQCInspectionDetail" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData" resultType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
select |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3802,7 +3802,7 @@ |
|
|
|
order by a.order_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getFAIInspectionDetail" parameterType="EamObjectInData" resultType="EamObjectInData"> |
|
|
|
<select id="getFAIInspectionDetail" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData" resultType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
select |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3817,7 +3817,7 @@ |
|
|
|
order by a.order_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getFQCInspectionDetail" parameterType="EamObjectInData" resultType="EamObjectInData"> |
|
|
|
<select id="getFQCInspectionDetail" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData" resultType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
select |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3832,7 +3832,7 @@ |
|
|
|
order by a.order_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getIPQCInspectionDetail" parameterType="EamObjectInData" resultType="EamObjectInData"> |
|
|
|
<select id="getIPQCInspectionDetail" parameterType="com.xujie.sys.modules.pms.data.EamObjectInData" resultType="com.xujie.sys.modules.pms.data.EamObjectInData"> |
|
|
|
select |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
@ -3847,12 +3847,12 @@ |
|
|
|
order by a.order_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<delete id="deleteEquipmentDataAcquisition" parameterType="QcFAIRecordData"> |
|
|
|
<delete id="deleteEquipmentDataAcquisition" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
delete from Equipment_data_acquisition |
|
|
|
where site = #{site} and bu_no = #{buNo} and inspection_no = #{inspectionNo} |
|
|
|
</delete> |
|
|
|
|
|
|
|
<select id="getInspectionStandards" parameterType="QcInspectionStandardData" resultType="QcInspectionStandardData"> |
|
|
|
<select id="getInspectionStandards" parameterType="com.xujie.sys.modules.pms.data.QcInspectionStandardData" resultType="com.xujie.sys.modules.pms.data.QcInspectionStandardData"> |
|
|
|
select |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
@ -3868,12 +3868,12 @@ |
|
|
|
where site = #{site} and bu_no = #{buNo} and template_id = #{templateId} and item_no = #{itemNo} |
|
|
|
</select> |
|
|
|
|
|
|
|
<delete id="deleteInspectionStandard" parameterType="QcInspectionStandardData"> |
|
|
|
<delete id="deleteInspectionStandard" parameterType="com.xujie.sys.modules.pms.data.QcInspectionStandardData"> |
|
|
|
delete from qc_inspection_standards |
|
|
|
where site = #{site} and bu_no = #{buNo} and template_id = #{templateId} and item_no = #{itemNo} |
|
|
|
</delete> |
|
|
|
|
|
|
|
<delete id="deleteInspectionStandard2" parameterType="QcTemplateData"> |
|
|
|
<delete id="deleteInspectionStandard2" parameterType="com.xujie.sys.modules.pms.data.QcTemplateData"> |
|
|
|
delete from qc_inspection_standards |
|
|
|
where site = #{site} and bu_no = #{buNo} and template_id = #{templateId} and item_no = #{itemNo} |
|
|
|
</delete> |
|
|
|
@ -3887,7 +3887,7 @@ |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<select id="getInspectionTemplateDetail" parameterType="QcFAIRecordData" resultType="QcInspectionStandardData"> |
|
|
|
<select id="getInspectionTemplateDetail" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData" resultType="com.xujie.sys.modules.pms.data.QcInspectionStandardData"> |
|
|
|
select |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
@ -3909,7 +3909,7 @@ |
|
|
|
order by order_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="updateEquipmentDataDetailInspectionNo" parameterType="SubDetailValues">getUpItemdata |
|
|
|
<update id="updateEquipmentDataDetailInspectionNo" parameterType="com.xujie.sys.modules.pms.data.SubDetailValues">getUpItemdata |
|
|
|
update Equipment_data_detail |
|
|
|
set inspection_no = #{inspectionNo} |
|
|
|
where id = #{id} |
|
|
|
@ -3921,8 +3921,13 @@ |
|
|
|
</delete> |
|
|
|
|
|
|
|
<select id="getUpItemdata" resultType="com.xujie.sys.modules.pms.data.QcTemplateData"> |
|
|
|
select top 1 site,bu_no,template_id,ItemNo, |
|
|
|
order_id |
|
|
|
select |
|
|
|
top 1 |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
template_id, |
|
|
|
ItemNo, |
|
|
|
order_id |
|
|
|
from qc_template_detailed |
|
|
|
where #{orderId} > order_id |
|
|
|
and site = #{site} |
|
|
|
@ -3933,46 +3938,86 @@ |
|
|
|
|
|
|
|
|
|
|
|
<select id="getDownItemdata" resultType="com.xujie.sys.modules.pms.data.QcTemplateData"> |
|
|
|
select top 1 site,bu_no,template_id,ItemNo, |
|
|
|
order_id |
|
|
|
select |
|
|
|
top 1 |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
template_id, |
|
|
|
ItemNo, |
|
|
|
order_id |
|
|
|
from qc_template_detailed |
|
|
|
where order_id > #{orderId} |
|
|
|
and site = #{site} |
|
|
|
and bu_no= #{buNo} |
|
|
|
and template_id = #{templateId} |
|
|
|
and site = #{site} |
|
|
|
and bu_no= #{buNo} |
|
|
|
and template_id = #{templateId} |
|
|
|
order by order_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="updateQcItemOrder"> |
|
|
|
<update id="updateQcItemOrder"> |
|
|
|
update qc_template_detailed |
|
|
|
set order_id=#{orderId} |
|
|
|
where site = #{site} |
|
|
|
and bu_no= #{buNo} |
|
|
|
and template_id = #{templateId} |
|
|
|
and ItemNo = #{itemNo} |
|
|
|
and bu_no= #{buNo} |
|
|
|
and template_id = #{templateId} |
|
|
|
and ItemNo = #{itemNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="getQCDetailOrderId" resultType="Integer"> |
|
|
|
<select id="getQCDetailOrderId" resultType="Integer"> |
|
|
|
SELECT isnull(max(order_id), 0) + 1 |
|
|
|
from qc_template_detailed |
|
|
|
where site = #{site} |
|
|
|
and bu_no= #{buNo} |
|
|
|
and template_id = #{templateId} |
|
|
|
where site = #{site} |
|
|
|
and bu_no= #{buNo} |
|
|
|
and template_id = #{templateId} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="updateQCDetailOrderIdNull"> |
|
|
|
|
|
|
|
UPDATE qc_template_detailed |
|
|
|
SET qc_template_detailed.order_id = oi.rn |
|
|
|
FROM ( SELECT |
|
|
|
site,bu_no, |
|
|
|
template_id, |
|
|
|
ItemNo, |
|
|
|
ROW_NUMBER() OVER (PARTITION BY site,bu_no,template_id ORDER BY ItemNo) AS rn |
|
|
|
FROM |
|
|
|
qc_template_detailed )as oi where qc_template_detailed.template_id = oi.template_id AND qc_template_detailed.ItemNo = oi.ItemNo and |
|
|
|
qc_template_detailed.order_id is null |
|
|
|
UPDATE qc_template_detailed |
|
|
|
SET qc_template_detailed.order_id = oi.rn |
|
|
|
FROM (SELECT |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
template_id, |
|
|
|
ItemNo, |
|
|
|
ROW_NUMBER() OVER (PARTITION BY site,bu_no,template_id ORDER BY ItemNo) AS rn |
|
|
|
FROM qc_template_detailed |
|
|
|
) as oi |
|
|
|
where qc_template_detailed.template_id = oi.template_id |
|
|
|
AND qc_template_detailed.ItemNo = oi.ItemNo |
|
|
|
and qc_template_detailed.order_id is null |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectInfoByInspectionNo" resultType="com.xujie.sys.modules.pms.data.PoOrderRollNoData" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
select |
|
|
|
site, |
|
|
|
citem_code, |
|
|
|
inspection_no |
|
|
|
from po_order_roll_no |
|
|
|
where site = #{site} and citem_code = #{buNo} and inspection_no = #{inspectionNo} |
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="updateIQCMasterSubmitFlag2" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
UPDATE qc_iqc_record |
|
|
|
SET submit_flag = 'N', |
|
|
|
state = '待检验' |
|
|
|
WHERE inspection_no = #{inspectionNo} and site = #{site} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateIQCDetailSubmitFlag2" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
UPDATE qc_iqc_detailed_record |
|
|
|
SET is_submit = 'N' |
|
|
|
WHERE inspection_no = #{inspectionNo} and site = #{site} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateIQCSubDetailSubmitFlag2" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
UPDATE qc_iqc_sub_detail_record |
|
|
|
SET is_submit = 'N' |
|
|
|
WHERE inspection_no = #{inspectionNo} and site = #{site} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<delete id="deleteReceivingTaskByInspectionNo" parameterType="com.xujie.sys.modules.pms.data.QcFAIRecordData"> |
|
|
|
delete receiving_task |
|
|
|
where site = #{site} and citem_code = #{buNo} and inspection_no = #{inspectionNo} |
|
|
|
</delete> |
|
|
|
</mapper> |
|
|
|
|
|
|
|
|
|
|
|
|