zhangxiaofeng 6 months ago
commit ab1094a022

@ -827,6 +827,9 @@ namespace Myshipping.Application.EDI
r.WriteLine("TSR+30+2'");
}
//2024-05-22 少了一行计数追加上 JHQ
//icount = icount + 1;
var str_pay = "";
if (bill.BLFRT.IndexOf("PREPAID") >= 0)
str_pay = bill.PREPARDAT;
@ -906,6 +909,13 @@ namespace Myshipping.Application.EDI
}
if (bill.CARRIEREDICODE == "ANNU" || bill.CARRIEREDICODE == "CMDU" || bill.CARRIEREDICODE == "CHNL")
{
r.WriteLine("RFF+FF:" + bill.ORDERNO.Trim() + "'");
icount = icount + 1;
}
else
{
if (InttrEdi.UseForWarderCode)
{
r.WriteLine("RFF+FF:" + bill.ORDERNO.Trim() + "'");
@ -921,8 +931,9 @@ namespace Myshipping.Application.EDI
icount = icount + 2;
}
}
}
if (bill.CARRIEREDICODE != "COSU")
if (bill.CARRIEREDICODE != "COSU" && !string.IsNullOrWhiteSpace(bill.MBLNO))
{
if (bill.CARRIEREDICODE == "HLCU")
{
@ -936,6 +947,7 @@ namespace Myshipping.Application.EDI
}
icount = icount + 2;
}
r.WriteLine("RFF+CT:" + bill.CONTRACTNO + "'");
if (bill.BLFRT.IndexOf("PREPAID") >= 0)
@ -1256,6 +1268,7 @@ namespace Myshipping.Application.EDI
else
r.WriteLine("NAD+FW+++" + formatEdiStr("txt", bill.WEITUO) + "'");
icount = icount + 1;
}
else
{
@ -1263,7 +1276,7 @@ namespace Myshipping.Application.EDI
if (InttrEdi.UseForWarderCode)
{
r.WriteLine("NAD+FW+" + InttrEdi.ForWarderCode + ":160:86++" + InttrEdi.ForWarderName + "'");
icount++;
icount = icount + 1;
}
else
{
@ -1271,6 +1284,8 @@ namespace Myshipping.Application.EDI
r.WriteLine("NAD+FW+" + InttrEdi.SENDCODE + ":160:86++" + InttrEdi.SENDNAME.Substring(0, 35) + "+" + InttrEdi.SENDNAME.Substring(35) + "'");
else
r.WriteLine("NAD+FW+" + InttrEdi.SENDCODE + ":160:86++" + InttrEdi.SENDNAME + "'");
icount = icount + 1;
}
}

@ -135,6 +135,11 @@ namespace Myshipping.Application.Event
messageInfo.Main.TaskTitle = $"重要提醒-计费周发生变更 {vesselVoyno} {etd} BLNo:{mblNo}";
messageInfo.Main.TaskDesp = $"重要提醒-计费周发生变更 {vesselVoyno} {etd} BLNo:{mblNo}";
messageInfo.Main.CautionNoticeInfo = new TaskManageOrderCautionNoticeInfo
{
};
var rlt = await service.CreateTaskJob(messageInfo);
}
}

@ -12758,5 +12758,68 @@ namespace Myshipping.Application
}
#endregion
#region 批量更新订舱的详情
/// <summary>
/// 批量更新订舱的详情
/// </summary>
/// <param name="dto">请求参数</param>
/// <returns></returns>
[HttpPost("/BookingOrder/BatchUpdateOrder")]
public async Task BatchUpdateOrder(BatchUpdate dto)
{
if (dto == null)
{
throw Oops.Bah("请求参数不能为空");
}
if(dto.Id.Count == 0)
throw Oops.Bah("未选中需要更新的订舱数据,请重新选择");
string version = Guid.NewGuid().ToString();
// 记录日志
var oldOrderList = await _rep.AsQueryable().Filter(null, true).Where(x => dto.Id.Contains(x.Id) && x.IsDeleted == false).ToListAsync();
if(dto.Id.Count != oldOrderList.Count)
throw Oops.Bah("订舱数据获取失败,部分订舱数据未获取到,订舱数据为空或已作废");
//oldOrderList.ForEach()
foreach (var oldOrder in oldOrderList)
{
var newOrder = oldOrder.Adapt<BookingOrder>();
newOrder.VERSION = version;
newOrder.VESSEL = dto.VESSEL;
newOrder.VOYNOINNER = dto.VOYNOINNER;
newOrder.ETD = dto.ETD;
newOrder.VOYNO = dto.VOYNO;
newOrder.PORTDISCHARGEID = dto.PORTDISCHARGEID;
newOrder.PORTDISCHARGE = dto.PORTDISCHARGE;
newOrder.DESTINATIONID = dto.DESTINATIONID;
newOrder.DESTINATION = dto.DESTINATION;
newOrder.CLOSINGDATE = dto.CLOSINGDATE;
newOrder.CLOSEDOCDATE = dto.CLOSEDOCDATE;
await SaveLog(newOrder, oldOrder, "批量编辑台账");
}
await _rep.UpdateAsync(x => dto.Id.Contains(x.Id), x => new BookingOrder
{
VERSION = version,
VESSEL = dto.VESSEL,
VOYNOINNER = dto.VOYNOINNER,
ETD = dto.ETD,
VOYNO = dto.VOYNO,
PORTDISCHARGEID = dto.PORTDISCHARGEID,
PORTDISCHARGE = dto.PORTDISCHARGE,
DESTINATIONID = dto.DESTINATIONID,
DESTINATION = dto.DESTINATION,
CLOSINGDATE = dto.CLOSINGDATE,
CLOSEDOCDATE = dto.CLOSEDOCDATE
});
await SendBookingOrder(dto.Id.ToArray());
}
#endregion
}
}

