lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/WorkStepServiceImpl.java
@@ -22,10 +22,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.*;
/**
 * @Description: TODO
@@ -122,6 +119,7 @@
                pd.setStepId(workStep.getId());
                workStepDepartmentList.add(pd);
                PermissionStreamNew perm = new PermissionStreamNew();
                perm.setDepartId(item.getDepartId());
                perm.setBusinessId(workStep.getId());
                perm.setBusinessType("6");
                permissionStreamList.add(perm);
@@ -137,16 +135,21 @@
                    ExceptionCast.cast(CommonCode.FAIL);
            }
        }
        //添加用户权限
        b = productPermissionService.add(workStep.getId(), userId,"6");
        if (!b) {
            ExceptionCast.cast(ProductInfoCode.PRODUCT_SAVE_ERROR);
        }
        //添加结构树
        ProductMix productMix = new ProductMix(Long.parseLong(workStep.getId()),Long.parseLong(workStep.getProcessId())
                ,workStep.getStepName(),workStep.getStepCode(),"6");
                ,workStep.getStepName(),workStep.getStepCode(),6,new Date());
        productMixService.save(productMix);
        //添加权限验证
        PermissionStreamNew permissionStream = new PermissionStreamNew();
        permissionStream.setUserId(userId);
        permissionStream.setBusinessId(workStep.getId());
        permissionStream.setBusinessType("6");
        return permissionStreamNewService.save(permissionStream);
        return permissionStreamNewService.addPermissionStreamNew(permissionStream);
    }
    /**
@@ -164,6 +167,11 @@
        WorkStep en = super.getById(id);
        if(en == null)
            ExceptionCast.cast(ProcessInfoCode.WORKSTEP_NOT_EXIST);
        //同步修改结构树
        ProductMix productMix = productMixService.getById(Long.parseLong(id));
        productMix.setName(workStep.getStepName());
        productMix.setCode(workStep.getStepCode());
        productMixService.updateById(productMix);
        return super.updateById(workStep);
    }