| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.TechnicalSpecificationMapper; |
| | | import com.whyc.pojo.TechnicalSpecification; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | import java.io.InputStream; |
| | | import java.text.ParseException; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class TechnicalSpecificationService { |
| | |
| | | private TechnicalSpecification get(int id){ |
| | | return mapper.selectById(id); |
| | | } |
| | | |
| | | //查询技术规格书 |
| | | public Response getInfo(String applyMaterialCode, String applyModel, String applyCustomCode, String owner, Integer lockFlaq |
| | | ,int pageNum, int pageSize) { |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | QueryWrapper<TechnicalSpecification> query = Wrappers.query(); |
| | | if(applyMaterialCode!=null&&!applyMaterialCode.isEmpty()){ |
| | | query.like("apply_material_code",applyMaterialCode); |
| | | } |
| | | if(applyModel!=null&&!applyModel.isEmpty()){ |
| | | query.like("apply_model",applyModel); |
| | | } |
| | | |
| | | if(applyCustomCode!=null&&!applyCustomCode.isEmpty()){ |
| | | query.like("apply_custom_code",applyCustomCode); |
| | | } |
| | | if(owner!=null&&!owner.isEmpty()){ |
| | | query.like("owner",owner); |
| | | } |
| | | if(lockFlaq!=null){ |
| | | query.eq("lock_flaq",lockFlaq); |
| | | } |
| | | List<TechnicalSpecification> list=mapper.selectList(query); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list!=null,pageInfo,"查询技术规格书"); |
| | | } |
| | | } |