|
@@ -6,11 +6,13 @@ import cn.iocoder.yudao.module.infra.api.file.FileApi;
|
|
|
import cn.iocoder.yudao.module.museums.dal.dataobject.specimenoutbound.SpecimenOutboundDO;
|
|
|
import cn.iocoder.yudao.module.museums.dal.mysql.specimenoutbound.SpecimenOutboundMapper;
|
|
|
import cn.iocoder.yudao.module.museums.enums.social.LogRecordConstants;
|
|
|
+import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSaveReqVO;
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.mzt.logapi.context.LogRecordContext;
|
|
|
+import com.mzt.logapi.service.impl.DiffParseFunction;
|
|
|
import com.mzt.logapi.starter.annotation.LogRecord;
|
|
|
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
|
|
|
import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
|
|
@@ -83,15 +85,6 @@ public class SpecimenInfoServiceImpl implements SpecimenInfoService {
|
|
|
return "标本创建成功,标本ID:" + specimenInfo.getId();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
@@ -113,9 +106,11 @@ public class SpecimenInfoServiceImpl implements SpecimenInfoService {
|
|
|
if(specimenInfo != null){
|
|
|
SpecimenInfoDO updateObj = BeanUtils.toBean(updateReqVO, SpecimenInfoDO.class);
|
|
|
specimenInfoMapper.updateById(updateObj);
|
|
|
- LogRecordContext.putVariable("update-specimen", updateObj);
|
|
|
+
|
|
|
+ LogRecordContext.putVariable(DiffParseFunction.OLD_OBJECT, BeanUtils.toBean(specimenInfo, SpecimenInfoSaveReqVO.class));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@LogRecord(type = MUSEUMS_SPECIMEN_TYPE, subType = MUSEUMS_SPECIMEN_DELETE_SUB_TYPE, bizNo = "{{#id}}",
|
|
@@ -242,108 +237,6 @@ public class SpecimenInfoServiceImpl implements SpecimenInfoService {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public String importSpecimenImages(MultipartFile file) throws Exception {
|
|
@@ -392,7 +285,7 @@ public class SpecimenInfoServiceImpl implements SpecimenInfoService {
|
|
|
|
|
|
|
|
|
String existingImagePaths = specimenInfo.getImagePath();
|
|
|
- if (existingImagePaths != null && !existingImagePaths.trim().isEmpty() && !existingImagePaths.equals("[]")) {
|
|
|
+ if (existingImagePaths != null && !existingImagePaths.trim().isEmpty()) {
|
|
|
|
|
|
existingImagePaths = existingImagePaths.replaceAll("^\\[|\\]$", "").trim();
|
|
|
|