| | |
| | | public void insert(ProductHistory his) { |
| | | mapper.insert(his); |
| | | } |
| | | |
| | | /** |
| | | * 获取标准产品 |
| | | * @param parentCode |
| | | * @return |
| | | */ |
| | | public ProductHistory getStandard(String parentCode) { |
| | | QueryWrapper<ProductHistory> query = Wrappers.query(); |
| | | query.eq("parent_code",parentCode); |
| | | List<ProductHistory> historyList = mapper.selectList(query); |
| | | for (ProductHistory history : historyList) { |
| | | String customCode = history.getCustomCode(); |
| | | if(customCode == null || customCode.trim().equals("")){ //不存在定制表单号,是标准产品 |
| | | return history; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |