|
|
@ -833,7 +833,8 @@ namespace ICSSoft.DataProject |
|
|
|
FROM ICSWareHouseLotInfoLog a |
|
|
|
INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint |
|
|
|
INNER JOIN ICSOApplyNegDetail c ON b.TransCode=c.OApplyNegCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint |
|
|
|
WHERE c.SourceDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' |
|
|
|
Left JOIN ICSOIssue m ON c.SourceDetailID=m.IssueDetailID AND c.WorkPoint=m.WorkPoint |
|
|
|
WHERE ISNULL(m.ApplyDetailID,ISNULL(m.PickID, c.SourceDetailID))='{0}' AND a.Identification='{1}' AND ERPUpload='0' |
|
|
|
--根据原条码退料-备料表 |
|
|
|
UPDATE a set ERPID='{2}',ERPDetailID='{3}',ERPCode='{4}',ERPSequence='{5}',ERPUpload='1' |
|
|
|
FROM ICSWareHouseLotInfoLog a |
|
|
@ -855,7 +856,7 @@ namespace ICSSoft.DataProject |
|
|
|
LEFT JOIN ICSOOPick x ON m.PickID=x.PickID AND m.WorkPoint=x.WorkPoint |
|
|
|
LEFT JOIN ICSOutsourcingOrder y ON x.OODetailID=y.OODetailID AND x.WorkPoint=y.WorkPoint |
|
|
|
LEFT JOIN ICSOApply z ON m.ApplyDetailID=z.ApplyDetailID AND m.WorkPoint=z.WorkPoint |
|
|
|
WHERE ISNULL(m.PickID, m.ApplyDetailID)='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' |
|
|
|
WHERE ISNULL(m.ApplyDetailID, m.PickID)='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' |
|
|
|
";
|
|
|
|
} |
|
|
|
//委外入库
|
|
|
@ -897,7 +898,8 @@ namespace ICSSoft.DataProject |
|
|
|
FROM ICSWareHouseLotInfoLog a |
|
|
|
INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint |
|
|
|
INNER JOIN ICSMOApplyNegDetail c ON b.TransCode=c.ApplyNegCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint |
|
|
|
WHERE c.SourceDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' |
|
|
|
left JOIN ICSMOIssue m ON c.SourceDetailID=m.IssueDetailID AND c.WorkPoint=m.WorkPoint |
|
|
|
WHERE ISNULL(m.ApplyDetailID, ISNULL(m.PickID, c.SourceDetailID))='{0}' AND a.Identification='{1}' AND ERPUpload='0' |
|
|
|
--根据原条码退料-备料表 |
|
|
|
UPDATE a set ERPID='{2}',ERPDetailID='{3}',ERPCode='{4}',ERPSequence='{5}',ERPUpload='1' |
|
|
|
FROM ICSWareHouseLotInfoLog a |
|
|
@ -919,7 +921,7 @@ namespace ICSSoft.DataProject |
|
|
|
LEFT JOIN ICSMOPick x ON m.PickID=x.PickID AND m.WorkPoint=x.WorkPoint |
|
|
|
LEFT JOIN ICSMO y ON x.MODetailID=y.MODetailID AND x.WorkPoint=y.WorkPoint |
|
|
|
LEFT JOIN ICSMOApply z ON m.ApplyDetailID=z.ApplyDetailID AND m.WorkPoint=z.WorkPoint |
|
|
|
WHERE ISNULL(m.PickID, m.ApplyDetailID)='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' |
|
|
|
WHERE ISNULL(m.ApplyDetailID, m.PickID)='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' |
|
|
|
";
|
|
|
|
} |
|
|
|
//生产入库
|
|
|
|