| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138 |
- {
- "pr_WMS_SavePrepareMaterial": {
- "empty": false,
- "def_len": 12157,
- "updates": {
- "NbrMaster": [
- "Status",
- "Remark",
- "UpdateTime",
- "UpdateUser"
- ],
- "NbrDetail": [
- "QtyFrom",
- "PUfld3",
- "User1",
- "UpdateTime",
- "UpdateUser"
- ],
- "MissedPrint": [
- "OrdNbr",
- "WorkOrd",
- "PickQty",
- "Status",
- "PeriodChar",
- "UpdateTime",
- "UpdateUser"
- ]
- },
- "inserts": {
- "EmpWorkWmsHist": [
- "Domain",
- "TransNum",
- "Employee",
- "Type",
- "OrdNbr",
- "OrdLine",
- "ItemNum",
- "Descr",
- "Descr1",
- "LabelRecID",
- "BarCode",
- "LotSerial",
- "Location",
- "Shelf",
- "Status",
- "Qty",
- "WorkOrd",
- "WoLot",
- "Ufld1",
- "ProdDate",
- "Period",
- "User1",
- "Reason",
- "CreateUser",
- "UpdateUser",
- "CreateTime",
- "UpdateTime"
- ]
- },
- "nested": [
- "pr_SFM_GetSequenceID",
- "pr_WMS_BPM_DelMobileTask"
- ],
- "update_snippets": [
- "update NbrDetail set QtyFrom=IsNull(d.QtyFrom,0)+t.Qty ,PUfld3=(case when IsNull(d.PUfld3,'')='' then '' else d.PUfld3+'|' end)+t.PUfld3 ,User1=@UserNo ,UpdateTime=@CurTime ,UpdateUser=@UserNo from NbrDetail d,(select n.RecID,n.PUfld3,sum(m.NewQty) as Qty from #nbrDetails n left join #missedPrint m on n.ItemNum=m.ItemNum and n.RecID=m.NbrDetailRecI",
- "update NbrMaster set Status='C' ,Remark=(case when IsNull(Remark,'')<>'' then Remark+',' else '' end)+'手工关闭' ,UpdateTime=getdate() ,UpdateUser=@UserNo where Domain=@Domain and Nbr=@Nbr select 1 as Success,'保存成功!' as Msg exec pr_WMS_BPM_DelMobileTask @TaskID=@Nbr, @IsProcCall=1, @ReturnMsg=@Msg output return end declare @IsInvFixed bit,@IsShelfAcc b",
- "update NbrMaster set Status=case when Status='C' then 'C' else 'A' end ,UpdateTime=getdate() ,UpdateUser=@UserNo where RecID=(select top 1 NbrRecID from #nbrDetails) update NbrDetail set QtyFrom=IsNull(d.QtyFrom,0)+t.Qty ,PUfld3=(case when IsNull(d.PUfld3,'')='' then '' else d.PUfld3+'|' end)+t.PUfld3 ,User1=@UserNo ,UpdateTime=@CurTime ,UpdateUser",
- "update MissedPrint set OrdNbr=@Nbr ,WorkOrd=t.DetWorkOrd ,PickQty=m.PickQty+t.NewQty ,Status=(case when m.Type='Card' then m.Status else 'A' end) ,PeriodChar=m.Status ,UpdateTime=@CurTime ,UpdateUser=@UserNo from MissedPrint m,(select RecID,sum(NewQty) as NewQty,max(DetWorkOrd) as DetWorkOrd from #missedPrint group by RecID) t where m.RecID=t.RecID"
- ]
- },
- "pr_WMS_SaveWorkOrdMaterialIssue": {
- "empty": false,
- "def_len": 45667,
- "updates": {
- "NbrMaster": [
- "SignTime",
- "User1",
- "UpdateTime",
- "UpdateUser",
- "Status",
- "IsConfirm"
- ],
- "NbrDetail": [
- "PUfld3",
- "PUfld2",
- "QtyFrom",
- "QtyRec",
- "Status",
- "IsConfirm",
- "SignTime",
- "User1",
- "UpdateTime",
- "UpdateUser"
- ],
- "WorkOrdDetail": [
- "QtyPosted",
- "UpdateTime",
- "UpdateUser"
- ],
- "MissedPrint": [
- "BarCode",
- "Qty",
- "CompQty",
- "QtyIssued",
- "OrdNbr",
- "PickQty",
- "QtyChange",
- "Status",
- "PeriodChar",
- "Location",
- "UpdateTime",
- "UpdateUser"
- ],
- "PurOrdRctDetail": [
- "RctQty"
- ]
- },
- "inserts": {
- "EmpWorkWmsHist": [
- "Domain",
- "TransNum",
- "Employee",
- "Type",
- "OrdNbr",
- "OrdLine",
- "ItemNum",
- "Descr",
- "LotSerial",
- "Location",
- "Qty",
- "WorkOrd",
- "Remark",
- "Reason",
- "LabelRecID",
- "ProdDate",
- "User1",
- "BarCode",
- "StartTime",
- "EndTime",
- "CreateUser",
- "UpdateUser",
- "CreateTime",
- "UpdateTime"
- ]
- },
- "nested": [
- "pr_SFM_CheckInventoryStatus",
- "pr_SFM_GetSequenceID",
- "pr_SFM_InventoryTransactionProcessing2",
- "pr_WMS_BPM_DelMobileTask",
- "pr_WMS_BPM_RctPurOrdAndPurOrdByBarcode",
- "pr_WMS_CreateBarCodeCard"
- ],
- "update_snippets": [
- "update NbrDetail set PUfld3=(case when @IsOutBatch=0 then '' else d.PUfld3 end) ,PUfld2=IsNull(t.PUfld2,'') ,QtyFrom=(case when @IsOutBatch=0 then 0 else d.QtyFrom end) ,QtyRec=d.QtyRec+t.QtyFrom ,Status=(case when d.QtyRec+t.QtyFrom>=d.QtyOrd then 'C' else '' end) ,IsConfirm=(case when d.QtyRec+t.QtyFrom>=d.QtyOrd then 1 else 0 end) ,SignTime=@Cur",
- "update NbrMaster set SignTime=@CurTime ,User1=@UserNo ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and Nbr=@Nbr update NbrDetail set PUfld3=(case when @IsOutBatch=0 then '' else d.PUfld3 end) ,PUfld2=IsNull(t.PUfld2,'') ,QtyFrom=(case when @IsOutBatch=0 then 0 else d.QtyFrom end) ,QtyRec=d.QtyRec+t.QtyFrom ,Status=(case when d.QtyR",
- "update NbrMaster set Status='C' ,IsConfirm=1 ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and Nbr=@Nbr else begin if not exists(select * from NbrDetail where Domain=@Domain and Nbr=@Nbr and QtyFrom>0) update NbrMaster set Status='' ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and Nbr=@Nbr end declare @tbMissedRecID",
- "update MissedPrint set BarCode=BarCode+convert(varchar(10),RecID) where RecID in(select RecID from @tbMissedRecID) end declare @tbMissedPrints table(DetRecID int,LocationFrom varchar(30),NewQty decimal(18,5),IsRctVMI bit,LotSerial varchar(100),ItemLocation varchar(30),InsSampleQty decimal(18,5)) if(@IsErpToLotSerial='1') begin insert @tbMissedPrint",
- "update MissedPrint set Qty=t.NewQty+t.InsSampleQty from MissedPrint m,#missedPrints t where m.RecID=t.RecID and t.IsRctVMI=1 update @tbPurOrdRcts set RctQty=t.RctQty+m.InsSampleQty from @tbPurOrdRcts t,#missedPrints m where t.LabRecID=m.RecID and m.IsRctVMI=1 update @tbPurOrdRcts set LabRecID=m.RecID from @tbPurOrdRcts t,@tbMissedRecID m where t.La",
- "update MissedPrint set Qty=t.BarcodeQty-t.InsSampleQty,CompQty=0,QtyIssued=0 from MissedPrint m,#missedPrints t where m.RecID=t.RecID and t.IsRctVMI=1 update PurOrdRctDetail set RctQty=d.RctQty+t.UseQty from PurOrdRctDetail d,@tbRctDets t where d.RecID=t.RecID and t.UseQty>0 delete @Inventorys insert @Inventorys( TransType ,OrderNbr ,OrdLine ,Sales",
- "update MissedPrint set OrdNbr=(case when @IsOutBatch=0 and (m.Qty<>t.NewQty or t.IsCard=1) then '' else m.OrdNbr end) ,PickQty=(case when @IsOutBatch=0 and (m.Qty<>t.NewQty or t.IsCard=1) then m.PickQty-t.NewQty else m.PickQty end) ,Qty=(case when m.Qty<>t.NewQty or t.IsCard=1 or (t.IsBarcodeTurnover=1 and IsMainMas=0) then m.Qty-t.NewQty else m.Qt",
- "update MissedPrint set Qty=m.Qty+t.NewQty ,QtyChange=t.NewQty ,UpdateTime=@CurTime ,UpdateUser=@UserNo from MissedPrint m,(select ToRecID,sum(NewQty) as NewQty from #missedPrints where ToRecID>0 group by ToRecID) t where m.RecID=t.ToRecID insert MissedPrintTransHist( Domain ,Product ,ItemNum ,Descr ,BarCode ,Qty ,QtyChange ,PurQty ,Carton ,ProdDate",
- "update WorkOrdDetail set QtyPosted=w.QtyPosted+d.QtyFrom ,UpdateTime=@CurTime ,UpdateUser=@UserNo from WorkOrdDetail w,#nbrDetails d where w.RecID=d.WorkOrdDetailRecID if not exists(select * from NbrDetail where Domain=@Domain and Nbr=@Nbr and IsNull(Status,'')<>'C') update NbrMaster set Status='C' ,IsConfirm=1 ,UpdateTime=@CurTime ,UpdateUser=@Use"
- ]
- },
- "pr_WMS_SaveWorkOrdMaterialIssueByQty": {
- "empty": false,
- "def_len": 16734,
- "updates": {
- "NbrMaster": [
- "SignTime",
- "User1",
- "UpdateTime",
- "UpdateUser",
- "Status",
- "IsConfirm"
- ],
- "NbrDetail": [
- "QtyRec",
- "Status",
- "IsConfirm",
- "SignTime",
- "User1",
- "UpdateTime",
- "UpdateUser"
- ]
- },
- "inserts": {},
- "nested": [
- "pr_SFM_CheckInventoryStatus",
- "pr_SFM_GetSequenceID",
- "pr_SFM_InventoryTransactionProcessing2",
- "pr_WMS_BPM_DelMobileTask"
- ],
- "update_snippets": [
- "update NbrDetail set QtyRec=d.QtyRec+t.NewQty ,Status=(case when d.QtyRec+t.NewQty>=d.QtyOrd then 'C' else '' end) ,IsConfirm=(case when d.QtyRec+t.NewQty>=d.QtyOrd then 1 else 0 end) ,SignTime=@CurTime ,User1=@UserNo ,UpdateTime=@CurTime ,UpdateUser=@UserNo from NbrDetail d,#nbrDetails t where d.RecID=t.RecID if not exists(select * from NbrDetail ",
- "update NbrMaster set SignTime=@CurTime ,User1=@UserNo ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and Nbr=@Nbr update NbrDetail set QtyRec=d.QtyRec+t.NewQty ,Status=(case when d.QtyRec+t.NewQty>=d.QtyOrd then 'C' else '' end) ,IsConfirm=(case when d.QtyRec+t.NewQty>=d.QtyOrd then 1 else 0 end) ,SignTime=@CurTime ,User1=@UserNo ,Up",
- "update NbrMaster set Status='C' ,IsConfirm=1 ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and Nbr=@Nbr declare @Inventorys InventoryTVP insert @Inventorys( TransType ,OrderNbr ,OrdLine ,SalesOrder ,Site ,Location ,LocationTo ,LotSerial ,ItemNumber ,Dimension1 ,Dimension2 ,ChangeQty ,Address ,Batch ,EffTime ,Dated ,Remark ,Reason "
- ]
- },
- "pr_WMS_SaveWorkOrdMaterialConfirm": {
- "empty": true,
- "alts": []
- },
- "pr_WMS_BPM_SaveCancelPrepareMaterial": {
- "empty": false,
- "def_len": 4852,
- "updates": {
- "NbrDetail": [
- "QtyFrom",
- "PUfld3",
- "UpdateTime",
- "UpdateUser"
- ],
- "NbrMaster": [
- "Status",
- "UpdateTime",
- "UpdateUser"
- ],
- "MissedPrint": [
- "OrdNbr",
- "PickQty",
- "Status",
- "PeriodChar",
- "UpdateTime",
- "UpdateUser"
- ]
- },
- "inserts": {},
- "nested": [],
- "update_snippets": [
- "update NbrDetail set QtyFrom=0 ,PUfld3='' ,UpdateTime=@CurTime ,UpdateUser=@UserNo where RecID=@RecID if not exists(select RecID from NbrDetail where Domain=@Domain and Nbr=@Nbr and QtyFrom>0) update NbrMaster set Status='' ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and Nbr=@Nbr update MissedPrint set OrdNbr='' ,PickQty=m.PickQty",
- "update NbrMaster set Status='' ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and Nbr=@Nbr update MissedPrint set OrdNbr='' ,PickQty=m.PickQty-t.NewQty ,Status=(case when m.PeriodChar='R' then m.PeriodChar when m.PickQty>t.NewQty then m.Status else 'N' end) ,PeriodChar='' ,UpdateTime=@CurTime ,UpdateUser=@UserNo from MissedPrint m,#m",
- "update MissedPrint set OrdNbr='' ,PickQty=m.PickQty-t.NewQty ,Status=(case when m.PeriodChar='R' then m.PeriodChar when m.PickQty>t.NewQty then m.Status else 'N' end) ,PeriodChar='' ,UpdateTime=@CurTime ,UpdateUser=@UserNo from MissedPrint m,#missedPrint t where m.RecID=t.RecID insert MissedPrintTransHist( Domain ,Product ,ItemNum ,Descr ,BarCode ,"
- ]
- },
- "pr_WMS_CreateBarCodeCard": {
- "empty": false,
- "def_len": 3244,
- "updates": {},
- "inserts": {
- "MissedPrint": [
- "Domain",
- "LabelFormat",
- "Printer",
- "Product",
- "ItemNum",
- "Descr",
- "BarCode",
- "Qty",
- "PrintTime",
- "Checker",
- "IsMiss",
- "CreateUser",
- "UpdateUser",
- "CreateTime",
- "UpdateTime",
- "Carton",
- "ProdDate",
- "FirmString5",
- "PCName",
- "Remark",
- "Period",
- "PeriodDate",
- "Location",
- "Shelf",
- "Site",
- "Status",
- "Type",
- "CartonQty"
- ]
- },
- "nested": [],
- "update_snippets": []
- },
- "pr_SFM_InventoryTransactionProcessing2": {
- "empty": false,
- "def_len": 16969,
- "updates": {
- "InvMaster": [
- "ABCClass",
- "AvgInt",
- "AverageSales",
- "CycCntInt",
- "LastIssue",
- "MRPRequired",
- "QOHNonnettable",
- "QtyChange",
- "QtyOnHand",
- "AvailStatusQty",
- "Assay",
- "FreezeQty",
- "QtyOnOrd",
- "WORcptActive",
- "PORcptActive",
- "LastRct",
- "RollupReqd",
- "EffTime",
- "IsActive",
- "IsConfirm",
- "UpdateTime",
- "UpdateUser"
- ],
- "ItemMaster": [
- "Location"
- ],
- "LocationDetail": [
- "QtyPicked",
- "DateCreated",
- "QtyOnHand",
- "AvailStatusQty",
- "Assay",
- "FreezeQty",
- "InvStatus",
- "EffTime",
- "Ufld1",
- "Cost",
- "IsActive",
- "IsConfirm",
- "UpdateTime",
- "UpdateUser"
- ]
- },
- "inserts": {
- "InvMaster": [
- "Domain",
- "Site",
- "ItemNum",
- "Location",
- "Dimension1",
- "Dimension2",
- "CreateTime",
- "CreateUser"
- ],
- "LocationDetail": [
- "Domain",
- "Site",
- "Location",
- "LotSerial",
- "Refs",
- "ItemNum",
- "Dimension1",
- "Dimension2",
- "CreateTime",
- "CreateUser"
- ]
- },
- "nested": [],
- "update_snippets": []
- },
- "pr_SFM_SaveWorkOrdChooseByOpData": {
- "empty": false,
- "def_len": 32483,
- "updates": {
- "WorkOrdMaster": [
- "Status",
- "OrdDate",
- "UpdateTime",
- "UpdateUser"
- ],
- "WorkOrdRouting": [
- "Status",
- "Ufld1",
- "UpdateTime",
- "UpdateUser",
- "Ufld2"
- ],
- "PeriodSequenceDet": [
- "Status",
- "UpdateTime",
- "UpdateUser"
- ],
- "LineStatusDet": [
- "ReleaseQty",
- "Employee",
- "EmployeeName",
- "WorkOrd",
- "OP",
- "UpdateTime",
- "ItemNum",
- "ID",
- "ProdDate",
- "PlanDate",
- "Period",
- "ParItemDesc",
- "CompItemDesc",
- "CompItemDesc1",
- "UChar1",
- "UChar2",
- "UChar3",
- "SalesOrd",
- "SetupStd",
- "RunStd",
- "BOMqty",
- "ScrapeStd",
- "WorkCtr",
- "Machine",
- "IsActive",
- "Dimension1",
- "BusinessID",
- "ItemLineNum",
- "IsNoWorkOrdPlan",
- "RoutingVer"
- ]
- },
- "inserts": {
- "WorkOrdMaster": [
- "Domain",
- "Site",
- "WorkOrd",
- "Batch",
- "ID",
- "Typed",
- "WoTyped",
- "Status",
- "ItemNum",
- "BOMFormula",
- "RoutingCode",
- "OrdDate",
- "QtyOrded",
- "Period",
- "Active",
- "IsActive",
- "IsConfirm",
- "CreateUser",
- "CreateTime",
- "UpdateUser",
- "UpdateTime"
- ],
- "WorkOrdRouting": [
- "Domain",
- "WorkOrd",
- "ID",
- "OP",
- "WorkOp",
- "Descr",
- "Status",
- "MilestoneOp",
- "ItemNum",
- "QtyOrded",
- "StartDate",
- "WorkCtr",
- "IsUseTurnoverBox",
- "IsActive",
- "IsConfirm",
- "CreateUser",
- "CreateTime",
- "UpdateUser",
- "UpdateTime"
- ],
- "WorkOrdDetail": [
- "Domain",
- "Site",
- "WorkOrd",
- "ID",
- "Op",
- "Line",
- "ItemNum",
- "FrozenBOMQty",
- "QtyRequired",
- "LoadedfromMO",
- "IsActive",
- "IsConfirm",
- "CreateUser",
- "CreateTime",
- "UpdateUser",
- "UpdateTime"
- ]
- },
- "nested": [
- "pr_SFM_AccPeriodSequenceDet",
- "pr_SFM_CreateLineLostSerial",
- "pr_SFM_GetSequenceID",
- "pr_SFM_SaveOpenLineConditions"
- ],
- "update_snippets": [
- "update WorkOrdMaster set Status='W',OrdDate=@CurTime,UpdateTime=@CurTime,UpdateUser=@UserNo from WorkOrdMaster w,#workOrdMaster t where w.RecID=t.RecID update WorkOrdRouting set Status='W',Ufld1=null,UpdateTime=@CurTime,UpdateUser=@UserNo where RecID in(select RecID from #workOrdRouting where RecID is not null) if @IsAssistLine=0 update PeriodSeque",
- "update WorkOrdRouting set Status='W',Ufld1=null,UpdateTime=@CurTime,UpdateUser=@UserNo where RecID in(select RecID from #workOrdRouting where RecID is not null) if @IsAssistLine=0 update PeriodSequenceDet set Status='W',UpdateTime=@CurTime,UpdateUser=@UserNo where RecID in(select PeriodRecID from #periodSequenceDet) declare @tbLineDet table(ID int ",
- "update WorkOrdRouting set Status=(case when QtyComplete>=QtyOrded then 'C' else 'W' end),Ufld2='A' where RecID=(select RecID from #workOrdRouting where RecID is not null) end update LineStatusDet set ReleaseQty=ReleaseQty+IsNull(w.QtyOrd,0) ,Employee=@UserNo ,EmployeeName=@UserName ,WorkOrd=(case when w.WorkOrd='' then w.OtherWorkOrd else w.WorkOrd",
- "update PeriodSequenceDet set Status='W',UpdateTime=@CurTime,UpdateUser=@UserNo where RecID in(select PeriodRecID from #periodSequenceDet) declare @tbLineDet table(ID int identity(1,1),RecID int,Domain varchar(20),Site varchar(20),ItemNum varchar(50),PlanDate datetime,WorkCtr varchar(20),Line varchar(20),WorkOrd varchar(50),Op varchar(10),RoutingVer",
- "update LineStatusDet set ReleaseQty=ReleaseQty+IsNull(w.QtyOrd,0) ,Employee=@UserNo ,EmployeeName=@UserName ,WorkOrd=(case when w.WorkOrd='' then w.OtherWorkOrd else w.WorkOrd end) ,OP=w.Op ,UpdateTime=@CurTime ,ItemNum=w.ItemNum ,ID=w.ID ,ProdDate=@ProdDate ,PlanDate=w.PlanDate ,Period=@Period ,ParItemDesc=left(w.Descr+w.Descr1,60) ,CompItemDesc=w"
- ]
- },
- "pr_SFM_SaveWorkOrdChooseByRWData": {
- "empty": false,
- "def_len": 5249,
- "updates": {
- "PeriodSequenceDet": [
- "OrdQty",
- "UDate1",
- "UpdateTime",
- "UpdateUser"
- ]
- },
- "inserts": {
- "PeriodSequenceDet": [
- "Domain",
- "Site",
- "WorkOrds",
- "ItemNum",
- "Op",
- "Line",
- "ProdDate",
- "PlanDate",
- "Period",
- "Sequence",
- "OrdQty",
- "UChar5",
- "UDate1",
- "CreateTime",
- "UpdateTime",
- "CreateUser",
- "UpdateUser"
- ]
- },
- "nested": [],
- "update_snippets": [
- "update PeriodSequenceDet set OrdQty=OrdQty+@PlanQty ,UDate1=case when UDate1 is null then @CurTime else UDate1 end ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and Line=@Line and ItemNum=@PItemNum and PlanDate=@ProdDate and Period=@Period and ProdDate=@ProdDate if @@ROWCOUNT=0 insert PeriodSequenceDet( Domain ,Site ,WorkOrds ,ItemN"
- ]
- },
- "pr_SFM_SaveEmployeeWorkStatus": {
- "empty": false,
- "def_len": 16785,
- "updates": {
- "EmployeeStatus": [
- "StartTime",
- "WorkStatus",
- "EmploymentStatus",
- "JOBNo",
- "JOBDescr",
- "WorkLocation",
- "UpdateTime",
- "UpdateUser",
- "InductionNum",
- "WorkTime"
- ],
- "LineStatusDet": [
- "Employee",
- "EmployeeName"
- ],
- "PeriodSequenceDet": [
- "UChar3",
- "UChar2"
- ],
- "EmpWorkHist": [
- "EndDate",
- "WorkTime",
- "UpdateUser",
- "UpdateTime",
- "WorkOrd",
- "ID",
- "ItemNum",
- "ProdTime2",
- "RestTime2",
- "UDate1"
- ]
- },
- "inserts": {
- "EmployeeStatus": [
- "Domain",
- "Employee",
- "Name",
- "StartTime",
- "WorkStatus",
- "EmploymentStatus",
- "JOBNo",
- "JOBDescr",
- "WorkLocation",
- "JobTitle",
- "InductionNum",
- "CreateTime",
- "CreateUser",
- "UpdateTime",
- "UpdateUser"
- ],
- "EmpWorkHist": [
- "JOBNo",
- "JOBDescr",
- "StartDate",
- "Employee",
- "EmployeeName",
- "ProdDate",
- "Line",
- "Period",
- "OP",
- "WorkOrd",
- "ID",
- "ItemNum",
- "Domain",
- "Site",
- "UpdateTime",
- "UpdateUser",
- "CreateTime",
- "CreateUser",
- "PerDate",
- "UDate3",
- "InductionNum",
- "PlanDate",
- "EndDate",
- "WorkTime"
- ]
- },
- "nested": [
- "pr_SFM_SavePlanDownTimeAndActualTime"
- ],
- "update_snippets": [
- "update PeriodSequenceDet set UChar3=(case when IsNull(UChar3,'')='' then @LineEmployees else UChar3 end), UChar2=(case when IsNull(UChar3,'')='' then @LineEmployeeNames else UChar2 end) from PeriodSequenceDet p,#lineStatusDet s where p.Domain=s.Domain and p.Line=s.Line and p.Period=s.Period and p.PlanDate=s.PlanDate and p.Op=cast(s.OP as int) and p",
- "update LineStatusDet set Employee=@LineEmployees,EmployeeName=@LineEmployeeNames from LineStatusDet d,#lineStatusDet s where d.RecID=s.RecID update PeriodSequenceDet set UChar3=(case when IsNull(UChar3,'')='' then @LineEmployees else UChar3 end), UChar2=(case when IsNull(UChar3,'')='' then @LineEmployeeNames else UChar2 end) from PeriodSequenceDet ",
- "update LineStatusDet set Employee=replace(d.Employee,@LineEmployees,''),EmployeeName=replace(d.EmployeeName,@LineEmployeeNames,'') from LineStatusDet d,#lineStatusDet s where d.RecID=s.RecID declare @ItemNums varchar(max),@EmpWorkHistRecIDs varchar(max) set @ItemNums=(select ItemNum+'|' from #lineStatusDet group by ItemNum for xml path('')) if exis",
- "update EmployeeStatus set StartTime=@CurTime ,WorkStatus='Idle' ,EmploymentStatus='OnDuty' ,JOBNo=@JobNo ,JOBDescr=@JobDescr ,WorkLocation=IsNull(s.WorkLocation,'')+@Line+'-'+convert(varchar(10),e.NewInductionNum)+';' ,JobTitle=null ,InductionNum=s.InductionNum+e.NewInductionNum ,UpdateTime=getdate() ,UpdateUser=@UserNo from EmployeeStatus s,#emplo",
- "update EmployeeStatus set UpdateTime=getdate(),UpdateUser=@UserNo ,InductionNum=case when s.InductionNum-e.NewInductionNum<0 then 0 else s.InductionNum-e.NewInductionNum end ,WorkStatus=case when (s.InductionNum-e.NewInductionNum<0) or ( s.InductionNum-e.NewInductionNum=0) then null else s.WorkStatus end ,JOBDescr=case when (s.InductionNum-e.NewInd",
- "update EmployeeStatus set WorkTime=datediff(second,s.StartTime,@CurTime)/3600.0 ,WorkLocation=replace(s.WorkLocation,h.Line+'-'+convert(varchar(10),h.InductionNum)+';','') from EmployeeStatus s,#empWorkHist h where s.RecID=h.StatusRecID if (@CompanyCode='YCT' and (select count(1)from #lineStatusDet)>1) begin select it.WorkOrd,it.Op into #OpTransEmp"
- ]
- },
- "pr_SFM_LinePlanedStart": {
- "empty": false,
- "def_len": 2612,
- "updates": {
- "LineStatusDet": [
- "ProdTime",
- "SetupTime",
- "RestTime",
- "QCTime",
- "ProdDownTime",
- "NextSetup",
- "AlertCode",
- "Status",
- "ProdType",
- "PrvAlertCode",
- "PrvAlertDescr",
- "PrvProdType",
- "UpdateTime",
- "UpdateUser"
- ],
- "LineRunRestDet": [
- "FinDate",
- "Closed",
- "UpdateTime",
- "UpdateUser",
- "Remark"
- ]
- },
- "inserts": {
- "LineRunRestDet": [
- "Line",
- "Period",
- "Domain",
- "ComeDate",
- "TransType",
- "ProdDate",
- "CreateTime",
- "UpdateTime",
- "CreateUser",
- "UpdateUser",
- "Reason"
- ]
- },
- "nested": [],
- "update_snippets": [
- "update LineStatusDet set ProdTime=ProdTime+(case when [Status]='Run' then datediff(second,NextSetup,@CurTime) else 0 end) ,SetupTime=SetupTime+(case when [Status]='Setup' or ProdType='Setup' then datediff(second,NextSetup,@CurTime) else 0 end) ,RestTime=RestTime+(case when [Status]='Rest' then datediff(second,NextSetup,@CurTime) else 0 end) ,QCTime"
- ]
- },
- "pr_SFM_LinePlanedEnd": {
- "empty": false,
- "def_len": 6045,
- "updates": {
- "LineStatusDet": [
- "ProdTime",
- "SetupTime",
- "RestTime",
- "QCTime",
- "ProdDownTime",
- "NextSetup",
- "AlertCode",
- "Status",
- "ProdType",
- "PrvAlertCode",
- "PrvAlertDescr",
- "UpdateTime",
- "UpdateUser",
- "BeginDT",
- "Endtime",
- "ProdTime4"
- ],
- "LineRunRestDet": [
- "FinDate",
- "Closed",
- "UpdateTime",
- "UpdateUser",
- "Remark"
- ],
- "EmpWorkHist": [
- "RestTime1"
- ]
- },
- "inserts": {
- "LineRunRestDet": [
- "Line",
- "Period",
- "Domain",
- "ComeDate",
- "TransType",
- "ProdDate",
- "CreateTime",
- "UpdateTime",
- "CreateUser",
- "UpdateUser",
- "Reason"
- ]
- },
- "nested": [],
- "update_snippets": [
- "update LineStatusDet set ProdTime=ProdTime+(case when [Status]='Run' then datediff(second,NextSetup,@CurTime) else 0 end) ,SetupTime=SetupTime+(case when [Status]='Setup' or ProdType='Setup' then datediff(second,NextSetup,@CurTime) else 0 end) ,RestTime=RestTime+(case when [Status]='Rest' then datediff(second,NextSetup,@CurTime) else 0 end) ,QCTime",
- "update LineStatusDet set ProdTime=0,ProdTime4=0 where RecID in(select RecID from #lineStatusDets) end update LineRunRestDet set FinDate=@CurTime ,Closed=1 ,UpdateTime=@CurTime ,UpdateUser=@UserNo ,Remark='linePlanedEnd' output inserted.ComeDate into @tbReset where Domain=@Domain and Line=@Line and Closed=0 set @Reset=IsNull(datediff(second,(select "
- ]
- },
- "pr_SFM_RejectsTransactionProcessingByOp": {
- "empty": false,
- "def_len": 2785,
- "updates": {
- "LineStatusDet": [
- "ScrapQty",
- "RejectQty",
- "UpdateTime"
- ]
- },
- "inserts": {},
- "nested": [],
- "update_snippets": [
- "update LineStatusDet set ScrapQty=ScrapQty+(case when @ReasonType='Scrap' then @ScrapQty else 0 end) ,RejectQty=RejectQty+(case when @ReasonType='Reject' then @ScrapQty else 0 end) ,UpdateTime=@CurTime ,@UserNo=@UserNo where RecID=@LineRecID end try begin catch set @Msg=ERROR_MESSAGE() set @tran_error=@tran_error+1 end catch if(@tran_error>0) begin"
- ]
- },
- "pr_SFM_InventoryMesTransactionProcessingByOp": {
- "empty": false,
- "def_len": 5529,
- "updates": {},
- "inserts": {},
- "nested": [
- "pr_SFM_InventoryMesCartonTransactionProcessingByOp"
- ],
- "update_snippets": []
- },
- "pr_SFM_InventoryMesCartonTransactionProcessingByOp": {
- "empty": false,
- "def_len": 129149,
- "updates": {
- "LineStatusDet": [
- "WorkOrd",
- "CompQty",
- "ScrapQty",
- "ScrapQty4",
- "RejectQty",
- "RejectQty4",
- "AddProdTime",
- "NextProdTime",
- "CompQty4",
- "MachineName",
- "UDeci1",
- "UChar3",
- "UpdateTime",
- "UpdateUser"
- ],
- "WorkOrdIssued": [
- "IsDelete",
- "ParDescr1",
- "UpdateTime",
- "UpdateUser",
- "CompDescr1",
- "QtyAllocated",
- "LineTotal"
- ],
- "WorkOrdRouting": [
- "QtyComplete",
- "QtyScrap",
- "QtyReject",
- "Status",
- "Ufld1",
- "Last",
- "UpdateTime",
- "UpdateUser",
- "SubQtyComp"
- ],
- "WorkOrdMaster": [
- "QtyReject",
- "QtyCompleted",
- "UpdateTime",
- "UpdateUser"
- ],
- "MissedPrint": [
- "Qty",
- "PurQty",
- "WorkOrd",
- "Op",
- "ItemNum",
- "Status",
- "UpdateUser",
- "UpdateTime",
- "Descr",
- "Product",
- "Location",
- "Position",
- "PickQty",
- "QtyIssued",
- "Remark",
- "StNbr"
- ],
- "SingleBarCode": [
- "BarCode",
- "ItemNum",
- "Descr",
- "Descr1",
- "Op",
- "OpDescr",
- "Status",
- "Location",
- "Position",
- "WorkOrd",
- "ProdLine",
- "DevCreateTime",
- "UpdateUser",
- "UpdateTime"
- ],
- "ReleaseDet": [
- "CompQty",
- "IsLocked",
- "UChar1",
- "UpdateUser",
- "UpdateTime",
- "UDeci4",
- "UChar2"
- ]
- },
- "inserts": {
- "MissedPrint": [
- "Domain",
- "LabelFormat",
- "Printer",
- "Product",
- "ItemNum",
- "Descr",
- "BarCode",
- "Qty",
- "Position",
- "Carton",
- "ProdDate",
- "ProdLine",
- "OrdNbr",
- "Remark",
- "Period",
- "WorkOrd",
- "Location",
- "Site",
- "Status",
- "LotSerial",
- "Type",
- "Op",
- "PurQty",
- "CreateUser",
- "UpdateUser",
- "CreateTime",
- "UpdateTime"
- ],
- "SingleBarCode": [
- "Domain",
- "ItemNumSN",
- "BarCode",
- "ItemNum",
- "WorkOrd",
- "Op",
- "ProdLine",
- "Status",
- "DateType",
- "Result",
- "DevCreateTime",
- "MESProcess",
- "Ufld1",
- "Ufld2",
- "RelChar1",
- "RelChar2",
- "RelChar3",
- "MaterialBarCode1",
- "MaterialBarCode2",
- "MaterialBarCode3",
- "MaterialBarCode4",
- "Code1",
- "Code2",
- "Code3",
- "Code4",
- "Material1",
- "Material2",
- "Material3",
- "Material4",
- "CreateUser",
- "UpdateUser",
- "CreateTime",
- "UpdateTime"
- ]
- },
- "nested": [
- "pr_SFM_AccPeriodSequenceDet",
- "pr_SFM_BomAnalyzeToMaterielLocations",
- "pr_SFM_CheckFeedWorkOrdIsses",
- "pr_SFM_CheckInventoryStatus",
- "pr_SFM_CreateLineLostSerial",
- "pr_SFM_CreateWorkordRoutingEmployeeOp",
- "pr_SFM_EndWorkOrdByOp",
- "pr_SFM_GetSequenceID",
- "pr_SFM_InventoryMesCreateBarCode",
- "pr_SFM_InventoryMesWorkOrdIsses",
- "pr_SFM_InventoryTransactionProcessing2",
- "pr_WMS_SaveInspectionScrap"
- ],
- "update_snippets": [
- "update WorkOrdMaster set QtyReject=QtyReject+@ScrapQty+@RejectQty ,QtyCompleted=QtyCompleted+@CompQty ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and WorkOrd=@WorkOrd update mes_morder set work_number=IsNull(work_number,0)+@CompQty ,inventory_number=IsNull(inventory_number,0)+@CompQty ,update_time=@CurTime where factory_id=@Domain",
- "update WorkOrdRouting set QtyComplete=QtyComplete+@CompQty ,QtyScrap=QtyScrap+@ScrapQty ,QtyReject=QtyReject+@RejectQty ,Status=(case when (@IsPlanScrapCtr=1 and QtyComplete+@CompQty+QtyScrap+@ScrapQty+QtyReject+@RejectQty>=QtyOrded) or (@IsPlanScrapCtr=0 and QtyComplete+@CompQty>=QtyOrded) then 'C' else Status end) ,Ufld1=@SAPConfirmType ,Last=@Cu",
- "update WorkOrdRouting set QtyComplete=QtyComplete-@PrevOpRejectQty ,QtyReject=QtyReject+@PrevOpRejectQty ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and WorkOrd=@WorkOrd and ItemNum=@ItemNum and OP=@RejectPrevOp if @IsAssistLine=1 update WorkOrdRouting set SubQtyComp=SubQtyComp+@CompQty ,UpdateTime=@CurTime ,UpdateUser=@UserNo whe",
- "update MissedPrint set Qty=(case when BarCode=@TurnoverBarCode then 0 else Qty+@TurnoverQty end), PurQty=(case when BarCode=@TurnoverBarCode then 0 else Qty+@TurnoverQty end), WorkOrd=(case when BarCode=@MoveTurnoverBarCode then @TurnoverWorkOrd else WorkOrd end), Op=(case when BarCode=@MoveTurnoverBarCode then @TurnoverOp else Op end), ItemNum=(ca",
- "update MissedPrint set Qty=m.Qty-n.Qty ,PurQty=m.PurQty-n.Qty ,Status=(case when m.Qty>n.Qty then 'D' else 'N' end) ,Op=(case when m.Qty>n.Qty then m.Op else 0 end) ,UpdateUser=@UserNo ,UpdateTime=@CurTime output inserted.RecID,'报工释放原周转箱','单件追溯报工释放原周转箱' into @tbTurnoverRecID(RecID,TransType,Remark) from MissedPrint m,(select BarCode,count(*) as Qty",
- "update MissedPrint set Qty=Qty+@ProcessDiffQty ,PurQty=PurQty+@ProcessDiffQty ,ItemNum=(case when Qty=0 then @ItemNum else ItemNum end) ,Descr=(case when Qty=0 then @ItemDescr else Descr end) ,Product=(case when Qty=0 then @ItemDescr1 else Product end) ,Op=(case when Qty=0 then @MissedPrintOp else Op end) ,Location=(case when Qty=0 then @MissedPrin",
- "update MissedPrint set Qty=m.Qty-t.UseQty ,PurQty=m.PurQty-t.UseQty ,ItemNum=(case when m.Qty=t.UseQty then '' else m.ItemNum end) ,Descr=(case when m.Qty=t.UseQty then '' else m.Descr end) ,Product=(case when m.Qty=t.UseQty then '' else m.Product end) ,Op=(case when m.Qty=t.UseQty then 0 else m.Op end) ,Location=(case when m.Qty=t.UseQty then '' e",
- "update MissedPrint set Qty=m.Qty-t.CurQtyAllocated ,PurQty=m.PurQty-t.CurQtyAllocated ,PickQty=(case when @IsPaintingLine=1 then m.PickQty-t.CurQtyAllocated else m.PickQty end) ,QtyIssued=(case when m.Type in('Turnover','Kanban') then m.QtyIssued else m.QtyIssued+t.CurQtyAllocated end) ,Status=(case when IsNull(m.Type,'') not in('Turnover','Kanban'",
- "update LineStatusDet set WorkOrd=@WorkOrd where RecID=@LineRecID drop table #otherWorkordRouting end declare @WorkOrdBatch varchar(50),@WorkOrdOpDescr varchar(160)='',@WorkOrdStatus varchar(10),@WorkOrdFID varchar(30),@WorkOrdRefs varchar(30),@WorkOrdBomVer varchar(100),@WorkOrdLotSerial varchar(60)='' select top 1 @WorkOrdBatch=Batch,@WorkOrdOpDes",
- "update LineStatusDet set CompQty=CompQty+@CompQty ,ScrapQty=ScrapQty+(case when @IsScrapByOp=1 then 0 else @ScrapQty end) ,ScrapQty4=ScrapQty4+@ScrapQty ,RejectQty=RejectQty+(case when @IsScrapByOp=1 then 0 else @RejectQty end) ,RejectQty4=RejectQty4+@RejectQty ,AddProdTime=AddProdTime+(case when NextProdTime is not null then datediff(second,NextPr"
- ]
- },
- "pr_SFM_EndWorkOrdByOp": {
- "empty": false,
- "def_len": 14884,
- "updates": {
- "PeriodSequenceDet": [
- "Status",
- "UpdateTime",
- "UpdateUser",
- "OrdQty"
- ],
- "WorkOrdRouting": [
- "Status",
- "UpdateTime",
- "UpdateUser"
- ],
- "WorkOrdMaster": [
- "Status",
- "Ufld2",
- "AcctingClosed",
- "AcctingCloseDate",
- "UpdateTime",
- "UpdateUser"
- ],
- "LineRunRestDet": [
- "FinDate",
- "Closed",
- "UpdateTime",
- "UpdateUser",
- "Remark"
- ],
- "WorkOrdIssued": [
- "QtyIssued",
- "UpdateTime",
- "UpdateUser"
- ],
- "LineMaster": [
- "Ufld2",
- "QCBeginDT",
- "QCNextDT",
- "CheckFrequency"
- ]
- },
- "inserts": {},
- "nested": [
- "pr_SFM_AccPeriodSequenceDet",
- "pr_SFM_GetSequenceID",
- "pr_SFM_InventoryMesCartonTransactionProcessingByOp"
- ],
- "update_snippets": [
- "update WorkOrdMaster set Status=case when @IsSFMClosedWorkOrd=1 or (@IsPlanScrapCtr=1 and QtyCompleted+QtyReject>=QtyOrded) or (@IsPlanScrapCtr=0 and QtyCompleted>=QtyOrded) then 'C' else 'S' end ,Ufld2=case when @IsSFMClosedWorkOrd=1 or (@IsPlanScrapCtr=1 and QtyCompleted+QtyReject>=QtyOrded) or (@IsPlanScrapCtr=0 and QtyCompleted>=QtyOrded) then ",
- "update WorkOrdRouting set Status=case when @IsSFMClosedWorkOrd=1 or (@IsPlanScrapCtr=1 and QtyComplete+QtyReject+QtyScrap>=QtyOrded) or (@IsPlanScrapCtr=0 and QtyComplete>=QtyOrded) then 'C' else 'S' end ,UpdateTime=@CurTime ,UpdateUser=@UserNo output inserted.Status,inserted.MilestoneOp into @tbWorkOrdRouting(Status,MilestoneOp) where RecID=@WorkO",
- "update PeriodSequenceDet set Status=@WorkOrdStatus ,UpdateTime=@CurTime ,UpdateUser=@UserNo where Domain=@Domain and Line=@Line and ItemNum=@LineItemNum and PlanDate=@LinePlanDate and Period=@LinePlanPeriod and Op=@IntOp and WorkOrds=@WorkOrd and OrdQty>0 and UChar4=(case when @IsNoWorkOrdPlan=1 then @RoutingVer else UChar4 end) end if @VirtualPlan"
- ]
- },
- "pr_SFM_AccPeriodSequenceDet": {
- "empty": false,
- "def_len": 8206,
- "updates": {
- "PeriodSequenceDet": [
- "ProdDate",
- "WorkOrds",
- "RunCrew",
- "WholeNormal",
- "OrdQty",
- "UDeci3",
- "SetupTime",
- "UDeci2",
- "ProductActual",
- "CompQty",
- "UInt1",
- "ScrapQty",
- "RejectQty",
- "BackQty",
- "UDeci1",
- "ProductStandard",
- "WholeDynamic",
- "UDate2",
- "QCTime",
- "PlanDownTime",
- "UChar3",
- "UChar2",
- "UChar1",
- "UDate1",
- "WorkCtr",
- "UInt2",
- "UInt3",
- "UpdateTime",
- "UpdateUser"
- ]
- },
- "inserts": {
- "PeriodSequenceDet": [
- "Domain",
- "Site",
- "PlanDate",
- "Period",
- "ItemNum",
- "Line",
- "UDate1",
- "UChar5",
- "Op",
- "ProdDate",
- "WorkOrds",
- "RunCrew",
- "WholeNormal",
- "OrdQty",
- "UDeci3",
- "SetupTime",
- "ProductActual",
- "CompQty",
- "UInt1",
- "ScrapQty",
- "RejectQty",
- "BackQty",
- "UDeci1",
- "ProductStandard",
- "WholeDynamic",
- "UDate2",
- "QCTime",
- "PlanDownTime",
- "UChar3",
- "UChar2",
- "UChar1",
- "WorkCtr",
- "UInt2",
- "UChar4",
- "UInt3",
- "Status",
- "Sequence",
- "UDeci2",
- "BusinessID",
- "IsActive"
- ]
- },
- "nested": [],
- "update_snippets": [
- "update PeriodSequenceDet set ProdDate=@ProdDate ,WorkOrds=case when IsNull(WorkOrds,'')='' and IsNull(@WorkOrd,'')<>'' then @WorkOrd else WorkOrds end ,RunCrew=@RunCrew ,WholeNormal=@WholeNormal ,OrdQty=case when @OrdQty>0 then OrdQty+@OrdQty else OrdQty end ,UDeci3=case when @UdecQty>0 then UDeci3+@UdecQty else UDeci3 end ,SetupTime=case when @Set",
- "update PeriodSequenceDet set OrdQty=OrdQty-@OrdQty where RecID=@VirtualPlanRecID set @ReturnMsg='保存周期表成功!' end try begin catch set @ReturnMsg='保存周期表失败,'+IsNull(ERROR_MESSAGE(),'') end catch"
- ]
- },
- "pr_MES_UpdateWorkOrder": {
- "empty": false,
- "def_len": 2866,
- "updates": {
- "WorkOrdMaster": [
- "QtyOrded",
- "LotSerial",
- "Priority",
- "UpdateTime",
- "UpdateUser"
- ],
- "WorkOrdRouting": [
- "QtyOrded",
- "UpdateTime",
- "UpdateUser",
- "Status"
- ],
- "WorkOrdDetail": [
- "QtyRequired",
- "UpdateTime",
- "UpdateUser"
- ],
- "NbrMaster": [
- "Status",
- "UpdateTime",
- "UpdateUser"
- ],
- "NbrDetail": [
- "Status",
- "QtyOrd",
- "CurrQtyOpened",
- "UpdateTime",
- "UpdateUser"
- ]
- },
- "inserts": {},
- "nested": [
- "pr_SFM_GetSequenceID"
- ],
- "update_snippets": [
- "update WorkOrdMaster set QtyOrded=@Qty,LotSerial=@LotSerial,Priority=@Priority,UpdateTime=GETDATE(),UpdateUser=@UserNO where Domain = @Domian and WorkOrd =@WorkOrd update mes_morder set need_number=@Qty,morder_production_number=@Qty,update_time=GETDATE(),update_by_name=@UserNO where morder_no=@WorkOrd update mes_moentry set need_number=@Qty,morder_",
- "update WorkOrdRouting set QtyOrded=@Qty,UpdateTime=GETDATE(),UpdateUser=@UserNO,Status=iif(Status='C','W',Status) where WorkOrd =@WorkOrd --更新物料 update WorkOrdDetail set QtyRequired=CEILING(FrozenBOMQty*@Qty),UpdateTime=GETDATE(),UpdateUser=@UserNO where WorkOrd =@WorkOrd --更新领料单 update NbrMaster set Status = '',UpdateTime=GETDATE(),UpdateUser=@Use",
- "update NbrDetail set Status='',QtyOrd=CEILING(b.FrozenBOMQty*@Qty),CurrQtyOpened=CEILING(b.FrozenBOMQty*@Qty),UpdateTime=GETDATE(),UpdateUser=@UserNO from NbrDetail a,WorkOrdDetail b where a.itemnum=b.itemnum and a.workord=b.workord and a.type='SM' and a.QtyOrd<>CEILING(b.FrozenBOMQty*@Qty) and a.WorkOrd=@WorkOrd and a.Domain=@Domian --添加工单修改事务推送 d",
- "update NbrMaster set Status = '',UpdateTime=GETDATE(),UpdateUser=@UserNO where Type ='SM' and Domain = @Domian and WorkOrd =@WorkOrd and Nbr in (select Nbr from NbrDetail a,WorkOrdDetail b where a.itemnum=b.itemnum and a.workord=b.workord and a.type='SM' and a.QtyOrd<>CEILING(b.FrozenBOMQty*@Qty) and a.WorkOrd=@WorkOrd ) --更新领料单明细 update NbrDetail ",
- "update WorkOrdDetail set QtyRequired=CEILING(FrozenBOMQty*@Qty),UpdateTime=GETDATE(),UpdateUser=@UserNO where WorkOrd =@WorkOrd --更新领料单 update NbrMaster set Status = '',UpdateTime=GETDATE(),UpdateUser=@UserNO where Type ='SM' and Domain = @Domian and WorkOrd =@WorkOrd and Nbr in (select Nbr from NbrDetail a,WorkOrdDetail b where a.itemnum=b.itemnum"
- ]
- },
- "pr_MES_CloseWorkOrders": {
- "empty": false,
- "def_len": 2962,
- "updates": {
- "WorkOrdMaster": [
- "Status",
- "AcctingClosed"
- ],
- "NbrMaster": [
- "Status"
- ],
- "NbrDetail": [
- "Status"
- ]
- },
- "inserts": {},
- "nested": [
- "pr_SFM_GetSequenceID"
- ],
- "update_snippets": [
- "update WorkOrdMaster set Status = 'C',AcctingClosed=1 where Domain = @Domian and WorkOrd in (select col from [dbo].[f_splitSTR](@WorkOrds,'|')); --更新领料单状态为C update NbrMaster set Status = 'C' where Type ='SM' and Domain = @Domian and WorkOrd in (select col from [dbo].[f_splitSTR](@WorkOrds,'|')); --更新领料单明细状态为C update NbrDetail set Status='C' where D",
- "update NbrDetail set Status='C' where Domain = @Domian and Type ='SM' and Nbr in ( select Nbr from NbrMaster where Type ='SM' and Domain = @Domian and WorkOrd in (select col from [dbo].[f_splitSTR](@WorkOrds,'|')) ); --更新退料单状态为C update NbrMaster set Status = 'C' where Type ='WOD' and Domain = @Domian and WorkOrd in (select col from [dbo].[f_splitST",
- "update NbrMaster set Status = 'C' where Type ='SM' and Domain = @Domian and WorkOrd in (select col from [dbo].[f_splitSTR](@WorkOrds,'|')); --更新领料单明细状态为C update NbrDetail set Status='C' where Domain = @Domian and Type ='SM' and Nbr in ( select Nbr from NbrMaster where Type ='SM' and Domain = @Domian and WorkOrd in (select col from [dbo].[f_splitSTR"
- ]
- }
- }
|