From 34c5c1737a20c8bd1fb8090a08d4bcbcc8d60cf8 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期五, 29 十月 2021 17:20:31 +0800
Subject: [PATCH] 修改了 模具、设备保养、维修、点检方法

---
 WebAPI/Controllers/CJGL/Cj_StationInBillController.cs |   64 +++++++++++++++++++++++++++++---
 1 files changed, 58 insertions(+), 6 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
index f987c96..02eb9ec 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -15,6 +15,9 @@
     {
         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();
         DataSet ds;
@@ -139,13 +142,14 @@
                 ds = oCN.RunProcReturn("select HInterID from Sc_ProcessExchangeBillSub Where hinterid=" + HProcExchInterID + " and hprocno<" + HProcNo + " order by hprocno", "Sc_ProcessExchangeBillSub");
                 if (ds == null)
                 {
-                    oCN.RollBack();
+
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
                     objJsonResult.Message = "鍒ゆ柇棣栭亾宸ュ簭澶辫触锛屼笉鍏佽淇濆瓨锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
+             
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 oCN.BeginTran();
 
@@ -272,6 +276,18 @@
 
                 }
                 oCN.Commit();
+                string sReturn = "";
+                if (oSystemParameter.ShowBill(ref sReturn) == true)
+                {
+                    if (oSystemParameter.omodel.MES_StationInBill_SaveAutoAddnew == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+                    {
+                        objJsonResult.Verify = "Y";
+                    }
+                    else
+                    {
+                        objJsonResult.Verify = "N";
+                    }
+                }
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
                 objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
@@ -344,7 +360,7 @@
         }
         #endregion
 
-        #region 杩斿洖濮斿宸ュ簭鎺ユ敹鍗曞垪琛�
+        #region 杩斿洖宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛�
         [Route("Cj_StationInBill/get_Display")]
         [HttpGet]
         public object get_Display(string sWhere)
@@ -565,8 +581,8 @@
                 ds1 = oCN.RunProcReturn("select HLastProc,HFstProc " +
                     " from Sc_ProcessExchangeBillMain a " +
                     " inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID " +
-                    " Where a.HInterID=(Select HProcExchInterID from Sc_StationInBillMain Where HInterID=55) " +
-                    " and b.HEntryID=(Select HProcExchEntryID from Sc_StationInBillMain Where HInterID=55)", "Sc_ProcessExchangeBillMain");
+                    " Where a.HInterID=(Select HProcExchInterID from Sc_StationInBillMain Where HInterID="+ lngBillKey + ") " +
+                    " and b.HEntryID=(Select HProcExchEntryID from Sc_StationInBillMain Where HInterID="+ lngBillKey + ")", "Sc_ProcessExchangeBillMain");
                 if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
                 {
                 }
@@ -676,8 +692,8 @@
                 ds1 = oCN.RunProcReturn("select HLastProc,HFstProc " +
                     " from Sc_ProcessExchangeBillMain a " +
                     " inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID " +
-                    " Where a.HInterID=(Select HProcExchInterID from Sc_StationInBillMain Where HInterID=55) " +
-                    " and b.HEntryID=(Select HProcExchEntryID from Sc_StationInBillMain Where HInterID=55)", "Sc_ProcessExchangeBillMain");
+                    " Where a.HInterID=(Select HProcExchInterID from Sc_StationInBillMain Where HInterID="+ lngBillKey + ") " +
+                    " and b.HEntryID=(Select HProcExchEntryID from Sc_StationInBillMain Where HInterID="+ lngBillKey + ")", "Sc_ProcessExchangeBillMain");
                 if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
                 {
                 }
@@ -863,5 +879,41 @@
             }
         }
         #endregion
+
+        #region 鏌ョ湅宸ュ簭娴佽浆鍗″叧鑱旀暟閲忓垪琛ㄥ姞杞�
+        [Route("Cj_StationInBill/GetStationQtyList")]
+        [HttpGet]
+        public object GetStationQtyList(string HInterID)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn("execute h_p_Sc_ProcExchBilltransRelationQty @HInterID=" + HInterID, "h_p_Sc_ProcExchBilltransRelationQty");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1