| | |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.OrderDomainParam; |
| | | import com.zy.asrs.entity.result.WrkTraceVo; |
| | | import com.zy.asrs.mapper.CanFinMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.web.BaseController; |
| | |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WrkMastLogService wrkMastLogService; |
| | | @Autowired |
| | | private CanFinMapper canFinMapper; |
| | | |
| | | @RequestMapping(value = "/order/nav/list/auth") |
| | | @ManagerAuth |
| | |
| | | @ManagerAuth(memo = "手动删除订单") |
| | | @Transactional |
| | | public R delete(@RequestParam Long orderId){ |
| | | OrderPakout orderPakout = orderService.selectOne(new EntityWrapper<OrderPakout>() |
| | | .eq("id", orderId)); |
| | | CanFin deleteCanFin = new CanFin(); |
| | | deleteCanFin.setOutNo(orderPakout.getOrderNo()); |
| | | List<CanFin> canFinList = canFinMapper.selectList(new EntityWrapper<CanFin>() |
| | | .orderBy("apply_time", true) |
| | | .isNotNull("out_no")); |
| | | if (!canFinList.isEmpty()){ |
| | | for (CanFin canFin : canFinList){ |
| | | if (canFin.getOutNo().equals(deleteCanFin.getOutNo())){ |
| | | canFinMapper.deleteById(canFin.getId()); |
| | | } |
| | | } |
| | | } |
| | | List<CanFin> newCanFinList = canFinMapper.selectList(new EntityWrapper<CanFin>() |
| | | .orderBy("apply_time", true)); |
| | | if (!newCanFinList.isEmpty()){ |
| | | CanFin firstCanFin = newCanFinList.get(0); |
| | | firstCanFin.setTaskStatus("canout"); |
| | | canFinMapper.updateById(firstCanFin); |
| | | } |
| | | orderService.remove(orderId); |
| | | // Order order = orderService.selectById(orderId); |
| | | // if (order != null) { |