| | |
| | | { |
| | | try |
| | | { |
| | | //LogService.Write(sMainSub.ToString()); |
| | | LogService.Write("鐢熶骇璁㈠崟"+sMainSub.ToString()); |
| | | var model = sMainSub["model"].ToString(); |
| | | var entry = sMainSub["model"]["HENTRY"].ToString(); |
| | | var _model = sMainSub["model"]["HPPBOMMAINENTRY"].ToString(); |
| | |
| | | oCN.RunProc(sql); |
| | | sql = $"delete Sc_ICMOBillSub where HinterID = {mainList[0].HInterID}"; |
| | | oCN.RunProc(sql); |
| | | |
| | | LogService.Write("鐢熶骇璁㈠崟" + @"Insert Into Sc_ICMOBillMain |
| | | (HBillType,HInterID,HBillNo,HDate,HPRDORGID |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate,HChecker,HCheckDate |
| | | ,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID |
| | | ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate,HBillStatus |
| | | ,HOWNERID,HOWNERTYPEID,HComboXSLX) |
| | | values('3710'," + mainList[0].HInterID + ",'" + mainList[0].HBillNo + "','" + mainList[0].HDate + "'," + mainList[0].HPRDORGID + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + mainList[0].HRemark + "','" + mainList[0].HMaker + "',getdate(),'" + mainList[0].HMaker + "',getdate()" + |
| | | ",'" + mainList[0].HSeOrderBillNo + "'," + mainList[0].HSeOrderInterID + "," + mainList[0].HSeOrderEntryID + "," + mainList[0].HEmpID + "," + mainList[0].HCusID + |
| | | "," + mainList[0].HCenterID + "," + mainList[0].HPlanQty + ",0,0,0,0,'','',2" + |
| | | "," + mainList[0].HOWNERID + ",'" + mainList[0].HOWNERTYPEID + "','" + mainList[0].HComboXSLX + "') "); |
| | | //涓昏〃 |
| | | oCN.RunProc(@"Insert Into Sc_ICMOBillMain |
| | | (HBillType,HInterID,HBillNo,HDate,HPRDORGID |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate,HChecker,HCheckDate |
| | | ,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID |
| | | ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate,HBillStatus |
| | | ,HOWNERID,HOWNERTYPEID) |
| | | ,HOWNERID,HOWNERTYPEID,HComboXSLX) |
| | | values('3710'," + mainList[0].HInterID + ",'" + mainList[0].HBillNo + "','" + mainList[0].HDate + "'," + mainList[0].HPRDORGID + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + mainList[0].HRemark + "','" + mainList[0].HMaker + "',getdate()" + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + mainList[0].HRemark + "','" + mainList[0].HMaker + "',getdate(),'" + mainList[0].HMaker + "',getdate()" + |
| | | ",'" + mainList[0].HSeOrderBillNo + "'," + mainList[0].HSeOrderInterID + "," + mainList[0].HSeOrderEntryID + "," + mainList[0].HEmpID + "," + mainList[0].HCusID + |
| | | "," + mainList[0].HCenterID + "," + mainList[0].HPlanQty + ",0,0,0,0,'','',2" + |
| | | ","+ mainList[0].HOWNERID + ",'"+ mainList[0].HOWNERTYPEID + "') "); |
| | | ","+ mainList[0].HOWNERID + ",'"+ mainList[0].HOWNERTYPEID + "','" + mainList[0].HComboXSLX + "') "); |
| | | //淇濆瓨涓昏〃 |
| | | foreach (var oSub in subList) |
| | | { |
| | |
| | | ,HMaterID,HUnitID,HRemark,HSourceID,HDeptID,HSTATUS |
| | | ,HBomID,HEntryCusID,HSTOCKINORGID |
| | | ,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney |
| | | ,HAuxQty,HAuxUnit,HWidth,HWeight,HColorRemark,HCusMaterName,HCusModel,HOrderPickRemark,HCusMaterNumber,HWidth_New,HWeight_New,HMaterModel,HRemark_New) |
| | | ,HAuxQty,HAuxUnit,HAuxQty2,HAuxUnit2,HWidth,HWeight,HColorRemark,HCusMaterName,HCusModel,HOrderPickRemark,HCusMaterNumber,HWidth_New,HWeight_New,HMaterModel,HRemark_New,HPlanOrderProcNo) |
| | | values({HInterID},{HEntryID},{(oSub.HQty == null ? 0 : oSub.HQty)} |
| | | ,'{(oSub.HPlanBeginDate == null ? DateTime.Now.ToString("yyyy-MM-dd") : oSub.HPlanBeginDate.ToString())}','{(oSub.HPlanEndDate == null ? DateTime.Now.AddDays(1).ToString("yyyy-MM-dd") : oSub.HPlanEndDate.ToString())}' |
| | | ,'{(oSub.HBeginDate == null ? DateTime.Now.ToString("yyyy-MM-dd") : oSub.HBeginDate.ToString())}','{(oSub.HEndDate == null ? DateTime.Now.AddDays(1).ToString("yyyy-MM-dd") : oSub.HEndDate.ToString())}' |
| | | ,{oSub.HMaterID},{oSub.HUnitID},'{oSub.HRemark}',{oSub.HSourceID},{oSub.HDeptID},{oSub.HSTATUS} |
| | | ,{oSub.HBomID} ,{oSub.HCusID} ,{oSub.HSTOCKINORGID} |
| | | ,{oSub.HSourceInterID},{oSub.HSourceEntryID},'{oSub.HSourceBillNo}','{oSub.HSourceBillType}',0,0 |
| | | ,{oSub.HAuxQty},{oSub.HAuxUnit},{oSub.HWidth},{oSub.HWeight},'{oSub.HColorRemark}','{oSub.HCusMaterName}','{oSub.HCusModel}','{oSub.HOrderPickRemark}','{oSub.HCusMaterNumber}',{oSub.HWidth_New},{oSub.HWeight_New},'{oSub.HModel}','{oSub.HRemark_New}')"); |
| | | ,{oSub.HAuxQty},{oSub.HAuxUnit},{oSub.HAuxQty2},{oSub.HAuxUnit2},{oSub.HWidth},{oSub.HWeight},'{oSub.HColorRemark}','{oSub.HCusMaterName}','{oSub.HCusModel}','{oSub.HOrderPickRemark}','{oSub.HCusMaterNumber}',{oSub.HWidth_New},{oSub.HWeight_New},'{oSub.HModel}','{oSub.HRemark_New}','{oSub.HPlanOrderProcNo}')"); |
| | | |
| | | |
| | | objJsonResult.code = "1"; |