From 6849b27386df0f3252ca57e1308bd90d3fac0a56 Mon Sep 17 00:00:00 2001 From: "ruoxing.wang" <88384874@qq.com> Date: Thu, 5 Dec 2024 14:42:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=96=B7=E6=B6=82=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E7=94=A8wms=E6=94=BE=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebService/Function.cs | 48 ++++++++++-------------------------------- 1 file changed, 11 insertions(+), 37 deletions(-) diff --git a/WebService/Function.cs b/WebService/Function.cs index 1f1ae8c..f681cb8 100644 --- a/WebService/Function.cs +++ b/WebService/Function.cs @@ -1028,8 +1028,8 @@ namespace Webservice string jsonParam = " [{\"ServiceType\":\"AddMesData\",\"OperName\":\"ADMIN\"}]"; string strJson = "[25," + JSONTools.ScriptSerialize>(list) + "]"; - //res = webService.AddData(jsonParam, strJson); - res = "true"; + res = webService.AddData(jsonParam, strJson); + //res = "true"; LogHelper.WriteSysLogBase("条码:" + barcode + "调用WMS入库接口,参数:strJson = " + strJson + "返回结果:" + res, MethodBase.GetCurrentMethod().Name); } catch(Exception ex) @@ -1110,16 +1110,19 @@ namespace Webservice { string jsonParam = " [{\"ServiceType\":\"GetMesData\",\"BarCode\":\""+sjBarCode+"\"}]"; WebService.WebReference.JsonService webService = GetWebService(); - + //true 可以操作, false 已经移库,不能操作 string rst = webService.GetData(jsonParam); - - return true; + if(!string.IsNullOrEmpty(rst) && rst.ToLower() == "true") + { + return true; + } + return false; } /// /// 是否允许发送给wms 是否质检等判断 /// /// - /// 0-不合格;1-合格 9-返喷 8-其它 + /// 0-不合格;1-合格 9-返喷 8-其它 11.27改为 1 合格 2报废 9返喷 ,4喷涂其他 /// pRepaint 只存在返喷 Repaint =1 只存在其它 Repaint =3 既存在返喷又存在其它 Repaint =4 /// static bool AllowSendToWms(string oneBarCode, int state, @@ -1220,7 +1223,7 @@ namespace Webservice } //不合格报废0 有报工记录不能重发 - else if (state == 0) + else if (state == 2) { //第一次操作 @@ -1250,39 +1253,10 @@ namespace Webservice return true; - //if (rePaint == 0) - //{ - // if (IsStockInAll(oneBarCode)) - // { - // errorMssg = $"条码[{oneBarCode}]已报工,不能重新报工."; - // return false; - // } - //} - - //if (inspectTable.Rows.Count > 1) - //{ - // if (inspectTable.Rows[1]["inspectResult"].ToString().Contains("报废"))//只要上一次为报废,就不能进行任何一项其他判定 - // { - // errorMssg = $"条码[{oneBarCode}]已报废,不能重新报工."; - // return false; - // } - // else if (inspectTable.Rows[0]["inspectResult"].ToString().Contains("其它") && inspectTable.Rows[1]["inspectResult"].ToString().Contains("其它")) - // { - // errorMssg = $"条码[{oneBarCode}]已经存在其它状态,不能重新判定为其它状态."; - // return false; - // } - // else if (inspectTable.Rows[0]["inspectResult"].ToString().Contains("打磨") && inspectTable.Rows[1]["inspectResult"].ToString().Contains("打磨")) - // { - // errorMssg = $"条码[{oneBarCode}]已经存在返喷状态,不能重新判定为返喷状态."; - // return false; - // } - //} - - } //其它状态 - else if(state == 8) + else if(state == 4) { //第一次合格 if (string.IsNullOrEmpty(lastState))