jianghaiqing 1 year ago
commit 9e72bf91f1

@ -642,7 +642,7 @@ namespace Myshipping.Application
model.BookingId = bkOrder.Id; //客户订舱数据与订舱台账数据关联
await _rep.UpdateAsync(model);
var ctnList = await _repCtn.Where(x => x.BILLID == model.Id).ToListAsync();
var ctnList = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == model.Id).ToListAsync();
foreach (var ctn in ctnList)
{
ctn.Id = YitIdHelper.NextId();
@ -978,7 +978,7 @@ namespace Myshipping.Application
model.BookingId = bkOrder.Id; //客户订舱数据与订舱台账数据关联
await _rep.UpdateAsync(model);
var ctnList = await _repCtn.Where(x => x.BILLID == model.Id).ToListAsync();
var ctnList = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == model.Id).ToListAsync();
foreach (var ctn in ctnList)
{
ctn.Id = YitIdHelper.NextId();

@ -962,8 +962,10 @@ namespace Myshipping.Application
{
throw Oops.Bah(ms);
}
JsonUtil.PropToUpper(input, "ORDNO", "BSSTATUS", "YARDID", "YardContract", "YardContractTel", "YardContractEmail", "MARKS", "DESCRIPTION", "CONSIGNEENAME", "SHIPPERNAME", "NOTIFYPARTYNAME", "DZRemark", "CZRemark");
if (input.ctnInputs != null)
{
var groupList = input.ctnInputs.Where(x => x.CTNNUM > 0).GroupBy(c => c.CTNALL).Select(g => $"{g.Key}*{g.Sum(gg => gg.CTNNUM)}");
@ -1082,7 +1084,18 @@ namespace Myshipping.Application
}
else
{
var mlist = await _rep.AsQueryable().Filter(null, true).Where(x => x.Id == input.Id).FirstAsync();
if (!(mlist.OPID==UserManager.UserId.ToString()|| mlist.DOCID==UserManager.UserId.ToString()||mlist.CUSTSERVICEID==UserManager.UserId.ToString()||mlist.ROUTEID==UserManager.UserId.ToString()||mlist.CreatedUserId.ToString()==UserManager.UserId.ToString())) {
throw Oops.Bah("您没有当前单据的操作权限!");
}
if (string.IsNullOrEmpty(entity.VOYNO))
{
entity.VOYNO = entity.VOYNOINNER;
@ -2376,6 +2389,10 @@ namespace Myshipping.Application
{
throw Oops.Bah("订阅目的港船公司或提单号不能为空!");
}
if (!item.isBook && (string.IsNullOrWhiteSpace(item.YARD) || string.IsNullOrWhiteSpace(item.YardCode) || string.IsNullOrWhiteSpace(item.MBLNO)))
{
throw Oops.Bah("订阅港前数据提单号或场站不能为空!");
}
billTraceList.Add(new BillTraceList
{
BusinessId = item.BusinessId,
@ -8628,9 +8645,9 @@ namespace Myshipping.Application
order.ATD = sjlg_time;
await _rep.AsUpdateable(order).IgnoreColumns().ExecuteCommandAsync();
var list = await _rep.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID && x.CARRIERID == order.CARRIERID && x.VESSEL == order.VESSEL && x.VOYNO == order.VOYNO && x.Id != order.Id&&x.ATD!=null)
var orderlist = await _rep.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID && x.CARRIERID == order.CARRIERID && x.VESSEL == order.VESSEL && x.VOYNO == order.VOYNO && x.Id != order.Id)
.WhereIF(!string.IsNullOrEmpty(order.VOYNOINNER), x => x.VOYNOINNER == order.VOYNOINNER).ToListAsync();
foreach (var i in list)
foreach (var i in orderlist)
{
i.StartETA = yjdk_time;
i.YgtETD = yjlk_time;
@ -8638,6 +8655,22 @@ namespace Myshipping.Application
i.ATD = sjlg_time;
await _rep.AsUpdateable(i).IgnoreColumns().ExecuteCommandAsync();
}
var itemcode = _cache.GetAllTenantParam().Result.Where(x => x.ParaCode == "BOOKING_DATA_PUSH" && x.TenantId == UserManager.TENANT_ID).Select(x => x.ItemCode).FirstOrDefault();
if (!string.IsNullOrEmpty(itemcode))
{
if (itemcode == "true")
{
List<long> list = new List<long>();
list = orderlist.Where(x => x.ParentId == 0).Select(x => x.Id).ToList();
list.Add(order.Id);
if (list != null && list.Count > 0)
{
await SendBookingOrder(list.ToArray());
}
}
}
return order;
}

@ -781,7 +781,17 @@ namespace Myshipping.Application.Service.DataSync.Dto
/// </summary>
public string ForeignAgent { get; set; }
/// <summary>
/// 三方付费
/// </summary>
public string ThirdPay { get; set; }
/// <summary>
/// 三方付费Code
/// </summary>
public string ThirdPayCode { get; set; }
public List<BookingCtnDto> ctnInputs { get; set; }
/// <summary>

Loading…
Cancel
Save