| | |
| | | return R.ok("收货成功!!"); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R closeOrder(Long id) { |
| | | AsnOrder order = this.getById(id); |
| | | if (Objects.isNull(order)) { |
| | | throw new CoolException("单据不存在!!"); |
| | | } |
| | | order.setExceStatus(Short.parseShort(AsnExceStatus.ASN_EXCE_STATUS_TASK_CLOSE.val)); |
| | | |
| | | if (!this.updateById(order)) { |
| | | throw new CoolException("单据关闭失败!!"); |
| | | } |
| | | try { |
| | | operateOrderLogs(order); |
| | | } catch (Exception e) { |
| | | throw new CoolException("单据关闭失败!!"); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 删除原主单及明细,加入历史档 |