@ -62,6 +62,11 @@ namespace Myshipping.Application.Service.BookingOrder.Dto
/// 截单日期
/// </summary>
public DateTime? CLOSEDOCDATE { get; set; }
/// <summary>
/// 强制更新字段列表(默认只更新有值的字段,如果需要强制更新为空请将字段填写到此列表)
/// </summary>
public List<string> enforceUpdateField { get; set; }
}
/// <summary>

@ -149,6 +149,11 @@ namespace Myshipping.Application
/// <returns>返回回执</returns>
Task<BookingOrderOutput> Save(SaveBookingOrderInput input);
/// <summary>
/// 批量更新订舱的详情
/// </summary>
/// <param name="dto">请求参数</param>
/// <returns></returns>
Task BatchUpdateOrder(BatchUpdate dto);
}
}

@ -57,5 +57,7 @@ namespace Myshipping.Application
/// 用户名称
/// </summary>
public string userName { get; set; }
}
}

@ -42,9 +42,9 @@ namespace Myshipping.Application
/// <summary>
/// 刷新预甩货对应订舱
/// </summary>
/// <param name="nominationId">预甩货主键</param>
/// <param name="taskPkId">预甩货主任务主键</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> RefreshBookingOrder(string nominationId);
Task<TaskManageOrderResultDto> RefreshBookingOrder(string taskPkId);
/// <summary>
/// 查看分享链接

@ -602,10 +602,10 @@ namespace Myshipping.Application
/// <summary>
/// 刷新预甩货对应订舱
/// </summary>
/// <param name="nominationId">预甩货主键</param>
/// <param name="taskPkId">预甩货主键</param>
/// <returns>返回回执</returns>
[HttpGet("/TaskManageRollingNomination/RefreshBookingOrder")]
public async Task<TaskManageOrderResultDto> RefreshBookingOrder(string nominationId)
public async Task<TaskManageOrderResultDto> RefreshBookingOrder(string taskPkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
@ -616,17 +616,17 @@ namespace Myshipping.Application
*/
var list = _taskRollingNominationInfoRepository.AsQueryable().Filter(null, true)
.InnerJoin<TaskRollingNominationDetailInfo>((nom, detail) => nom.PK_ID == detail.NOM_ID)
.Where((nom, detail) => nom.PK_ID == nominationId
.Where((nom, detail) => nom.TASK_ID == taskPkId
&& detail.IsDeleted == false && !detail.BOOKING_ID.HasValue)
.Select((nom, detail) => detail).ToList();
if (list.Count > 0)
{
var mblNoArg = list.Select(a=>a.SHIPMENT).Distinct().ToList();
var mblNoArg = list.Select(a => a.SHIPMENT?.Trim()).Distinct().ToList();
var orderList = _bookingOrderRepository.AsQueryable()
.Where(a => mblNoArg.Contains(a.MBLNO) && !a.ParentId.HasValue && a.IsDeleted == false).ToList();
.Where(a => mblNoArg.Contains(a.MBLNO) && (a.ParentId == null || a.ParentId == 0) && a.IsDeleted == false).ToList();
DateTime nowDate = DateTime.Now;
@ -659,6 +659,9 @@ namespace Myshipping.Application
}
}
result.succ = true;
result.msg = "对应订舱完成";
}
catch (Exception ex)
{
@ -1278,7 +1281,7 @@ namespace Myshipping.Application
model.LoadDetailList = list.Select(a => a.Adapt<TaskRollingNominationShipDetailShowDto>()).ToList();
if (model.From != null && model.From.Count > 0)
if (model.From != null && model.From.Count > 1)
{
var firstLoadDetail = model.LoadDetailList.FirstOrDefault();

@ -1604,7 +1604,8 @@ namespace Myshipping.Application
if (b.StatusSKUCode.Equals(st.StatusCode, StringComparison.OrdinalIgnoreCase))
return true;
if (b.SubStatusList != null && b.SubStatusList.Any(c => c.StatusSKUCode.Equals(st.StatusCode, StringComparison.OrdinalIgnoreCase)))
if (b.SubStatusList != null && b.SubStatusList.Any(c => !string.IsNullOrWhiteSpace(c.StatusSKUCode)
&& c.StatusSKUCode.Equals(st.StatusCode, StringComparison.OrdinalIgnoreCase)))
return true;
return false;
@ -1617,7 +1618,7 @@ namespace Myshipping.Application
=> a.Main.SERVICE_WF_ID == rt.WFPKId).ToList();
if(runList.Any(b
=>b.Detail.STATUS_SKU_CODE.Equals(st.StatusCode,StringComparison.OrdinalIgnoreCase)))
=> b.Detail != null && !string.IsNullOrWhiteSpace(b.Detail.STATUS_SKU_CODE) && b.Detail.STATUS_SKU_CODE.Equals(st.StatusCode,StringComparison.OrdinalIgnoreCase)))
{
var detail = runList.FirstOrDefault(b
=> b.Detail.STATUS_SKU_CODE.Equals(st.StatusCode, StringComparison.OrdinalIgnoreCase));

Loading…
Cancel
Save