Browse Source

更新PDA服务接口校验

master
周红军 3 days ago
parent
commit
5413346a9e
  1. 16
      WebService/AppWebservice.asmx.cs
  2. 9
      WebService/Function.cs

16
WebService/AppWebservice.asmx.cs

@ -1,6 +1,8 @@
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using System.Runtime.Remoting.Contexts;
using System.Text;
using System.Web.Script.Services;
using System.Web.Services;
using Tools;
@ -47,6 +49,7 @@ namespace Webservice
model.DataList = null;
LogHelper.WriteSysLogBase("箱码与总成码关系绑定,入参boxCode=" + boxCode + ",barCode=" + barCode, MethodBase.GetCurrentMethod().Name);
Context.Response.ContentType = "application/json; charset=utf-8";
#region 参数判断
//if (string.IsNullOrWhiteSpace(app_id))
@ -55,12 +58,12 @@ namespace Webservice
// Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model));
// return;
//}
//if (string.IsNullOrWhiteSpace(boxCode))
//{
// model.ErrReason = "缺少必要传入参数 boxCode";
// Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model));
// return;
//}
if (string.IsNullOrWhiteSpace(boxCode))
{
model.ErrReason = "缺少必要传入参数 boxCode";
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model));
return;
}
//if (string.IsNullOrWhiteSpace(barCode))
//{
// model.ErrReason = "缺少必要传入参数 barCode";
@ -133,6 +136,7 @@ namespace Webservice
}
}
Context.Response.Write(JSONTools.ScriptSerialize<JsonModel<MKModel>>(model));
}

9
WebService/Function.cs

@ -376,6 +376,15 @@ namespace Webservice
}
}
DataTable dtBoxNum = GetCodeRecords(boxCode, out errorReason);
if(dtBoxNum != null && dtBoxNum.Rows.Count.ToString() == qtyValue)
{
errorReason = "此箱码已满箱";
return updateNum;
}
string sql = @"
select top 1 * from tb_Punch_Code_Record where Flag=1 and ZcBarCode = '" + barCode + @"' order by CreateTime desc
";

Loading…
Cancel
Save