From 192df9e5b55cde1c11e21e050657dc94002a4612 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期三, 14 十二月 2022 11:07:29 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/Sc_MouldOtherInBillController.cs |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs
index e2bd3ce..60534ae 100644
--- a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs
+++ b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs
@@ -88,7 +88,7 @@
             try
             {
                 //缂栬緫鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Sc_MouldOtherInBillList", 1, true, user))
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldOtherInBillList", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -98,6 +98,7 @@
                 }
 
                 ds = Sc_MouldOtherInBill(sWhere, Organization);
+
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
                 objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
@@ -223,7 +224,7 @@
             try
             {
                 //缂栬緫鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Sc_MouldOtherInBill_Edit", 1, true, msg4))
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldOtherInBill_Edit", 1, false, msg4))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -312,15 +313,19 @@
                 {
                     // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                     bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                    string sql = string.Format($"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ");
+                    oCn.RunProc(sql);
                 }
                 else
                 {
                     bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                    //淇敼鎴愬姛
+                    //string sql = string.Format($"exec h_p_Sc_MouldChangeNowWHID  1,{oBill.omodel.HInterID.ToString()},' ' ");
+                    string sql = string.Format($"exec h_p_Sc_MouldChangeNowWHID ");
+                    oCn.RunProc(sql);
                 }
                 if (bResult)
                 {
-                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ";
-                    oCn.RunProc(sql);
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
@@ -358,7 +363,7 @@
         public object DeltetMouldOtherInBill(string HInterID,string user)
         {
             //缂栬緫鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log("Sc_MouldOtherOutBill_Delete", 1, true, user))
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldOtherOutBill_Delete", 1, false, user))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
@@ -397,10 +402,21 @@
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
-
+                //鍒犻櫎鍓嶆煡鎵惧綋鍓嶅崟鎹殑鎵�鏈夊櫒鍏稩D
+                //string swhere = "";
+                //DataSet ds = oCn.RunProcReturn("select HMaterID from Sc_MouldStockBillSub where HinterID=" + HInterID, "Sc_MouldStockBillSub");
+                //for (var i = 0; i < ds.Tables[0].Rows.Count; i++)
+                //{
+                //    swhere = swhere + ds.Tables[0].Rows[i]["HMaterID"].ToString() + ",";
+                //}
+                //swhere = swhere.Substring(0, swhere.Length - 1);
                 bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                 if (IsDete)
                 {
+                    //鍒犻櫎鎴愬姛淇敼鍣ㄥ叿妗f浣嶇疆
+                    //string sql = string.Format($"exec h_p_Sc_MouldChangeNowWHID  0,0,'{swhere}' ");
+                    string sql = string.Format($"exec h_p_Sc_MouldChangeNowWHID ");
+                    oCn.RunProc(sql);
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;

--
Gitblit v1.9.1