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,9 +133,12 @@ namespace djy.Model.AmsDto
/// 最后一个非美港/中转港Code
/// </summary>
public string LastNoUsPortCode { get; set; }
/// <summary>
/// SASCCODE
/// </summary>
public string SASCCODE { get; set; }
public List<AMS_HouseDto> HouseDto { get; set; } = new List<AMS_HouseDto>();
}

@ -34,7 +34,7 @@ namespace djy.Service.Ams
public class AmsService : ServBase, IAmsService
{
#region 查询列表
public TableData Load(AMSQuery req, User user, UserAuthorityDto aut)
public TableData Load(AMSQuery req, User user, UserAuthorityDto aut)
{
var result = new TableData();
int count = 0;
@ -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")
@ -213,8 +219,8 @@ namespace djy.Service.Ams
}
else
{
if (DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == dto.GID).ToList().Where(x=>x.ReportState.Contains("未申报")).Count()>0)
if (DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == dto.GID).ToList().Where(x => x.ReportState.Contains("未申报")).Count() > 0)
{
DbBus.Get(DbList.AMSCenter).Transaction(() =>
{
@ -242,37 +248,37 @@ namespace djy.Service.Ams
DbBus.Get(DbList.AMSCenter).Delete<AMS_Cntrno>().Where(w => w.PID == master.GID).ExecuteAffrows();
foreach (var item in dto.HouseDto)
{
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(w => w.GID == item.GID).ToOne();
house = item.MapTo<AMS_House>();
house.GID = Guid.NewGuid().ToString("N");
house.PID = master.GID;
house.IsDel = false;
house.State = "0";
house.ReportState = "未申报";
DbBus.Get(DbList.AMSCenter).Insert(house).ExecuteAffrows();
if (item.CntrnoDto != null && item.CntrnoDto.Count() > 0)
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(w => w.GID == item.GID).ToOne();
house = item.MapTo<AMS_House>();
house.GID = Guid.NewGuid().ToString("N");
house.PID = master.GID;
house.IsDel = false;
house.State = "0";
house.ReportState = "未申报";
DbBus.Get(DbList.AMSCenter).Insert(house).ExecuteAffrows();
if (item.CntrnoDto != null && item.CntrnoDto.Count() > 0)
{
foreach (var it in item.CntrnoDto)
{
foreach (var it in item.CntrnoDto)
{
AMS_Cntrno cntrno = it.MapTo<AMS_Cntrno>();
AMS_Cntrno cntrno = it.MapTo<AMS_Cntrno>();
cntrno.GID = Guid.NewGuid().ToString("N");
cntrno.PID = master.GID;
cntrno.HID = house.GID;
cntrno.IsDel = false;
cntrno.GID = Guid.NewGuid().ToString("N");
cntrno.PID = master.GID;
cntrno.HID = house.GID;
cntrno.IsDel = false;
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
}
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
}
AMS_MasterHistory history = new AMS_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.AM_ID = house.GID;
history.SendTime = DateTime.Now;
history.State = "新增";
history.Type = "0";
history.Operator = user.SHOWNAME;
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "创建了单据";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
}
AMS_MasterHistory history = new AMS_MasterHistory();
history.GID = Guid.NewGuid().ToString("N");
history.AM_ID = house.GID;
history.SendTime = DateTime.Now;
history.State = "新增";
history.Type = "0";
history.Operator = user.SHOWNAME;
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "创建了单据";
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
}
guid = master.GID;
});
@ -281,68 +287,68 @@ namespace djy.Service.Ams
{
DbBus.Get(DbList.AMSCenter).Transaction(() =>
{
var master = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(w => w.GID == dto.GID).ToOne();
master.CARRIERID = dto.CARRIERID;
master.MBLNO = dto.MBLNO;
master.VESSEL = dto.VESSEL;
master.VOYNO = dto.VOYNO;
master.ShippingType = dto.ShippingType;
master.SHIPPERADDR = dto.SHIPPERADDR;
master.ETA = dto.ETA;
master.ETD = dto.ETD;
master.LastUpdate = DateTime.Now;
master.ShippingNo = dto.ShippingNo;
master.ConsignmentType = dto.ConsignmentType;
master.LoadingPortCode = dto.LoadingPortCode;
master.PORTDISCHARGECode = dto.PORTDISCHARGECode;
master.LastNoUsPortCode = dto.LastNoUsPortCode;
master.PORTDISCHARGE = DbBus.Get(DbList.Common).Select<CodePort>().Where(x => x.Code == master.PORTDISCHARGECode).ToList().Select(x => x.EnName).FirstOrDefault();
master.CARRIER = DbBus.Get(DbList.Common).Select<CodeCarrier>().Where(x => x.Code == master.CARRIERID).ToList().Select(x => x.EnName).FirstOrDefault();
master.LoadingPort = DbBus.Get(DbList.Common).Select<CodePortLoad>().Where(x => x.EdiCode == master.LoadingPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
master.LastNoUsPort = DbBus.Get(DbList.Common).Select<CodePort>().Where(x => x.Code == master.LastNoUsPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().SetSource(master).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Delete<AMS_Cntrno>().Where(w => w.PID == master.GID).ExecuteAffrows();
List<string> houseid = dto.HouseDto.Select(x => x.GID).ToList();
foreach (var item in dto.HouseDto)
{
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(w => w.GID == item.GID).ToOne();
if (house != null)
{
house.HBLNo = item.HBLNo;
house.SHIPPERNAME = item.SHIPPERNAME;
house.SHIPPERADDR = item.SHIPPERADDR;
house.SHIPPERTEL = item.SHIPPERTEL;
house.CONSIGNEEName = item.CONSIGNEEName;
house.CONSIGNEEDADDR = item.CONSIGNEEDADDR;
house.CONSIGNEETEL = item.CONSIGNEETEL;
house.NOTIFYPARTYNAME = item.NOTIFYPARTYNAME;
house.NOTIFYPARTYADDR = item.NOTIFYPARTYADDR;
house.NOTIFYPARTYTEL = item.NOTIFYPARTYTEL;
house.SHIPPERCountry = item.SHIPPERCountry;
house.SHIPPERCountryCode = item.SHIPPERCountryCode;
house.SHIPPERCity = item.SHIPPERCity;
house.CONSIGNEECountry = item.CONSIGNEECountry;
house.CONSIGNEECountryCode = item.CONSIGNEECountryCode;
house.CONSIGNEECity = item.CONSIGNEECity;
house.NOTIFYPARTYCountry = item.NOTIFYPARTYCountry;
house.NOTIFYPARTYCountryCode = item.NOTIFYPARTYCountryCode;
house.NOTIFYPARTYCity = item.NOTIFYPARTYCity;
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().SetSource(house).ExecuteAffrows();
if (item.CntrnoDto != null && item.CntrnoDto.Count() > 0)
{
foreach (var it in item.CntrnoDto)
{
var cntrno = new AMS_Cntrno();
cntrno = it.MapTo<AMS_Cntrno>();
cntrno.GID = Guid.NewGuid().ToString("N");
cntrno.PID = master.GID;
cntrno.HID = house.GID;
cntrno.IsDel = false;
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
}
}
var master = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>().Where(w => w.GID == dto.GID).ToOne();
master.CARRIERID = dto.CARRIERID;
master.MBLNO = dto.MBLNO;
master.VESSEL = dto.VESSEL;
master.VOYNO = dto.VOYNO;
master.ShippingType = dto.ShippingType;
master.SHIPPERADDR = dto.SHIPPERADDR;
master.ETA = dto.ETA;
master.ETD = dto.ETD;
master.LastUpdate = DateTime.Now;
master.ShippingNo = dto.ShippingNo;
master.ConsignmentType = dto.ConsignmentType;
master.LoadingPortCode = dto.LoadingPortCode;
master.PORTDISCHARGECode = dto.PORTDISCHARGECode;
master.LastNoUsPortCode = dto.LastNoUsPortCode;
master.PORTDISCHARGE = DbBus.Get(DbList.Common).Select<CodePort>().Where(x => x.Code == master.PORTDISCHARGECode).ToList().Select(x => x.EnName).FirstOrDefault();
master.CARRIER = DbBus.Get(DbList.Common).Select<CodeCarrier>().Where(x => x.Code == master.CARRIERID).ToList().Select(x => x.EnName).FirstOrDefault();
master.LoadingPort = DbBus.Get(DbList.Common).Select<CodePortLoad>().Where(x => x.EdiCode == master.LoadingPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
master.LastNoUsPort = DbBus.Get(DbList.Common).Select<CodePort>().Where(x => x.Code == master.LastNoUsPortCode).ToList().Select(x => x.EnName).FirstOrDefault();
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().SetSource(master).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Delete<AMS_Cntrno>().Where(w => w.PID == master.GID).ExecuteAffrows();
List<string> houseid = dto.HouseDto.Select(x => x.GID).ToList();
foreach (var item in dto.HouseDto)
{
var house = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(w => w.GID == item.GID).ToOne();
if (house != null)
{
house.HBLNo = item.HBLNo;
house.SHIPPERNAME = item.SHIPPERNAME;
house.SHIPPERADDR = item.SHIPPERADDR;
house.SHIPPERTEL = item.SHIPPERTEL;
house.CONSIGNEEName = item.CONSIGNEEName;
house.CONSIGNEEDADDR = item.CONSIGNEEDADDR;
house.CONSIGNEETEL = item.CONSIGNEETEL;
house.NOTIFYPARTYNAME = item.NOTIFYPARTYNAME;
house.NOTIFYPARTYADDR = item.NOTIFYPARTYADDR;
house.NOTIFYPARTYTEL = item.NOTIFYPARTYTEL;
house.SHIPPERCountry = item.SHIPPERCountry;
house.SHIPPERCountryCode = item.SHIPPERCountryCode;
house.SHIPPERCity = item.SHIPPERCity;
house.CONSIGNEECountry = item.CONSIGNEECountry;
house.CONSIGNEECountryCode = item.CONSIGNEECountryCode;
house.CONSIGNEECity = item.CONSIGNEECity;
house.NOTIFYPARTYCountry = item.NOTIFYPARTYCountry;
house.NOTIFYPARTYCountryCode = item.NOTIFYPARTYCountryCode;
house.NOTIFYPARTYCity = item.NOTIFYPARTYCity;
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().SetSource(house).ExecuteAffrows();
if (item.CntrnoDto != null && item.CntrnoDto.Count() > 0)
{
foreach (var it in item.CntrnoDto)
{
var cntrno = new AMS_Cntrno();
cntrno = it.MapTo<AMS_Cntrno>();
cntrno.GID = Guid.NewGuid().ToString("N");
cntrno.PID = master.GID;
cntrno.HID = house.GID;
cntrno.IsDel = false;
DbBus.Get(DbList.AMSCenter).Insert(cntrno).ExecuteAffrows();
}
}
//AMS_MasterHistory history = new AMS_MasterHistory();
//history.GID = Guid.NewGuid().ToString("N");
//history.AM_ID = item.GID;
@ -390,8 +396,8 @@ namespace djy.Service.Ams
}
}
guid = master.GID;
});
guid = master.GID;
});
}
return guid;
@ -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.requesterDea = sysOptionConfig.Webconfig.requesterDea;
}
masterBillInfo.consignmentType = master.ConsignmentType;
masterBillInfo.loadHarbour = master.LoadingPort;
masterBillInfo.loadHarbourCode = master.LoadingPortCode;
@ -597,7 +611,15 @@ namespace djy.Service.Ams
}
masterBillInfo.requesterDea = sysOptionConfig.Webconfig.requesterDea;
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;
@ -618,7 +640,7 @@ namespace djy.Service.Ams
req.Message = "当前状态不能重发!如有疑问,请联系相关客服!";
return req;
}
if (docType == "AMSDOC"&&(item.NewNotice== "新增发送成功"))
if (docType == "AMSDOC" && (item.NewNotice == "新增发送成功"))
{
req.Code = 201;
req.Message = "当前单据已经发送,不能再次发送!如有疑问,请联系相关客服!";
@ -874,7 +896,7 @@ namespace djy.Service.Ams
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送单据失败,失败原因:" + msg + errorInfo;
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
}
req.Code = 201;
req.Message = "操作失败," + msg + errorInfo;
return req;
@ -889,22 +911,22 @@ namespace djy.Service.Ams
if (docType == "AMSDOC")
{
history.State = "新增发送成功";
}
else if (docType == "AMSAR")
{
history.State = "重发成功";
}
else if (docType == "AMSM")
{
history.State = "修改发送成功";
}
else
{
history.State = "删除发送成功";
}
history.Operator = user.SHOWNAME;
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送了单据";
@ -1066,7 +1088,7 @@ namespace djy.Service.Ams
if (house.MateState.Contains("3Z"))
{
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "3Z," + retdto.status, NewNotice = "海关接收成功"}).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = "3Z," + retdto.status, NewNotice = "海关接收成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
else
@ -1103,7 +1125,7 @@ namespace djy.Service.Ams
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();
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 == "修改发送成功")
{
@ -1115,7 +1137,7 @@ namespace djy.Service.Ams
}
else
{
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = 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 = house.MateState + "," + retdto.status, NewNotice = "船司匹配成功" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
}
@ -1206,7 +1228,7 @@ namespace djy.Service.Ams
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();
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 == "修改发送成功")
@ -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();
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
{
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { MateState = retdto.status, NewNotice = "匹配失败" }).Where(w => w.GID == retdto.businessId).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 == "删除发送成功")
// {
// 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
// {
// 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,8 +1335,9 @@ namespace djy.Service.Ams
}).Distinct().ToList();
return List;
}
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
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,
ENName = x.EnName,
@ -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
{
@ -1452,7 +1476,7 @@ namespace djy.Service.Ams
}
public List<CommonCodeValue> GetVessel(string strlink,int page,int limit)
public List<CommonCodeValue> GetVessel(string strlink, int page, int limit)
{
try
{
@ -1465,8 +1489,9 @@ namespace djy.Service.Ams
}).Distinct().ToList();
return List;
}
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
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,
Value = 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,10 +624,7 @@ 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();
}
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")
{

@ -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