liuxm
2024-06-04 eeee3d8fa04aff41db6ee2418468e7371ecad57d
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessSv.java
@@ -63,6 +63,10 @@
    }
    @Transactional
    public int save(PrProductionProcess process){
        //流程名称不能重复
        if (processDao.exists(process.name, process.id)) {
            throw new RuntimeException("流程名称不能重复");
        }
        prepareProcess(process);
        int count = processDao.insertSelective(process);
        saveNodesAndInstructions(process);
@@ -71,6 +75,10 @@
    @Transactional
    public int update(PrProductionProcess process){
        //流程名称不能重复
        if (processDao.exists(process.name, process.id)) {
            throw new RuntimeException("流程名称不能重复");
        }
        prepareProcess(process);
        int count = processDao.updateByPrimaryKeySelective(process);
        // 优化:只有当节点有变更时才删除并重新插入
@@ -159,8 +167,8 @@
        return rsVo ;
    }
    public List<Map<String,String>> queryAll(){
        return processDao.queryAll();
    public List<Map<String,String>> queryAll(Long proId){
        return processDao.queryAll(proId);
    }
    private void addUrl(PrWorkingInstruction ins){