master
wet 2 years ago
parent 13c9bfaad8
commit 158132021a

@ -0,0 +1,31 @@
using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;
using System.ComponentModel.DataAnnotations;
namespace Common.DJYModel
{
[JsonObject(MemberSerialization.OptIn), Table(Name = "company_new_param_value", DisableSyncStructure = true)]
public class company_new_param_value
{
public string ParaCode { get; set; }
public string CompId { get; set; }
public string ItemCode { get; set; }
public string Remark { get; set; }
public string Category { get; set; }
public int? Sort { get; set; }
}
}

@ -48,7 +48,7 @@ namespace djy.IService.Ams
Response SaveReceipt(string retdto);
Task<company_new_param_value> GetSASCCODE(User user);
List<CommonCodeValue> GetCodeProvince(string code);

@ -133,7 +133,10 @@ namespace djy.Model.AmsDto
/// 最后一个非美港/中转港Code
/// </summary>
public string LastNoUsPortCode { get; set; }
/// <summary>
/// SASCCODE
/// </summary>
public string SASCCODE { get; set; }

@ -62,12 +62,21 @@ namespace djy.Service.Ams
.WhereIf(hou != null, x => hou.Contains(x.GID))
.WhereIf(req.BDate != null, x => x.CreateTime >= req.BDate)
.WhereIf(req.EDate != null, x => x.CreateTime <= req.EDate).OrderByDescending(x => x.CreateTime);
var SASCCODEList = DbBus.Get(DbList.djydb).Select<company_new_param_value>().Where(x => x.ParaCode == "AMSSASCCODE").ToList();
var list = dto.Page(req.Page, req.Limit).ToList<AMSDto>();
if (list != null)
{
foreach (var item in list)
{
var SASCCODE = SASCCODEList.Where(x => x.CompId == item.CompID).FirstOrDefault();
if (SASCCODE != null)
{
item.SASCCODE = SASCCODE.ItemCode;
}
else
{
item.SASCCODE = "NIAV";
}
var hodto = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == item.GID)
.WhereIf(!string.IsNullOrEmpty(req.Hid), x => x.GID == req.Hid)
.WhereIf(req.HBLNo != null, x => x.HBLNo.Contains(req.HBLNo.Trim()))
@ -78,7 +87,6 @@ namespace djy.Service.Ams
item.HouseDto = hodto;
if (hodto != null)
{
foreach (var it in hodto)
{
var cnt = DbBus.Get(DbList.AMSCenter).Select<AMS_Cntrno>().Where(x => x.IsDel != true && x.HID == it.GID).ToList();
@ -89,8 +97,6 @@ namespace djy.Service.Ams
}
count += hodto.Count();
}
}
result.data = list.Where(x => x.HouseDto != null && x.HouseDto.Count() > 0).ToList();
if (req.ReportState == "0")
@ -423,6 +429,7 @@ namespace djy.Service.Ams
var url = DbBus.Get(DbList.djydb).Select<ParamSet>().Where(x => x.PARAMNAME == "AMSURL").ToOne();
var method = DbBus.Get(DbList.djydb).Select<ParamSet>().Where(x => x.PARAMNAME == "AMSMethod").ToOne();
var timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
var AMSRequestDEA = DbBus.Get(DbList.djydb).Select<company_new_param_value>().Where(x => x.CompId == user.CompId && x.ParaCode == "AMSRequestDEA").First();
foreach (string oid in id)
{
if (oid != "")
@ -457,8 +464,15 @@ namespace djy.Service.Ams
{
masterBillInfo.voyage = master.VOYNO;
}
if (AMSRequestDEA != null)
{
masterBillInfo.requesterDea = AMSRequestDEA.ItemCode;
}
else {
masterBillInfo.requesterDea = sysOptionConfig.Webconfig.requesterDea;
}
masterBillInfo.consignmentType = master.ConsignmentType;
masterBillInfo.loadHarbour = master.LoadingPort;
masterBillInfo.loadHarbourCode = master.LoadingPortCode;
@ -597,7 +611,15 @@ namespace djy.Service.Ams
}
if (AMSRequestDEA != null)
{
masterBillInfo.requesterDea = AMSRequestDEA.ItemCode;
}
else
{
masterBillInfo.requesterDea = sysOptionConfig.Webconfig.requesterDea;
}
masterBillInfo.consignmentType = master.ConsignmentType;
masterBillInfo.loadHarbour = master.LoadingPort;
masterBillInfo.loadHarbourCode = master.LoadingPortCode;
@ -1227,42 +1249,42 @@ namespace djy.Service.Ams
}
}
else
{
AMS_MasterHistory history = new AMS_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.AM_ID = retdto.businessId;
history.SendTime = DateTime.Now;
history.State = "匹配失败";
history.Type = "1";
history.Operator = "系统管理员";
history.Remark = "您的单据" + house.HBLNo + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "匹配失败";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
//else
//{
// AMS_MasterHistory history = new AMS_MasterHistory();
// history.GID = Guid.NewGuid().ToString("N");
// history.AM_ID = retdto.businessId;
// history.SendTime = DateTime.Now;
// history.State = "匹配失败";
// history.Type = "1";
// 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 == "删除发送成功")
{
// if (house.NewNotice == "删除发送成功")
// {
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
else
if (house.NewNotice == "修改发送成功")
{
// DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
// }
// else
// if (house.NewNotice == "修改发送成功")
// {
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
else
if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
{
// DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
// }
// else
// if (house.NewNotice == "重发发送成功" || house.NewNotice == "新增发送成功")
// {
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
else
{
// DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
// }
// else
// {
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
// DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
// }
}
//}
});
}
else
@ -1313,7 +1335,8 @@ namespace djy.Service.Ams
}).Distinct().ToList();
return List;
}
else {
else
{
var List = DbBus.Get(DbList.Common).Select<CodeCountry>().WhereIf(strlink != "", x => x.Code.Contains(strlink.Trim()) || x.EnName.Contains(strlink.Trim()) || x.CnName.Contains(strlink.Trim())).Page(page, limit).ToList().Select(x => new CommonCNEN
{
Code = x.Code,
@ -1416,7 +1439,8 @@ namespace djy.Service.Ams
}).Distinct().ToList();
return List;
}
else {
else
{
var List = DbBus.Get(DbList.Common).Select<CodePort>().WhereIf(strlink != "", x => x.Code.Contains(strlink.Trim()) || x.EnName.Contains(strlink.Trim())).Page(page, limit).ToList().Select(x => new CommonCodeValue
{
@ -1465,7 +1489,8 @@ namespace djy.Service.Ams
}).Distinct().ToList();
return List;
}
else {
else
{
var List = DbBus.Get(DbList.Common).Select<CodeVessel>().WhereIf(strlink != "", x => x.Name.Contains(strlink.Trim())).Page(page, limit).ToList().Select(x => new CommonCodeValue
{
Code = x.Name,
@ -1733,6 +1758,21 @@ namespace djy.Service.Ams
}
});
}
#endregion
public async Task<company_new_param_value> GetSASCCODE(User user)
{
try
{
var List = await DbBus.Get(DbList.djydb).Select<company_new_param_value>().Where(x => x.CompId == user.CompId && x.ParaCode == "AMSSASCCODE").FirstAsync();
return List;
}
catch (Exception e)
{
throw;
}
}
}
}

