|
|
|
@ -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}");
|
|
|
|
|