| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | |
| | | @Override |
| | | public int upStandardProductList(StandardProductList list) { |
| | | /*if(list.getId()==null || list.getId().equals("")){ |
| | | |
| | | }*/ |
| | | return standardProductListMapper.updateById(list); |
| | | } |
| | | |
| | |
| | | list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", trees[3], trees[4], tree)); |
| | | list.addAll(standardTreeMapper.selectStandardProductListByTree2("\"" + trees[2] + "\",\"" + trees[3] + "\"", trees[3], trees[4], tree)); |
| | | } |
| | | for (StandardProductList productList : list) { |
| | | productList.setId(IdWorker.getId()); |
| | | } |
| | | List<StandardProductList> standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, id).like(StandardProductList::getTree, tree)); |
| | | for (StandardProductList sp : standardProductLists) { |
| | | for (StandardProductList pl : list) { |
| | | if (Objects.equals(sp.getInspectionItem(), pl.getInspectionItem()) |
| | | && Objects.equals(sp.getInspectionItemSubclass() == null ? "" : sp.getInspectionItemSubclass(), pl.getInspectionItemSubclass() == null ? "" : pl.getInspectionItemSubclass()) |
| | | && Objects.equals(sp.getModel(), pl.getModel()) && Objects.equals(sp.getStructureItemParameterId(), pl.getStructureItemParameterId())) { |
| | | && Objects.equals(sp.getModel(), pl.getModel()) |
| | | && Objects.equals(sp.getStructureItemParameterId(), pl.getStructureItemParameterId())) { |
| | | pl.setId(sp.getId()); |
| | | if (sp.getState() != null && !sp.getState().equals("")) { |
| | | pl.setState(sp.getState()); |
| | |
| | | if (sp.getTemplateId() != null && !sp.getTemplateId().equals("")) { |
| | | pl.setTemplateId(sp.getTemplateId()); |
| | | } |
| | | if(sp.getTree() != null && !sp.getTree().equals("")){ |
| | | pl.setTree(sp.getTree()); |
| | | } |
| | | break; |
| | | } |
| | | } |