| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DuWorktypeMapper; |
| | | import com.doumee.dao.business.model.DuWorktype; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 派遣单位方案管工种关联信息表Service实现 |
| | |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | duWorktypeMapper.deleteById(id); |
| | | DuWorktype duWorktype = duWorktypeMapper.selectById(id); |
| | | if(Objects.isNull(duWorktype)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(duWorktype.getStatus().equals(Constants.TWO)){ |
| | | duWorktypeMapper.deleteById(id); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"当前状态无法进行删除"); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |