| | |
| | | link.setDealAndClose(1); |
| | | } |
| | | } |
| | | case 4:{ //TODO 出库申请 |
| | | if(link.getStatus() == WorkflowEnum.LINK_STATUS_PASS.getValue().intValue()){ |
| | | mainInDB.setStatus(WorkflowEnum.MAIN_STATUS_WAIT_FOR_DEALING.getValue()); |
| | | mainService.updateById(mainInDB); |
| | | }else if(link.getStatus() == WorkflowEnum.LINK_STATUS_REJECT.getValue().intValue()){ |
| | | mainInDB.setStatus(WorkflowEnum.MAIN_STATUS_END_REJECT.getValue()); |
| | | mainInDB.setEndReason(link.getDealRejectReason()); |
| | | mainInDB.setEndTime(now); |
| | | //检查是否有关联工单.如果有关联工单,关联工单状态重置为完结待处理,完成时间重置为空 |
| | | if(mainInDB.getRelatedId() != null){ |
| | | Integer relatedId = mainInDB.getRelatedId(); |
| | | mainService.resetRepairStatus(relatedId,mainInDB.getQuantity()); |
| | | } |
| | | mainService.updateById(mainInDB); |
| | | link.setDealAndClose(1); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |