wanghaomei 2 years ago
commit 03e224e837

@ -930,7 +930,6 @@ namespace Myshipping.Application.EDI.TSL
} }
var voyno = ""; var voyno = "";
if (!string.IsNullOrEmpty(bill.NVOYNO)) voyno = bill.NVOYNO; else voyno = bill.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 + "'"); r.WriteLine("LOC+11+" + bill.PORTDISCHARGEID + ":139:6:" + bill.PORTDISCHARGE + "'");
icount = icount + 5; icount = icount + 5;
if (bill.DESTINATION != "") if (!string.IsNullOrWhiteSpace(bill.DESTINATION))
{ {
r.WriteLine("LOC+7+" + bill.DESTINATIONID + ":139:6:" + bill.DESTINATION + "'"); r.WriteLine("LOC+7+" + bill.DESTINATIONID + ":139:6:" + bill.DESTINATION + "'");
icount = icount + 1; icount = icount + 1;
@ -977,7 +976,7 @@ namespace Myshipping.Application.EDI.TSL
icount = icount + 7; icount = icount + 7;
if (bill.WEITUO != "") if (!string.IsNullOrWhiteSpace(bill.WEITUO))
{ {
if (bill.WEITUO.Length > 35) if (bill.WEITUO.Length > 35)
r.WriteLine("NAD+FW+++" + formatEdiStr("txt", bill.WEITUO.Substring(0, 35)) + "+" + formatEdiStr("txt", bill.WEITUO.Substring(35)) + "'"); r.WriteLine("NAD+FW+++" + formatEdiStr("txt", bill.WEITUO.Substring(0, 35)) + "+" + formatEdiStr("txt", bill.WEITUO.Substring(35)) + "'");

@ -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
{
/// <summary>
/// 操作类型枚举
/// </summary>
public enum OperateTypeEnum
{
/// <summary>
/// 保存
/// </summary>
[Description("保存")]
Save,
/// <summary>
/// 提交
/// </summary>
[Description("提交")]
Submit,
/// <summary>
/// 取消
/// </summary>
[Description("取消")]
Cancel,
/// <summary>
/// 删除
/// </summary>
[Description("删除")]
Delete
}
}

@ -846,5 +846,9 @@ namespace Myshipping.Application.Service.BookingOrder.Dto
/// 最后下货纸比对状态 NO_DIFF-无异常;DIFF-有差异;NO_YARD-无场站数据;EXPT-异常 /// 最后下货纸比对状态 NO_DIFF-无异常;DIFF-有差异;NO_YARD-无场站数据;EXPT-异常
/// </summary> /// </summary>
public string LstShipOrderCompareRltName { get; set; } public string LstShipOrderCompareRltName { get; set; }
/// <summary>
/// 最后下货纸比对方式 MANUAL-手动 AUTO-自动
/// </summary>
public string LstShipOrderCompareMode { get; set; }
} }
} }

@ -522,6 +522,7 @@ namespace Myshipping.Application
*/ */
try try
{ {
//先保存 //先保存
var id = InnerSave(info); var id = InnerSave(info);
@ -537,6 +538,46 @@ namespace Myshipping.Application
return result; return result;
} }
/// <summary>
/// 校验派车
/// </summary>
/// <param name="operateType">操作类型</param>
/// <param name="entityArg">派车信息列表</param>
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($"派车状态只有暂存、已撤销才能作废");
}
}
}
/// <summary> /// <summary>
/// 批量提交派车 /// 批量提交派车
/// </summary> /// </summary>

Loading…
Cancel
Save