diff --git a/Myshipping.Application/EDI/InttraEdiHelper.cs b/Myshipping.Application/EDI/InttraEdiHelper.cs
index ed7fded6..88003c0f 100644
--- a/Myshipping.Application/EDI/InttraEdiHelper.cs
+++ b/Myshipping.Application/EDI/InttraEdiHelper.cs
@@ -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;
@@ -869,9 +872,9 @@ namespace Myshipping.Application.EDI
}
/*件重尺*/
- r.WriteLine("CNT+7:" + Math.Round(bill.KGS,3) + ":KGM'");//按照四舍五入的国际标准
+ r.WriteLine("CNT+7:" + Math.Round(bill.KGS, 3) + ":KGM'");//按照四舍五入的国际标准
r.WriteLine("CNT+11:" + bill.PKGS.ToString() + "'");
- r.WriteLine("CNT+15:" + Math.Round(bill.CBM,3) + ":MTQ'");
+ r.WriteLine("CNT+15:" + Math.Round(bill.CBM, 3) + ":MTQ'");
icount = icount + 3;
@@ -906,23 +909,31 @@ namespace Myshipping.Application.EDI
}
- if (InttrEdi.UseForWarderCode)
+ if (bill.CARRIEREDICODE == "ANNU" || bill.CARRIEREDICODE == "CMDU" || bill.CARRIEREDICODE == "CHNL")
{
r.WriteLine("RFF+FF:" + bill.ORDERNO.Trim() + "'");
- r.WriteLine("RFF+ON:" + bill.ORDERNO.Trim() + "'");
- icount = icount + 2;
+ icount = icount + 1;
}
else
{
- if (bill.ORDERNO.Trim() != "")
+ if (InttrEdi.UseForWarderCode)
{
r.WriteLine("RFF+FF:" + bill.ORDERNO.Trim() + "'");
r.WriteLine("RFF+ON:" + bill.ORDERNO.Trim() + "'");
icount = icount + 2;
}
+ else
+ {
+ if (bill.ORDERNO.Trim() != "")
+ {
+ r.WriteLine("RFF+FF:" + bill.ORDERNO.Trim() + "'");
+ r.WriteLine("RFF+ON:" + bill.ORDERNO.Trim() + "'");
+ 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;
}
}
diff --git a/Myshipping.Application/Event/CautionNoticeTaskSubscriber.cs b/Myshipping.Application/Event/CautionNoticeTaskSubscriber.cs
index 9fa4cd04..58eda83e 100644
--- a/Myshipping.Application/Event/CautionNoticeTaskSubscriber.cs
+++ b/Myshipping.Application/Event/CautionNoticeTaskSubscriber.cs
@@ -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);
}
}
diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
index ce016f51..0cb64577 100644
--- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
+++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
@@ -12758,5 +12758,68 @@ namespace Myshipping.Application
}
#endregion
+ #region 批量更新订舱的详情
+ ///
+ /// 批量更新订舱的详情
+ ///
+ /// 请求参数
+ ///
+ [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();
+
+ 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
}
}
diff --git a/Myshipping.Application/Service/BookingOrder/Dto/BatchUpdate.cs b/Myshipping.Application/Service/BookingOrder/Dto/BatchUpdate.cs
index a92721b4..34696930 100644
--- a/Myshipping.Application/Service/BookingOrder/Dto/BatchUpdate.cs
+++ b/Myshipping.Application/Service/BookingOrder/Dto/BatchUpdate.cs
@@ -62,6 +62,11 @@ namespace Myshipping.Application.Service.BookingOrder.Dto
/// 截单日期
///
public DateTime? CLOSEDOCDATE { get; set; }
+
+ ///
+ /// 强制更新字段列表(默认只更新有值的字段,如果需要强制更新为空请将字段填写到此列表)
+ ///
+ public List enforceUpdateField { get; set; }
}
///
diff --git a/Myshipping.Application/Service/BookingOrder/IBookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/IBookingOrderService.cs
index 54879701..34658a64 100644
--- a/Myshipping.Application/Service/BookingOrder/IBookingOrderService.cs
+++ b/Myshipping.Application/Service/BookingOrder/IBookingOrderService.cs
@@ -149,6 +149,11 @@ namespace Myshipping.Application
/// 返回回执
Task Save(SaveBookingOrderInput input);
-
+ ///
+ /// 批量更新订舱的详情
+ ///
+ /// 请求参数
+ ///
+ Task BatchUpdateOrder(BatchUpdate dto);
}
}
\ No newline at end of file
diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/CautionNoitce/CautionNoticeTaskDto.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/CautionNoitce/CautionNoticeTaskDto.cs
index 475fd8d1..8ffd2895 100644
--- a/Myshipping.Application/Service/TaskManagePlat/Dtos/CautionNoitce/CautionNoticeTaskDto.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/CautionNoitce/CautionNoticeTaskDto.cs
@@ -57,5 +57,7 @@ namespace Myshipping.Application
/// 用户名称
///
public string userName { get; set; }
+
+
}
}
diff --git a/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageRollingNominationService.cs b/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageRollingNominationService.cs
index 4874ca84..ded0caf3 100644
--- a/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageRollingNominationService.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageRollingNominationService.cs
@@ -42,9 +42,9 @@ namespace Myshipping.Application
///
/// 刷新预甩货对应订舱
///
- /// 预甩货主键
+ /// 预甩货主任务主键
/// 返回回执
- Task RefreshBookingOrder(string nominationId);
+ Task RefreshBookingOrder(string taskPkId);
///
/// 查看分享链接
diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageRollingNominationService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageRollingNominationService.cs
index de60a40a..fcc70f5f 100644
--- a/Myshipping.Application/Service/TaskManagePlat/TaskManageRollingNominationService.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageRollingNominationService.cs
@@ -602,10 +602,10 @@ namespace Myshipping.Application
///
/// 刷新预甩货对应订舱
///
- /// 预甩货主键
+ /// 预甩货主键
/// 返回回执
[HttpGet("/TaskManageRollingNomination/RefreshBookingOrder")]
- public async Task RefreshBookingOrder(string nominationId)
+ public async Task RefreshBookingOrder(string taskPkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
@@ -616,17 +616,17 @@ namespace Myshipping.Application
*/
var list = _taskRollingNominationInfoRepository.AsQueryable().Filter(null, true)
.InnerJoin((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()).ToList();
- if (model.From != null && model.From.Count > 0)
+ if (model.From != null && model.From.Count > 1)
{
var firstLoadDetail = model.LoadDetailList.FirstOrDefault();
@@ -1566,7 +1569,7 @@ namespace Myshipping.Application
//原船
if (!string.IsNullOrWhiteSpace(fromShipInfo.VESSEL) && !string.IsNullOrWhiteSpace(fromShipInfo.VOYNO))
{
- baseHtml = baseHtml.Replace("#VesselVoyno#", $"{fromShipInfo.VESSEL} / {fromShipInfo.VOYNO}");
+ baseHtml = baseHtml.Replace("#VesselVoyno#", $"{fromShipInfo.VESSEL}/{fromShipInfo.VOYNO}");
}
else
{
@@ -1585,7 +1588,7 @@ namespace Myshipping.Application
//换船
if (!string.IsNullOrWhiteSpace(toShipInfo.VESSEL) && !string.IsNullOrWhiteSpace(toShipInfo.VOYNO))
{
- baseHtml = baseHtml.Replace("#newVesselVoyno#", $"{toShipInfo.VESSEL} / {toShipInfo.VOYNO}");
+ baseHtml = baseHtml.Replace("#newVesselVoyno#", $"{toShipInfo.VESSEL}/{toShipInfo.VOYNO}");
}
else
{
diff --git a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs
index 6a37b5c7..a9bb597c 100644
--- a/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs
+++ b/Myshipping.Application/Service/TrackingSystem/ServiceWorkFlowManageService.cs
@@ -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));