From 16bb2f7b48cf2c3cfbb6a026c265d4e52d22eca4 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期六, 29 十月 2022 17:11:14 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs | 39 ++++++++++++++++++++++++++++----------- 1 files changed, 28 insertions(+), 11 deletions(-) diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs index b2aa15a..758f54e 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs @@ -89,7 +89,7 @@ try { //缂栬緫鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepInBillList", 1, true, user)) + if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepInBillList", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -99,6 +99,7 @@ } ds = Sc_MouldMoveStockStepInBill(sWhere, Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -120,11 +121,11 @@ string sql1 = string.Format(@"select * from h_v_Sc_MouldMoveStockStepInBillListDetail where (璋冨叆缁勭粐='" + Organization + "' or 璋冨嚭缁勭粐='" + Organization + "' )"); if (sWhere == null || sWhere.Equals("")) { - return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldMoveStockStepInBillListDetail"); + return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鍒跺崟鏃ユ湡 desc", "h_v_Sc_MouldMoveStockStepInBillListDetail"); } else { - string sql = sql1 + sWhere + "order by 鏃ユ湡 desc"; + string sql = sql1 + sWhere + "order by 鍒跺崟鏃ユ湡 desc"; return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldMoveStockStepInBillListDetail"); } @@ -166,7 +167,7 @@ 璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty, 鍗曚环 HPrice, 閲戦 HMoney,HStockOrgID, HOtherOrgID,璋冨嚭缁勭粐浠g爜 HOtherOrgCode,璋冨嚭缁勭粐 HOtherOrgName, HWHID, 璋冨叆浠撳簱浠g爜 HWHCode, 璋冨叆浠撳簱 HWHName,HSPID, 璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID, - 璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldMoveStockStepInBillListDetail"), "h_v_Sc_MouldMoveStockStepInBillListDetail"); + 璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜 HUnitCode,璁¢噺鍗曚綅 HUnitName FROM h_v_Sc_MouldMoveStockStepInBillListDetail"), "h_v_Sc_MouldMoveStockStepInBillListDetail"); } else @@ -176,7 +177,7 @@ 璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty, 鍗曚环 HPrice, 閲戦 HMoney,HStockOrgID, HOtherOrgID,璋冨嚭缁勭粐浠g爜 HOtherOrgCode,璋冨嚭缁勭粐 HOtherOrgName, HWHID, 璋冨叆浠撳簱浠g爜 HWHCode, 璋冨叆浠撳簱 HWHName,HSPID, 璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID, - 璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldMoveStockStepInBillListDetail where 1 = 1 "); + 璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜 HUnitCode,璁¢噺鍗曚綅 HUnitName FROM h_v_Sc_MouldMoveStockStepInBillListDetail where 1 = 1 "); string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMoveStockStepInBillListDetail"); @@ -225,7 +226,7 @@ ListModels oListModels = new ListModels(); try { - if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepInBill_Edit", 1, true, msg4)) + if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepInBill_Edit", 1, false, msg4)) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -314,15 +315,20 @@ { // 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 = "淇濆瓨鎴愬姛锛�"; @@ -360,7 +366,7 @@ public object DeltetMouldMoveStockStepInBill(string HInterID,string user) { //缂栬緫鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepInBill_Delete", 1, true, user)) + if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepInBill_Delete", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -399,10 +405,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; @@ -437,7 +454,7 @@ { //flag=1 瀹℃牳锛� flag=2 鍙嶅鏍� //缂栬緫鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepInBill_Check", 1, true, user)) + if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldMoveStockStepInBill_Check", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; -- Gitblit v1.9.1