From a563afa026e07c29631bed7c0cbac1ef13a373ca Mon Sep 17 00:00:00 2001
From: wet <1034391973@qq.com>
Date: Wed, 20 Jul 2022 16:17:59 +0800
Subject: [PATCH] 1
---
web/djy.IService/djy.IService.csproj | 4 +
web/djy.Model/djy.Model.csproj | 4 +
web/djy.Service/Ams/AmsService.cs | 117 +++++-------------
web/djy.Service/djy.Service.csproj | 4 +
web/djy.WebApi/djy_AmsApi.csproj.user | 2 +-
web/djy_Report/Controllers/ApiBase.cs | 2 +-
.../Controllers/Report/ReportController.cs | 15 +++
web/djy_Report/Exceptionfilter.cs | 2 +-
web/djy_Report/HangFireAuthorizeFilter.cs | 2 +-
web/djy_Report/HttpResponseExceptionFilter.cs | 2 +-
web/djy_Report/IOC.cs | 2 +-
web/djy_Report/MytMiddleware.cs | 2 +-
web/djy_Report/Program.cs | 4 +-
web/djy_Report/Startup.cs | 4 +-
web/djy_Report/djy_Report.csproj.user | 7 ++
15 files changed, 79 insertions(+), 94 deletions(-)
create mode 100644 web/djy_Report/Controllers/Report/ReportController.cs
create mode 100644 web/djy_Report/djy_Report.csproj.user
diff --git a/web/djy.IService/djy.IService.csproj b/web/djy.IService/djy.IService.csproj
index 08cdfed..4097205 100644
--- a/web/djy.IService/djy.IService.csproj
+++ b/web/djy.IService/djy.IService.csproj
@@ -15,4 +15,8 @@
+
+
+
+
diff --git a/web/djy.Model/djy.Model.csproj b/web/djy.Model/djy.Model.csproj
index 8e3cf9a..31566ca 100644
--- a/web/djy.Model/djy.Model.csproj
+++ b/web/djy.Model/djy.Model.csproj
@@ -28,4 +28,8 @@
+
+
+
+
diff --git a/web/djy.Service/Ams/AmsService.cs b/web/djy.Service/Ams/AmsService.cs
index f894d68..a7a9116 100644
--- a/web/djy.Service/Ams/AmsService.cs
+++ b/web/djy.Service/Ams/AmsService.cs
@@ -896,7 +896,7 @@ namespace djy.Service.Ams
HBLNO = item.HBLNo,
SENDUSERID = user.GID,
LURURENID = user.GID,
- CtnrCount = 1,
+ CtnrCount = DbBus.Get(DbList.AMSCenter).Select().Where(x => x.IsDel != true && x.HID == item.GID ).ToList().Count(),
CtnrInfo = string.Empty,
BSTYPE = 15,
SENDTYPE = 0,
@@ -920,7 +920,7 @@ namespace djy.Service.Ams
HBLNO = item.HBLNo,
SENDUSERID = user.GID,
LURURENID = user.GID,
- CtnrCount = 1,
+ CtnrCount = DbBus.Get(DbList.AMSCenter).Select().Where(x => x.IsDel != true && x.HID == item.GID).ToList().Count(),
CtnrInfo = string.Empty,
BSTYPE = 15,
SENDTYPE = 0,
@@ -942,10 +942,10 @@ namespace djy.Service.Ams
HBLNO = item.HBLNo,
SENDUSERID = user.GID,
LURURENID = user.GID,
- CtnrCount = 1,
+ CtnrCount = DbBus.Get(DbList.AMSCenter).Select().Where(x => x.IsDel != true && x.HID == item.GID).ToList().Count(),
CtnrInfo = string.Empty,
BSTYPE = 15,
- SENDTYPE = 2,
+ SENDTYPE = 1,
BSNO = oid.ToString(),
MBLNO = master.MBLNO.ToString(),
}, 1);
@@ -1029,30 +1029,13 @@ namespace djy.Service.Ams
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关接收成功", ReportState = "删单成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
- if (house.NewNotice == "修改发送成功")
- {
- if (string.IsNullOrEmpty(house.MateState)) {
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关接收成功", ReportState = "修改成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
- }
- else
- {
+ else {
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = house.MateState+","+retdto.status, NewNotice = "海关接收成功", ReportState = "修改成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
-
- }
+ DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
- if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
- {
- if (string.IsNullOrEmpty(house.MateState))
- {
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
- }
- else {
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "海关接收成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
- }
-
- }
+
+
}
}
@@ -1075,34 +1058,10 @@ namespace djy.Service.Ams
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "船司匹配成功", ReportState = "删单成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
- if (house.NewNotice == "修改发送成功")
- {
- if (string.IsNullOrEmpty(house.MateState))
- {
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "船司匹配成功", ReportState = "修改成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
- }
- else
- {
-
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "船司匹配成功", ReportState = "修改成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
-
- }
-
- }
- if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
- {
- if (string.IsNullOrEmpty(house.MateState))
- {
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "船司匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
- }
- else
- {
-
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "船司匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
-
- }
-
+ else {
+ DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "船司匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
+
}
}
@@ -1126,36 +1085,10 @@ namespace djy.Service.Ams
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "ISF匹配成功", ReportState = "删单成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
- if (house.NewNotice == "修改发送成功")
- {
- if (string.IsNullOrEmpty(house.MateState))
- {
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "ISF匹配成功", ReportState = "修改成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
- }
- else
- {
-
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "ISF匹配成功", ReportState = "修改成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
-
- }
-
-
+ else {
+ DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "ISF匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
- if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
- {
- if (string.IsNullOrEmpty(house.MateState))
- {
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "ISF匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
- }
- else
- {
- DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = house.MateState + "," + retdto.status, NewNotice = "ISF匹配成功", ReportState = "接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
-
- }
-
-
- }
}
}
@@ -1170,22 +1103,28 @@ 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();
-
+
if (house.NewNotice == "删除发送成功")
{
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "删单失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
+ else
if (house.NewNotice == "修改发送成功")
{
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "修改失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
+ else
if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
{
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
+ else {
+
+ DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "海关拒绝", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
+ }
}
else if (retdto.status == "2Z")
@@ -1199,22 +1138,28 @@ 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();
-
+
if (house.NewNotice == "删除发送成功")
{
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "删单失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
+ else
if (house.NewNotice == "修改发送成功")
{
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "修改失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
+ else
if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
{
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
+ else {
+
+ DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "箱货信息不匹配", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
+ }
}
else
@@ -1228,22 +1173,28 @@ 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();
-
+
if (house.NewNotice == "删除发送成功")
{
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "删单失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
+ else
if (house.NewNotice == "修改发送成功")
{
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "修改失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
+ else
if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
{
DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
+ else {
+
+ DbBus.Get(DbList.AMSCenter).Update().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败", ReportState = "接收失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
+ }
}
}
diff --git a/web/djy.Service/djy.Service.csproj b/web/djy.Service/djy.Service.csproj
index 88b6423..524960e 100644
--- a/web/djy.Service/djy.Service.csproj
+++ b/web/djy.Service/djy.Service.csproj
@@ -23,4 +23,8 @@
+
+
+
+
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_Report/Controllers/ApiBase.cs b/web/djy_Report/Controllers/ApiBase.cs
index efa8a5f..9a7fc84 100644
--- a/web/djy_Report/Controllers/ApiBase.cs
+++ b/web/djy_Report/Controllers/ApiBase.cs
@@ -12,7 +12,7 @@ using Common.Tools;
using djy.IService.Djy;
using Common;
-namespace djy_AmsApi.Controllers
+namespace djy_Report.Controllers
{
///
diff --git a/web/djy_Report/Controllers/Report/ReportController.cs b/web/djy_Report/Controllers/Report/ReportController.cs
new file mode 100644
index 0000000..03ac1bd
--- /dev/null
+++ b/web/djy_Report/Controllers/Report/ReportController.cs
@@ -0,0 +1,15 @@
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+
+namespace djy_Report.Controllers.Report
+{
+ [AllowAnonymous]
+ public class ReportController : ApiBase
+ {
+ [HttpGet]
+ public string GetName() {
+
+ return "1";
+ }
+ }
+}
diff --git a/web/djy_Report/Exceptionfilter.cs b/web/djy_Report/Exceptionfilter.cs
index 51178fb..b17ebd2 100644
--- a/web/djy_Report/Exceptionfilter.cs
+++ b/web/djy_Report/Exceptionfilter.cs
@@ -7,7 +7,7 @@ using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Common;
-namespace djy_AmsApi
+namespace djy_Report
{
public class Exceptionfilter : ActionFilterAttribute,IExceptionFilter
{
diff --git a/web/djy_Report/HangFireAuthorizeFilter.cs b/web/djy_Report/HangFireAuthorizeFilter.cs
index 95e20af..8ca7a0a 100644
--- a/web/djy_Report/HangFireAuthorizeFilter.cs
+++ b/web/djy_Report/HangFireAuthorizeFilter.cs
@@ -4,7 +4,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-namespace djy_AmsApi
+namespace djy_Report
{
public class HangFireAuthorizeFilter : IDashboardAuthorizationFilter
{
diff --git a/web/djy_Report/HttpResponseExceptionFilter.cs b/web/djy_Report/HttpResponseExceptionFilter.cs
index d2cf07e..6c46727 100644
--- a/web/djy_Report/HttpResponseExceptionFilter.cs
+++ b/web/djy_Report/HttpResponseExceptionFilter.cs
@@ -7,7 +7,7 @@ using System.Text.Json;
using System.Threading.Tasks;
using Common;
-namespace djy_AmsApi
+namespace djy_Report
{
public class HttpResponseExceptionFilter : IActionFilter, IOrderedFilter
{
diff --git a/web/djy_Report/IOC.cs b/web/djy_Report/IOC.cs
index 4d796a8..1bb76dd 100644
--- a/web/djy_Report/IOC.cs
+++ b/web/djy_Report/IOC.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-namespace djy_AmsApi
+namespace djy_Report
{
///
/// Ioc封装
diff --git a/web/djy_Report/MytMiddleware.cs b/web/djy_Report/MytMiddleware.cs
index 98a8634..49e7f76 100644
--- a/web/djy_Report/MytMiddleware.cs
+++ b/web/djy_Report/MytMiddleware.cs
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
using Common;
using Common.Tools;
-namespace djy_AmsApi
+namespace djy_Report
{
/*
使用方法 在startup Configure中添加
diff --git a/web/djy_Report/Program.cs b/web/djy_Report/Program.cs
index f42e3a7..f67d331 100644
--- a/web/djy_Report/Program.cs
+++ b/web/djy_Report/Program.cs
@@ -1,4 +1,4 @@
-using djy_AmsApi;
+using djy_Report;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
@@ -9,7 +9,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-namespace djy_AmsApi
+namespace djy_Report
{
public class Program
{
diff --git a/web/djy_Report/Startup.cs b/web/djy_Report/Startup.cs
index cab358a..0511b39 100644
--- a/web/djy_Report/Startup.cs
+++ b/web/djy_Report/Startup.cs
@@ -16,13 +16,13 @@ using System.IO;
using Hangfire;
using System.Net.Mime;
using AutoMapper;
-using djy_AmsApi;
+using djy_Report;
using djy.Service;
using Common.Extensions;
using djy.Service.DjyService;
using djy.IService.Djy;
-namespace djy_AmsApi
+namespace djy_Report
{
public class Startup
{
diff --git a/web/djy_Report/djy_Report.csproj.user b/web/djy_Report/djy_Report.csproj.user
new file mode 100644
index 0000000..e4f6e71
--- /dev/null
+++ b/web/djy_Report/djy_Report.csproj.user
@@ -0,0 +1,7 @@
+
+
+
+ MvcControllerEmptyScaffolder
+ root/Common/MVC/Controller
+
+
\ No newline at end of file