From 0814b5edd454729fd15aa0f9d5a60d16c1a1d97c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B5=B7=E8=88=AA?= <11918452+yang-haihang@user.noreply.gitee.com> Date: Mon, 4 Nov 2024 11:10:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=201.=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=86=85=E9=83=A8=E9=9D=99=E6=80=81=E7=B1=BB=E4=BD=9C=E4=B8=BA?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=AF=BC=E8=87=B4=E6=8E=A5=E5=8F=97=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=202.=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0=E8=B0=83=E7=94=A8=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/ApprovedUpdateEntrustDTO.java | 20 +------------- .../platform/entrustment/dto/MaterialDTO.java | 26 +++++++++++++++++++ .../impl/EntrustAlterApplyServiceImpl.java | 15 ++++++----- 3 files changed, 36 insertions(+), 25 deletions(-) create mode 100644 src/main/java/digital/laboratory/platform/entrustment/dto/MaterialDTO.java diff --git a/src/main/java/digital/laboratory/platform/entrustment/dto/ApprovedUpdateEntrustDTO.java b/src/main/java/digital/laboratory/platform/entrustment/dto/ApprovedUpdateEntrustDTO.java index 808943d..ca6f162 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/dto/ApprovedUpdateEntrustDTO.java +++ b/src/main/java/digital/laboratory/platform/entrustment/dto/ApprovedUpdateEntrustDTO.java @@ -3,6 +3,7 @@ package digital.laboratory.platform.entrustment.dto; import digital.laboratory.platform.sys.entity.DrugLite; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -28,23 +29,4 @@ public class ApprovedUpdateEntrustDTO { @ApiModelProperty(value = "是否完成, true:已完成(标记该申请已完成,该申请将不在允许修改), false:未完成(不改变状态)") private Boolean finished; - - // 使用内部类MaterialDTO - @Data - @ApiModel(value = "MaterialDTO", description = "委托检材") - public class MaterialDTO { - - @ApiModelProperty(value = "检材id") - private String id; - - @ApiModelProperty(value = "检材名称(疑似物种类)") - private String name; - - @ApiModelProperty(value = "分析项目 1.定性分析 2.定量分析 3.定性定量分析 4.关联性判断 5。其他") - private Integer analysisOption; - - @ApiModelProperty(value = "候选毒品列表(drug 对象的 json array)") - private List candidateDrugs; - } - } diff --git a/src/main/java/digital/laboratory/platform/entrustment/dto/MaterialDTO.java b/src/main/java/digital/laboratory/platform/entrustment/dto/MaterialDTO.java new file mode 100644 index 0000000..ac910d2 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/entrustment/dto/MaterialDTO.java @@ -0,0 +1,26 @@ +package digital.laboratory.platform.entrustment.dto; + +import digital.laboratory.platform.sys.entity.DrugLite; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +// 使用内部类MaterialDTO +@Data +@ApiModel(value = "MaterialDTO", description = "委托检材") +public class MaterialDTO { + + @ApiModelProperty(value = "检材id") + private String id; + + @ApiModelProperty(value = "检材名称(疑似物种类)") + private String name; + + @ApiModelProperty(value = "分析项目 1.定性分析 2.定量分析 3.定性定量分析 4.关联性判断 5。其他") + private Integer analysisOption; + + @ApiModelProperty(value = "候选毒品列表(drug 对象的 json array)") + private List candidateDrugs; +} \ No newline at end of file diff --git a/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustAlterApplyServiceImpl.java b/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustAlterApplyServiceImpl.java index c006975..49e9c7e 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustAlterApplyServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustAlterApplyServiceImpl.java @@ -15,6 +15,7 @@ import digital.laboratory.platform.entrustment.convert.DrugLiteConvert; import digital.laboratory.platform.entrustment.dto.ApprovedUpdateEntrustDTO; import digital.laboratory.platform.entrustment.dto.EntrustAlterApplyApproveDTO; import digital.laboratory.platform.entrustment.dto.EntrustAlterApplyDTO; +import digital.laboratory.platform.entrustment.dto.MaterialDTO; import digital.laboratory.platform.entrustment.entity.CaseEvent; import digital.laboratory.platform.entrustment.entity.EntrustAlterApply; import digital.laboratory.platform.entrustment.entity.Entrustment; @@ -203,17 +204,16 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpllambdaUpdate().eq(CaseEvent::getId, entrustment.getCaseId()).set(CaseEvent::getCaseBrief, dto.getCaseBrief())); // 添加更新记录 updateRecordBuilder.append("操作记录:\\n").append("该委托案件的案件简要由 [").append(oldCaseInfo.getCaseBrief()).append("] 更改为 [").append(dto.getCaseBrief()).append("] 。"); - updateRecordBuilder.append("检材信息的更新记录:"); // 2.修改检材 信息 // 这里之所以要取未更新前的信息是为了留痕 Map oldInfoMap = entrustmentIdentificationMaterialService.list(Wrappers.lambdaQuery() .eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId) .orderByAsc(EntrustmentIdentificationMaterial::getOrderNo)) .stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity())); - List materialList = dto.getMaterialList(); + List materialList = dto.getMaterialList(); Integer index = 1; List entrustmentIdentificationMaterialList = new ArrayList<>(); - for (ApprovedUpdateEntrustDTO.MaterialDTO item : materialList) { + for (MaterialDTO item : materialList) { String materialId = item.getId(); String name = item.getName(); List candidateDrugs = item.getCandidateDrugs(); @@ -230,6 +230,9 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpllambdaUpdate().eq(EntrustAlterApply::getId, entrustment.getId()) + return super.update(Wrappers.lambdaUpdate().eq(EntrustAlterApply::getId, dto.getId()) .set(EntrustAlterApply::getUpdateRecord, updateRecordBuilder.toString()) .set(dto.getFinished(), EntrustAlterApply::getStatus, EntrustAlterApplyStatus.FINISHED.getStatus())); } @@ -283,7 +286,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl renewList = entrustmentIdentificationMaterialService.list(Wrappers.lambdaQuery() .eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId) .orderByAsc(EntrustmentIdentificationMaterial::getOrderNo)); @@ -331,7 +334,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl