|
|
|
@ -304,6 +304,80 @@ |
|
|
|
AND pi.status='N' and pi.LabelType like '产品标签%' AND ComputerName=#{ip} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getJLPackagePrintData" resultType="com.heai.modules.production.entity.PackagePrintData"> |
|
|
|
Select |
|
|
|
|
|
|
|
T.Site, |
|
|
|
|
|
|
|
T.ReceiptNo+'-'+Convert(Varchar(4),T.ItemNo) as TransNo, |
|
|
|
|
|
|
|
T.InspectItemNo as ItemNo, |
|
|
|
|
|
|
|
PD.PartNo,dbo.Get_PartDesc(T.Site,PD.PartNo) as PartDesc, |
|
|
|
|
|
|
|
dbo.Get_Part_Spec(T.Site,PD.PartNo) as PartSpec, |
|
|
|
|
|
|
|
dbo.Get_Part_UMID(T.Site,PD.PartNo) as umid , |
|
|
|
|
|
|
|
T.InspectItemNo as SeqNo, |
|
|
|
|
|
|
|
T.Remark,'' as OrderRef4, |
|
|
|
|
|
|
|
Convert(Datetime,Convert(Integer,Convert(Float,T.InspectDate))) as ReceiveDate, |
|
|
|
|
|
|
|
'' as SiteName, |
|
|
|
|
|
|
|
PD.OrderNo as BatchNo, |
|
|
|
|
|
|
|
T.Inspector as Inspector, |
|
|
|
|
|
|
|
s.Address_E as siteAdress , |
|
|
|
|
|
|
|
'Phone:'+s.PhoneNo+' Email:'+s.Email as sitePhone, |
|
|
|
|
|
|
|
convert(varchar(100),isnull(V.TextValue,'')) as bilNote, |
|
|
|
|
|
|
|
pi.id, |
|
|
|
|
|
|
|
pi.printQty, |
|
|
|
|
|
|
|
pi.UnitQty, |
|
|
|
|
|
|
|
SUBSTRING(LabelType, 5, 10) code, |
|
|
|
|
|
|
|
pi.KeyInfo_Str1 as keyInfoStr1, |
|
|
|
|
|
|
|
pi.KeyInfo_Str2 as keyInfoStr2 |
|
|
|
|
|
|
|
from POInspect as T |
|
|
|
|
|
|
|
left join print_info pi on pi.Site=T.site and pi.status!='Y' and pi.orderRef1=T.ReceiptNo and pi.orderRef2=CONVERT(VARCHAR(10),T.ItemNo ) |
|
|
|
|
|
|
|
and pi.orderRef3=CONVERT(VARCHAR(10),T.InspectItemNo) |
|
|
|
|
|
|
|
,POReceiptDetail as PD |
|
|
|
|
|
|
|
,Part as P |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Left Join PartSubPropertiesValue as V |
|
|
|
|
|
|
|
On P.Site=V.Site and P.PartNo=V.PartNo and P.CodeNo=V.CodeNo and V.SubCodeSeqNo=1 and V.RecordType='P' and V.PropertiesItemNo='BILNOTE' |
|
|
|
|
|
|
|
,Site as S |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where T.Site=S.SiteID and T.Site=PD.Site and T.ReceiptNo=PD.ReceiptNo and T.ItemNo=PD.ItemNo |
|
|
|
|
|
|
|
and PD.Site=P.Site and PD.PartNo=P.PartNo |
|
|
|
|
|
|
|
AND pi.status='N' and pi.LabelType like '进料产品标签%' |
|
|
|
|
|
|
|
AND ComputerName=#{ip} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getSopAddress" resultType="com.heai.modules.production.entity.TvSopBaseData"> |
|
|
|
select tv_id,work_station,now_seqNo,now_operator,PartNo,RevNo,ItemNo,Site,colourFlag from tv_sop_base where tv_id=#{tvId} |
|
|
|
</select> |
|
|
|
|