jianghaiqing 1 year ago
commit 934246ebc4

@ -1124,7 +1124,7 @@ namespace Myshipping.Application
var et = await _rep.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.MBLNO == order.MBLNO && x.TenantId == UserManager.TENANT_ID && x.ParentId == 0 && x.Id != Id).FirstAsync();
if (et != null)
{
throw Oops.Bah("当前主提单号已存在,无法恢复!");
throw Oops.Bah("当前主提单号已存在,无法恢复!");
}
var ctnlist = await _repCtn.AsQueryable().Where(x => x.BILLID == Id).Select(x => x.Id).ToListAsync();
await _repCtn.UpdateAsync(x => x.BILLID == Id, x => new BookingCtn { IsDeleted = false });
@ -1537,7 +1537,7 @@ namespace Myshipping.Application
//更新货物状态
await SetBookingOrderGoodsStatus((long)input.BookingId);
var order = _rep.Where(x => x.Id == input.BookingId).First();
var userid = order.CreatedUserId;
if (userid != null)
@ -1581,7 +1581,7 @@ namespace Myshipping.Application
config.RemoveAll(x => x.ConfigId == item.ConfigId);
}
var t = list.Union<GoodsStatusQuery>(config).OrderBy(x => x.Sort).DistinctBy(x => x.StatusName).ToList();
return t;
}
@ -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
#region 打印
@ -5020,7 +5068,8 @@ namespace Myshipping.Application
var url = _cache.GetAllDictData().Result.Where(x => x.Code == "xiangManCangPostUrl").Select(x => x.Value).FirstOrDefault();
var account = _webAccountConfig.GetAccountConfig("XiangManCang", UserManager.UserId).Result;
if (account==null) {
if (account == null)
{
throw Oops.Bah("未配置箱满仓账号!");
}
@ -7934,7 +7983,7 @@ namespace Myshipping.Application
var sjlg_time = item.GetDateTimeValue("sjlg_time");//实际离港时间
_logger.LogInformation("船期:" + yjdk_time + yjlk_time + sjdk_time + sjlg_time);
bool flag = false;
if (order.StartETA != yjdk_time&& yjdk_time!=null)
if (order.StartETA != yjdk_time && yjdk_time != null)
{
order.StartETA = yjdk_time;
@ -7987,13 +8036,14 @@ namespace Myshipping.Application
/// <param name="code"></param>
/// <param name="bookingId"></param>
/// <returns></returns>
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();
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)
{
_logger.LogInformation($"检查{code}货物状态:{bookingId}");

@ -154,4 +154,165 @@ namespace Myshipping.Application
/// </summary>
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