| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void reTreeBySampleType(String sampleType) { |
| | | // Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | CompletableFuture.supplyAsync(() -> { |
| | | List<StandardProductList> productList = standardTreeMapper.getStandardProductListBySample(sampleType); |
| | | List<StandardProductList> productList1 = JSON.parseArray(JSON.toJSONString(productList), StandardProductList.class); |
| | |
| | | int count2 = 0; |
| | | for (StandardProductList pl2 : productList) { |
| | | if (Objects.equals(pl1.getInspectionItemSubclass(), pl2.getInspectionItemSubclass()) && Objects.equals(pl1.getInspectionItem(), pl2.getInspectionItem())) { |
| | | pl2.setUpdateUser(null); |
| | | pl2.setUpdateTime(null); |
| | | pl2.setUpdateUser(userId); |
| | | pl2.setUpdateTime(LocalDateTime.now()); |
| | | pl2.setId(pl1.getId()); |
| | | pl2.setSample(tree.getSample()); |
| | | standardProductListMapper.updateById(pl2); |
| | | break; |
| | | } else { |