From 7df532d4322f0461b4d579703b0f4ba76ab9e790 Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期四, 24 十月 2024 17:53:26 +0800 Subject: [PATCH] 工艺路线状态控制 --- WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 71 +++++++++++++++++++++++++++++++++-- 1 files changed, 66 insertions(+), 5 deletions(-) diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs index 2d3d0fb..864e60e 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") { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�"; + objJsonResult.Message = "姝ゅ崟鎹姸鎬佹湭鍦ㄥ垱寤猴紝涓嶅厑璁镐慨鏀癸紒"; objJsonResult.data = 1; return objJsonResult; } @@ -1270,9 +1270,18 @@ { oCN.RunProc("update Gy_RoutingBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate(),HBillStatus=2 where HInterID=" + HInterID); - //鍒锋柊榛樿宸ヨ壓璺嚎 - //oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID); - + //鑾峰彇绯荤粺鍙傛暟 + string Ret = ""; + if (oSystemParameter.ShowBill(ref Ret)) + { + //鍒ゆ柇瀹㈡埛 + if (oSystemParameter.omodel.WMS_CampanyName == "娣诲悍绉戞妧") //绯荤粺鍙傛暟 + { + //鍒锋柊榛樿宸ヨ壓璺嚎 + oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID); + } + } + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "瀹℃牳鎴愬姛"; @@ -2259,5 +2268,57 @@ } #endregion + #region 寰呭け鏁堟姤琛� + /// <summary> + /// 寰呭け鏁堟姤琛� + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Gy_RoutingBill/getInvalidityReport")] + [HttpGet] + public object getInvalidityReport(string sWhere, string user) + { + DataSet ds; + try + { + List<object> columnNameList = new List<object>(); + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "寰呭け鏁堟姤琛ㄦ棤鏉冮檺鏌ヨ!"; + objJsonResult.data = null; + 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"); + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = CodeConstant.SUCCEED; + objJsonResult.count = CountConstant.SUCCEED; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + return GetObjectJson(ds); + } + + #endregion } } \ No newline at end of file -- Gitblit v1.9.1