From 80d8f2b14624d78565733335dbb383a4af9724d3 Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期六, 12 十月 2024 16:22:30 +0800 Subject: [PATCH] 工艺路线控制完善添加 --- WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 33 ++++++++++++++++++++++++++++++--- 1 files changed, 30 insertions(+), 3 deletions(-) diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs index 3cbb90f..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 + @@ -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; -- Gitblit v1.9.1