@ -624,11 +624,8 @@ namespace djy.Service.Isf
history.Operator = "系统管理员";
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 == "重发发送" || master.NewNotice == "新增发送")
{
DbBus.Get(DbList.AMSCenter).Update<ISF_Master>().Set(w => new ISF_Master { MateState = retdto.status }).Where(w => w.GID == master.GID).ExecuteAffrows();
}
}
else if (retdto.status == "02")
{
ISF_MasterHistory history = new ISF_MasterHistory();

@ -231,7 +231,31 @@ namespace djy_AmsApi.Controllers.AMS
return result;
}
#endregion
[HttpGet("GetSASCCODE")]
public async Task<Response<company_new_param_value>> GetSASCCODE()
{
Response<company_new_param_value> req = new Response<company_new_param_value>();
var user = GetUserInfo();
if (user == null)
{
req.Code = 401;
req.Message = "登录过期,请重新登录!";
return req;
}
var result = ser.GetSASCCODE(user);
req.Result = result.Result;
req.Code = 200;
req.Message ="操作成功";
return req;
}
}
}

File diff suppressed because one or more lines are too long

@ -24,7 +24,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5000",
"applicationUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"dotnetRunMessages": "true"
},
"Docker": {

@ -3,7 +3,7 @@
<PropertyGroup>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
<NameOfLastUsedPublishProfile>C:\Project\DJYAMS\djyweb_ams\web\djy.WebApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>C:\Project\DJYAMS\djyweb_ams\web\djy.WebApi\Properties\PublishProfiles\FolderProfile1.pubxml</NameOfLastUsedPublishProfile>
<ActiveDebugProfile>IIS Express</ActiveDebugProfile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

@ -5,6 +5,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>C:\Project\DJYAMS\djyweb_ams\web\djy_IsfApi\bin\Release\net5.0\publish\</_PublishTargetUrl>
<History>True|2022-09-29T06:06:18.1120086Z;True|2022-08-25T13:52:10.9522475+08:00;True|2022-08-25T10:41:51.2753305+08:00;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;</History>
<History>True|2022-10-13T03:22:56.6976734Z;True|2022-09-29T14:06:18.1120086+08:00;True|2022-08-25T13:52:10.9522475+08:00;True|2022-08-25T10:41:51.2753305+08:00;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;</History>
</PropertyGroup>
</Project>

@ -6,6 +6,6 @@
<Project>
<PropertyGroup>
<_PublishTargetUrl>C:\Project\DJYAMS\djyweb_ams\web\djy_IsfApi\bin\Release\net5.0\publish\</_PublishTargetUrl>
<History>True|2022-09-29T01:19:00.7683602Z;True|2022-09-29T09:13:52.5346287+08:00;True|2022-09-28T17:20:00.5132329+08:00;True|2022-09-28T17:12:55.5194328+08:00;True|2022-09-28T17:08:40.9334943+08:00;True|2022-09-28T17:05:05.8696515+08:00;True|2022-09-28T16:31:42.3084773+08:00;True|2022-09-28T09:20:15.3600913+08:00;True|2022-08-31T11:05:06.8122818+08:00;True|2022-08-23T14:37:55.9777827+08:00;True|2022-08-22T15:49:27.7983465+08:00;</History>
<History>True|2022-10-11T09:38:16.7996816Z;True|2022-09-29T09:19:00.7683602+08:00;True|2022-09-29T09:13:52.5346287+08:00;True|2022-09-28T17:20:00.5132329+08:00;True|2022-09-28T17:12:55.5194328+08:00;True|2022-09-28T17:08:40.9334943+08:00;True|2022-09-28T17:05:05.8696515+08:00;True|2022-09-28T16:31:42.3084773+08:00;True|2022-09-28T09:20:15.3600913+08:00;True|2022-08-31T11:05:06.8122818+08:00;True|2022-08-23T14:37:55.9777827+08:00;True|2022-08-22T15:49:27.7983465+08:00;</History>
</PropertyGroup>
</Project>
Loading…
Cancel
Save