| | |
| | | //更新节点信息 |
| | | linkMapper.updateById(link); |
| | | if(link.getLinkStatus() == 2){ //驳回 |
| | | //驳回到员工进行处理 |
| | | //查询工单的员工 |
| | | Long createUserId = mainService.getInfoById(link.getMainId()).getCreateUserId(); |
| | | WorksheetLink link2 = new WorksheetLink(); |
| | | link2.setMainId(link.getMainId()); |
| | | link2.setParentId(link.getId()); |
| | | link2.setDealUserId(createUserId); |
| | | link2.setDealType(0); |
| | | link2.setDealDesc("工单被经理驳回,驳回信息:"+link.getDealReason()); |
| | | link2.setLinkStatus(0); |
| | | link2.setEnableArchive(0); |
| | | link2.setRejectVersion(link.getRejectVersion()); |
| | | linkMapper.insert(link2); |
| | | //更新主表状态 |
| | | mainService.updateStatusById(link.getMainId(),0); |
| | | //项目经理驳回,驳回即终止 |
| | | mainService.updateEndStatusById(link.getMainId(),"经理驳回",0); |
| | | }else{ |
| | | //进入下一节点,总经理审批 |
| | | WorksheetLink link2 = new WorksheetLink(); |
| | |
| | | //更新节点信息 |
| | | linkMapper.updateById(link); |
| | | if(link.getLinkStatus() == 2){ //驳回 |
| | | //驳回到员工进行处理 |
| | | //查询对应的项目经理 |
| | | 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.setLinkStatus(0); |
| | | link2.setEnableArchive(0); |
| | | link2.setRejectVersion(link.getRejectVersion()); |
| | | linkMapper.insert(link2); |
| | | //更新主表状态 |
| | | mainService.updateStatusById(link.getMainId(),1); |
| | | if(link.getParentId()!=0) { |
| | | //查询对应的项目经理 |
| | | 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.setLinkStatus(0); |
| | | link2.setEnableArchive(0); |
| | | link2.setRejectVersion(link.getRejectVersion()); |
| | | linkMapper.insert(link2); |
| | | //更新主表状态 |
| | | mainService.updateStatusById(link.getMainId(), 1); |
| | | }else{ |
| | | //说明是项目经理提交的,驳回即终止 |
| | | mainService.updateEndStatusById(link.getMainId(),"总经理驳回",0); |
| | | } |
| | | }else{ |
| | | //审批通过,更新主表状态 |
| | | mainService.updateEndStatusById(link.getMainId(),"完结",5); |
| | |
| | | his.setThickness(approvingBom.getThickness()); |
| | | his.setType(approvingBom.getType()); |
| | | his.setUnit(approvingBom.getUnit()); |
| | | his.setUpUser(approvingBom.getUpUser()); |
| | | his.setUpUserId(approvingBom.getUpUserId()); |
| | | |
| | | newHistoryList.add(his); |
| | | }); |
| | |
| | | String dwgUrl = fileBom.getDwgUrl(); |
| | | if(pictureUrl !=null){ |
| | | String newPictureUrl ="doc_file"+File.separator+"product"+File.separator+fileBom.getParentModel()+File.separator+ pictureUrl.substring(pictureUrl.lastIndexOf(File.separator)+1); |
| | | File newPictureFile = new File(projectDir + File.separator + newPictureUrl); |
| | | if(!newPictureFile.exists()){ |
| | | newPictureFile.mkdirs(); |
| | | File newPictureDir = new File(projectDir + File.separator + "doc_file"+File.separator+"product"+File.separator+fileBom.getParentModel()); |
| | | if(!newPictureDir.exists()){ |
| | | newPictureDir.mkdirs(); |
| | | } |
| | | FileCopyUtils.copy(new File(projectDir+File.separator+ pictureUrl), |
| | | newPictureFile); |
| | | new File(projectDir+File.separator+newPictureUrl)); |
| | | fileBom.setPictureUrl(newPictureUrl); |
| | | } |
| | | if(dwgUrl !=null){ |
| | | String newDwgUrl ="doc_file"+File.separator+"product"+File.separator+fileBom.getParentModel()+File.separator+ dwgUrl.substring(dwgUrl.lastIndexOf(File.separator)+1); |
| | | File newDwgFile = new File(projectDir + File.separator + newDwgUrl); |
| | | if(!newDwgFile.exists()){ |
| | | newDwgFile.mkdirs(); |
| | | File newDwgDir = new File(projectDir + File.separator + "doc_file"+File.separator+"product"+File.separator+fileBom.getParentModel()); |
| | | if(!newDwgDir.exists()){ |
| | | newDwgDir.mkdirs(); |
| | | } |
| | | FileCopyUtils.copy(new File(projectDir+File.separator+ dwgUrl), |
| | | newDwgFile); |
| | | new File(projectDir + File.separator + newDwgUrl)); |
| | | fileBom.setDwgUrl(newDwgUrl); |
| | | } |
| | | } catch (IOException e) { |