| | |
| | | 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; |
| | |
| | | private DepartmentMapper departmentMapper; |
| | | @Autowired |
| | | private ISysUserService userService; |
| | | @Autowired |
| | | private IMdcProductionService iMdcProductionService; |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public boolean addDefinition(ActivitiDefinition definition) { |
| | |
| | | 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) |