|
@@ -3081,14 +3081,14 @@ public class OrderController : BaseController
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("order_previous_audit_batch")]
|
|
|
- public async Task AuditBatch([FromBody] List<AuditSendBackDto> dtos)
|
|
|
+ public async Task AuditBatch([FromBody] BatchAuditSendBackDto dto)
|
|
|
{
|
|
|
- foreach (AuditSendBackDto dto in dtos)
|
|
|
+ foreach (string id in dto.Ids)
|
|
|
{
|
|
|
if (dto.State == ESendBackAuditState.Refuse && string.IsNullOrEmpty(dto.AuditContent))
|
|
|
throw UserFriendlyException.SameMessage("退回拒绝,请填写审批拒绝原因");
|
|
|
//验证是否存在退回
|
|
|
- var sendBack = await _orderSendBackAuditRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
|
|
|
+ var sendBack = await _orderSendBackAuditRepository.GetAsync(id, HttpContext.RequestAborted);
|
|
|
if (sendBack is null)
|
|
|
throw UserFriendlyException.SameMessage("无效退回");
|
|
|
if (sendBack.State != ESendBackAuditState.Apply)
|
|
@@ -3663,14 +3663,14 @@ public class OrderController : BaseController
|
|
|
/// <returns></returns>
|
|
|
[HttpPut("special_batch")]
|
|
|
[LogFilter("批量审批工单特提")]
|
|
|
- public async Task UpdateBatch([FromBody] List<AuditOrderSpecialDto> dtos)
|
|
|
+ public async Task UpdateBatch([FromBody] BatchAuditOrderSpecialDto dto)
|
|
|
{
|
|
|
- foreach (AuditOrderSpecialDto dto in dtos)
|
|
|
+ foreach (string id in dto.ids)
|
|
|
{
|
|
|
var special = await _orderSpecialRepository
|
|
|
.Queryable()
|
|
|
.Includes(d => d.Order)
|
|
|
- .FirstAsync(d => d.Id == dto.Id);
|
|
|
+ .FirstAsync(d => d.Id == id);
|
|
|
if (special is null) throw UserFriendlyException.SameMessage("无效特提审批信息!");
|
|
|
if (special.State != 0) throw UserFriendlyException.SameMessage("无效特提审批信息,特提审批信息错误,该信息已审核!");
|
|
|
if (string.IsNullOrEmpty(dto.NextStepName)) dto.NextStepName = special.NextStepName;
|