更新
1.修改内部静态类作为参数导致接受失败的问题 2.修改查询参数调用错误问题
This commit is contained in:
@@ -3,6 +3,7 @@ package digital.laboratory.platform.entrustment.dto;
|
|||||||
import digital.laboratory.platform.sys.entity.DrugLite;
|
import digital.laboratory.platform.sys.entity.DrugLite;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
@@ -28,23 +29,4 @@ public class ApprovedUpdateEntrustDTO {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "是否完成, true:已完成(标记该申请已完成,该申请将不在允许修改), false:未完成(不改变状态)")
|
@ApiModelProperty(value = "是否完成, true:已完成(标记该申请已完成,该申请将不在允许修改), false:未完成(不改变状态)")
|
||||||
private Boolean finished;
|
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<DrugLite> candidateDrugs;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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<DrugLite> candidateDrugs;
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ import digital.laboratory.platform.entrustment.convert.DrugLiteConvert;
|
|||||||
import digital.laboratory.platform.entrustment.dto.ApprovedUpdateEntrustDTO;
|
import digital.laboratory.platform.entrustment.dto.ApprovedUpdateEntrustDTO;
|
||||||
import digital.laboratory.platform.entrustment.dto.EntrustAlterApplyApproveDTO;
|
import digital.laboratory.platform.entrustment.dto.EntrustAlterApplyApproveDTO;
|
||||||
import digital.laboratory.platform.entrustment.dto.EntrustAlterApplyDTO;
|
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.CaseEvent;
|
||||||
import digital.laboratory.platform.entrustment.entity.EntrustAlterApply;
|
import digital.laboratory.platform.entrustment.entity.EntrustAlterApply;
|
||||||
import digital.laboratory.platform.entrustment.entity.Entrustment;
|
import digital.laboratory.platform.entrustment.entity.Entrustment;
|
||||||
@@ -203,17 +204,16 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
caseEventService.update(Wrappers.<CaseEvent>lambdaUpdate().eq(CaseEvent::getId, entrustment.getCaseId()).set(CaseEvent::getCaseBrief, dto.getCaseBrief()));
|
caseEventService.update(Wrappers.<CaseEvent>lambdaUpdate().eq(CaseEvent::getId, entrustment.getCaseId()).set(CaseEvent::getCaseBrief, dto.getCaseBrief()));
|
||||||
// 添加更新记录
|
// 添加更新记录
|
||||||
updateRecordBuilder.append("操作记录:\\n").append("该委托案件的案件简要由 [").append(oldCaseInfo.getCaseBrief()).append("] 更改为 [").append(dto.getCaseBrief()).append("] 。");
|
updateRecordBuilder.append("操作记录:\\n").append("该委托案件的案件简要由 [").append(oldCaseInfo.getCaseBrief()).append("] 更改为 [").append(dto.getCaseBrief()).append("] 。");
|
||||||
updateRecordBuilder.append("检材信息的更新记录:");
|
|
||||||
// 2.修改检材 信息
|
// 2.修改检材 信息
|
||||||
// 这里之所以要取未更新前的信息是为了留痕
|
// 这里之所以要取未更新前的信息是为了留痕
|
||||||
Map<String, EntrustmentIdentificationMaterial> oldInfoMap = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
|
Map<String, EntrustmentIdentificationMaterial> oldInfoMap = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
|
||||||
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId)
|
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId)
|
||||||
.orderByAsc(EntrustmentIdentificationMaterial::getOrderNo))
|
.orderByAsc(EntrustmentIdentificationMaterial::getOrderNo))
|
||||||
.stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity()));
|
.stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity()));
|
||||||
List<ApprovedUpdateEntrustDTO.MaterialDTO> materialList = dto.getMaterialList();
|
List<MaterialDTO> materialList = dto.getMaterialList();
|
||||||
Integer index = 1;
|
Integer index = 1;
|
||||||
List<EntrustmentIdentificationMaterial> entrustmentIdentificationMaterialList = new ArrayList<>();
|
List<EntrustmentIdentificationMaterial> entrustmentIdentificationMaterialList = new ArrayList<>();
|
||||||
for (ApprovedUpdateEntrustDTO.MaterialDTO item : materialList) {
|
for (MaterialDTO item : materialList) {
|
||||||
String materialId = item.getId();
|
String materialId = item.getId();
|
||||||
String name = item.getName();
|
String name = item.getName();
|
||||||
List<DrugLite> candidateDrugs = item.getCandidateDrugs();
|
List<DrugLite> candidateDrugs = item.getCandidateDrugs();
|
||||||
@@ -230,6 +230,9 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
// 信息并没有修改,不操作
|
// 信息并没有修改,不操作
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (index == 1) {
|
||||||
|
updateRecordBuilder.append("检材信息的更新记录:");
|
||||||
|
}
|
||||||
updateRecordBuilder
|
updateRecordBuilder
|
||||||
.append("\\n")
|
.append("\\n")
|
||||||
.append(index++)
|
.append(index++)
|
||||||
@@ -273,7 +276,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
// 4.删除鉴定事项确认书和委托书
|
// 4.删除鉴定事项确认书和委托书
|
||||||
deleteConfirmEntrustLetter(entrustment.getEntrustmentNo(), entrustmentId);
|
deleteConfirmEntrustLetter(entrustment.getEntrustmentNo(), entrustmentId);
|
||||||
}
|
}
|
||||||
return super.update(Wrappers.<EntrustAlterApply>lambdaUpdate().eq(EntrustAlterApply::getId, entrustment.getId())
|
return super.update(Wrappers.<EntrustAlterApply>lambdaUpdate().eq(EntrustAlterApply::getId, dto.getId())
|
||||||
.set(EntrustAlterApply::getUpdateRecord, updateRecordBuilder.toString())
|
.set(EntrustAlterApply::getUpdateRecord, updateRecordBuilder.toString())
|
||||||
.set(dto.getFinished(), EntrustAlterApply::getStatus, EntrustAlterApplyStatus.FINISHED.getStatus()));
|
.set(dto.getFinished(), EntrustAlterApply::getStatus, EntrustAlterApplyStatus.FINISHED.getStatus()));
|
||||||
}
|
}
|
||||||
@@ -283,7 +286,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
* @param entrustmentId
|
* @param entrustmentId
|
||||||
* @param entrustment
|
* @param entrustment
|
||||||
*/
|
*/
|
||||||
private void updateEntrustmentRequirement(String entrustmentId, Entrustment entrustment) {
|
public void updateEntrustmentRequirement(String entrustmentId, Entrustment entrustment) {
|
||||||
List<EntrustmentIdentificationMaterial> renewList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
|
List<EntrustmentIdentificationMaterial> renewList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
|
||||||
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId)
|
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId)
|
||||||
.orderByAsc(EntrustmentIdentificationMaterial::getOrderNo));
|
.orderByAsc(EntrustmentIdentificationMaterial::getOrderNo));
|
||||||
@@ -331,7 +334,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
}
|
}
|
||||||
// 状态合法,开始修改委托信息
|
// 状态合法,开始修改委托信息
|
||||||
// 1. 修改委托案件简要
|
// 1. 修改委托案件简要
|
||||||
Entrustment entrustment = entrustmentService.getById(dto.getId());
|
Entrustment entrustment = entrustmentService.getById(dto.getEntrustId());
|
||||||
if (entrustment == null) {
|
if (entrustment == null) {
|
||||||
throw new ValidateCodeException("修改的委托记录不存在!");
|
throw new ValidateCodeException("修改的委托记录不存在!");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user