|
|
@ -255,24 +255,27 @@ namespace Webservice |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(changeBoxCode)) |
|
|
|
{ |
|
|
|
model.ErrReason = "缺少必要传入参数 changeBoxCode"; |
|
|
|
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model)); |
|
|
|
return; |
|
|
|
} |
|
|
|
//if (string.IsNullOrWhiteSpace(changeBoxCode))
|
|
|
|
//{
|
|
|
|
// model.ErrReason = "缺少必要传入参数 changeBoxCode";
|
|
|
|
// Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model));
|
|
|
|
// return;
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
var boxCodeList = boxCode.Split(';'); |
|
|
|
var changeBoxCodeList = changeBoxCode.Split(';'); |
|
|
|
|
|
|
|
//小米箱码格式验证
|
|
|
|
if (!changeBoxCode.Contains("PN") || !changeBoxCode.Contains("PKG") || !changeBoxCode.Contains("QTY") || changeBoxCodeList.Length != 7 || changeBoxCodeList[0].Length != 16 || changeBoxCodeList[1].Length != 12 || changeBoxCodeList[5].Length != 16) |
|
|
|
if(!string.IsNullOrWhiteSpace(changeBoxCode)) |
|
|
|
{ |
|
|
|
model.ErrReason = "小米箱码标签格式不对"; |
|
|
|
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model)); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!changeBoxCode.Contains("PN") || !changeBoxCode.Contains("PKG") || !changeBoxCode.Contains("QTY") || changeBoxCodeList.Length != 7 || changeBoxCodeList[0].Length != 16 || changeBoxCodeList[1].Length != 12 || changeBoxCodeList[5].Length != 16) |
|
|
|
{ |
|
|
|
model.ErrReason = "小米箱码标签格式不对"; |
|
|
|
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model)); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//Wms箱码格式验证
|
|
|
|
if (!boxCode.Contains(".0") || !boxCode.Contains("/") || boxCodeList.Length != 7 || boxCodeList[5].Length != 10) |
|
|
@ -283,15 +286,18 @@ namespace Webservice |
|
|
|
} |
|
|
|
|
|
|
|
string boxPartNo = boxCodeList[0].Substring(0, 10); |
|
|
|
string changeBoxPartNo = changeBoxCodeList[0].Substring(3,10); |
|
|
|
//Wms箱码和小米箱码零件号验证
|
|
|
|
if (boxPartNo != changeBoxPartNo) |
|
|
|
if(!string.IsNullOrEmpty(changeBoxCode)) |
|
|
|
{ |
|
|
|
model.Result = "0"; |
|
|
|
model.ErrReason = "Wms箱码和小米箱码零件号不符"; |
|
|
|
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model)); |
|
|
|
return; |
|
|
|
} |
|
|
|
string changeBoxPartNo = changeBoxCodeList[0].Substring(3, 10); |
|
|
|
//Wms箱码和小米箱码零件号验证
|
|
|
|
if (boxPartNo != changeBoxPartNo) |
|
|
|
{ |
|
|
|
model.Result = "0"; |
|
|
|
model.ErrReason = "Wms箱码和小米箱码零件号不符"; |
|
|
|
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model)); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
List<MKModel> listInfo = new List<MKModel>(); |
|
|
|
string errorReasonBoxData = ""; |
|
|
|
DataTable dtBoxNum = Function.GetCodeRecords(boxCode, out errorReasonBoxData); |
|
|
|