| | |
| | | return mapper.selectList(query); |
| | | } |
| | | |
| | | public void endType(Integer mainId) { |
| | | public void endStatus(Integer mainId) { |
| | | UpdateWrapper<ComponentApproving> update = Wrappers.update(); |
| | | update.set("type",2).eq("main_id",mainId); |
| | | update.set("status",2).eq("main_id",mainId); |
| | | mapper.update(null,update); |
| | | } |
| | | |
| | |
| | | if(link.getLinkStatus() == 2){ //驳回 |
| | | //查看是否为散装件审批,是则需要更新散装件审批表中的状态为完结 |
| | | if(mainService.getInfoById(link.getMainId()).getType().equals(EnumWorksheetType.Component.getType())){ |
| | | cAService.endType(link.getMainId()); |
| | | cAService.endStatus(link.getMainId()); |
| | | } |
| | | //项目经理驳回,驳回即终止 |
| | | mainService.updateEndStatusById(link.getMainId(),"经理驳回,驳回原因:"+link.getDealReason(),0); |
| | |
| | | }); |
| | | cService.insertBatch(componentList); |
| | | //更新散装件审批子表中type为完结 |
| | | cAService.endType(link.getMainId()); |
| | | cAService.endStatus(link.getMainId()); |
| | | } |
| | | else if(type.intValue() == EnumWorksheetType.ComponentProduct.getType()){ //更新散装件-产品关系 |
| | | //查找到对应的散装件-产品关系数据 |
| | |
| | | return response.setII(23, null, existComponentList, "重复提交:现有散装件中,存在当前提交上传的散装件"); |
| | | } |
| | | } |
| | | }else{ //删除 TODO |
| | | }else{ //删除 |
| | | //判断是否在散装件审批删除中,是否存在产品关联及关联审批 |
| | | ComponentApproving deleteApproving = new ComponentApproving(); |
| | | List<ComponentProductHistory> existComponentProducts = new LinkedList<>(); |