whycxzp
2022-08-13 fde67238dfcd493876d45d6916d3f7bdd2bb7120
更新审批
3个文件已修改
10 ■■■■ 已修改文件
src/main/java/com/whyc/service/ComponentApprovingService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/WorksheetLinkService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/WorksheetMainService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/ComponentApprovingService.java
@@ -152,9 +152,9 @@
        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);
    }
src/main/java/com/whyc/service/WorksheetLinkService.java
@@ -57,7 +57,7 @@
        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);
@@ -263,7 +263,7 @@
                });
                cService.insertBatch(componentList);
                //更新散装件审批子表中type为完结
                cAService.endType(link.getMainId());
                cAService.endStatus(link.getMainId());
            }
            else if(type.intValue() == EnumWorksheetType.ComponentProduct.getType()){ //更新散装件-产品关系
                //查找到对应的散装件-产品关系数据
src/main/java/com/whyc/service/WorksheetMainService.java
@@ -264,7 +264,7 @@
                    return response.setII(23, null, existComponentList, "重复提交:现有散装件中,存在当前提交上传的散装件");
                }
            }
        }else{ //删除 TODO
        }else{ //删除
            //判断是否在散装件审批删除中,是否存在产品关联及关联审批
            ComponentApproving deleteApproving = new ComponentApproving();
            List<ComponentProductHistory> existComponentProducts = new LinkedList<>();