20240904 vgm发送 返回值解析变动

DS7_XiangRongDa
dengyu 3 months ago
parent 3dd2729450
commit 54ff727b71

@ -3877,6 +3877,21 @@ namespace DSWeb.Areas.CommMng.Models
{
public op_seae_vgm_send_md data { get; set; }
/// <summary>
/// 船司发送状态
/// 船司发送状态 0-未发送 1-发送成功 -1 发送失败
/// </summary>
public int? CarrierSendFlag { get; set; }
/// <summary>
/// 云港通发送状态 0-未发送 1-发送成功 -1 发送失败
/// </summary>
public int? YGTSendFlag { get; set; }
/// <summary>
/// 发送回执消息
/// </summary>
public string SendRltMsg { get; set; }
public string errors { get; set; }
}
}

@ -436,11 +436,29 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL
if (_r.statusCode == 200)
{
//20240904 然后判断 CarrierSendFlag 或 YGTSendFlag 中有-1的 对应发送失败
var cdc = new CommonDataContext();
var updrec = cdc.op_seae_vgm_send.FirstOrDefault(x => x.BSNO == OpSeaehead.BSNO);
updrec.MFNO = _r.data.MFNO;
updrec.LINKURL = _r.data.LINKURL;
updrec.VGMSTATUS = _r.data.sendstatus;
//updrec.VGMSTATUS = _r.data.sendstatus;
updrec.VGMSTATUS = "";
if (_r.CarrierSendFlag == -1) {
updrec.VGMSTATUS = "船公司发送失败";
}
if (_r.CarrierSendFlag == 1)
{
updrec.VGMSTATUS = "船公司发送成功";
}
if (_r.YGTSendFlag == -1)
{
updrec.VGMSTATUS += " 云港通发送失败";
}
if (_r.YGTSendFlag == 1)
{
updrec.VGMSTATUS += " 云港通发送成功";
}
cdc.op_seae_vgm_send.AddOrUpdate(updrec);
cdc.SaveChanges();
result.OK("上传成功",updrec);

Loading…
Cancel
Save