| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.ProductBomHistoryMapper; |
| | | import com.whyc.pojo.ProductBomHistory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | List list=mapper.selectList(wrapper); |
| | | return new Response().setII(1,list.size()>0?true:false,list,"返回数据"); |
| | | } |
| | | |
| | | /**指定版本的产品bom*/ |
| | | public List<ProductBomHistory> getListByParentModel(String parentModel, Integer version) { |
| | | QueryWrapper<ProductBomHistory> query = Wrappers.query(); |
| | | query.eq("parent_model",parentModel).le("e_version",version).ge("s_version",version); |
| | | return mapper.selectList(query); |
| | | } |
| | | |
| | | public void addBatch(List<ProductBomHistory> newHistoryList) { |
| | | mapper.insertBatchSomeColumn(newHistoryList); |
| | | } |
| | | } |