Commit 15c7bfb7 authored by zhengyi's avatar zhengyi

审批申请拦截重复提交

parent 31eb5ef1
...@@ -100,7 +100,7 @@ public interface OrderApprovalMapper extends AbstractMapper<OrderApprovalDO> { ...@@ -100,7 +100,7 @@ public interface OrderApprovalMapper extends AbstractMapper<OrderApprovalDO> {
OrderApprovalDO itemApprovalCount(@Param("orderItemId") Long orderItemId, @Param("orderId") Long orderId, @Param("types") List<Integer> types); OrderApprovalDO itemApprovalCount(@Param("orderItemId") Long orderItemId, @Param("orderId") Long orderId, @Param("types") List<Integer> types);
@ResultType(OrderSpecialApplyVO.class) @ResultType(Integer.class)
@Select({ @Select({
"<script>", "<script>",
"select", "select",
......
...@@ -607,6 +607,11 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont ...@@ -607,6 +607,11 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
} }
Date now = new Date(); Date now = new Date();
OrderDO orderDO = orderService.getById(orderCargoControlApplyVO.getOrderId()); OrderDO orderDO = orderService.getById(orderCargoControlApplyVO.getOrderId());
// TODO 待确认具体拦截哪些审批任务
int count = orderApprovalMapper.processingItemApproval(null, orderCargoControlApplyVO.getOrderId(), Arrays.asList(orderCargoControlApplyVO.getApplyType(), 14));
if (count > 0){
throw exception(ORDER_IS_APPROVAL_IN_PROCESS);
}
OrderCargoControlReleaseInfoDto releaseInfoDto = this.getOrderCargoControlReleaseInfo(orderCargoControlApplyVO.getOrderId()); OrderCargoControlReleaseInfoDto releaseInfoDto = this.getOrderCargoControlReleaseInfo(orderCargoControlApplyVO.getOrderId());
orderCargoControlApplyVO.setOrderNo(releaseInfoDto.getOrderNo()); orderCargoControlApplyVO.setOrderNo(releaseInfoDto.getOrderNo());
orderCargoControlApplyVO.setPickQuantity(releaseInfoDto.getPickQuantity()); orderCargoControlApplyVO.setPickQuantity(releaseInfoDto.getPickQuantity());
......
...@@ -146,6 +146,7 @@ public class OrderCargoControlController { ...@@ -146,6 +146,7 @@ public class OrderCargoControlController {
@PutMapping("/update/apply") @PutMapping("/update/apply")
@ApiOperation("控货业务审批申请") @ApiOperation("控货业务审批申请")
@Idempotent(timeout = 10)
public CommonResult<Boolean> orderCargoControlApply(@Valid @RequestBody OrderCargoControlApplyVO orderCargoControlApplyVO) { public CommonResult<Boolean> orderCargoControlApply(@Valid @RequestBody OrderCargoControlApplyVO orderCargoControlApplyVO) {
orderCargoControlService.orderCargoControlApply(orderCargoControlApplyVO); orderCargoControlService.orderCargoControlApply(orderCargoControlApplyVO);
return success(true); return success(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment