| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | |
| | | public void reTreeBySampleType(String sampleType) { |
| | | 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); |
| | | List<StandardMethodList> methodList = standardTreeMapper.getStandardMethodListBySample(sampleType); |
| | |
| | | sl1.setRemark(sl2.getRemark()); |
| | | sl2.setId(sl1.getId()); |
| | | standardMethodListMapper.updateById(sl1); |
| | | //通过检验标准id查询检验项目(标准库) |
| | | List<StandardProductList> standardProductList = standardProductListService.selectStandardProductListByMethodId(sl1.getId()); |
| | | for (StandardProductList pl1 : standardProductList) { |
| | | int count2 = 0; |
| | |
| | | pl2.setUpdateTime(LocalDateTime.now()); |
| | | pl2.setId(pl1.getId()); |
| | | pl2.setSample(tree.getSample()); |
| | | pl2.setDic(pl1.getDic()); |
| | | //如果标准库里面的要求有值则不更新,要求为null则同步更新 |
| | | if (ObjectUtils.isNotEmpty(pl1.getAsk())){ |
| | | pl2.setAsk(null); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(pl1.getTell())){ |
| | | pl2.setTell(null); |
| | | } |
| | | standardProductListMapper.updateById(pl2); |
| | | break; |
| | | } else { |