| | |
| | | package com.yuanchu.limslaboratory.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.yuanchu.limslaboratory.pojo.MetricalInformation; |
| | | import com.yuanchu.limslaboratory.mapper.MetricalInformationMapper; |
| | | import com.yuanchu.limslaboratory.pojo.dto.UpdatedMetricalInformationDto; |
| | | import com.yuanchu.limslaboratory.service.MetricalInformationService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.limslaboratory.utils.FileSaveUtil; |
| | |
| | | String fileName = FileSaveUtil.StoreFile(file); |
| | | metricalInformation.setFilePath(fileName); |
| | | } |
| | | metricalInformation.setCode(MyUtil.getTimeSixNumberCode("METRICALCODE","METRICALCODE")); |
| | | return metricalInformationMapper.insert(metricalInformation); |
| | | } |
| | | |
| | |
| | | } |
| | | return metricalInformationMapper.updateById(metricalInformation); |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateMetricalInformationInfo(UpdatedMetricalInformationDto dto) { |
| | | System.out.println(dto); |
| | | MetricalInformation info = new MetricalInformation(); |
| | | info.setId(dto.getId()); |
| | | info.setRemarks(dto.getRemarks()); |
| | | info.setPerformanceIndex(dto.getPerformanceIndex()); |
| | | info.setResult(dto.getResult()); |
| | | info.setUncertainty(dto.getUncertainty()); |
| | | info.setEndDate(dto.getDate()); |
| | | info.setUpdateTime(DateUtil.date()); |
| | | System.out.println(info); |
| | | //文件滤过 |
| | | return metricalInformationMapper.updateById(info)>0; |
| | | } |
| | | } |