From fb4349497ef239dab5cd97bb6de79ace28102d5c Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 11 七月 2024 17:11:02 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs |   42 ++++++++++++++++++++++++++++++++++++++----
 1 files changed, 38 insertions(+), 4 deletions(-)

diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
index d21e767..d66e65e 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
@@ -431,6 +431,7 @@
 
         public object HSourceOrderList(DataTable dt, HSouceOrderList ordrlist,string HBarCodeType) 
         {
+            oSystemParameter.ShowBill(ref DBUtility.ClsPub.sExeReturnInfo);
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 ordrlist.HQty = dt.Rows[i]["鏈敓鎴愭潯鐮佹暟閲�"].ToString();
@@ -467,6 +468,17 @@
                 ordrlist.HSourceName = dt.Rows[i]["鐢熶骇绾�"].ToString();
                 ordrlist.HEndDate = dt.Rows[i]["璁″垝瀹屽伐鏃ユ湡"].ToString();//鍗氭棩 鐢熶骇璁㈠崟 澶辨晥鏃ユ湡
                 ordrlist.HMinQty = dt.Rows[i]["鏈�灏忓寘瑁呮暟"].ToString();
+
+                if (oSystemParameter.omodel.WMS_CampanyName == "涔濊彵") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
+                {
+                    ordrlist.HGroupID = Convert.ToInt32(dt.Rows[i]["HBeginWorkGroupID"]);
+                    ordrlist.HGroupNumber = dt.Rows[i]["寮�宸ョ彮缁勪唬鐮�"].ToString();
+                    ordrlist.HGroupName = dt.Rows[i]["寮�宸ョ彮缁勫悕绉�"].ToString();
+                    ordrlist.HEmpID = Convert.ToInt32(dt.Rows[i]["HBeginWorkEmpID"]);
+                    ordrlist.HEmpNumber = dt.Rows[i]["寮�宸ヤ汉浠g爜"].ToString();
+                    ordrlist.HEmpName = dt.Rows[i]["寮�宸ヤ汉鍚嶇О"].ToString();
+                }
+
                 if (HBarCodeType == "浠櫒澶栬喘浠舵潯鐮佸鍣ㄨ鍒�")
                 {
                     ordrlist.HMinQty = dt.Rows[i]["鏈敓鎴愭潯鐮佹暟閲�"].ToString();
@@ -819,6 +831,11 @@
             decimal HAuxQty = 0;
             string HheatNO = "";
 
+            Int64 HGroupID = 0;
+            long HEmpID = 0;
+            string HCusModel = ""; //瀹㈡埛鐗╂枡瑙勬牸
+            string HCusMaterName = ""; //瀹㈡埛鐗╂枡鍚嶇О
+
             DataSet Ds;
             msg2 = msg2.Replace("\\", "");
             msg2 = msg2.Replace("\n", "");  //\n
@@ -837,6 +854,10 @@
                     HFactory = ClsPub.isStrNull(ordrlist[j].HFactory);
                     HAuxQty = ClsPub.isLong(ordrlist[j].HAuxQty);
                     HheatNO = ClsPub.isStrNull(ordrlist[j].HheatNO);
+                    HGroupID = ClsPub.isInt(ordrlist[j].HGroupID);
+                    HEmpID = ClsPub.isLong(ordrlist[j].HEmpID);
+                    HCusModel = ClsPub.isStrNull(ordrlist[j].HCusModel);
+                    HCusMaterName = ClsPub.isStrNull(ordrlist[j].HCusMaterName);
                     //鏃ユ湡鑾峰彇鏂瑰紡
                     sDate = DateTime.Now.ToString();
                     //
@@ -1183,6 +1204,11 @@
                         barcode.HFactory = ordrlist[j].HFactory;
                         barcode.HAuxQty = ordrlist[j].HAuxQty;
                         barcode.HheatNO = ordrlist[j].HheatNO;
+
+                        barcode.HGroupID2 = ordrlist[j].HGroupID;
+                        barcode.HEmpID2 = ordrlist[j].HEmpID;
+                        barcode.HCusModel2 = ordrlist[j].HCusModel;
+                        barcode.HCusMaterName2 = ordrlist[j].HCusMaterName;
                         ListRows.Add(barcode);
                         k = k + 1;
                         n = n + 1;
@@ -1199,7 +1225,7 @@
             double HQty2 = 0;
             string HBatchNo2 = "";
             Int64 HSupID = 0;
-            Int64 HGroupID = 0;
+            Int64 HGroupID2 = 0;
             int HPrintQty = 0;
             Int64 HSourceInterID = 0;
             Int64 HSourceEntryID = 0;
@@ -1231,6 +1257,10 @@
             string HheatNO2 = "";
             DateTime HProduceDate;
             DateTime HExpiryDate;
+            long HEmpID2 = 0;
+            string HCusModel2 = "";
+            string HCusMaterName2 = "";
+
             try
             {
                 oCN.BeginTran();
@@ -1283,6 +1313,10 @@
                         HheatNO2 = ClsPub.isStrNull(ListRows[i].HheatNO);
                         HProduceDate = ClsPub.isDate(ListRows[i].HProduceDate);
                         HExpiryDate = ClsPub.isDate(ListRows[i].HExpiryDate);
+                        HGroupID2 = ClsPub.isInt(ListRows[i].HGroupID2);
+                        HEmpID2 = ClsPub.isLong(ListRows[i].HEmpID2);
+                        HCusModel2 = ClsPub.isStrNull(ListRows[i].HCusModel2);
+                        HCusMaterName2 = ClsPub.isStrNull(ListRows[i].HCusMaterName2);
                         oCN.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
                                     ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
                                     ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
@@ -1291,16 +1325,16 @@
                                     ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " +
                                     ",HGiveAwayFlag " +
                                     ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" +
-                                    ",HCoilNO,HFurnaceNO,HFactory,HAuxQty,HheatNO,HProduceDate,HExpiryDate " +
+                                    ",HCoilNO,HFurnaceNO,HFactory,HAuxQty,HheatNO,HProduceDate,HExpiryDate,HEmpID,HCusModel,HCusMaterName " +
                                     ") values ("
                                     + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
-                                    + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString()
+                                    + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID2.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString()
                                     + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HWei + "'"
                                     + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
                                     + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'"
                                     + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + ""
                                     + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag)
-                                    + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HCoilNO2 + "','" + HFurnaceNO2 + "','" + HFactory2 + "'," + HAuxQty2 + ",'" + HheatNO2 + "','" + HProduceDate + "','" + HExpiryDate + "'" + ")");
+                                    + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HCoilNO2 + "','" + HFurnaceNO2 + "','" + HFactory2 + "'," + HAuxQty2 + ",'" + HheatNO2 + "','" + HProduceDate + "','" + HExpiryDate + "'," + HEmpID2.ToString() + ",'" + HCusModel2 + "','" + HCusMaterName2 + "'" + ")");
 
 
                         //HNumber = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMaterID2Col].Value);

--
Gitblit v1.9.1