| | |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.Inspection; |
| | | import com.yuanchu.limslaboratory.mapper.InspectionMapper; |
| | | import com.yuanchu.limslaboratory.pojo.dto.InspectionDto; |
| | | import com.yuanchu.limslaboratory.service.InspectionService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private InspectionMapper inspectionMapper; |
| | | |
| | | @Override |
| | | public int addInspection(Inspection inspection) { |
| | | return inspectionMapper.insert(inspection); |
| | | public Inspection addInspection(String userName,int type) { |
| | | Inspection inspection = new Inspection(type, 0,1,1, userName); |
| | | int judge = inspectionMapper.insert(inspection); |
| | | return judge>0?inspection:null; |
| | | } |
| | | |
| | | @Override |
| | | public List<InspectionDto> selectAllInspection(int pageSize, int countSize, Integer state) { |
| | | return inspectionMapper.selectAllInspection((pageSize - 1) * countSize,pageSize * countSize, state); |
| | | } |
| | | } |