| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DispatchUnitMapper; |
| | | import com.doumee.dao.business.DuSolutionMapper; |
| | | import com.doumee.dao.business.DuWorktypeMapper; |
| | | import com.doumee.dao.business.WorktypeMapper; |
| | | import com.doumee.dao.business.model.DispatchUnit; |
| | | import com.doumee.dao.business.model.DuSolution; |
| | | import com.doumee.dao.business.model.DuWorktype; |
| | | import com.doumee.dao.business.model.Worktype; |
| | | import com.doumee.service.business.DuWorktypeService; |
| | |
| | | @Autowired |
| | | private DispatchUnitMapper dispatchUnitMapper; |
| | | |
| | | @Autowired |
| | | private DuSolutionMapper duSolutionMapper; |
| | | |
| | | @Override |
| | | public Integer create(DuWorktype duWorktype) { |
| | | duWorktypeMapper.insert(duWorktype); |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | duWorktypeMapper.deleteById(id); |
| | | |
| | | if(duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>().lambda() |
| | | .eq(DuWorktype::getDispatchUnitId,dispatchUnit.getId()) |
| | | .eq(DuWorktype::getDuSolutionId,dbDuWorkType.getDuSolutionId()))<=0){ |
| | | duSolutionMapper.deleteById(dbDuWorkType.getDuSolutionId()); |
| | | } |
| | | if(duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>().lambda() |
| | | .eq(DuWorktype::getDispatchUnitId,dispatchUnit.getId()) |
| | | .eq(DuWorktype::getStatus,Constants.ZERO) |