From 70799329dc591e8f07682e40cf4dd464ffa22bdf Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 09 二月 2026 08:58:01 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs | 50 ++++++++++++++++++++++++++++++++++----------------
1 files changed, 34 insertions(+), 16 deletions(-)
diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
index 123c422..e9375ad 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
@@ -308,7 +308,7 @@
{
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();
@@ -324,18 +324,30 @@
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,HBillSubType)
+ 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 + "','" + mainList[0].HBillSubType + "') ");
//涓昏〃
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,HBillSubType)
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 + "','" + mainList[0].HBillSubType + "') ");
//淇濆瓨涓昏〃
foreach (var oSub in subList)
{
@@ -381,9 +393,13 @@
,HCHILDSUPPLYORGID,HSUPPLYORGID,HENTRUSTPICKORGID,HSRCTRANSORGID,HGROUPBYOWNERID,HOWNERID,HOWNERTYPEID
,HRelationQty,HMoveStockQty,HAuxPropID,HBatchNO,HMTONo,HQtyScrap,HERPInterID,HERPEntryID
,HBackRelationQty,HNumerator,HDenominator,HBASEUNITID,HProcessID,HICMOENTRYSEQ,HPROJECTNO
- ,HOPERID,HSEQ,HSTOCKSTATUSID,HLOT,HOPTQUEUE,HRESERVETYPE,HSelPickedQty,HSELPRCDRETURNQTY,HProcName)
+ ,HOPERID,HSEQ,HSTOCKSTATUSID,HLOT,HOPTQUEUE,HRESERVETYPE,HSelPickedQty,HSELPRCDRETURNQTY,HProcName,HKeyMaterID_Line)
values('{oSub.HInterID}','{oSub.HEntryID}','{oSub.HMaterID}','{oSub.HMaterNumber}','{oSub.HUnitID}','{oSub.HUnitNumber}','{oSub.HSPID}','{oSub.HQty}'
- ,'{oSub.HQtyMust}','{oSub.HWHID}','{oSub.HRemark}','{oSub.HSourceInterID}','{oSub.HSourceEntryID}','{oSub.HSourceBillNo}','{oSub.HSourceBillType}','{oSub.HICMOInterID}','{oSub.HICMOEntryID}','{oSub.HICMOBillNo}','{oSub.HCHILDSUPPLYORGID}','{oSub.HSUPPLYORGID}','{oSub.HENTRUSTPICKORGID}','{oSub.HSRCTRANSORGID}','{oSub.HGROUPBYOWNERID}','{oSub.HOWNERID}','{oSub.HOWNERTYPEID}','{oSub.HRelationQty}','{oSub.HMoveStockQty}','{oSub.HAuxPropID}','{oSub.HBatchNO}','{oSub.HMTONo}','{Convert.ToDecimal(oSub.HQtyScrap)}','{oSub.HERPInterID}','{oSub.HERPEntryID}','{oSub.HBackRelationQty}','{oSub.HNumerator}','{oSub.HDenominator}','{oSub.HBASEUNITID}','{oSub.HProcessID}','{oSub.HICMOENTRYSEQ}','{oSub.HPROJECTNO}','{oSub.HOPERID}','{oSub.HSEQ}','{oSub.HSTOCKSTATUSID}','{oSub.HLOT}','{oSub.HOPTQUEUE}','{oSub.HRESERVETYPE}','{oSub.HSelPickedQty}','{oSub.HSELPRCDRETURNQTY}','{oSub.HProcName}')");
+ ,'{oSub.HQtyMust}','{oSub.HWHID}','{oSub.HRemark}','{oSub.HSourceInterID}','{oSub.HSourceEntryID}','{oSub.HSourceBillNo}','{oSub.HSourceBillType}','{oSub.HICMOInterID}','{oSub.HICMOEntryID}','{oSub.HICMOBillNo}'
+ ,'{oSub.HCHILDSUPPLYORGID}','{oSub.HSUPPLYORGID}','{oSub.HENTRUSTPICKORGID}','{oSub.HSRCTRANSORGID}','{oSub.HGROUPBYOWNERID}','{oSub.HOWNERID}','{oSub.HOWNERTYPEID}'
+ ,'{oSub.HRelationQty}','{oSub.HMoveStockQty}','{oSub.HAuxPropID}','{oSub.HBatchNO}','{oSub.HMTONo}','{Convert.ToDecimal(oSub.HQtyScrap)}','{oSub.HERPInterID}','{oSub.HERPEntryID}'
+ ,'{oSub.HBackRelationQty}','{oSub.HNumerator}','{oSub.HDenominator}','{oSub.HBASEUNITID}','{oSub.HProcessID}','{oSub.HICMOENTRYSEQ}','{oSub.HPROJECTNO}'
+ ,'{oSub.HOPERID}','{oSub.HSEQ}','{oSub.HSTOCKSTATUSID}','{oSub.HLOT}','{oSub.HOPTQUEUE}','{oSub.HRESERVETYPE}','{oSub.HSelPickedQty}','{oSub.HSELPRCDRETURNQTY}','{oSub.HProcName}','{oSub.HKeyMaterID_Line}')");
}
oCN.Commit();
objJsonResult.code = "1";
@@ -673,14 +689,14 @@
,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,HPlanOrderProcNo)
+ ,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.HPlanOrderProcNo}')");
+ ,{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";
@@ -1218,6 +1234,11 @@
err = "鎵�閫夌敓浜ц鍗曚负宸蹭綔搴熺姸鎬侊紝涓嶅厑璁镐笅鎺ㄧ敓鎴愬伐搴忔祦杞崱锛乗n";
}
+ if (ds.Tables[0].Rows[0]["鐘舵��"].ToString() != "涓嬭揪" && ds.Tables[0].Rows[0]["鐘舵��"].ToString() != "寮�宸�")
+ {
+ err = "鎵�閫夌敓浜ц鍗曚笉涓轰笅杈炬垨寮�宸ョ姸鎬侊紝涓嶅厑璁镐笅鎺ㄧ敓鎴愬伐搴忔祦杞崱锛乗n";
+ }
+
ds = oCN.RunProcReturn("select * from h_v_S_Sc_ICMOBillList where hmainid=" + hmainid + " and HEntryID=" + HEntryID + " and HSTOCKINORGID='" + OrganizationID + "'", "h_v_S_Sc_ICMOBillList");
if (double.Parse(ds.Tables[0].Rows[0]["娴佽浆鍗℃暟閲�"].ToString()) == 0)
@@ -1262,12 +1283,7 @@
lsmain.HPicNumAssemble = ds.Tables[0].Rows[0]["鎬昏鍥惧彿"].ToString();
lsmain.HMaterTexture = ds.Tables[0].Rows[0]["鏉愯川"].ToString();
lsmain.HProductNum = ds.Tables[0].Rows[0]["鎴愬搧缂栧彿"].ToString();
- lsmain.HVerNum = ds.Tables[0].Rows[0]["鐗堟湰"].ToString();
- //lsmain.HCusNumber = ds.Tables[0].Rows[0]["婧愬崟瀹㈡埛缂栫爜"].ToString();
- //lsmain.HPickLabel = ds.Tables[0].Rows[0]["鍖呰鏍囪瘑"].ToString();
- //lsmain.HPickLabelNumber = ds.Tables[0].Rows[0]["鍖呰鏍囪瘑缂栫爜"].ToString();
- //lsmain.HXTNumber = ds.Tables[0].Rows[0]["鑺綋鐗╂枡浠g爜"].ToString();
- //lsmain.HXTModel = ds.Tables[0].Rows[0]["鑺綋瑙勬牸鍨嬪彿"].ToString();
+ lsmain.HVerNum = ds.Tables[0].Rows[0]["鐗堟湰"].ToString();
lsmain.HWidth = double.Parse(ds.Tables[0].Rows[0]["HWidth"].ToString());
lsmain.HWeight = double.Parse(ds.Tables[0].Rows[0]["HWeight"].ToString());
lsmain.HAuxUnit = int.Parse(ds.Tables[0].Rows[0]["HAuxUnit"].ToString());
@@ -1299,6 +1315,8 @@
ClsSc_ProcessExchangeBillSub sub = new ClsSc_ProcessExchangeBillSub();
sub.HEntryID = j + 1;
sub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ sub.HRoutingBillMainID = long.Parse(row["hmainid"].ToString());
+ sub.HRoutingBillEntryID = long.Parse(row["hsubid"].ToString());
sub.HProcNo = long.Parse(row["宸ュ簭鍙�"].ToString());
sub.HProcID = long.Parse(row["HProcID"].ToString());
sub.HProcNumber = row["宸ュ簭浠g爜"].ToString();
@@ -1337,7 +1355,7 @@
}
else
{
- oBill.omodel.HBillNo = DBUtility.ClsPub.CreateBillCode("3772", ref DBUtility.ClsPub.sExeReturnInfo,true);
+ oBill.omodel.HBillNo = DBUtility.ClsPub.CreateBillCode_Prod("3772", ref DBUtility.ClsPub.sExeReturnInfo,true);
bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
oBill.DetailColl.Clear();
--
Gitblit v1.9.1