From 1e61df1d934895fafa6248c830999d66abec4b6f Mon Sep 17 00:00:00 2001
From: jingh <jingh@LAPTOP-I53VDLOO>
Date: 星期一, 17 一月 2022 19:19:25 +0800
Subject: [PATCH] quanxian

---
 WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
index cb9454f..8c0db55 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
@@ -89,7 +89,7 @@
             try
             {
                 //缂栬緫鏉冮檺 
-                if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepOutBillList", 1, true, user))
+                if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepOutBillList", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -155,6 +155,8 @@
         public object Sc_MouldMoveStockStepOutBillListProjectDetai(string sqlWhere)
         {
             DataSet ds;
+            DataSet ds1;
+            List<object> list = new List<object>();
             try
             {
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -166,10 +168,6 @@
                                                 璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID, 
                                                 璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldMoveStockStepOutBill"), "h_v_Sc_MouldMoveStockStepOutBill");
 
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
-                    objJsonResult.data = ds.Tables[0];
                 }
                 else
                 {
@@ -182,11 +180,18 @@
                     string sql = sql1 + sqlWhere;
                     ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMoveStockStepOutBill");
 
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
-                    objJsonResult.data = ds.Tables[0];
                 }
+                //鏌ユ眹鎬�
+                ds1 = oCN.RunProcReturn(string.Format(@"select  鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
+                                            hscwhid,max(璋冨嚭浠撳簱浠g爜)璋冨嚭浠撳簱浠g爜,max(璋冨嚭浠撳簱)璋冨嚭浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldMoveStockStepOutBill 
+                                            where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,hscwhid,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldMoveStockStepOutBill");
+
+                list.Add(ds.Tables[0]);
+                list.Add(ds1.Tables[0]);
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                objJsonResult.list = list;
             }
             catch (Exception e)
             {
@@ -221,7 +226,7 @@
             ListModels oListModels = new ListModels();
             try
             {
-                if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepOutBill_Edit", 1, true, msg4))
+                if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepOutBill_Edit", 1, false, msg4))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -317,6 +322,8 @@
                 }
                 if (bResult)
                 {
+                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'out','{oBill.omodel.HInterID.ToString()}' ";
+                    oCn.RunProc(sql);
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
@@ -354,7 +361,7 @@
         public object DeltetMouldMoveStockStepOutBil(string HInterID,string user)
         {
             //缂栬緫鏉冮檺 
-            if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepOutBill_Delete", 1, true, user))
+            if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepOutBill_Delete", 1, false, user))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
@@ -431,7 +438,7 @@
         {
             //flag=1 瀹℃牳锛�  flag=2 鍙嶅鏍�
             //缂栬緫鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepOutBill_Check", 1, true, user))
+            if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepOutBill_Check", 1, false, user))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;

--
Gitblit v1.9.1