| | |
| | | import com.yuanchu.mom.pojo.StandardProductList; |
| | | import com.yuanchu.mom.pojo.StandardTree; |
| | | import com.yuanchu.mom.service.StandardProductListService; |
| | | import com.yuanchu.mom.service.StandardProductListService2; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private GetLook getLook; |
| | | |
| | | private StandardProductListService2 standardProductListService2; |
| | | |
| | | @Override |
| | | public int upStandardProductList(StandardProductList list) { |
| | |
| | | if(sp.getSection()!=null&&!sp.getSection().equals("")){ |
| | | pl.setSection(sp.getSection()); |
| | | } |
| | | if(sp.getTemplateId()!=null&&!sp.getTemplateId().equals("")){ |
| | | pl.setTemplateId(sp.getTemplateId()); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | CompletableFuture.supplyAsync(() -> { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id).like(StandardProductList::getTree, tree)); |
| | | saveBatch(list.stream().map(a->{ |
| | | standardProductListService2.saveBatch(list.stream().map(a->{ |
| | | a.setFactory(trees[0]); |
| | | a.setLaboratory(trees[1]); |
| | | a.setSampleType(trees[2]); |