From df4649d2b21b588052017bd73fda81ae9483307b Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期四, 15 一月 2026 10:40:25 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs | 32 +++++++++++++++++++-------------
1 files changed, 19 insertions(+), 13 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 edab874..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"
@@ -330,24 +330,24 @@
,HYear,HPeriod,HRemark,HMaker,HMakeDate,HChecker,HCheckDate
,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID
,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate,HBillStatus
- ,HOWNERID,HOWNERTYPEID,HComboXSLX)
+ ,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].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,HChecker,HCheckDate
,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID
,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate,HBillStatus
- ,HOWNERID,HOWNERTYPEID,HComboXSLX)
+ ,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].HOWNERID + ",'"+ mainList[0].HOWNERTYPEID + "','" + mainList[0].HComboXSLX + "','" + mainList[0].HBillSubType + "') ");
//淇濆瓨涓昏〃
foreach (var oSub in subList)
{
@@ -393,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";
@@ -1230,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)
@@ -1274,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());
@@ -1311,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();
@@ -1349,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