vgm接口直发,增加对箱信息的验证

DS7_JinGang
ddlucky 2 years ago
parent b426ab2ca6
commit 9ac779e46c

@ -7609,6 +7609,21 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
result.SetErrorInfo("请维护用户基础信息中的电话和邮箱");
}
foreach (var ctn in ctns) {
if (string.IsNullOrWhiteSpace( ctn.CTNALL)) result.SetErrorInfo("必须选择箱型");
if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零");
if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空");
if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空");
if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零");
if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零");
if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零");
}
if (userbaseinfo == null || string.IsNullOrWhiteSpace(userbaseinfo.Tel) || string.IsNullOrWhiteSpace(userbaseinfo.Email))
{
result.SetErrorInfo("请维护用户基础信息中的电话和邮箱");
}
if (!result.Success) return result;
#endregion
@ -7671,7 +7686,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
//log.Debug($"准备发送vgm{strSendObj}");
try
{
BasicDataRefDAL.SaveLog(strSendObj, "", "VGM直发", "发送");
var rtn = WebRequestHelper.DoPost(paraVgmSendService.PARAMVALUE, strSendObj, timeout: 5000);
BasicDataRefDAL.SaveLog(rtn, "", "VGM直发", "返回");
//log.Debug($"发送vgm返回{rtn}");
var jobjRtn = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(rtn, new { code = 0, status = false, message = string.Empty, data = string.Empty });
if (!jobjRtn.status)

Loading…
Cancel
Save