|
|
@ -1369,5 +1369,57 @@ namespace Myshipping.Application
|
|
|
|
return rtn;
|
|
|
|
return rtn;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 派车任务台账保存
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="model">请求详情</param>
|
|
|
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
|
|
|
[HttpPost("/TaskManageTruck/SaveTruckByPage")]
|
|
|
|
|
|
|
|
public async Task<TaskManageOrderResultDto> SaveTruckByPage([FromBody] TruckPageDto model)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var entity = _taskTruckRepository.AsQueryable().First(a => a.TASK_ID == model.TaskPKId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (model == null)
|
|
|
|
|
|
|
|
throw Oops.Oh($"派车信息获取失败,派车信息不存在或已作废");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//校验
|
|
|
|
|
|
|
|
ValidateTruck(OperateTypeEnum.Save, new TaskTruckInfo[] { entity });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
entity.TruckId = model.TruckId;
|
|
|
|
|
|
|
|
entity.TruckCode = model.TruckCode;
|
|
|
|
|
|
|
|
entity.TruckName = model.TruckName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
entity.UpdatedTime = DateTime.Now;
|
|
|
|
|
|
|
|
entity.UpdatedUserId = UserManager.UserId;
|
|
|
|
|
|
|
|
entity.UpdatedUserName = UserManager.Name;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//更新
|
|
|
|
|
|
|
|
await _taskTruckRepository.AsUpdateable(entity).UpdateColumns(it => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
it.TruckId,
|
|
|
|
|
|
|
|
it.TruckCode,
|
|
|
|
|
|
|
|
it.TruckName,
|
|
|
|
|
|
|
|
it.UpdatedTime,
|
|
|
|
|
|
|
|
it.UpdatedUserId,
|
|
|
|
|
|
|
|
it.UpdatedUserName
|
|
|
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
|
|
|
|
result.msg = "保存成功";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result.succ = false;
|
|
|
|
|
|
|
|
result.msg = $"{ex.Message}";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|