From 9c60b98594f1e685f4d8f99efb4e84d21b3847f3 Mon Sep 17 00:00:00 2001
From: 仲国强 <519541279@qq.com>
Date: 星期五, 15 十月 2021 11:29:55 +0800
Subject: [PATCH] 批量委外接收显示明细

---
 WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index c20bfe3..37e6306 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -14,6 +14,7 @@
     public class Cj_StationEntrustInBillController : ApiController
     {
         public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
 
         private json objJsonResult = new json();
         SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -128,7 +129,9 @@
             {
                 //濮斿宸ュ簭鍙戝嚭鍙嶅簭鍒楀寲
                 msg1 = "[" + msg1.ToString() + "]";
-                List<StationBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg1);
+                List<StationBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg1); 
+                long HMainInterID = 0;
+                HMainInterID = list[0].HMainInterID;
                 string eventType = list[0].eventType;
                 long HInterID = list[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
                 int HYear = 2021;
@@ -255,7 +258,7 @@
                     ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationInTime,HSourceID" +
                     ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" +
                     ",HSupID,HTaxRate,HQty,HPrice,HMoney,HPieceQty" +
-                    ",HProcNo,HOrderProcNO,HWWWorkOrderBillNo,HWWWorkOrderInterID,HWWWorkOrderEntryID" +
+                    ",HProcNo,HOrderProcNO,HWWWorkOrderBillNo,HWWWorkOrderInterID,HWWWorkOrderEntryID,HMainInterID" +
                     ") " +
                     " values('3792','3792'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillStatus.ToString() + "',getdate(),'" + HMaker + "',getdate()" +
                     ",'" + HYear.ToString() + "','" + HPeriod.ToString() + "','" + HRemark + "','" + HInnerBillNo + "'" +
@@ -263,7 +266,7 @@
                     ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID +
                     "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" +
                     "," + HSupID + "," + HTaxRate + "," + HQty + "," + HPrice + "," + HMoney + "," + HPieceQty +
-                    ",'" + HProcNo + "','" + HOrderProcNO + "'" + ",'" + HWWWorkOrderBillNo + "'" + "," + HWWWorkOrderInterID + "" + "," + HWWWorkOrderEntryID + "" +
+                    ",'" + HProcNo + "','" + HOrderProcNO + "'" + ",'" + HWWWorkOrderBillNo + "'" + "," + HWWWorkOrderInterID + "" + "," + HWWWorkOrderEntryID + "," + HMainInterID +
                     ") ");
                 }
                 else if ("Modify".Equals(eventType))
@@ -332,6 +335,18 @@
                 oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_In " + HInterID.ToString() + ",1");
                 oCN.RunProc("exec h_p_WW_EntrustWorkOrderRelationQty_In " + HInterID.ToString() + ",1");
                 oCN.Commit();
+                string sReturn = "";
+                if (oSystemParameter.ShowBill(ref sReturn) == true)
+                {
+                    if (oSystemParameter.omodel.MES_StationEntrustInBill_SaveAutoAddnew == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+                    {
+                        objJsonResult.Verify = "Y";
+                    }
+                    else
+                    {
+                        objJsonResult.Verify = "N";
+                    }
+                }
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
                 objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";

--
Gitblit v1.9.1