入货通知历史引入接口

optimize
wanghaomei 1 year ago
parent 2a242f4f86
commit 730f087c9e

@ -2567,6 +2567,54 @@ namespace Myshipping.Application
} }
} }
/// <summary>
/// 查询历史放舱数据(用于历史引入)
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/BookingOrder/LetterYardHis")]
public async Task<SqlSugarPagedList<BookingLetteryardHisOutput>> LetterYardHis(BookingLetteryardHisInput input)
{
var list =await _repLetterYard.AsQueryable()
.InnerJoin<BookingOrder>((ly, ord) => ly.BookingId == ord.Id)
.WhereIF(!string.IsNullOrEmpty(input.MBLNO), (ly, ord) => ord.MBLNO.Contains(input.MBLNO))
.WhereIF(!string.IsNullOrEmpty(input.HBLNO), (ly, ord) => ord.HBLNO.Contains(input.HBLNO))
.WhereIF(!string.IsNullOrEmpty(input.BOOKINGNO), (ly, ord) => ord.BOOKINGNO.Contains(input.BOOKINGNO))
.WhereIF(!string.IsNullOrEmpty(input.CUSTOMERNAME), (ly, ord) => ord.CUSTOMERNAME.Contains(input.CUSTOMERNAME))
.WhereIF(input.BETD.HasValue, (ly, ord) => ord.ETD > input.BETD.Value)
.WhereIF(input.EETD.HasValue, (ly, ord) => ord.ETD < input.EETD.Value.AddDays(1))
.OrderByDescending((ly, ord) => ly.CreatedTime)
.Select((ly, ord) => new BookingLetteryardHisOutput()
{
MBLNO = ord.MBLNO,
HBLNO = ord.HBLNO,
BOOKINGNO = ord.BOOKINGNO,
ETD = ord.ETD.Value.ToString("yyyy-MM-dd"),
CUSTOMERNAME = ord.CUSTOMERNAME,
ToName = ly.ToName,
Attn = ly.Attn,
AttnMail = ly.AttnMail,
AttnPhone = ly.AttnPhone,
AttnTel = ly.AttnTel,
FromMail = ly.FromMail,
FromName = ly.FromName,
FromPhone = ly.FromPhone,
FromTel = ly.FromTel,
Description = ly.Description,
CloseDocTime = ly.CloseDocTime,
ClosingTime = ly.ClosingTime,
VgmTime = ly.VgmTime,
YARD = ly.YARD,
YARDCONTRACT = ly.YARDCONTRACT,
YARDCONTRACTTEL = ly.YARDCONTRACTTEL,
YARDID = ly.YARDID,
Remark = ly.Remark,
})
.ToPagedListAsync(input.PageNo, input.PageSize); ;
return list;
}
#endregion #endregion
#region 打印 #region 打印
@ -5020,7 +5068,8 @@ namespace Myshipping.Application
var url = _cache.GetAllDictData().Result.Where(x => x.Code == "xiangManCangPostUrl").Select(x => x.Value).FirstOrDefault(); var url = _cache.GetAllDictData().Result.Where(x => x.Code == "xiangManCangPostUrl").Select(x => x.Value).FirstOrDefault();
var account = _webAccountConfig.GetAccountConfig("XiangManCang", UserManager.UserId).Result; var account = _webAccountConfig.GetAccountConfig("XiangManCang", UserManager.UserId).Result;
if (account==null) { if (account == null)
{
throw Oops.Bah("未配置箱满仓账号!"); throw Oops.Bah("未配置箱满仓账号!");
} }
@ -7934,7 +7983,7 @@ namespace Myshipping.Application
var sjlg_time = item.GetDateTimeValue("sjlg_time");//实际离港时间 var sjlg_time = item.GetDateTimeValue("sjlg_time");//实际离港时间
_logger.LogInformation("船期:" + yjdk_time + yjlk_time + sjdk_time + sjlg_time); _logger.LogInformation("船期:" + yjdk_time + yjlk_time + sjdk_time + sjlg_time);
bool flag = false; bool flag = false;
if (order.StartETA != yjdk_time&& yjdk_time!=null) if (order.StartETA != yjdk_time && yjdk_time != null)
{ {
order.StartETA = yjdk_time; order.StartETA = yjdk_time;
@ -7991,9 +8040,10 @@ namespace Myshipping.Application
public async Task SetGoodsStatus(string code, long bookingId) public async Task SetGoodsStatus(string code, long bookingId)
{ {
var CreatedUserId = _rep.AsQueryable().Filter(null, true).Where(x => x.Id == bookingId).Select(x => x.CreatedUserId).First(); var CreatedUserId = _rep.AsQueryable().Filter(null, true).Where(x => x.Id == bookingId).Select(x => x.CreatedUserId).First();
if (CreatedUserId!=null) { if (CreatedUserId != null)
{
var gsCfg = _goodsStatusConfig.FirstOrDefault(x => x.SystemCode == code && x.CreatedUserId ==(long) CreatedUserId); var gsCfg = _goodsStatusConfig.FirstOrDefault(x => x.SystemCode == code && x.CreatedUserId == (long)CreatedUserId);
if (gsCfg != null) if (gsCfg != null)
{ {
_logger.LogInformation($"检查{code}货物状态:{bookingId}"); _logger.LogInformation($"检查{code}货物状态:{bookingId}");

@ -154,4 +154,165 @@ namespace Myshipping.Application
/// </summary> /// </summary>
public string UrlVgmSi { get; set; } public string UrlVgmSi { get; set; }
} }
/// <summary>
/// 入货通知历史查询输入
/// </summary>
public class BookingLetteryardHisInput : PageInputBase
{
/// <summary>
/// 主提单号
/// </summary>
public virtual string MBLNO { get; set; }
/// <summary>
/// 分提单号
/// </summary>
public virtual string HBLNO { get; set; }
/// <summary>
/// 业务编号
/// </summary>
public virtual string BOOKINGNO { get; set; }
/// <summary>
/// 开船日期开始
/// </summary>
public virtual DateTime? BETD { get; set; }
/// <summary>
/// 开船日期截止
/// </summary>
public virtual DateTime? EETD { get; set; }
/// <summary>
/// 客户(委托单位)
/// </summary>
public string CUSTOMERNAME { get; set; }
}
/// <summary>
/// 入货通知历史查询输出
/// </summary>
public class BookingLetteryardHisOutput
{
/// <summary>
/// 主提单号
/// </summary>
public virtual string MBLNO { get; set; }
/// <summary>
/// 分提单号
/// </summary>
public virtual string HBLNO { get; set; }
/// <summary>
/// 业务编号
/// </summary>
public virtual string BOOKINGNO { get; set; }
/// <summary>
/// 开船日期
/// </summary>
public virtual string ETD { get; set; }
/// <summary>
/// 客户(委托单位)
/// </summary>
public string CUSTOMERNAME { get; set; }
/// <summary>
/// TO
/// </summary>
public virtual string ToName { get; set; }
/// <summary>
/// ATTN
/// </summary>
public virtual string Attn { get; set; }
/// <summary>
/// ATTN电话
/// </summary>
public virtual string AttnTel { get; set; }
/// <summary>
/// ATTN邮箱
/// </summary>
public virtual string AttnMail { get; set; }
/// <summary>
/// ATTN手机
/// </summary>
public string AttnPhone { get; set; }
/// <summary>
/// FROM
/// </summary>
public virtual string FromName { get; set; }
/// <summary>
/// FROM电话
/// </summary>
public virtual string FromTel { get; set; }
/// <summary>
/// FROM邮箱
/// </summary>
public virtual string FromMail { get; set; }
/// <summary>
/// FROM手机
/// </summary>
public string FromPhone { get; set; }
/// <summary>
/// 描述
/// </summary>
public virtual string Description { get; set; }
/// <summary>
/// 截单时间
/// </summary>
public virtual DateTime? CloseDocTime { get; set; }
/// <summary>
/// 截港时间
/// </summary>
public virtual DateTime? ClosingTime { get; set; }
/// <summary>
/// 截VGM时间
/// </summary>
public virtual DateTime? VgmTime { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
/// <summary>
/// 场站代码
/// </summary>
public string YARDID { get; set; }
/// <summary>
/// 场站
/// </summary>
public string YARD { get; set; }
/// <summary>
/// 场站联系人
/// </summary>
public string YARDCONTRACT { get; set; }
/// <summary>
/// 场站联系人电话
/// </summary>
public string YARDCONTRACTTEL { get; set; }
}
} }

Loading…
Cancel
Save