修改派车任务保存,修改状态判断。

修改派车任务发送派车,要求车队必填。
optimize
jianghaiqing 1 year ago
parent 2689aaa89c
commit 3daccdd6dc

@ -907,6 +907,9 @@ namespace Myshipping.Application
if (!info.KGS.HasValue) if (!info.KGS.HasValue)
throw Oops.Oh($"吨数不能为空"); throw Oops.Oh($"吨数不能为空");
if(string.IsNullOrWhiteSpace(info.TruckCode) || string.IsNullOrWhiteSpace(info.TruckName))
throw Oops.Oh($"车队不能为空");
info.UpdatedTime = DateTime.Now; info.UpdatedTime = DateTime.Now;
info.UpdatedUserId = UserManager.UserId; info.UpdatedUserId = UserManager.UserId;
info.UpdatedUserName = UserManager.Name; info.UpdatedUserName = UserManager.Name;
@ -1211,7 +1214,8 @@ namespace Myshipping.Application
{ {
if (operateType == OperateTypeEnum.Save) if (operateType == OperateTypeEnum.Save)
{ {
if (entityArg.Any(a => a.Status != BookingTruckStatus.TEMP.ToString())) if (entityArg.Any(a => a.Status != BookingTruckStatus.TEMP.ToString()
&& a.Status != BookingTruckStatus.CANCEL_DISPATCH.ToString()))
{ {
throw Oops.Oh($"派车状态只有暂存才能保存"); throw Oops.Oh($"派车状态只有暂存才能保存");
} }

Loading…
Cancel
Save