| | |
| | | // 修改名称匹配的标准树下的检验项目 |
| | | // 查询所有对象+名称的树 |
| | | |
| | | List<StandardProductList> standardProductLists = standardProductListService.list(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getSample, standardTree.getSample()) |
| | | LambdaUpdateWrapper<StandardProductList> updateWrapper = Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getFactory, standardTree.getFactory()) |
| | | .eq(StandardProductList::getLaboratory, standardTree.getLaboratory()) |
| | | .eq(StandardProductList::getSampleType, standardTree.getSampleType()) |
| | | .eq(StandardProductList::getModel, standardTree.getOldModel())); |
| | | .eq(StandardProductList::getModel, standardTree.getOldModel()); |
| | | if (StringUtils.isNotBlank(standardTree.getSample()) && !standardTree.getSample().equals("null")) { |
| | | updateWrapper.eq(StandardProductList::getSample, standardTree.getSample()); |
| | | } else { |
| | | updateWrapper.isNull(StandardProductList::getSample); |
| | | } |
| | | |
| | | List<StandardProductList> standardProductLists = standardProductListService.list(updateWrapper); |
| | | if (CollectionUtils.isNotEmpty(standardProductLists)) { |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | // 修改样品名称 |
| | |
| | | .eq(StandardTree::getSampleType, standardTree.getSampleType()) |
| | | .eq(StandardTree::getModel, standardTree.getOldModel()) |
| | | .set(StandardTree::getModel, standardTree.getModel()); |
| | | if (StringUtils.isNotBlank(standardTree.getSample())) { |
| | | if (StringUtils.isNotBlank(standardTree.getSample()) && !standardTree.getSample().equals("null")) { |
| | | wrapper.eq(StandardTree::getSample, standardTree.getSample()); |
| | | } else { |
| | | wrapper.isNull(StandardTree::getSample); |
| | | } |
| | | return standardTreeMapper.update(null, wrapper); |
| | | } |