From c064b9124554626cd3c386a2648a8008d3efc44c Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期二, 15 十月 2024 15:20:06 +0800 Subject: [PATCH] 考勤汇报单列表、 异常工时申请单列表、 定额申请单列表 客户列表, 供应商列表 分页 --- WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 71 ++++++++++++++++++++++++----------- 1 files changed, 49 insertions(+), 22 deletions(-) diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs index 0553ab6..c9946f8 100644 --- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs +++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs @@ -281,6 +281,30 @@ } else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) { //淇敼 + + //淇敼 + DataSet dss; + dss = oCN.RunProcReturn("select * from Gy_RoutingBillMain where HInterID=" + HInterID + " and HBillNo='" + HBillNo + "'", "Gy_RoutingBillMain"); + //鍒ゆ柇鏄惁鍙紪杈� + if (dss.Tables[0].Rows[0]["HChecker"].ToString() != "" && dss.Tables[0].Rows[0]["HChecker"] != null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + dss = oCN.RunProcReturn("select COUNT(*) as number from Sc_ProcessExchangeBillMain where HRoutingBillID = " + HInterID, "Gy_RoutingBillMain"); + //鍒ゆ柇鏄惁鍙紪杈� + if (dss.Tables[0].Rows[0]["number"].ToString() != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹凡缁忚寮曠敤锛屼笉鍏佽淇敼锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + oCN.RunProc("update Gy_RoutingBillMain set " + "HDate='" + HDate + "',HYear='" + HYear + "',HPeriod='" + HPeriod + "',HRemark='" + HRemark + "',hupdater='" + HMaker + @@ -405,7 +429,7 @@ foreach (Gy_RoutingBillSub oSub in DetailColl) { i++; - if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤") + if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤" && oSystemParameter.omodel.WMS_CampanyName != "娣诲悍绉戞妧") { if (oSub.HWorkQty <= 0) { @@ -450,7 +474,7 @@ //璁′环鏂瑰紡涓嶄负璁℃椂锛屽垯鎶婅鏃舵殏浼板瓧娈垫洿鏂颁负绌� if (oSub.HIsTime == false) { - oCN.RunProc("update Gy_RoutingBillSub set HEstimate = null where HInterID = " + HInterID + " and HEntryID = " + i); + oCN.RunProc("update Gy_RoutingBillSub set HEstimate = 0 where HInterID = " + HInterID + " and HEntryID = " + i); } if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) @@ -494,7 +518,7 @@ //璁′环鏂瑰紡涓嶄负璁℃椂锛屽垯鎶婅鏃舵殏浼板瓧娈垫洿鏂颁负绌� if (oSub.HIsTime == false) { - oCN.RunProc("update Gy_RoutingBillSub set HEstimate = null where HInterID = " + HInterID + " and HEntryID = " + i); + oCN.RunProc("update Gy_RoutingBillSub set HEstimate = 0 where HInterID = " + HInterID + " and HEntryID = " + i); } if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) @@ -1244,7 +1268,10 @@ if (IsAudit == 0) //瀹℃牳鍒ゆ柇 { - oCN.RunProc("update Gy_RoutingBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate() where HInterID=" + HInterID); + oCN.RunProc("update Gy_RoutingBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate(),HBillStatus=2 where HInterID=" + HInterID); + + //鍒锋柊榛樿宸ヨ壓璺嚎 + //oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -1953,7 +1980,7 @@ oCN.RunProc(sql04); //鏇存柊鍗曟嵁鐨勫崟鎹姸鎬� - if (oBill.CheckBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo) == true) + if (oBill.CheckBill(oCN, oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Gy_RoutingBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) { objJsonResult.code = CodeConstant.SUCCEED; objJsonResult.count = CountConstant.SUCCEED; @@ -1976,23 +2003,23 @@ { #region 鍙嶅鏍稿墠鐨勭浉鍏冲垽鏂� //鍙嶅鏍稿墠鎺у埗========================================= - //DataSet ds = oCN.RunProcReturn("Exec h_p_Gy_Routing_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'", "h_p_Gy_Routing_BeforeUnCheckCtrl"); - //if (ds == null) - //{ - // objJsonResult.code = CodeConstant.FAIL; - // objJsonResult.count = CountConstant.FAIL; - // objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + "鍙嶅鏍稿墠鍒ゆ柇澶辫触锛�"; - // objJsonResult.data = null; - // return objJsonResult; - //} - //if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") - //{ - // objJsonResult.code = CodeConstant.FAIL; - // objJsonResult.count = CountConstant.FAIL; - // objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); - // objJsonResult.data = null; - // return objJsonResult; - //} + DataSet ds = oCN.RunProcReturn("Exec h_p_Gy_Routing_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'", "h_p_Gy_Routing_BeforeUnCheckCtrl"); + if (ds == null) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + "鍙嶅鏍稿墠鍒ゆ柇澶辫触锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.data = null; + return objJsonResult; + } //========================================================= //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 -- Gitblit v1.9.1