lxzn-module-dnc/src/main/java/org/jeecg/modules/activiti/service/impl/ActivitiDefinitionServiceImpl.java
@@ -16,7 +16,9 @@
import org.jeecg.modules.dnc.response.QueryPageResponseResult;
import org.jeecg.modules.dnc.ucenter.Department;
import org.jeecg.modules.dnc.utils.ValidateUtil;
import org.jeecg.modules.system.entity.MdcProduction;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.IMdcProductionService;
import org.jeecg.modules.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -30,6 +32,8 @@
    private DepartmentMapper departmentMapper;
    @Autowired
    private ISysUserService userService;
    @Autowired
    private IMdcProductionService iMdcProductionService;
    @Override
    @Transactional(rollbackFor = {Exception.class})
    public boolean addDefinition(ActivitiDefinition definition) {
@@ -39,8 +43,9 @@
        ActivitiDefinition en = getByDepartId(definition.getDepartId());
        if(en != null)
            ExceptionCast.cast(ActivitiDefinitionCode.DEF_IS_EXIST);
        Department department = departmentMapper.selectById(definition.getDepartId());
        if(department == null)
        //修改为mdc车间
        MdcProduction mdcProduction=iMdcProductionService.getById(definition.getDepartId());
        if(mdcProduction == null)
            ExceptionCast.cast(ActivitiDefinitionCode.DEF_DEPART_NONE);
        String[] userIds = definition.getApproveUsers().split(",");
        if(userIds == null|| userIds.length < 1)