diff --git a/pom.xml b/pom.xml index 4d71c8a..b3136e4 100644 --- a/pom.xml +++ b/pom.xml @@ -1,255 +1,261 @@ - 4.0.0 - - digital.laboratory.platform - DigitalLaboratoryPlatform - 2022.10.11-snapshots - - - dlp-entrustment - jar - - 送检受理111 - - - 2022.10.11-snapshots - 2021.1 - 1.0.0 - - - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - ${cloud.alibaba.version} - - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - ${cloud.alibaba.version} - - - - - digital.laboratory.platform - dlp-common-swagger - - - - - digital.laboratory.platform - dlp-common-feign - ${dlp.version} - - - - - digital.laboratory.platform - dlp-common-security - ${dlp.version} - - - - org.springframework.boot - spring-boot-starter-jdbc - - - - - - mysql - mysql-connector-java - ${mysql-connector-java.version} - - - - org.springframework.boot - spring-boot-starter-undertow - - - - digital.laboratory.platform - dlp-common-log - ${dlp.version} - - - - digital.laboratory.platform - dlp-admin-api - ${dlp.version} - - - - digital.laboratory.platform - dlp-sewage-api - ${dlp.version} - - - - - digital.laboratory.platform - dlp-othersys-api - ${dlp.version} - - - - digital.laboratory.platform - dlp-common-oss - ${dlp.version} - compile - - - - digital.laboratory.platform - dlp-common-remote-word2pdf - ${dlp.version} - compile - - - - - - - - - - - - - com.deepoove - poi-tl - 1.12.0 - - - - - - - - - - commons-io - commons-io - 2.11.0 - - - - - - - - - - - - - - - - - com.alibaba - fastjson - 1.2.9 - - - - - velocity - org.apache.velocity - ${velocity.version} - - - - - org.springframework - spring-test - - - - - digital.laboratory.platform - dlp-common-seata - ${dlp.version} - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + digital.laboratory.platform + DigitalLaboratoryPlatform + 2022.10.11-snapshots + + + dlp-entrustment + jar + + 送检受理 + + + 2022.10.11-snapshots + 2021.1 + 1.0.0 + + + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + ${cloud.alibaba.version} + + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + ${cloud.alibaba.version} + + + + + digital.laboratory.platform + dlp-common-swagger + + + + + digital.laboratory.platform + dlp-common-feign + ${dlp.version} + + + + + digital.laboratory.platform + dlp-common-security + ${dlp.version} + + + + org.springframework.boot + spring-boot-starter-jdbc + + + + + + mysql + mysql-connector-java + ${mysql-connector-java.version} + + + + org.springframework.boot + spring-boot-starter-undertow + + + + digital.laboratory.platform + dlp-common-log + ${dlp.version} + + + + digital.laboratory.platform + dlp-admin-api + ${dlp.version} + + + + digital.laboratory.platform + dlp-sewage-api + ${dlp.version} + + + + + digital.laboratory.platform + dlp-othersys-api + ${dlp.version} + + + + digital.laboratory.platform + dlp-common-oss + ${dlp.version} + compile + + + + digital.laboratory.platform + dlp-common-remote-word2pdf + ${dlp.version} + compile + + + + + + + + + + + + + com.deepoove + poi-tl + 1.12.0 + + + + + + + + + + commons-io + commons-io + 2.11.0 + + + + + + + + + + + + + + + + + com.alibaba + fastjson + 1.2.9 + + + + + velocity + org.apache.velocity + ${velocity.version} + + + + + org.springframework + spring-test + + + + + digital.laboratory.platform + dlp-common-seata + ${dlp.version} + + + + + digital.laboratory.platform + dlp-common-aop + 2022.10.11-snapshots + + + + + org.apache.maven.plugins + maven-compiler-plugin + + -Xlint:unchecked + + 3.8.1 + + + org.springframework.boot + spring-boot-maven-plugin + + + io.fabric8 + docker-maven-plugin + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + timestamp-property + + timestamp-property + + + timestamp + yyyy-MM-dd HH:mm:ss + zh_CN + Asia/Shanghai + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.1.0 + + + copy-resource-one + install + + copy-resources + + + ${basedir}/../../out + + + ${basedir}/target + + ${project.artifactId}.jar + + + + + + + - - - - org.apache.maven.plugins - maven-compiler-plugin - - -Xlint:unchecked - - 3.8.1 - - - org.springframework.boot - spring-boot-maven-plugin - - - io.fabric8 - docker-maven-plugin - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.0.0 - - - timestamp-property - - timestamp-property - - - timestamp - yyyy-MM-dd HH:mm:ss - zh_CN - Asia/Shanghai - - - - - - - - org.apache.maven.plugins - maven-resources-plugin - 3.1.0 - - - copy-resource-one - install - - copy-resources - - - ${basedir}/../../out - - - ${basedir}/target - - ${project.artifactId}.jar - - - - - - - - - - + + diff --git a/src/main/java/digital/laboratory/platform/entrustment/controller/CaseEventController.java b/src/main/java/digital/laboratory/platform/entrustment/controller/CaseEventController.java index 12017fd..3e6aa41 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/controller/CaseEventController.java +++ b/src/main/java/digital/laboratory/platform/entrustment/controller/CaseEventController.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.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.lambdaUpdate() .eq(Entrustment::getId, dto.getEntrustId()) .set(Entrustment::getEntrustmentType, dto.getEntrustmentType()) + .set(StrUtil.isNotBlank(dto.getType()), Entrustment::getType, dto.getType()) ); } return R.ok(caseEvent, "保存案件信息成功"); diff --git a/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustApproveRecordController.java b/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustApproveRecordController.java new file mode 100644 index 0000000..0076280 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustApproveRecordController.java @@ -0,0 +1,38 @@ +package digital.laboratory.platform.entrustment.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import digital.laboratory.platform.common.core.util.R; +import digital.laboratory.platform.entrustment.query.BaseQuery; +import digital.laboratory.platform.entrustment.service.EntrustApproveRecordService; +import digital.laboratory.platform.entrustment.vo.EntrustApproveRecordVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * 委托审核记录 + * + * @author chenjiangbao + * @describe 委托审核记录 + */ +@RestController +@RequestMapping("/papp/entrustApproveRecord") +@Api(tags = "018-委托审核记录") +public class EntrustApproveRecordController { + + @Resource + private EntrustApproveRecordService entrustApproveRecordService; + + + @ApiOperation("分页查询-委托审核记录") + @PostMapping("/page") + public R> page(@RequestBody BaseQuery query) { + IPage page = entrustApproveRecordService.voPage(query); + return R.ok(page); + } +} diff --git a/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustMaterialCheckoutResultController.java b/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustMaterialCheckoutResultController.java index b203f9d..a19bade 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustMaterialCheckoutResultController.java +++ b/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustMaterialCheckoutResultController.java @@ -1,11 +1,15 @@ package digital.laboratory.platform.entrustment.controller; import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; import digital.laboratory.platform.common.core.exception.CheckedException; import digital.laboratory.platform.common.core.util.R; import digital.laboratory.platform.entrustment.convert.EntrustMaterialCheckoutResultConvert; import digital.laboratory.platform.entrustment.dto.EntrustMaterialCheckoutResultDTO; +import digital.laboratory.platform.entrustment.query.BaseQuery; +import digital.laboratory.platform.entrustment.query.EntrustMaterialCheckoutResultQuery; import digital.laboratory.platform.entrustment.service.EntrustMaterialCheckoutResultService; +import digital.laboratory.platform.entrustment.vo.EntrustMaterialCheckoutResultVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; @@ -52,6 +56,18 @@ public class EntrustMaterialCheckoutResultController { return success ? R.ok("保存检出得定性定量结果成功!") : R.ok("保存检出得定性定量结果失败!"); } + @ApiOperation("检出得定性定量结果分页查询") + @GetMapping("/page") + public R> page(EntrustMaterialCheckoutResultQuery query) { + IPage voiPage; + try { + voiPage = entrustMaterialCheckoutResultService.voiPage(query); + } catch (CheckedException e) { + return R.failed(e.getMessage()); + } + return R.ok(voiPage); + } + @ApiOperation("导出检材检出结果的excel表格") @PostMapping("/exportExcel") public void exportExcel(@RequestBody List entrustIds, HttpServletResponse response) { diff --git a/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustmentController.java b/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustmentController.java index f0ed357..bb33a43 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustmentController.java +++ b/src/main/java/digital/laboratory/platform/entrustment/controller/EntrustmentController.java @@ -22,6 +22,7 @@ import digital.laboratory.platform.entrustment.entity.CaseEvent; import digital.laboratory.platform.entrustment.entity.Entrustment; import digital.laboratory.platform.entrustment.enums.EntrustmentStatusConstants; import digital.laboratory.platform.entrustment.service.CaseEventService; +import digital.laboratory.platform.entrustment.service.EntrustMaterialCheckoutResultService; import digital.laboratory.platform.entrustment.service.EntrustmentService; import digital.laboratory.platform.entrustment.vo.CaseEventVO; import digital.laboratory.platform.entrustment.vo.EntrustmentVO; @@ -80,6 +81,8 @@ public class EntrustmentController { private final RemoteOrgService remoteOrgService; + private final EntrustMaterialCheckoutResultService entrustMaterialCheckoutResultService; + //private final RestTemplate restTemplate; // /** @@ -157,7 +160,8 @@ public class EntrustmentController { @RequestParam(value = "submitter", required = false) String submitter, @RequestParam(value = "checkCandidateUser", required = false) String checkCandidateUser, @RequestParam(value = "checkUser", required = false) String checkUser, - @RequestParam(value = "dataSources", required = false) Integer dataSources) { + @RequestParam(value = "dataSources", required = false) Integer dataSources, + @RequestParam(value = "checkoutQuery", required = false, defaultValue = "0") Integer checkoutQuery) { String orgId = null; DLPUser dlpUser = SecurityUtils.getUser(); System.out.println(String.format("getEntrustmentPage 用户 %s 的 id=%s [%s]", dlpUser.getUsername(), dlpUser.getId(), (dlpUser.isStaff()) ? "鉴定机构员工" : "普通用户")); @@ -186,10 +190,16 @@ public class EntrustmentController { .eq(StrUtil.isNotBlank(caseId), "e.case_id", caseId) .in((statuses != null) && (statuses.size() > 0), "e.status", statuses) .eq(dataSources != null, "e.data_sources", dataSources) + .inSql(checkoutQuery.equals(1), "e.id", "SELECT entrust_id FROM b_entrust_material_checkout_result") // 筛选检材检出结果记录不为0 的委托 .like(StrUtil.isNotBlank(caseName), "c.case_name", caseName) .orderByDesc(statuses != null && statuses.size() > 0 && statuses.get(0) == 9, "CAST(SUBSTRING(e.accept_no, 1,4) AS UNSIGNED)", "CAST(SUBSTRING(e.accept_no, 6) AS UNSIGNED)") .orderByDesc(statuses != null && statuses.size() > 0 && statuses.get(0) == 7, "CAST(SUBSTRING(e.entrustment_no, 4,4) AS UNSIGNED)", "CAST(SUBSTRING(e.entrustment_no, 9) AS UNSIGNED)") ); + if (checkoutQuery.equals(1)) { + thePage.getRecords().forEach(record -> { + record.setCheckoutResultStr(entrustMaterialCheckoutResultService.buildEntrustMaterialCheckoutResultStr(record.getId())); + }); + } } else { //-- 当前用户是普通用户, 不是鉴定中心员工 System.out.println(String.format("用户 %s 的 id=%s, 不是鉴定机构员工", dlpUser.getUsername(), dlpUser.getId())); @@ -2107,8 +2117,8 @@ public class EntrustmentController { * @return */ @GetMapping("/getBookNameByEntrustId") - public R getBookNameByEntrustId(String entrustId, String whatBook) { - String fileOssPath = entrustmentService.getBookNameByEntrustId(entrustId, whatBook); + public R getBookNameByEntrustId(String entrustId, String whatBook, String docType) { + String fileOssPath = entrustmentService.getBookNameByEntrustId(entrustId, whatBook, docType); Assert.notBlank(fileOssPath, "获取文书失败,请检查参数"); String docId = IdWorker.get32UUID(); String dataInfo = docId + "#" + fileOssPath; diff --git a/src/main/java/digital/laboratory/platform/entrustment/convert/EntrustApproveRecordConvert.java b/src/main/java/digital/laboratory/platform/entrustment/convert/EntrustApproveRecordConvert.java new file mode 100644 index 0000000..9d61297 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/entrustment/convert/EntrustApproveRecordConvert.java @@ -0,0 +1,23 @@ +package digital.laboratory.platform.entrustment.convert; + +import digital.laboratory.platform.entrustment.entity.EntrustApproveRecord; +import digital.laboratory.platform.entrustment.vo.EntrustApproveRecordVO; + +/** + * 委托审核记录 实体 vo dto等对象转换 + */ +public class EntrustApproveRecordConvert { + + public static EntrustApproveRecordVO entityToVO(EntrustApproveRecord entity) { + EntrustApproveRecordVO entrustApproveRecordVO = new EntrustApproveRecordVO(); + entrustApproveRecordVO.setId(entity.getId()); + entrustApproveRecordVO.setEntrustId(entity.getEntrustId()); + entrustApproveRecordVO.setApproveType(entity.getApproveType()); + entrustApproveRecordVO.setComments(entity.getComments()); + entrustApproveRecordVO.setUserId(entity.getUserId()); + entrustApproveRecordVO.setOrgId(entity.getOrgId()); + entrustApproveRecordVO.setApproveTime(entity.getApproveTime()); + return entrustApproveRecordVO; + } + +} 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 3abce6c..f936ca4 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/dto/ApprovedUpdateEntrustDTO.java +++ b/src/main/java/digital/laboratory/platform/entrustment/dto/ApprovedUpdateEntrustDTO.java @@ -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,13 @@ 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; + @ApiModelProperty(value = "案件简要") private String caseBrief; diff --git a/src/main/java/digital/laboratory/platform/entrustment/dto/UpdateCaseAndEntrustTypeDTO.java b/src/main/java/digital/laboratory/platform/entrustment/dto/UpdateCaseAndEntrustTypeDTO.java index 24b2249..1bb785e 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/dto/UpdateCaseAndEntrustTypeDTO.java +++ b/src/main/java/digital/laboratory/platform/entrustment/dto/UpdateCaseAndEntrustTypeDTO.java @@ -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; } diff --git a/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustApproveRecord.java b/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustApproveRecord.java new file mode 100644 index 0000000..92a8f7a --- /dev/null +++ b/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustApproveRecord.java @@ -0,0 +1,59 @@ +package digital.laboratory.platform.entrustment.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import digital.laboratory.platform.common.mybatis.base.BaseEntity; +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.Date; +import lombok.Data; + +/** + * 委托审核记录 + * @TableName b_entrust_approve_record + */ +@Data +@TableName(value ="b_entrust_approve_record") +public class EntrustApproveRecord extends BaseEntity { + /** + * 主键标识 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private String id; + + /** + * 审核关联的委托id + */ + private String entrustId; + + /** + * 审核类型, 目前 0 代表 审核不通过 + */ + private Integer approveType; + + /** + * 意见 + */ + private String comments; + + /** + * 用户id + */ + private String userId; + + /** + * 机构id + */ + private String orgId; + + /** + * 审核时间 + */ + private LocalDateTime approveTime; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; + +} diff --git a/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustMaterialCheckoutResult.java b/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustMaterialCheckoutResult.java index c44b6b4..fac6271 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustMaterialCheckoutResult.java +++ b/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustMaterialCheckoutResult.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; import digital.laboratory.platform.common.mybatis.base.BaseEntity; import digital.laboratory.platform.sys.entity.DrugLite; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -25,6 +26,12 @@ public class EntrustMaterialCheckoutResult extends BaseEntity { @TableId(value = "entrust_material_id", type = IdType.ASSIGN_ID) private String id; + /** + * 委托检材id + */ + @ApiModelProperty(value = "委托id") + private String entrustId; + /** * 定性结果 */ diff --git a/src/main/java/digital/laboratory/platform/entrustment/entity/Entrustment.java b/src/main/java/digital/laboratory/platform/entrustment/entity/Entrustment.java index 47b230a..fed17ef 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/entity/Entrustment.java +++ b/src/main/java/digital/laboratory/platform/entrustment/entity/Entrustment.java @@ -53,7 +53,7 @@ public class Entrustment extends BaseEntity { private String entrustmentNo; /** - * 委托类型: 0=正常司法鉴定委托, 1=案前委托 + * 委托类型: 0=常规毒品, 1=生物样本 */ @ApiModelProperty(value="委托类型: 0=常规毒品, 1=生物样本") private Integer entrustmentType; @@ -80,8 +80,8 @@ public class Entrustment extends BaseEntity { * 委托日期, 鉴定委托书打印日期 */ @ApiModelProperty(value="委托日期, 鉴定委托书打印日期") - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private LocalDate entrustmentTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private LocalDateTime entrustmentTime; /** * 委托提交者, 后期可能会转给其他人user_id @@ -746,7 +746,12 @@ public class Entrustment extends BaseEntity { @ApiModelProperty(value="是否退回(0:未退回,-1:已退回)") private Integer returnOrNot; - + /** + * 20250121 新增的一个委托类型,选择生物样本类型后需要区分是 0 委托、1 初筛、 2 两社人员、 3 其他人员, 常规毒品 0 委托 1 初筛,其他的不需要区分 + * 存字符串,不用code表达 + */ + @ApiModelProperty("新增的一个委托类型,选择生物样本类型后需要区分是 0 委托、1 初筛、 2 两社人员、 3 其他人员, 常规毒品 0 委托 1 初筛,其他的不需要区分") + private String type; } diff --git a/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustmentIdentificationMaterial.java b/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustmentIdentificationMaterial.java index 28a7e6f..2323b09 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustmentIdentificationMaterial.java +++ b/src/main/java/digital/laboratory/platform/entrustment/entity/EntrustmentIdentificationMaterial.java @@ -551,6 +551,11 @@ public class EntrustmentIdentificationMaterial extends BaseEntity { @ApiModelProperty(value = "检材备注--贵阳新增需求") private String remark; + @ApiModelProperty(value = "检材年龄,用于后续统计各年龄阶段的数据--贵阳新增需求") + private Integer materialAge; + + @ApiModelProperty(value = "生物检材类型, 目前区分毛发和尿液--贵阳新增需求") + private String biologyType; /*****************************************************************************************/ public String getOrderNo1() { diff --git a/src/main/java/digital/laboratory/platform/entrustment/enums/EntrustBiologyType.java b/src/main/java/digital/laboratory/platform/entrustment/enums/EntrustBiologyType.java new file mode 100644 index 0000000..fbf4fb0 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/entrustment/enums/EntrustBiologyType.java @@ -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 alias; + + EntrustBiologyType(Integer code, String desc, List 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; + } + +} diff --git a/src/main/java/digital/laboratory/platform/entrustment/enums/EntrustStatisticType.java b/src/main/java/digital/laboratory/platform/entrustment/enums/EntrustStatisticType.java new file mode 100644 index 0000000..67645c4 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/entrustment/enums/EntrustStatisticType.java @@ -0,0 +1,33 @@ +package digital.laboratory.platform.entrustment.enums; + +import lombok.Getter; + +@Getter +public enum EntrustStatisticType { + + ENTRUST(0, "委托"), + SCREEN(1, "初筛"), + SOCIETY(2, "两社人员"), + OTHER(3, "其他人员") + ; + + private final Integer code; + + private final String desc; + + EntrustStatisticType(Integer code, String desc) { + this.code = code; + this.desc = desc; + } + + // 根据名称判断是否存在对应枚举 + public static EntrustStatisticType isExist(String desc) { + for (EntrustStatisticType entrustStatisticType : values()) { + if (entrustStatisticType.getDesc().equals(desc)) { + return entrustStatisticType; + } + } + throw new IllegalArgumentException("No enum constant with desc: " + desc); + } + +} diff --git a/src/main/java/digital/laboratory/platform/entrustment/mapper/EntrustApproveRecordMapper.java b/src/main/java/digital/laboratory/platform/entrustment/mapper/EntrustApproveRecordMapper.java new file mode 100644 index 0000000..d9558fb --- /dev/null +++ b/src/main/java/digital/laboratory/platform/entrustment/mapper/EntrustApproveRecordMapper.java @@ -0,0 +1,29 @@ +package digital.laboratory.platform.entrustment.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import digital.laboratory.platform.entrustment.entity.EntrustAlterApply; +import digital.laboratory.platform.entrustment.entity.EntrustApproveRecord; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import digital.laboratory.platform.entrustment.vo.EntrustApproveRecordVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** +* @author ChenJiangBao +* @description 针对表【b_entrust_approve_record(委托审核记录)】的数据库操作Mapper +* @createDate 2025-01-23 09:26:25 +* @Entity digital.laboratory.platform.entrustment.entity.EntrustApproveRecord +*/ +@Mapper +public interface EntrustApproveRecordMapper extends BaseMapper { + + IPage voPage(Page page, @Param(Constants.WRAPPER) Wrapper qw); + +} + + + + diff --git a/src/main/java/digital/laboratory/platform/entrustment/mapper/EntrustMaterialCheckoutResultMapper.java b/src/main/java/digital/laboratory/platform/entrustment/mapper/EntrustMaterialCheckoutResultMapper.java index d53dcd2..2ea65e2 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/mapper/EntrustMaterialCheckoutResultMapper.java +++ b/src/main/java/digital/laboratory/platform/entrustment/mapper/EntrustMaterialCheckoutResultMapper.java @@ -1,8 +1,18 @@ package digital.laboratory.platform.entrustment.mapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; import digital.laboratory.platform.entrustment.entity.EntrustMaterialCheckoutResult; +import digital.laboratory.platform.entrustment.entity.Entrustment; +import digital.laboratory.platform.entrustment.vo.EntrustMaterialCheckoutResultVO; +import digital.laboratory.platform.entrustment.vo.EntrustmentVO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * @author ChenJiangBao @@ -13,6 +23,11 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface EntrustMaterialCheckoutResultMapper extends BaseMapper { + IPage getEntrustMaterialCheckoutResultVOPage(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + + List voList(@Param(Constants.WRAPPER) Wrapper qw); + } diff --git a/src/main/java/digital/laboratory/platform/entrustment/query/EntrustMaterialCheckoutResultQuery.java b/src/main/java/digital/laboratory/platform/entrustment/query/EntrustMaterialCheckoutResultQuery.java new file mode 100644 index 0000000..5f11c43 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/entrustment/query/EntrustMaterialCheckoutResultQuery.java @@ -0,0 +1,22 @@ +package digital.laboratory.platform.entrustment.query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 委托中检材检出结果消息 查询对象(分页查询、列表查询) + * + * @author Chen + * @since 1.0.0 2025-02-18 + */ +@Data +@ApiModel(description = "委托中检材检出结果消息 查询对象(分页查询、列表查询)") +public class EntrustMaterialCheckoutResultQuery extends BaseQuery { + + @ApiModelProperty("委托id") + private String entrustId; + +} diff --git a/src/main/java/digital/laboratory/platform/entrustment/service/EntrustApproveRecordService.java b/src/main/java/digital/laboratory/platform/entrustment/service/EntrustApproveRecordService.java new file mode 100644 index 0000000..653fb06 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/entrustment/service/EntrustApproveRecordService.java @@ -0,0 +1,31 @@ +package digital.laboratory.platform.entrustment.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import digital.laboratory.platform.entrustment.entity.EntrustApproveRecord; +import com.baomidou.mybatisplus.extension.service.IService; +import digital.laboratory.platform.entrustment.entity.Entrustment; +import digital.laboratory.platform.entrustment.query.BaseQuery; +import digital.laboratory.platform.entrustment.vo.EntrustApproveRecordVO; +import digital.laboratory.platform.sewage.entity.UpdateInfo; + +/** +* @author ChenJiangBao +* @description 针对表【b_entrust_approve_record(委托审核记录)】的数据库操作Service +* @createDate 2025-01-23 09:26:25 +*/ +public interface EntrustApproveRecordService extends IService { + + /** + * 分页查询-委托审核记录 + * @param query + * @return + */ + IPage voPage(BaseQuery query); + + /** + * 保存审核不通过记录 + * @param entrust + * @param pi + */ + void saveRecord(Entrustment entrust, UpdateInfo pi); +} diff --git a/src/main/java/digital/laboratory/platform/entrustment/service/EntrustMaterialCheckoutResultService.java b/src/main/java/digital/laboratory/platform/entrustment/service/EntrustMaterialCheckoutResultService.java index 8b9cd92..62e9240 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/service/EntrustMaterialCheckoutResultService.java +++ b/src/main/java/digital/laboratory/platform/entrustment/service/EntrustMaterialCheckoutResultService.java @@ -1,8 +1,11 @@ package digital.laboratory.platform.entrustment.service; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.entrustment.dto.EntrustMaterialCheckoutResultDTO; import digital.laboratory.platform.entrustment.entity.EntrustMaterialCheckoutResult; +import digital.laboratory.platform.entrustment.query.EntrustMaterialCheckoutResultQuery; +import digital.laboratory.platform.entrustment.vo.EntrustMaterialCheckoutResultVO; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -15,6 +18,14 @@ import java.util.List; */ public interface EntrustMaterialCheckoutResultService extends IService { + /** + * 构建委托材料检验结果字符串 + * + * @param entrustId 委托ID + * @return 委托材料检验结果字符串 + */ + String buildEntrustMaterialCheckoutResultStr(String entrustId); + /** * 根据DTO保存检材得检出结果信息 * @param dto 检出DTO @@ -30,4 +41,10 @@ public interface EntrustMaterialCheckoutResultService extends IService entrustIds, HttpServletResponse response) throws IOException; + /** + * vo 分页对象 + * @param query + * @return + */ + IPage voiPage(EntrustMaterialCheckoutResultQuery query); } diff --git a/src/main/java/digital/laboratory/platform/entrustment/service/EntrustmentService.java b/src/main/java/digital/laboratory/platform/entrustment/service/EntrustmentService.java index 5c1c5a2..8d572ba 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/service/EntrustmentService.java +++ b/src/main/java/digital/laboratory/platform/entrustment/service/EntrustmentService.java @@ -83,12 +83,14 @@ public interface EntrustmentService extends IService { //生成鉴定事项确认书 Boolean generateIdentifyItemsBook(String entrustId); /** - *获取文书名称 + * 获取文书名称 + * * @param entrustId * @param whatBook entrust-委托书 identItemBook-鉴定事项确认书 identfyBook-鉴定书 + * @param docType * @return */ - String getBookNameByEntrustId(String entrustId,String whatBook); + String getBookNameByEntrustId(String entrustId, String whatBook, String docType); /** * 构建鉴定要求 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 bd4e915..6b42a51 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 @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import digital.laboratory.platform.common.aop.annotation.DlpResultProc; import digital.laboratory.platform.common.core.constant.OSSDirectoryConstants; import digital.laboratory.platform.common.core.exception.ValidateCodeException; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; @@ -52,9 +53,6 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl voPage(EntrustAlterApplyQuery query) { DLPUser user = SecurityUtils.getUser(); if (!user.isStaff()) { @@ -83,6 +82,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpllambdaUpdate().eq(CaseEvent::getId, entrustment.getCaseId()).set(CaseEvent::getCaseBrief, dto.getCaseBrief())); + caseEventService.update(Wrappers.lambdaUpdate().eq(CaseEvent::getId, entrustment.getCaseId()) + .set(CaseEvent::getCaseBrief, dto.getCaseBrief()) + .set(CaseEvent::getCaseName, dto.getCaseName()) + ); // 添加更新记录 |
代表换行 LocalDateTime opDate = null; // 操作的时间,这里也用来标识是否有更新 if (!oldCaseInfo.getCaseBrief().equals(dto.getCaseBrief())) { @@ -229,7 +232,8 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl + implements EntrustApproveRecordService{ + + /** + * 分页查询-委托审核记录 + * @param query + * @return + */ + @Override + @DlpResultProc + public IPage voPage(BaseQuery query) { + QueryWrapper queryWrapper = appendQueryCriteria(query); + return baseMapper.voPage(new Page<>(query.getCurrent(), query.getSize()), queryWrapper); + } + + /** + * 保存审核不通过记录 + * @param entrust + * @param pi + */ + @Override + public void saveRecord(Entrustment entrust, UpdateInfo pi) { + EntrustApproveRecord entrustApproveRecord = new EntrustApproveRecord(); + entrustApproveRecord.setApproveTime(LocalDateTime.now()); + entrustApproveRecord.setApproveType(0); + entrustApproveRecord.setEntrustId(entrust.getId()); + entrustApproveRecord.setComments(pi.getComments()); + entrustApproveRecord.setUserId(pi.getUserId()); + entrustApproveRecord.setOrgId(pi.getOrgId()); + this.save(entrustApproveRecord); + } + + private QueryWrapper appendQueryCriteria(BaseQuery query) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.like(StrUtil.isNotBlank(query.getKeywords()), "c.case_name", query.getKeywords()); + queryWrapper.ge(query.getStartDate() != null, "ear.approve_time", query.getStartDate()); + queryWrapper.le(query.getEndDate() != null, "ear.approve_time", query.getEndDate()); + queryWrapper.orderByDesc("ear.approve_time"); + return queryWrapper; + } +} + + + + diff --git a/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustMaterialCheckoutResultServiceImpl.java b/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustMaterialCheckoutResultServiceImpl.java index 0aee013..99308cf 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustMaterialCheckoutResultServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustMaterialCheckoutResultServiceImpl.java @@ -1,7 +1,10 @@ package digital.laboratory.platform.entrustment.service.impl; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import digital.laboratory.platform.common.core.exception.CheckedException; import digital.laboratory.platform.entrustment.convert.DrugLiteConvert; @@ -13,14 +16,17 @@ import digital.laboratory.platform.entrustment.entity.Entrustment; import digital.laboratory.platform.entrustment.entity.EntrustmentIdentificationMaterial; import digital.laboratory.platform.entrustment.enums.EntrustmentStatusConstants; import digital.laboratory.platform.entrustment.mapper.EntrustMaterialCheckoutResultMapper; +import digital.laboratory.platform.entrustment.query.EntrustMaterialCheckoutResultQuery; import digital.laboratory.platform.entrustment.service.CommonFeignService; import digital.laboratory.platform.entrustment.service.EntrustMaterialCheckoutResultService; import digital.laboratory.platform.entrustment.service.EntrustmentIdentificationMaterialService; import digital.laboratory.platform.entrustment.service.EntrustmentService; +import digital.laboratory.platform.entrustment.vo.EntrustMaterialCheckoutResultVO; import digital.laboratory.platform.sys.entity.Area; import digital.laboratory.platform.sys.entity.DrugLite; import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -29,10 +35,7 @@ import java.io.IOException; import java.net.URLEncoder; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -54,6 +57,40 @@ public class EntrustMaterialCheckoutResultServiceImpl extends ServiceImpl materialList = entrustmentIdentificationMaterialService.list(Wrappers.lambdaQuery().eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustId)); + Map materialMap = materialList.stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity())); + // 获取检测结果 + List checkoutResultList = super.list(Wrappers.lambdaQuery().eq(EntrustMaterialCheckoutResult::getEntrustId, entrustId)); + if (CollUtil.isEmpty(checkoutResultList)) { + return ""; + } + + List resultStrList = new ArrayList<>(); + // 对检测结果进行分组 + Map> checkoutResultGroupMap = checkoutResultList.stream().collect(Collectors.groupingBy(item -> DrugLiteConvert.joiningDrugListNameToStr(item.getQualitativeResult(), "、"))); + + checkoutResultGroupMap.forEach((key, value) -> { + StringBuilder builder = new StringBuilder(); + builder + .append(value.stream().map(item -> materialMap.get(item.getId()).getOrderNo1()).collect(Collectors.joining("、"))) + .append(" : [") + .append(key) + .append("]"); + resultStrList.add(builder.toString()); + }); + return resultStrList.stream().sorted().collect(Collectors.joining("\n")); + } + /** * 根据DTO保存检材得检出结果信息 * @param dto 检出DTO @@ -79,6 +116,7 @@ public class EntrustMaterialCheckoutResultServiceImpl extends ServiceImpllambdaQuery().eq(EntrustMaterialCheckoutResult::getId, id)) <= 0) { // throw new CheckedException(String.format("检材编号 [%s] 的检材检出结果已经存在!", identificationMaterial.getImNo())); success = super.save(entrustMaterialCheckoutResult); @@ -143,6 +181,35 @@ public class EntrustMaterialCheckoutResultServiceImpl extends ServiceImpl voiPage(EntrustMaterialCheckoutResultQuery query) { + IPage page = this.page( + new Page<>(query.getCurrent(), query.getSize()), + Wrappers.lambdaQuery() + .eq(StrUtil.isNotBlank(query.getEntrustId()), EntrustMaterialCheckoutResult::getEntrustId, query.getEntrustId()) + .orderByDesc(EntrustMaterialCheckoutResult::getUpdateTime) + ); + IPage voPage = new Page<>(); + BeanUtils.copyProperties(page, voPage, "records"); + List records = page.getRecords(); + if (CollUtil.isNotEmpty(records)) { + List entrustmentIdentificationMaterials = entrustmentIdentificationMaterialService.list(Wrappers.lambdaQuery().in(EntrustmentIdentificationMaterial::getId, records.stream().map(EntrustMaterialCheckoutResult::getId).collect(Collectors.toSet()))); + Map materialMap = entrustmentIdentificationMaterials.stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity())); + List entrustMaterialCheckoutResultVOS = records.stream().map(record -> { + EntrustMaterialCheckoutResultVO entrustMaterialCheckoutResultVO = EntrustMaterialCheckoutResultConvert.entityToVO(record); + entrustMaterialCheckoutResultVO.setName(materialMap.get(record.getId()).getName()); + return entrustMaterialCheckoutResultVO; + }).collect(Collectors.toList()); + voPage.setRecords(entrustMaterialCheckoutResultVOS); + } + return voPage; + } + /** * 构建并输出Excel文件。 * diff --git a/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentIdentificationMaterialServiceImpl.java b/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentIdentificationMaterialServiceImpl.java index 03c90bf..cee6068 100644 --- a/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentIdentificationMaterialServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentIdentificationMaterialServiceImpl.java @@ -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 ServiceImpllambdaQuery() .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 taskAvailableUserList_Approve() { - R> r = remoteUserService.innerGetUsersByPermission(CommonConstants.ORG_TREE_ROOT_ID, Arrays.asList(new String[]{"EntrustmentApprove"})); + R> r = remoteUserService.innerGetUsersByPermission(CommonConstants.ORG_TREE_ROOT_ID, Collections.singletonList("EntrustmentApprove")); return r.getData(); } @Override public List taskAvailableUserList_Confirm(String clientOrgId) { - R> r = remoteUserService.innerGetUsersByPermission(clientOrgId, Arrays.asList(new String[]{"EntrustmentConfirm"})); + R> r = remoteUserService.innerGetUsersByPermission(clientOrgId, Collections.singletonList("EntrustmentConfirm")); return r.getData(); } @@ -934,7 +937,7 @@ public class EntrustmentServiceImpl extends ServiceImpl dm = BeanMap.create(ev); //ClassUtils.objectToMap(ev); Map dm = ClassUtils.objectToMap(ev); if (ev.getEntrustmentTime() == null) { - ev.setEntrustmentTime(LocalDate.now()); + ev.setEntrustmentTime(LocalDateTime.now()); UpdateWrapper updateWrapper = new UpdateWrapper(); updateWrapper.eq("id", ev.getId()); // 查询条件是 id 相等 @@ -2654,7 +2659,7 @@ public class EntrustmentServiceImpl extends ServiceImpl dm = ClassUtils.objectToMap(ev); if (ev.getEntrustmentTime() == null) { - ev.setEntrustmentTime(LocalDate.now()); + ev.setEntrustmentTime(LocalDateTime.now()); UpdateWrapper updateWrapper = new UpdateWrapper(); updateWrapper.eq("id", ev.getId()); // 查询条件是 id 相等 @@ -3324,6 +3329,7 @@ public class EntrustmentServiceImpl extends ServiceImpllambdaQuery().inSql(Entrustment::getId, "SELECT entrust_id FROM b_entrust_material_checkout_result")).size(), "检测结果")); markersVOS.add(new MarkersVO(EntrustMarkConstants.REVIEW_OR_APPROVAL, this.list(new LambdaQueryWrapper() .in(Entrustment::getStatus, integers1) @@ -3491,7 +3497,7 @@ public class EntrustmentServiceImpl extends ServiceImpl materialList;//检材列表 } diff --git a/src/main/resources/mapper/EntrustAlterApplyMapper.xml b/src/main/resources/mapper/EntrustAlterApplyMapper.xml index e311cd7..fa806d0 100644 --- a/src/main/resources/mapper/EntrustAlterApplyMapper.xml +++ b/src/main/resources/mapper/EntrustAlterApplyMapper.xml @@ -31,7 +31,12 @@ - SELECT eaa.*, ce.case_name, ce.id as case_id FROM + SELECT + eaa.*, + ce.case_name, + ce.id as case_id, + e.entrustment_type + FROM b_entrust_alter_apply eaa LEFT JOIN b_entrustment e ON eaa.entrust_id = e.id LEFT JOIN b_case_event ce ON ce.id = e.case_id diff --git a/src/main/resources/mapper/EntrustApproveRecordMapper.xml b/src/main/resources/mapper/EntrustApproveRecordMapper.xml new file mode 100644 index 0000000..3f37a7c --- /dev/null +++ b/src/main/resources/mapper/EntrustApproveRecordMapper.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + ear.id, + ear.entrust_id, + ear.approve_type, + ear.comments, + ear.user_id, + ear.org_id, + ear.approve_time, + ear.create_time, + ear.create_by, + ear.update_time, + ear.update_by + + + + SELECT + , + c.case_name, + e.client_org_name, + e.entrustment_type + FROM b_entrust_approve_record ear + LEFT JOIN b_entrustment e ON e.id = ear.entrust_id + LEFT JOIN b_case_event c on e.case_id = c.id + + + + diff --git a/src/main/resources/mapper/EntrustMaterialCheckoutResultMapper.xml b/src/main/resources/mapper/EntrustMaterialCheckoutResultMapper.xml index 3f73e08..4ace1f5 100644 --- a/src/main/resources/mapper/EntrustMaterialCheckoutResultMapper.xml +++ b/src/main/resources/mapper/EntrustMaterialCheckoutResultMapper.xml @@ -6,6 +6,7 @@ + @@ -15,14 +16,41 @@ + + + + + - entrust_material_id, - qualitative_result, - quantitative_result, - other_result, - create_time, - create_by, - update_time, - update_by + emr.entrust_material_id, + emr.entrust_id, + emr.qualitative_result, + emr.quantitative_result, + emr.other_result, + emr.create_time, + emr.create_by, + emr.update_time, + emr.update_by + + + + SELECT + , + em.name, + em.entrustment_id, + em.order_no + FROM b_entrust_material_checkout_result emr + LEFT JOIN b_entrustment_identification_material em + ON emr.entrust_material_id = em.id + + + + diff --git a/src/main/resources/mapper/EntrustmentMapper.xml b/src/main/resources/mapper/EntrustmentMapper.xml index 26fc1ec..14ebfd8 100644 --- a/src/main/resources/mapper/EntrustmentMapper.xml +++ b/src/main/resources/mapper/EntrustmentMapper.xml @@ -121,8 +121,7 @@ - - + @@ -148,92 +147,230 @@ + + e.id, + e.case_id, + e.entrustment_no, + e.third_sys_entrust_no, + e.entrustment_type, + e.business_type, + e.process_instance_id, + e.identification_id, + e.entrustment_time, + e.submitter, + e.submit_time, + e.client_org_id, + e.client_org_name, + e.client_address, + e.client_postcode, + e.client_tel, + e.client_fax, + e.identification_domain, + e.identification_org_name, + e.qualitative_analysis, + e.quantitative_analysis, + e.other_identification_requests, + e.candidate_drugs, + e.is_client_specified_method, + e.client_specified_method, + e.destructive_analysis, + e.other_identification_notes, + e.reidentification, + e.old_identification_org_name, + e.old_identification_document, + e.old_identification_result, + e.reidentification_reason, + e.avoid_identifier, + e.specified_identifier, + e.other_agreement, + e.comments, + e.check_candidate_user, + e.check_claim_user, + e.check_claim_time, + e.check_user, + e.check_time, + e.check_comments, + e.check_times, + e.check_all_identification_material_confirmed, + e.approve_candidate_user, + e.approve_claim_user, + e.approve_claim_time, + e.approve_user, + e.approve_time, + e.approve_comments, + e.approve_times, + e.deliver_confirm_user, + e.deliver_confirm_time, + e.deliver_confirm_comments, + e.deliver_time, + e.deliver_submitter, + e.deliverer1_name, + e.deliverer1_position, + e.deliverer1_cert, + e.deliverer1_id, + e.deliverer1_phone, + e.deliverer2_name, + e.deliverer2_position, + e.deliverer2_cert, + e.deliverer2_id, + e.deliverer2_phone, + e.accept_claim_user, + e.accept_claim_time, + e.accept_no, + e.accept_user, + e.accept_time, + e.accept_comments, + e.identification_items_confirm_printed, + e.process_info, + e.report_receive_mode, + e.report_receiver1_user_id, + e.report_receiver1_name, + e.report_receiver1_position, + e.report_receiver1_cert, + e.report_receiver1_id, + e.report_receiver1_phone, + e.report_receiver2_user_id, + e.report_receiver2_name, + e.report_receiver2_position, + e.report_receiver2_cert, + e.report_receiver2_id, + e.report_receiver2_phone, + e.report_sender_user_id, + e.report_sent_time, + e.report_receiver1_signature, + e.report_receiver2_signature, + e.sample_receive_mode, + e.sample_receiver1_user_id, + e.sample_receiver1_name, + e.sample_receiver1_position, + e.sample_receiver1_cret, + e.sample_receiver1_id, + e.sample_receiver1_phone, + e.sample_receiver2_user_id, + e.sample_receiver2_name, + e.sample_receiver2_position, + e.sample_receiver2_cret, + e.sample_receiver2_id, + e.sample_receiver2_phone, + e.sample_sender_user_id, + e.sample_sent_time, + e.sample_receiver1_person_signature, + e.sample_receiver2_person_signnature, + e.status, + e.previous_status, + e.create_time, + e.create_by, + e.update_time, + e.update_by, + e.entrustment_letter_path, + e.identification_items_confirm_path, + e.transfer_status, + e.transfer_oper_signnature, + e.transfer_get_signnature, + e.transfer_name, + e.transfer_no, + e.accept_need_professional, + e.data_sources, + e.accept_no_third_sys, + e.entrust_requirement, + e.post_address, + e.return_or_not, + e.is_trans, + e.type + + - SELECT e.*, - c.case_name, - c.case_no, - c.case_brief, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.submitter - ) AS submitter_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.check_claim_user - ) AS check_claim_user_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.check_user - ) AS check_user_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.approve_claim_user - ) AS approve_claim_user_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.approve_user - ) AS approve_user_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.deliver_confirm_user - ) AS deliver_confirm_user_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.deliver_submitter - ) AS deliver_submitter_name, --- ( --- SELECT user.name --- FROM dlp_base.sys_user user --- WHERE user.user_id=e.accept_claim_user --- ) AS accept_claim_user_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.accept_user - ) AS accept_user_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.report_sender_user_id - ) AS report_sender_user_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.sample_sender_user_id - ) AS sample_sender_user_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.create_by - ) AS create_user_name, - ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=e.update_by - ) AS update_user_name, + SELECT + , + c.case_name, + c.case_no, + c.case_brief, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.submitter + ) AS submitter_name, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.check_claim_user + ) AS check_claim_user_name, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.check_user + ) AS check_user_name, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.approve_claim_user + ) AS approve_claim_user_name, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.approve_user + ) AS approve_user_name, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.deliver_confirm_user + ) AS deliver_confirm_user_name, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.deliver_submitter + ) AS deliver_submitter_name, + -- ( + -- SELECT user.name + -- FROM dlp_base.sys_user user + -- WHERE user.user_id=e.accept_claim_user + -- ) AS accept_claim_user_name, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.accept_user + ) AS accept_user_name, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.report_sender_user_id + ) AS report_sender_user_name, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.sample_sender_user_id + ) AS sample_sender_user_name, - ( - SELECT COUNT(*) - FROM b_entrustment_identification_material eim - WHERE eim.entrustment_id=e.id - ) AS identification_material_count, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.create_by + ) AS create_user_name, + ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id=e.update_by + ) AS update_user_name, - ( - select identification_no - from b_identification i - where i.id = e.identification_id - ) as identification_no + ( + SELECT COUNT(*) + FROM b_entrustment_identification_material eim + WHERE eim.entrustment_id=e.id + ) AS identification_material_count, + + ( + select identification_no + from b_identification i + where i.id = e.identification_id + ) as identification_no, + ( + SELECT COUNT(*) FROM b_entrust_material_checkout_result emr WHERE emr.entrust_id = e.id + ) AS checkout_result_count + + FROM b_entrustment e + LEFT JOIN b_case_event c on e.case_id=c.id - FROM b_entrustment e - LEFT JOIN b_case_event c on e.case_id=c.id @@ -283,6 +420,9 @@ where d.id = #{id} - - + +