| | |
| | | linkMapper.updateById(link); |
| | | if(link.getLinkStatus() == 2){ //驳回 |
| | | //驳回到员工进行处理 |
| | | //查询工单的员工 |
| | | Long createUserId = mainService.getInfoById(link.getMainId()).getCreateUserId(); |
| | | //查询对应的项目经理 |
| | | Long createUserId = linkMapper.selectById(link.getParentId()).getDealUserId(); |
| | | WorksheetLink link2 = new WorksheetLink(); |
| | | link2.setMainId(link.getMainId()); |
| | | link2.setParentId(link.getId()); |
| | | link2.setDealUserId(createUserId); |
| | | link2.setDealType(0); |
| | | link2.setDealDesc("工单被经理驳回,驳回信息:"+link.getDealReason()); |
| | | link2.setDealDesc("工单被总经理驳回,驳回信息:"+link.getDealReason()); |
| | | link2.setLinkStatus(0); |
| | | link2.setEnableArchive(0); |
| | | link2.setRejectVersion(link.getRejectVersion()); |
| | | linkMapper.insert(link2); |
| | | //更新主表状态 |
| | | mainService.updateStatusById(link.getMainId(),0); |
| | | mainService.updateStatusById(link.getMainId(),1); |
| | | }else{ |
| | | //审批通过,更新主表状态 |
| | | mainService.updateEndStatusById(link.getMainId(),"完结",5); |
| | |
| | | //删除? TODO 需要约定逻辑 |
| | | |
| | | //查询部件最新的版本号 |
| | | Integer currentVersion = bomService.getProduct(approvingList.get(0).getParentModel()).getVersion(); |
| | | if(currentVersion==null){ |
| | | currentVersion = 0; |
| | | ProductBom product = bomService.getProduct(approvingList.get(0).getParentModel()); |
| | | int currentVersion = -1; |
| | | if(product!=null){ |
| | | currentVersion = product.getVersion(); |
| | | } |
| | | Integer nextVersion = currentVersion+1; |
| | | //更新到product_bom_history,增加进去的需要sVersion和eVersion一致 |
| | |
| | | his.setThickness(approvingBom.getThickness()); |
| | | his.setType(approvingBom.getType()); |
| | | his.setUnit(approvingBom.getUnit()); |
| | | his.setUpdateDate(approvingBom.getUpdateDate()); |
| | | his.setUpUser(approvingBom.getUpUser()); |
| | | |
| | | newHistoryList.add(his); |
| | |
| | | .filter(currentHistory -> !approvingUpdateSubNameList.contains(currentHistory.getSubName())) |
| | | .collect(Collectors.toList()); |
| | | newVersionCurrentHistoryList.forEach(history->{history.setEVersion(nextVersion);}); |
| | | historyService.updateVersionBatch(newVersionCurrentHistoryList); |
| | | |
| | | if(newVersionCurrentHistoryList.size()!=0) { |
| | | historyService.updateVersionBatch(newVersionCurrentHistoryList); |
| | | } |
| | | /*更新到product_bom*/ |
| | | //查询新的版本 |
| | | List<ProductBomHistory> newBomList = historyService.getListByParentModel(approvingList.get(0).getParentModel(), nextVersion); |