AMS调整:如果已收到ISF已匹配的状态,则修改发送时,保留ISF已匹配的状态

master
zhangxiaofeng 9 months ago
parent 651b2ff9c5
commit 7ef3c4c30d

@ -548,7 +548,7 @@ namespace djy.Service.AFR
{
await DbAMS.Insert(waitInsertHouseList).WithTransaction(tran).ExecuteAffrowsAsync();
await SaveHistoryAsync(input.GID, waitInsertHouseList, "新增", 0, "新增了单据", tran);
await SaveHistoryAsync(input.GID, waitInsertHouseList, "新增", 0, "创建了分单", tran);
}
if (waitDeleteHouseGids.Any())
{

@ -150,7 +150,7 @@ namespace djy.Service.Ams
}
}
result.data = list.Where(x => x.HouseDto != null && x.HouseDto.Count() > 0).Skip((req.Page-1) * req.Limit).Take(req.Limit).ToList();
result.data = list.Where(x => x.HouseDto != null && x.HouseDto.Count() > 0).Skip((req.Page - 1) * req.Limit).Take(req.Limit).ToList();
}
@ -498,7 +498,8 @@ namespace djy.Service.Ams
var packageList = DbBus.Get(DbList.Common).Select<MappingPackage>().Where(map => map.Module == "AMS").ToList();
MasterBillInfoDto dto = new MasterBillInfoDto();
masterBillInfo masterBillInfo = new masterBillInfo();
if (string.IsNullOrEmpty(master.CARRIERID)) {
if (string.IsNullOrEmpty(master.CARRIERID))
{
req.Code = 201;
req.Message = "船公司id为空";
@ -520,7 +521,8 @@ namespace djy.Service.Ams
{
masterBillInfo.requesterDea = AMSRequestDEA.ItemCode;
}
else {
else
{
masterBillInfo.requesterDea = sysOptionConfig.Webconfig.requesterDea;
}
@ -892,7 +894,7 @@ namespace djy.Service.Ams
dic.Add("docLength", docContent.ToString().Length.ToString());
#region 接口调用
_LogsAdd("SendDE", "post", $"timestamp{timestamp}");
_LogsAdd("SendDE", "post", $"AMS接口调用发送{oid}{ JsonConvert.SerializeObject(dic)}");
_LogsAdd("SendDE", "post", $"AMS接口调用发送{oid}{JsonConvert.SerializeObject(dic)}");
_LogsAdd("SendDE", "post", $"AMS接口调用地址{oid}{url.PARAMVALUE}");
string gethtml = await HttpHelp.Post(dic, url.PARAMVALUE, PsotType.Urlencoded);
_LogsAdd("SendDE", "post", $"AMS接口调用返回{oid}{gethtml}");
@ -1053,8 +1055,17 @@ namespace djy.Service.Ams
BSNO = oid.ToString(),
MBLNO = master.MBLNO.ToString(),
}, 1);
// 如果已收到ISF已匹配的状态则修改发送时保留ISF已匹配的状态
string matestate = item.MateState?.Contains("3Z") == true ? "3Z" : "";
DbBus.Get(DbList.AMSCenter)
.Update<AMS_House>()
.Set(w => new AMS_House { MateState = matestate, ReportState = "已提交", NewNotice = "修改发送成功" })
.Where(w => w.GID == item.GID)
.ExecuteAffrows();
}
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "", ReportState = "已提交", NewNotice = "修改发送成功" }).Where(w => House.Contains(w.GID)).ExecuteAffrows();
}
else
@ -1094,7 +1105,7 @@ namespace djy.Service.Ams
{
req.Code = 500;
req.Message = ex.InnerException?.Message ?? ex.Message;
_LogsAdd("SendDE", "post", $"AMS_SendDE接口{req.Message }");
_LogsAdd("SendDE", "post", $"AMS_SendDE接口{req.Message}");
return req;
}
@ -1131,7 +1142,7 @@ namespace djy.Service.Ams
history.Operator = "系统管理员";
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关接收成功";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
var matestate = $"{house.MateState},{ retdto.status}";
var matestate = $"{house.MateState},{retdto.status}";
if (house.NewNotice == "删除发送成功")
{
@ -1178,7 +1189,7 @@ namespace djy.Service.Ams
history.Operator = "系统管理员";
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "船司匹配成功";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
var matestate = $"{house.MateState},{ retdto.status}";
var matestate = $"{house.MateState},{retdto.status}";
if (house.NewNotice == "删除发送成功")
{
@ -1229,7 +1240,7 @@ namespace djy.Service.Ams
}
else
{
var matestate = $"{house.MateState},{ retdto.status}";
var matestate = $"{house.MateState},{retdto.status}";
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = matestate, NewNotice = "ISF匹配成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
}
@ -1246,7 +1257,7 @@ namespace djy.Service.Ams
history.Operator = "系统管理员";
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关拒绝";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
var matestate = $"{house.MateState},{ retdto.status}";
var matestate = $"{house.MateState},{retdto.status}";
if (house.NewNotice == "删除发送成功")
{
@ -1359,7 +1370,7 @@ namespace djy.Service.Ams
{
req.Code = 500;
req.Message = ex.InnerException?.Message ?? ex.Message;
_LogsAdd("SendDE", "post", $"AMS_SaveReceipt接口{req.Message }");
_LogsAdd("SendDE", "post", $"AMS_SaveReceipt接口{req.Message}");
return req;
}
@ -1633,7 +1644,7 @@ namespace djy.Service.Ams
Document document = new Document(PageSize.A4);
//指定字体文件IDENTITY_H支持中文
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "msyh.ttc,0");
_LogsAdd("PDF", "Get", $"PDF字体路径{path }");
_LogsAdd("PDF", "Get", $"PDF字体路径{path}");
BaseFont customfont = BaseFont.CreateFont(path, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
var Fonttable = new Font(customfont, 12);
Font font = new Font(customfont, 14);

@ -21,6 +21,7 @@ using djy.Service;
using Common.Extensions;
using djy.Service.DjyService;
using djy.IService.Djy;
using djy.Model;
namespace djy_AmsApi
{
@ -45,6 +46,7 @@ namespace djy_AmsApi
});
services.AddHttpClient();
services.AddScoped<IUser, AspNetUser>();
//读取配置信息
Configuration.Bind("WebConfig", sysOptionConfig.Webconfig);

@ -22,13 +22,13 @@
"ConnName": "sqldb",
"cache_time": 10,
"WebHostUrl": "http://192.168.1.83:30816",
"Redis": "192.168.1.83:6379,password=,defaultDatabase=4",
"Redis": "127.0.0.1:6379,password=,defaultDatabase=4",
"RedisDb": 4,
"Rbmq_Host": "",
"Rbmq_UserName": "admin",
"Rbmq_Password": "admin",
"Rbmq_Sqlhost": "Data Source =192.168.1.83; Initial Catalog=djy_logs; Persist Security Info=True; User ID =sa; Password=sa@djy.net;pooling=true",
"DapperDbString": "Data Source =192.168.1.83,32009; Initial Catalog=DevAMS; Persist Security Info=True; User ID =sa; Password=sa@djy.net;pooling=true;",
"Rbmq_Sqlhost": "Data Source =192.168.1.83; Initial Catalog=djy_logs; Persist Security Info=True; User ID =sa; Password=Djy@Sql2022.test;pooling=true",
"DapperDbString": "Data Source =192.168.1.83,32009; Initial Catalog=DevAMS; Persist Security Info=True; User ID =sa; Password=Djy@Sql2022.test;pooling=true;",
"requesterDea": "nbforwarder",
"DataConnList": [
@ -38,7 +38,7 @@
"Index": 100,
"DataType": 1,
"Status": 0,
"ConnString": "Data Source =192.168.1.83,32009; Initial Catalog=DevAMS; Persist Security Info=True; User ID =sa; Password=sa@djy.net;pooling=true;"
"ConnString": "Data Source =60.209.125.238,32009; Initial Catalog=DevAMS; Persist Security Info=True; User ID =sa; Password=Djy@Sql2022.test;pooling=true;"
},
{
"SysKey": "Common",
@ -46,7 +46,7 @@
"Index": 100,
"DataType": 1,
"Status": 0,
"ConnString": "Data Source =192.168.1.83,32009; Initial Catalog=DevCommonDB; Persist Security Info=True; User ID =sa; Password=sa@djy.net;pooling=true;"
"ConnString": "Data Source =60.209.125.238,32009; Initial Catalog=TestCommonDB; Persist Security Info=True; User ID =sa; Password=Djy@Sql2022.test;pooling=true;"
},
{
"SysKey": "djydb",
@ -54,7 +54,7 @@
"Index": 100,
"DataType": 1,
"Status": 0,
"ConnString": "Data Source =192.168.1.83,32009; Initial Catalog=TestDsPingTai; Persist Security Info=True; User ID =sa; Password=sa@djy.net;pooling=true"
"ConnString": "Data Source =60.209.125.238,32009; Initial Catalog=TestDsPingTai; Persist Security Info=True; User ID =sa; Password=Djy@Sql2022.test;pooling=true"
},
{
@ -63,7 +63,7 @@
"Index": 100,
"DataType": 1,
"Status": 0,
"ConnString": "Data Source =192.168.1.83,32009; Initial Catalog=TestDjyLogs; Persist Security Info=True; User ID =sa; Password=sa@djy.net;pooling=true"
"ConnString": "Data Source =60.209.125.238,32009; Initial Catalog=TestDjyLogs; Persist Security Info=True; User ID =sa; Password=Djy@Sql2022.test;pooling=true"
}

Loading…
Cancel
Save