|
|
@ -153,8 +153,11 @@ namespace EntrustSettle.Api.Controllers
|
|
|
|
//[UseTran]
|
|
|
|
//[UseTran]
|
|
|
|
public async Task<MessageModel<List<OrderSubmitResultDto>>> Submit(OrderSubmitDto inputDto)
|
|
|
|
public async Task<MessageModel<List<OrderSubmitResultDto>>> Submit(OrderSubmitDto inputDto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var validator = new OrderSubmitDtoValidator();
|
|
|
|
var validateResult = new OrderSubmitDtoValidator().Validate(inputDto);
|
|
|
|
validator.ValidateAndThrow(inputDto);
|
|
|
|
if (!validateResult.IsValid)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new ArgumentException(validateResult.ToString("、"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 订单信息保存
|
|
|
|
// 订单信息保存
|
|
|
|
inputDto.MblnoList = inputDto.MblnoList.Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x.Trim()).ToArray();
|
|
|
|
inputDto.MblnoList = inputDto.MblnoList.Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x.Trim()).ToArray();
|
|
|
@ -342,7 +345,11 @@ namespace EntrustSettle.Api.Controllers
|
|
|
|
[HttpPost]
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<MessageModel> ChangeStatus(ChangeStatusDto changeStatusDto)
|
|
|
|
public async Task<MessageModel> ChangeStatus(ChangeStatusDto changeStatusDto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
new ChangeStatusDtoValidator().ValidateAndThrow(changeStatusDto);
|
|
|
|
var validateResult = new ChangeStatusDtoValidator().Validate(changeStatusDto);
|
|
|
|
|
|
|
|
if (!validateResult.IsValid)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new ArgumentException(validateResult.ToString("、"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var order = await orderService.QueryById(changeStatusDto.Id);
|
|
|
|
var order = await orderService.QueryById(changeStatusDto.Id);
|
|
|
|
if (order == null)
|
|
|
|
if (order == null)
|
|
|
@ -877,7 +884,11 @@ namespace EntrustSettle.Api.Controllers
|
|
|
|
[HttpPost]
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<MessageModel> ApplyInvoice(ApplyInvoiceDto input)
|
|
|
|
public async Task<MessageModel> ApplyInvoice(ApplyInvoiceDto input)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
new ApplyInvoiceValidator().ValidateAndThrow(input);
|
|
|
|
var validateResult = new ApplyInvoiceValidator().Validate(input);
|
|
|
|
|
|
|
|
if (!validateResult.IsValid)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new ArgumentException(validateResult.ToString("、"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (input.OrderIdList?.Any() != true)
|
|
|
|
if (input.OrderIdList?.Any() != true)
|
|
|
|
{
|
|
|
|
{
|
|
|
|