From 8834694ec1680a643b51ec8259e8647a9ad0a017 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Thu, 24 Jul 2025 14:50:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96APP=E8=A3=85=E7=AE=B1?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebService/AppWebservice.asmx.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/WebService/AppWebservice.asmx.cs b/WebService/AppWebservice.asmx.cs index 9c3f1cf..9487064 100644 --- a/WebService/AppWebservice.asmx.cs +++ b/WebService/AppWebservice.asmx.cs @@ -108,15 +108,17 @@ namespace Webservice if (dt.Rows.Count < 1) { - model.Result = "0"; + model.ResultRowsCount = "0"; model.DataList = null; if (string.IsNullOrEmpty(errorReasonBoxData)) { - model.ErrReason = "箱码包含总成数量为零"; + model.Result = "1"; + model.ErrReason = ""; } else { + model.Result = "0"; model.ErrReason = errorReasonBoxData; } } @@ -133,6 +135,7 @@ namespace Webservice var barCodeList = barCode.Split(';'); if (!barCode.Contains("S104") || !barCode.Contains(".") || barCodeList[0].Length != 17 || barCodeList[1].Length != 4 || barCodeList[2].Length != 4) { + model.Result = "0"; model.ErrReason = "总成条码格式不对或不存在"; Context.Response.Write(JSONTools.ScriptSerialize>(model)); return; @@ -143,6 +146,7 @@ namespace Webservice string barCodePartNo = barCodeList[0].Substring(0, 10); if(boxPartNo != barCodePartNo) { + model.Result = "0"; model.ErrReason = "箱码和总成条码零件号不符"; Context.Response.Write(JSONTools.ScriptSerialize>(model)); return; @@ -158,15 +162,17 @@ namespace Webservice if (dt.Rows.Count < 1) { - model.Result = "0"; + model.ResultRowsCount = "0"; model.DataList = null; if (string.IsNullOrEmpty(errorReasonBoxData)) { - model.ErrReason = "箱码包含总成数量为零"; + model.Result = "1"; + model.ErrReason = ""; } else { + model.Result = "0"; model.ErrReason = errorReasonBoxData; } }