| | |
| | | package cn.gistack.sm.sg.service.impl; |
| | | |
| | | import cn.gistack.sm.sg.DO.SgGxStepDO; |
| | | import cn.gistack.sm.sg.DTO.ProjectSearchDTO; |
| | | import cn.gistack.sm.sg.mapper.SgGxStepMapper; |
| | | import cn.gistack.sm.sg.service.SgGxStepService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.lang.reflect.Array; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public void delete(String id) { |
| | | SgGxStepDO sgGxStepDO = sgGxStepMapper.selectById(id); |
| | | List<SgGxStepDO> list= sgGxStepMapper.selectByGxInfoId(sgGxStepDO.getGxInfoId()); |
| | | if (sgGxStepDO.getGxStepNum().equals(list.get(0).getGxStepNum())){ |
| | | if (!sgGxStepDO.getGxStepNum().equals(list.get(0).getGxStepNum())){ |
| | | throw new ServiceException("请按顺序删除工序步骤"); |
| | | } |
| | | this.removeById(id); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SgGxStepDO> queryPageList(IPage<SgGxStepDO> page, ProjectSearchDTO searchDTO) { |
| | | List<SgGxStepDO> list = sgGxStepMapper.queryPageList(page,searchDTO); |
| | | return page.setRecords(list); |
| | | } |
| | | } |