From 64f5b09495710c474f4fc5843f5fea00ff325cb9 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Thu, 25 Aug 2022 13:51:34 +0800 Subject: [PATCH] 123 --- web/djy.Service/ISF/IsfService.cs | 38 ++++++++----------- .../FolderProfile1.pubxml.user | 2 +- web/djy.WebApi/djy_AmsApi.csproj.user | 2 +- .../PublishProfiles/FolderProfile.pubxml.user | 2 +- .../FolderProfile1.pubxml.user | 2 +- web/djy_IsfApi/djy_IsfApi.csproj.user | 2 +- 6 files changed, 20 insertions(+), 28 deletions(-) diff --git a/web/djy.Service/ISF/IsfService.cs b/web/djy.Service/ISF/IsfService.cs index bd2b6cd..39250c9 100644 --- a/web/djy.Service/ISF/IsfService.cs +++ b/web/djy.Service/ISF/IsfService.cs @@ -48,7 +48,7 @@ namespace djy.Service.Isf { foreach (var item in list) { - var historyDto = DbBus.Get(DbList.AMSCenter).Select().Where(x => x.ISF_ID == item.GID).ToList(); + var historyDto = DbBus.Get(DbList.AMSCenter).Select().Where(x => x.ISF_ID == item.GID).OrderByDescending(x => x.SendTime).ToList(); item.HistoryDto = historyDto; var companylist = DbBus.Get(DbList.AMSCenter).Select().Where(x => (x.IsDel == false || x.IsDel == null) && x.PID == item.GID).ToList(); item.companyList = companylist; @@ -609,31 +609,23 @@ namespace djy.Service.Isf ISFReceipt retdto = Json.JsonToObject(msg); var master = DbBus.Get(DbList.AMSCenter).Select().Where(x => x.GID == retdto.businessId).ToOne(); - if (retdto.status == "SI") + if (retdto.status == "S1") { ISF_MasterHistory history = new ISF_MasterHistory(); history.GID = Guid.NewGuid().ToString("N"); history.ISF_ID = master.GID; history.SendTime = DateTime.Now; - history.State = "匹配失败"; - history.Type = "匹配失败"; + history.State = "ISF和AMS匹配"; + history.Type = "ISF和AMS匹配"; history.Operator = "系统管理员"; - history.Remark = "您的明细单据" + retdto.businessId + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "匹配失败"; + history.Remark = "您的明细单据" + retdto.businessId + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "ISF和AMS匹配"; DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows(); - //if (master.NewNotice == "删除发送成功") - //{ - - // DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows(); - //} - //if (master.NewNotice == "修改发送成功") - //{ - // DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_Master { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows(); - //} + if (master.NewNotice == "重发发送成功" || master.NewNotice == "新增发送成功") { - DbBus.Get(DbList.AMSCenter).Update().Set(w => new ISF_Master { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "接收成功" }).Where(w => w.GID == master.GID).ExecuteAffrows(); + DbBus.Get(DbList.AMSCenter).Update().Set(w => new ISF_Master { MateState = retdto.status, NewNotice = "ISF和AMS匹配", ReportState = "匹配成功" }).Where(w => w.GID == master.GID).ExecuteAffrows(); } } else if (retdto.status == "02") @@ -642,12 +634,12 @@ namespace djy.Service.Isf history.GID = Guid.NewGuid().ToString("N"); history.ISF_ID = master.GID; history.SendTime = DateTime.Now; - history.State = "删除成功"; - history.Type = "删除成功"; + history.State = "接收成功"; + history.Type = "接收成功"; history.Operator = "系统管理员"; - history.Remark = "您的单据于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关删除成功"; + history.Remark = "您的单据于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关已接受"; DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows(); - DbBus.Get(DbList.AMSCenter).Update().Set(w => new ISF_Master { MateState = retdto.status, NewNotice = "ISF和AMS匹配成功", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows(); + DbBus.Get(DbList.AMSCenter).Update().Set(w => new ISF_Master { MateState = retdto.status, NewNotice = "海关已接受", ReportState = "接收成功" }).Where(w => w.GID == master.GID).ExecuteAffrows(); } else if (retdto.status == "01") { @@ -656,11 +648,11 @@ namespace djy.Service.Isf history.ISF_ID = master.GID; history.SendTime = DateTime.Now; history.State = "海关拒绝"; - history.Type = "删除成功"; + history.Type = "海关拒绝"; history.Operator = "系统管理员"; history.Remark = "您的单据于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关拒绝"; DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows(); - DbBus.Get(DbList.AMSCenter).Update().Set(w => new ISF_Master { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows(); + DbBus.Get(DbList.AMSCenter).Update().Set(w => new ISF_Master { MateState = retdto.status, NewNotice = "海关已拒绝", ReportState = "海关拒绝" }).Where(w => w.GID == master.GID).ExecuteAffrows(); } else if (retdto.status == "SB" || retdto.status == "S2" || retdto.status == "S3" || retdto.status == "S4" || retdto.status == "S5" || retdto.status == "S6") { @@ -671,9 +663,9 @@ namespace djy.Service.Isf history.State = "未匹配AMS"; history.Type = "未匹配AMS"; history.Operator = "系统管理员"; - history.Remark = "您的单据于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "海关拒绝"; + history.Remark = "您的单据于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "未匹配AMS"; DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows(); - DbBus.Get(DbList.AMSCenter).Update().Set(w => new ISF_Master { MateState = retdto.status, NewNotice = "未匹配AMS", ReportState = "删单失败" }).Where(w => w.GID == master.GID).ExecuteAffrows(); + DbBus.Get(DbList.AMSCenter).Update().Set(w => new ISF_Master { MateState = retdto.status, NewNotice = "未匹配AMS", ReportState = "匹配失败" }).Where(w => w.GID == master.GID).ExecuteAffrows(); } } else diff --git a/web/djy.WebApi/Properties/PublishProfiles/FolderProfile1.pubxml.user b/web/djy.WebApi/Properties/PublishProfiles/FolderProfile1.pubxml.user index 9ab57cd..bb0807a 100644 --- a/web/djy.WebApi/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/web/djy.WebApi/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -6,6 +6,6 @@ <_PublishTargetUrl>C:\Project\DJYAMS\djyweb_ams\web\djy.WebApi\bin\Release\net5.0\publish\ - True|2022-08-23T06:06:20.0492662Z;True|2022-08-18T14:54:28.0305650+08:00;True|2022-08-18T14:01:59.8031822+08:00;True|2022-08-16T15:41:06.8876151+08:00;True|2022-08-11T16:30:26.5758718+08:00;True|2022-08-11T15:57:08.7787498+08:00;True|2022-08-11T15:31:36.9253999+08:00; + True|2022-08-23T06:28:11.3249766Z;True|2022-08-23T14:06:20.0492662+08:00;True|2022-08-18T14:54:28.0305650+08:00;True|2022-08-18T14:01:59.8031822+08:00;True|2022-08-16T15:41:06.8876151+08:00;True|2022-08-11T16:30:26.5758718+08:00;True|2022-08-11T15:57:08.7787498+08:00;True|2022-08-11T15:31:36.9253999+08:00; \ No newline at end of file diff --git a/web/djy.WebApi/djy_AmsApi.csproj.user b/web/djy.WebApi/djy_AmsApi.csproj.user index fdfaf80..73c7fc6 100644 --- a/web/djy.WebApi/djy_AmsApi.csproj.user +++ b/web/djy.WebApi/djy_AmsApi.csproj.user @@ -3,7 +3,7 @@ MvcControllerEmptyScaffolder root/Common/MVC/Controller - C:\Project\DJYAMS\djyweb_ams\web\djy.WebApi\Properties\PublishProfiles\FolderProfile1.pubxml + C:\Project\DJYAMS\djyweb_ams\web\djy.WebApi\Properties\PublishProfiles\FolderProfile.pubxml IIS Express diff --git a/web/djy_IsfApi/Properties/PublishProfiles/FolderProfile.pubxml.user b/web/djy_IsfApi/Properties/PublishProfiles/FolderProfile.pubxml.user index 6627e8d..68f37c2 100644 --- a/web/djy_IsfApi/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/web/djy_IsfApi/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,6 +5,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>C:\Project\DJYAMS\djyweb_ams\web\djy_IsfApi\bin\Release\net5.0\publish\ - True|2022-08-11T06:45:29.1942046Z;True|2022-08-11T11:53:01.3573178+08:00;True|2022-08-11T11:45:09.8023314+08:00;True|2022-07-07T11:27:16.6078315+08:00;True|2022-07-05T16:26:03.2409062+08:00;True|2022-07-05T16:24:40.7410506+08:00;True|2022-07-04T17:29:37.9437422+08:00;True|2022-07-04T11:51:52.2386090+08:00;True|2022-07-04T11:51:11.4558393+08:00;True|2022-07-04T09:35:17.7702978+08:00;True|2022-07-01T17:41:17.1936764+08:00;True|2022-07-01T17:32:54.2967210+08:00;True|2022-07-01T16:13:16.7902814+08:00;True|2022-07-01T15:53:11.0569260+08:00;True|2022-07-01T09:54:42.5780181+08:00;True|2022-06-30T15:28:48.8212173+08:00;True|2022-06-30T15:07:27.8048719+08:00;True|2022-06-30T14:23:02.1357807+08:00;True|2022-06-30T14:07:07.8696769+08:00;True|2022-06-30T09:14:19.1360602+08:00;True|2022-06-29T16:34:08.2367476+08:00; + True|2022-08-25T02:41:51.2753305Z;True|2022-08-11T14:45:29.1942046+08:00;True|2022-08-11T11:53:01.3573178+08:00;True|2022-08-11T11:45:09.8023314+08:00;True|2022-07-07T11:27:16.6078315+08:00;True|2022-07-05T16:26:03.2409062+08:00;True|2022-07-05T16:24:40.7410506+08:00;True|2022-07-04T17:29:37.9437422+08:00;True|2022-07-04T11:51:52.2386090+08:00;True|2022-07-04T11:51:11.4558393+08:00;True|2022-07-04T09:35:17.7702978+08:00;True|2022-07-01T17:41:17.1936764+08:00;True|2022-07-01T17:32:54.2967210+08:00;True|2022-07-01T16:13:16.7902814+08:00;True|2022-07-01T15:53:11.0569260+08:00;True|2022-07-01T09:54:42.5780181+08:00;True|2022-06-30T15:28:48.8212173+08:00;True|2022-06-30T15:07:27.8048719+08:00;True|2022-06-30T14:23:02.1357807+08:00;True|2022-06-30T14:07:07.8696769+08:00;True|2022-06-30T09:14:19.1360602+08:00;True|2022-06-29T16:34:08.2367476+08:00; \ No newline at end of file diff --git a/web/djy_IsfApi/Properties/PublishProfiles/FolderProfile1.pubxml.user b/web/djy_IsfApi/Properties/PublishProfiles/FolderProfile1.pubxml.user index 94f06f0..755369b 100644 --- a/web/djy_IsfApi/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/web/djy_IsfApi/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -6,6 +6,6 @@ <_PublishTargetUrl>C:\Project\DJYAMS\djyweb_ams\web\djy_IsfApi\bin\Release\net5.0\publish\ - True|2022-08-22T07:49:27.7983465Z; + True|2022-08-23T06:37:55.9777827Z;True|2022-08-22T15:49:27.7983465+08:00; \ No newline at end of file diff --git a/web/djy_IsfApi/djy_IsfApi.csproj.user b/web/djy_IsfApi/djy_IsfApi.csproj.user index 8cba453..0c0d867 100644 --- a/web/djy_IsfApi/djy_IsfApi.csproj.user +++ b/web/djy_IsfApi/djy_IsfApi.csproj.user @@ -1,7 +1,7 @@  - C:\Project\DJYAMS\djyweb_ams\web\djy_IsfApi\Properties\PublishProfiles\FolderProfile1.pubxml + C:\Project\DJYAMS\djyweb_ams\web\djy_IsfApi\Properties\PublishProfiles\FolderProfile.pubxml MvcControllerEmptyScaffolder root/Common/MVC/Controller