20250217 更新

master
陈江保 6 days ago
parent 159af0dfdb
commit 807b381437
  1. 8
      src/main/java/digital/laboratory/platform/entrustment/controller/CaseEventController.java
  2. 6
      src/main/java/digital/laboratory/platform/entrustment/dto/ApprovedUpdateEntrustDTO.java
  3. 7
      src/main/java/digital/laboratory/platform/entrustment/dto/UpdateCaseAndEntrustTypeDTO.java
  4. 43
      src/main/java/digital/laboratory/platform/entrustment/enums/EntrustBiologyType.java
  5. 3
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustAlterApplyServiceImpl.java
  6. 6
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentIdentificationMaterialServiceImpl.java
  7. 7
      src/main/java/digital/laboratory/platform/entrustment/vo/CaseEventVO.java

@ -61,11 +61,17 @@ import java.util.Map;
@RequestMapping("/papp/entrustment/case")
@Api(tags = "001-案件管理")
public class CaseEventController {
private final CaseEventService caseEventService;
private final CaseEvidenceService caseEvidenceService;
private final EntrustmentService entrustmentService;
private final EntrustmentIdentificationMaterialService entrustmentIdentificationMaterialService;
private final RemoteOrgService remoteOrgService;
private final OssFile ossFile;
@ -90,6 +96,7 @@ public class CaseEventController {
Entrustment one = entrustmentService.getOne(Wrappers.<Entrustment>lambdaQuery().eq(Entrustment::getCaseId, id));
cevo.setEntrustmentType(one.getEntrustmentType());
cevo.setType(one.getType());
return R.ok(cevo);
}
@ -235,6 +242,7 @@ public class CaseEventController {
entrustmentService.update(Wrappers.<Entrustment>lambdaUpdate()
.eq(Entrustment::getId, dto.getEntrustId())
.set(Entrustment::getEntrustmentType, dto.getEntrustmentType())
.set(StrUtil.isNotBlank(dto.getType()), Entrustment::getType, dto.getType())
);
}
return R.ok(caseEvent, "保存案件信息成功");

@ -1,5 +1,6 @@
package digital.laboratory.platform.entrustment.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.sys.entity.DrugLite;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -7,6 +8,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.List;
@Data
@ -21,6 +23,10 @@ public class ApprovedUpdateEntrustDTO {
@NotBlank(message = "关联的委托id不能为空!")
private String entrustId;
@ApiModelProperty(value="委托日期, 鉴定委托书打印日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime entrustmentTime;
@ApiModelProperty(value = "案件名称")
private String caseName;

@ -96,4 +96,11 @@ public class UpdateCaseAndEntrustTypeDTO {
@ApiModelProperty(value="委托类型: 0=常规毒品, 1=生物样本")
private Integer entrustmentType;
/**
* 20250121 新增的一个委托类型选择生物样本类型后需要区分是 0 委托1 初筛 2 两社人员 3 其他人员 常规毒品 0 委托 1 初筛其他的不需要区分
* 存字符串不用code表达
*/
@ApiModelProperty("新增的一个委托类型,选择生物样本类型后需要区分是 0 委托、1 初筛、 2 两社人员、 3 其他人员, 常规毒品 0 委托 1 初筛,其他的不需要区分")
private String type;
}

@ -0,0 +1,43 @@
package digital.laboratory.platform.entrustment.enums;
import cn.hutool.core.collection.CollUtil;
import lombok.Getter;
import java.util.List;
@Getter
public enum EntrustBiologyType {
HAIR(0, "毛发", CollUtil.newArrayList("黑色头发", "毛发")),
URINE(1, "尿液", CollUtil.newArrayList("黄色尿液")),
OTHER(2, "其他", CollUtil.newArrayList()),
;
private final Integer code;
private final String desc;
private final List<String> alias;
EntrustBiologyType(Integer code, String desc, List<String> alias) {
this.code = code;
this.desc = desc;
this.alias = alias;
}
// 根据名称或别名判断是否存在对应枚举
public static EntrustBiologyType isExist(String desc) {
for (EntrustBiologyType entrustStatisticType : values()) {
// 先匹配描述字段
if (entrustStatisticType.getDesc().equals(desc)) {
return entrustStatisticType;
}
// 然后匹配别名
if (entrustStatisticType.getAlias().contains(desc)) {
return entrustStatisticType;
}
}
return OTHER;
}
}

@ -232,7 +232,8 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
opDate
);
entrustmentIdentificationMaterialService.updateBatchById(entrustmentIdentificationMaterialList);
// 3. 更新委托鉴定要求
// 3. 更新委托鉴定要求和委托时间
entrustment.setEntrustmentTime(dto.getEntrustmentTime()); // 修改委托时间
updateEntrustmentRequirement(entrustment, dto.getEntrustRequirement(), updateRecordBuilder, opDate);
// 如果确认完成,则删除鉴定事项确认书和委托书,并更新申请状态为已完成
if (dto.getFinished()) {

@ -25,6 +25,7 @@ import digital.laboratory.platform.common.security.util.SecurityUtils;
import digital.laboratory.platform.entrustment.dto.PrintDTO;
import digital.laboratory.platform.entrustment.entity.*;
import digital.laboratory.platform.entrustment.enums.AnalysisOptionEnums;
import digital.laboratory.platform.entrustment.enums.EntrustBiologyType;
import digital.laboratory.platform.entrustment.enums.EntrustmentStatusConstants;
import digital.laboratory.platform.entrustment.handler.AppStartupRunner;
import digital.laboratory.platform.entrustment.mapper.EntrustmentIdentificationMaterialMapper;
@ -1184,6 +1185,10 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
Integer currentEntrustMaterialCount = (int) this.count(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustment.getId()));
for (EntrustmentIdentificationMaterial identificationMaterial : identificationMaterialList) {
// 先提前根据性状设置生物类型 -》 只正对生物样本数据
if (identificationMaterial.getTypeName().equals("生物样本") || identificationMaterial.getType().equals("1")) {
identificationMaterial.setBiologyType(EntrustBiologyType.isExist(identificationMaterial.getFormName()).getDesc());
}
if (StringUtils.isNotBlank(identificationMaterial.getId()) && StringUtils.isNotBlank(identificationMaterial.getSample1No())) {
identificationMaterial = this.putUpdateById(identificationMaterial, dlpUser);
} else {
@ -1266,7 +1271,6 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
identificationMaterial.setSample1RepeatWeigh(identificationMaterial.getQuantity());
identificationMaterial.setSample2RepeatWeigh(null);
//判断检材的重量不能大于物证的重量 暂不判断,因为可能单位不统一
if (this.save(identificationMaterial)) {
// 新增检材记录成功

@ -30,4 +30,11 @@ public class CaseEventVO extends CaseEvent {
@ApiModelProperty(value="委托类型: 0=常规毒品, 1=生物样本")
private Integer entrustmentType;
/**
* 20250121 新增的一个委托类型选择生物样本类型后需要区分是 0 委托1 初筛 2 两社人员 3 其他人员 常规毒品 0 委托 1 初筛其他的不需要区分
* 存字符串不用code表达
*/
@ApiModelProperty("新增的一个委托类型,选择生物样本类型后需要区分是 0 委托、1 初筛、 2 两社人员、 3 其他人员, 常规毒品 0 委托 1 初筛,其他的不需要区分")
private String type;
}

Loading…
Cancel
Save