| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.pojo.LinkBasicInformation; |
| | | import com.yuanchu.limslaboratory.mapper.LinkBasicInformationMapper; |
| | | import com.yuanchu.limslaboratory.pojo.LinkDetection; |
| | | import com.yuanchu.limslaboratory.service.LinkBasicInformationService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.limslaboratory.service.LinkDetectionService; |
| | |
| | | |
| | | @Override |
| | | public String addLinkBasicInformation(LinkBasicInformation linkBasicInformation) { |
| | | //委托编号 |
| | | String code = MyUtil.getTimeSixNumberCode("SL", "SL"); |
| | | linkBasicInformation.setEntrustCoding(code); |
| | | //新增基本信息表 |
| | | int insert = linkBasicInformationMapper.insert(linkBasicInformation); |
| | | if (insert == 1) { |
| | | //新增委托样品表 |
| | | linkDetectionService.insertListData(linkBasicInformation.getId(), linkBasicInformation.getLinkDetectionList()); |
| | | return code; |
| | | } |
| | |
| | | return uuid.equals(RedisUtil.get("viewId")); |
| | | } |
| | | |
| | | @Override |
| | | public LinkBasicInformation getContractsSampleInfo(String viewId) { |
| | | return linkBasicInformationMapper.getLinkBasicInformation(viewId); |
| | | } |
| | | |
| | | //根据委托样品删除 |
| | | @Override |
| | | public void delLink(Integer id) { |
| | | LinkDetection linkDetection = new LinkDetection(); |
| | | linkDetection.setId(id); |
| | | linkDetection.setState(0); |
| | | linkDetectionService.updateById(linkDetection); |
| | | } |
| | | |
| | | |
| | | } |