From c42507edbe94f0c71044cf7c69d1b5698d194217 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期四, 31 十月 2024 09:40:34 +0800 Subject: [PATCH] 增加设备工艺参数点检表查询方法, --- WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 69 ++++++++++++++++++++++++++++++---- 1 files changed, 60 insertions(+), 9 deletions(-) diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs index bbbe690..84f95c0 100644 --- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs +++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs @@ -286,11 +286,11 @@ 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) + if ((dss.Tables[0].Rows[0]["HChecker"].ToString() != "" && dss.Tables[0].Rows[0]["HChecker"] != null) || (dss.Tables[0].Rows[0]["HBillStatus"].ToString() != "1" && dss.Tables[0].Rows[0]["HBillStatus"].ToString() != "5" && dss.Tables[0].Rows[0]["HBillStatus"].ToString() != "0")) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�"; + objJsonResult.Message = "姝ゅ崟鎹姸鎬佹湭鍦ㄥ垱寤烘垨閫�鍥烇紝涓嶅厑璁镐慨鏀癸紒"; objJsonResult.data = 1; return objJsonResult; } @@ -372,11 +372,11 @@ //鏄惁鍕鹃�夐粯璁ゅ伐鑹鸿矾绾� - if (HStandard) - { - //璁剧疆榛樿宸ヨ壓璺嚎 - oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID + ",'" + user + "'"); - } + //if (HStandard) + //{ + // //璁剧疆榛樿宸ヨ壓璺嚎 + // oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID + ",'" + user + "'"); + //} //鍒ゆ柇鏄惁閲嶅宸ュ簭鍙� ds = oCN.RunProcReturn("exec h_p_Gy_RoutingCtrl " + HInterID, "h_p_Gy_RoutingCtrl"); @@ -1278,7 +1278,7 @@ if (oSystemParameter.omodel.WMS_CampanyName == "娣诲悍绉戞妧") //绯荤粺鍙傛暟 { //鍒锋柊榛樿宸ヨ壓璺嚎 - oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID); + oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID + ",'" + CurUserName + "'"); } } @@ -2292,7 +2292,7 @@ return objJsonResult; } SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where 瀹氶绫诲瀷 = '涓存椂瀹氶' and 澶辨晥鏃堕棿 BETWEEN NOW() - INTERVAL 15 DAY AND NOW() " + sWhere + " order by hmainid desc", "h_v_Gy_RoutingBillList"); + ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where 瀹氶绫诲瀷 = '涓存椂瀹氶' and 澶辨晥鏃堕棿 BETWEEN DATEADD(DAY, -15, GETDATE()) AND GETDATE() " + sWhere + " order by hmainid desc", "h_v_Gy_RoutingBillList"); foreach (DataColumn col in ds.Tables[0].Columns) { Type dataType = col.DataType; @@ -2320,5 +2320,56 @@ } #endregion + + #region 宸ヨ壓璺嚎(闆嗕綋) 鎵归噺澶氱骇瀹℃牳 + [Route("Gy_Routing/CheckAllFlow")] + [HttpGet] + public object CheckAll(string HInterIDS, int IsAudit, string CurUserName, string CurUserID) + { + try + { + //澶勭悊瀛楃涓� + if (!string.IsNullOrEmpty(HInterIDS)) + { + int[] idArray = Array.ConvertAll(HInterIDS.Split(','), int.Parse); + // 澶勭悊idArray... + for (int i = 0; i < idArray.Length; i++) + { + objJsonResult = (json)AuditGy_Routing_Flow(idArray[i], IsAudit, CurUserName, CurUserID);//瀹℃牳鎵ц + if (objJsonResult.count == 0) + { + oCN.RollBack(); + objJsonResult.Message += "绗�" + (i + 1) + "琛屽嚭鐜伴棶棰樻棤娉曠户缁畬鎴�"; + return objJsonResult; + } + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇烽�夋嫨姝g‘琛�"; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult.code = CodeConstant.SUCCEED; + objJsonResult.count = CountConstant.SUCCEED; + objJsonResult.Message = "鎵ц鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳鎴栧弽瀹℃牳宸ヨ壓璺嚎澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + } } \ No newline at end of file -- Gitblit v1.9.1