¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.pojo.Instrument; |
| | | import com.yuanchu.limslaboratory.pojo.RawMaterial; |
| | | import com.yuanchu.limslaboratory.mapper.RawMaterialMapper; |
| | | import com.yuanchu.limslaboratory.pojo.vo.InspectionVo; |
| | | import com.yuanchu.limslaboratory.service.RawMaterialService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2023-07-28 |
| | | */ |
| | | @Service |
| | | public class RawMaterialServiceImpl extends ServiceImpl<RawMaterialMapper, RawMaterial> implements RawMaterialService { |
| | | |
| | | @Resource |
| | | private RawMaterialMapper rawMaterialMapper; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param materialCoding |
| | | * @param materialName |
| | | * @param condition |
| | | * @param createTime |
| | | * @param page |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<RawMaterial> selectRawMaterial(String materialCoding, String materialName, Integer condition, String createTime, Page<Objects> page) { |
| | | return rawMaterialMapper.selectRawMaterial(materialCoding, materialName, condition, createTime, page); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææåæææ¥æ£å |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<RawMaterial> selectRawmaAll() { |
| | | return rawMaterialMapper.selectRawmaAll(); |
| | | } |
| | | |
| | | /** |
| | | * éæ©åæææ¥æ£ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public InspectionVo selectRawmaById(Integer id, String startTime, String endTime) throws ParseException { |
| | | InspectionVo inspectionVo = rawMaterialMapper.selectRawmaById(id); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); |
| | | inspectionVo.setStartTime(formatter.parse(startTime)); |
| | | inspectionVo.setEndTime(formatter.parse(endTime)); |
| | | inspectionVo.setType(0); |
| | | return inspectionVo; |
| | | } |
| | | } |