| | |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.*; |
| | | import com.doumee.dao.business.join.DispatchUnitJoinMapper; |
| | | import com.doumee.dao.business.join.DuLogJoinMapper; |
| | | import com.doumee.dao.business.join.DuSolutionJoinMapper; |
| | | import com.doumee.dao.business.join.DuWorkTypeJoinMapper; |
| | | import com.doumee.dao.business.join.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.DispatchUnitService; |
| | |
| | | |
| | | @Autowired |
| | | private DuSolutionMapper duSolutionMapper; |
| | | |
| | | @Autowired |
| | | private SolutionWorktypeJoinMapper solutionWorktypeJoinMapper; |
| | | |
| | | @Autowired |
| | | private DuWorktypeMapper duWorktypeMapper; |
| | |
| | | newVersion = dispatchUnitMapper.selectOne(new QueryWrapper<DispatchUnit>().lambda() |
| | | .eq(DispatchUnit::getIsdeleted,Constants.ZERO) |
| | | .eq(DispatchUnit::getDataType,Constants.TWO) |
| | | .eq(DispatchUnit::getBaseId,model.getId()).last(" limit 1")); |
| | | .eq(DispatchUnit::getBaseId,model.getId()) |
| | | .last(" limit 1")); |
| | | } |
| | | if(Objects.isNull(newVersion)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到派遣单位最新版本"); |
| | |
| | | if(Objects.isNull(saveDuWorkTypeDTO.getWorkTypeId())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"【"+saveDuSolutionDTO.getSolutionName()+"】该方案下"+saveDuWorkTypeDTO.getWorkTypeName()+"该工种信息异常"); |
| | | } |
| | | //验证方案与工种的关系 |
| | | if(solutionWorktypeJoinMapper.selectCount(new QueryWrapper<SolutionWorktype>().lambda().eq(SolutionWorktype::getSolutionId,saveDuSolutionDTO.getSolutionId()) |
| | | .eq(SolutionWorktype::getWorktypeId,saveDuWorkTypeDTO.getWorkTypeId()))<=0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"【"+saveDuSolutionDTO.getSolutionName()+"】该方案下"+saveDuWorkTypeDTO.getWorkTypeName()+"该工种信息无绑定关系"); |
| | | }; |
| | | if(duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>() |
| | | .lambda().eq(DuWorktype::getDuSolutionId,duSolution.getId()) |
| | | .eq(DuWorktype::getIsdeleted,Constants.ZERO) |