|
|
@ -1028,8 +1028,8 @@ namespace Webservice |
|
|
|
|
|
|
|
string jsonParam = " [{\"ServiceType\":\"AddMesData\",\"OperName\":\"ADMIN\"}]"; |
|
|
|
string strJson = "[25," + JSONTools.ScriptSerialize<List<WMS03Model>>(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); |
|
|
|
|
|
|
|
if(!string.IsNullOrEmpty(rst) && rst.ToLower() == "true") |
|
|
|
{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
/// 是否允许发送给wms 是否质检等判断
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="oneBarCode"></param>
|
|
|
|
/// <param name="state">0-不合格;1-合格 9-返喷 8-其它</param>
|
|
|
|
/// <param name="state">0-不合格;1-合格 9-返喷 8-其它 11.27改为 1 合格 2报废 9返喷 ,4喷涂其他</param>
|
|
|
|
/// pRepaint 只存在返喷 Repaint =1 只存在其它 Repaint =3 既存在返喷又存在其它 Repaint =4
|
|
|
|
/// <returns></returns>
|
|
|
|
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)) |
|
|
|