|
@ -108,15 +108,17 @@ namespace Webservice |
|
|
|
|
|
|
|
|
if (dt.Rows.Count < 1) |
|
|
if (dt.Rows.Count < 1) |
|
|
{ |
|
|
{ |
|
|
model.Result = "0"; |
|
|
|
|
|
model.ResultRowsCount = "0"; |
|
|
model.ResultRowsCount = "0"; |
|
|
model.DataList = null; |
|
|
model.DataList = null; |
|
|
if (string.IsNullOrEmpty(errorReasonBoxData)) |
|
|
if (string.IsNullOrEmpty(errorReasonBoxData)) |
|
|
{ |
|
|
{ |
|
|
model.ErrReason = "箱码包含总成数量为零"; |
|
|
model.Result = "1"; |
|
|
|
|
|
model.ErrReason = ""; |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
|
|
|
model.Result = "0"; |
|
|
model.ErrReason = errorReasonBoxData; |
|
|
model.ErrReason = errorReasonBoxData; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -133,6 +135,7 @@ namespace Webservice |
|
|
var barCodeList = barCode.Split(';'); |
|
|
var barCodeList = barCode.Split(';'); |
|
|
if (!barCode.Contains("S104") || !barCode.Contains(".") || barCodeList[0].Length != 17 || barCodeList[1].Length != 4 || barCodeList[2].Length != 4) |
|
|
if (!barCode.Contains("S104") || !barCode.Contains(".") || barCodeList[0].Length != 17 || barCodeList[1].Length != 4 || barCodeList[2].Length != 4) |
|
|
{ |
|
|
{ |
|
|
|
|
|
model.Result = "0"; |
|
|
model.ErrReason = "总成条码格式不对或不存在"; |
|
|
model.ErrReason = "总成条码格式不对或不存在"; |
|
|
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model)); |
|
|
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model)); |
|
|
return; |
|
|
return; |
|
@ -143,6 +146,7 @@ namespace Webservice |
|
|
string barCodePartNo = barCodeList[0].Substring(0, 10); |
|
|
string barCodePartNo = barCodeList[0].Substring(0, 10); |
|
|
if(boxPartNo != barCodePartNo) |
|
|
if(boxPartNo != barCodePartNo) |
|
|
{ |
|
|
{ |
|
|
|
|
|
model.Result = "0"; |
|
|
model.ErrReason = "箱码和总成条码零件号不符"; |
|
|
model.ErrReason = "箱码和总成条码零件号不符"; |
|
|
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model)); |
|
|
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model)); |
|
|
return; |
|
|
return; |
|
@ -158,15 +162,17 @@ namespace Webservice |
|
|
|
|
|
|
|
|
if (dt.Rows.Count < 1) |
|
|
if (dt.Rows.Count < 1) |
|
|
{ |
|
|
{ |
|
|
model.Result = "0"; |
|
|
|
|
|
model.ResultRowsCount = "0"; |
|
|
model.ResultRowsCount = "0"; |
|
|
model.DataList = null; |
|
|
model.DataList = null; |
|
|
if (string.IsNullOrEmpty(errorReasonBoxData)) |
|
|
if (string.IsNullOrEmpty(errorReasonBoxData)) |
|
|
{ |
|
|
{ |
|
|
model.ErrReason = "箱码包含总成数量为零"; |
|
|
model.Result = "1"; |
|
|
|
|
|
model.ErrReason = ""; |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
|
|
|
model.Result = "0"; |
|
|
model.ErrReason = errorReasonBoxData; |
|
|
model.ErrReason = errorReasonBoxData; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|