File was renamed from WebAPI/Controllers/SCGL/Sc_WorkBillSortBillController.cs |
| | |
| | | else if (OperationType == 3) |
| | | { |
| | | //ä¿®æ¹ |
| | | oCN.RunProc("UpDate Gy_WorkWarehouseBillMain set " + |
| | | " HOrgId='" + omdelMian.HPRDORGID + "'" + |
| | | ",HUpDater='" + omdelMian.HMaker + "'" + |
| | | ",HUpDateDate='" + DateTime.Now + "'" + |
| | | " where HInterID=" + omdelMian.HInterID.ToString()); |
| | | |
| | | //å é¤å表 |
| | | oCN.RunProc("delete from Gy_WorkWarehouseBillMainSub where HInterID='" + omdelMian.HInterID.ToString() + "' and HEntryID='" + hentryid + "'"); |
| | | oCN.RunProc($"update Sc_WorkBillSortBillMain set HUpDater='{omdelMian.HMaker}',HUpDateDate=GETDATE()" + |
| | | $", HRemark='{omdelMian.HRemark}', HPrintQty={(omdelMian.HPrintQty == null ? 0 : omdelMian.HPrintQty)}" + |
| | | $", HDeptID={omdelMian.HDeptID}, HSeOrderBillNo='{omdelMian.HSeOrderBillNo}', HSourceQty= {(omdelMian.HSourceQty == null ? 0 : omdelMian.HSourceQty)}" + |
| | | $", HInStockQty={(omdelMian.HInStockQty == null ? 0 : omdelMian.HInStockQty)}, HMaterID={omdelMian.HMaterID}" + |
| | | $", HMaterName= '{omdelMian.HMaterName}', HMaterModel= '{omdelMian.HMaterModel}', HGroupID={omdelMian.HGroupID}" + |
| | | $", HWorkShopID={omdelMian.HWorkShopID}, HRelationQty={(omdelMian.HRelationQty == null ? 0 : omdelMian.HRelationQty)}" + |
| | | $", HUnitID={omdelMian.HUnitID}, HWorkerID={omdelMian.HWorkerID}, HSourceID={omdelMian.HSourceID}" + |
| | | $", HBeginWorkTimes={(omdelMian.HBeginWorkTimes == null ? 0 : omdelMian.HBeginWorkTimes)}, HInStockOwnerTypeID= '{omdelMian.HInStockOwnerTypeID}'" + |
| | | $", HSplitRelationQty={(omdelMian.HSplitRelationQty == null ? 0 : omdelMian.HSplitRelationQty)}, HOrderLev='{omdelMian.HOrderLev}'" + |
| | | $", HWorkQty={(omdelMian.HWorkQty == null ? 0 : omdelMian.HWorkQty)}" + |
| | | $", HSplitPlanQty={(omdelMian.HSplitPlanQty == null ? 0 : omdelMian.HSplitPlanQty)}, HOwnerTypeID='{omdelMian.HOwnerTypeID}'" + |
| | | $", HPlanBeginDate= '{omdelMian.HPlanBeginDate}', HPlanEndDate='{omdelMian.HPlanEndDate}', HICMOBillNo='{omdelMian.HICMOBillNo}'" + |
| | | $", HOwnerID={omdelMian.HOwnerID}, HBatchNo='{omdelMian.HBatchNo}', HYX={(omdelMian.HYX == null ? 0 : omdelMian.HYX)}" + |
| | | $", HProdTimes={(omdelMian.HProdTimes == null ? 0 : omdelMian.HProdTimes)}, HEntrustORGID={omdelMian.HEntrustORGID}" + |
| | | $", HPlanQty={(omdelMian.HPlanQty == null ? 0 : omdelMian.HPlanQty)}, HPreparatDate='{omdelMian.HPreparatDate}'" + |
| | | $", HOrderNeedQty={(omdelMian.HOrderNeedQty == null ? 0 : omdelMian.HOrderNeedQty)}, HOrderCommitDate='{omdelMian.HOrderCommitDate}'" + |
| | | $", HCompleteQty={(omdelMian.HCompleteQty == null ? 0 : omdelMian.HCompleteQty)}" + |
| | | $", HSeOrderBillQty={(omdelMian.HSeOrderBillQty == null ? 0 : omdelMian.HSeOrderBillQty)}, HICMOInterID={(omdelMian.HICMOInterID == null ? 0 : omdelMian.HICMOInterID)}" + |
| | | $", HKTQ={(omdelMian.HKTQ == null ? 0 : omdelMian.HKTQ)}, HStockInORGID={(omdelMian.HStockInORGID == null ? 0 : omdelMian.HStockInORGID)}" + |
| | | $", HDayPlanSumQty={(omdelMian.HDayPlanSumQty == null ? 0 : omdelMian.HDayPlanSumQty)}" + |
| | | $", HSourceBillNo='{omdelMian.HSourceBillNo}', HICMOEntryID={(omdelMian.HICMOEntryID == null ? 0 : omdelMian.HICMOEntryID)}" + |
| | | $", HMainInterID={(omdelMian.HMainInterID == null ? 0 : omdelMian.HMainInterID)}, HProdORGID={omdelMian.HProdORGID}" + |
| | | $", HLeftPlanQty={(omdelMian.HLeftPlanQty == null ? 0 : omdelMian.HLeftPlanQty)}" + |
| | | $", HEmpID={(omdelMian.HEmpID == null ? 0 : omdelMian.HEmpID)}, HInStockOwnerID={omdelMian.HInStockOwnerID}, HICMOEntrySEQ={(omdelMian.HICMOEntrySEQ == null ? 0 : omdelMian.HICMOEntrySEQ)}" + |
| | | $", HICMOBillType='{omdelMian.HICMOBillType}', HCloseCount={(omdelMian.HCloseCount == null ? 0 : omdelMian.HCloseCount)}" + |
| | | $", HOrderType= '{omdelMian.HOrderType}', HSplitQty={(omdelMian.HSplitQty == null ? 0 : omdelMian.HSplitQty)}, HSourceStockInQty={(omdelMian.HSourceStockInQty == null ? 0 : omdelMian.HSourceStockInQty)}" + |
| | | $", HPriority={(omdelMian.HPriority == null ? 0 : omdelMian.HPriority)}, HLocked='{(omdelMian.HLocked == true ? 1 : 0)}'" + |
| | | $", HHangUp='{(omdelMian.HHangUp == true ? 1 : 0)}' where HInterID={omdelMian.HInterID}"); |
| | | } |
| | | //ä¿åå表 |
| | | objJsonResult = AddBillSub(msg3, hentryid); |
| | |
| | | |
| | | public json AddBillSub(string msg3, int hentryid) |
| | | { |
| | | //è·åè¡¨æ ¼æ°æ® |
| | | ds = oCN.RunProcReturn($"select * from h_v_JIT_Sc_WorkBillSortBillList where åæ®å·='{omdelMian.HBillNo}'", "h_v_JIT_Sc_WorkBillSortBillList"); |
| | | |
| | | //å é¤å表 |
| | | oCN.RunProc("delete from Sc_WorkBillSortBillSub where HInterID='" + omdelMian.HInterID.ToString() + "' and HEntryID='" + hentryid + "'"); |
| | | |
| | | omodelsub = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Sc_WorkBillSortBillSub>>(msg3); |
| | | int i = 1; |
| | | //æå
¥å表 |
| | |
| | | ", HRptFinishQty, HTimes, HUseTimes, HBTimes, HETimes" + |
| | | ", HDateSub, HCloseMan, HEntryCloseDate, HCloseTypeSub, HColumn" + |
| | | ", HLockedSub, HComplete, HStatusTag, HIsHandModify)" + |
| | | $"values({omdelMian.HInterID}, {(hentryid == -1 ? i : hentryid)}, '{oSub.HRemark}', '{oSub.HMasterDate}', {(oSub.HQty == null ? 0: oSub.HQty)}" + |
| | | $"values({omdelMian.HInterID}, {(hentryid == -1 ? i : omodelsub.Count==1? hentryid:i==1? hentryid:(i+ds.Tables[0].Rows.Count-1))}, '{oSub.HRemark}', '{oSub.HMasterDate}', {(oSub.HQty == null ? 0: oSub.HQty)}" + |
| | | $", {(oSub.HRptFinishQty == null ? 0: oSub.HRptFinishQty)}, {(oSub.HTimes == null ? 0: oSub.HTimes)}, {(oSub.HUseTimes == null ? 0: oSub.HUseTimes)}, '{oSub.HBTimes}', '{oSub.HETimes}'" + |
| | | $", '{oSub.HDateSub}', '{oSub.HCloseMan}', '{oSub.HEntryCloseDate}', {(oSub.HCloseTypeSub == true ? 1 : 0)}, '{oSub.HColumn}'" + |
| | | $", '{(oSub.HLockedSub == true ? 1 : 0)}', '{oSub.HComplete}', '{(oSub.HStatusTag == true ? 1 : 0)}', '{(oSub.HIsHandModify == true ? 1 : 0)}')"); |