diff --git a/Myshipping.Application/EDI/TSLEdiHelper.cs b/Myshipping.Application/EDI/TSLEdiHelper.cs
index f2f9907f..c869f1c0 100644
--- a/Myshipping.Application/EDI/TSLEdiHelper.cs
+++ b/Myshipping.Application/EDI/TSLEdiHelper.cs
@@ -930,7 +930,6 @@ namespace Myshipping.Application.EDI.TSL
}
-
var voyno = "";
if (!string.IsNullOrEmpty(bill.NVOYNO)) voyno = bill.NVOYNO; else voyno = bill.VOYNO;
@@ -945,7 +944,7 @@ namespace Myshipping.Application.EDI.TSL
r.WriteLine("LOC+11+" + bill.PORTDISCHARGEID + ":139:6:" + bill.PORTDISCHARGE + "'");
icount = icount + 5;
- if (bill.DESTINATION != "")
+ if (!string.IsNullOrWhiteSpace(bill.DESTINATION))
{
r.WriteLine("LOC+7+" + bill.DESTINATIONID + ":139:6:" + bill.DESTINATION + "'");
icount = icount + 1;
@@ -977,7 +976,7 @@ namespace Myshipping.Application.EDI.TSL
icount = icount + 7;
- if (bill.WEITUO != "")
+ if (!string.IsNullOrWhiteSpace(bill.WEITUO))
{
if (bill.WEITUO.Length > 35)
r.WriteLine("NAD+FW+++" + formatEdiStr("txt", bill.WEITUO.Substring(0, 35)) + "+" + formatEdiStr("txt", bill.WEITUO.Substring(35)) + "'");
diff --git a/Myshipping.Application/Enum/OperateTypeEnum.cs b/Myshipping.Application/Enum/OperateTypeEnum.cs
new file mode 100644
index 00000000..1eb7f755
--- /dev/null
+++ b/Myshipping.Application/Enum/OperateTypeEnum.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Myshipping.Application
+{
+ ///
+ /// 操作类型枚举
+ ///
+ public enum OperateTypeEnum
+ {
+ ///
+ /// 保存
+ ///
+ [Description("保存")]
+ Save,
+ ///
+ /// 提交
+ ///
+ [Description("提交")]
+ Submit,
+ ///
+ /// 取消
+ ///
+ [Description("取消")]
+ Cancel,
+ ///
+ /// 删除
+ ///
+ [Description("删除")]
+ Delete
+ }
+}
diff --git a/Myshipping.Application/Service/BookingOrder/Dto/PageBookingOrder.cs b/Myshipping.Application/Service/BookingOrder/Dto/PageBookingOrder.cs
index d5b6f35a..04b52f37 100644
--- a/Myshipping.Application/Service/BookingOrder/Dto/PageBookingOrder.cs
+++ b/Myshipping.Application/Service/BookingOrder/Dto/PageBookingOrder.cs
@@ -846,5 +846,9 @@ namespace Myshipping.Application.Service.BookingOrder.Dto
/// 最后下货纸比对状态 NO_DIFF-无异常;DIFF-有差异;NO_YARD-无场站数据;EXPT-异常
///
public string LstShipOrderCompareRltName { get; set; }
+ ///
+ /// 最后下货纸比对方式 MANUAL-手动 AUTO-自动
+ ///
+ public string LstShipOrderCompareMode { get; set; }
}
}
diff --git a/Myshipping.Application/Service/BookingTruck/BookingTruckService.cs b/Myshipping.Application/Service/BookingTruck/BookingTruckService.cs
index 02f4d6fb..c688c07a 100644
--- a/Myshipping.Application/Service/BookingTruck/BookingTruckService.cs
+++ b/Myshipping.Application/Service/BookingTruck/BookingTruckService.cs
@@ -522,6 +522,7 @@ namespace Myshipping.Application
*/
try
{
+
//先保存
var id = InnerSave(info);
@@ -537,6 +538,46 @@ namespace Myshipping.Application
return result;
}
+ ///
+ /// 校验派车
+ ///
+ /// 操作类型
+ /// 派车信息列表
+ private void ValidateTruck(OperateTypeEnum operateType, BookingTruck[] entityArg)
+ {
+ if (operateType == OperateTypeEnum.Save)
+ {
+ if (entityArg.Any(a => a.Status != BookingTruckStatus.TEMP.ToString()
+ && a.Status != BookingTruckStatus.CANCELED.ToString()))
+ {
+ throw Oops.Oh($"派车状态只有暂存、已撤销才能保存");
+ }
+ }
+ else if (operateType == OperateTypeEnum.Submit)
+ {
+ if (entityArg.Any(a => a.Status != BookingTruckStatus.TEMP.ToString()
+ && a.Status != BookingTruckStatus.CANCELED.ToString()))
+ {
+ throw Oops.Oh($"派车状态只有暂存、已撤销才能提交");
+ }
+ }
+ else if (operateType == OperateTypeEnum.Cancel)
+ {
+ if (entityArg.Any(a => a.Status != BookingTruckStatus.SUBMITED.ToString()))
+ {
+ throw Oops.Oh($"派车状态只有已提交才能撤销派车");
+ }
+ }
+ else if (operateType == OperateTypeEnum.Delete)
+ {
+ if (entityArg.Any(a => a.Status != BookingTruckStatus.TEMP.ToString()
+ && a.Status != BookingTruckStatus.CANCELED.ToString()))
+ {
+ throw Oops.Oh($"派车状态只有暂存、已撤销才能作废");
+ }
+ }
+ }
+
///
/// 批量提交派车
///