Преглед изворни кода

Merge remote-tracking branch 'origin/master'

MarkHuang пре 4 година
родитељ
комит
1c2aeca394

+ 134 - 0
src/main/java/com/diagbot/entity/FollowupPlanMapping.java

@@ -0,0 +1,134 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 手术随访计划映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-24
+ */
+@TableName("tran_followup_plan_mapping")
+public class FollowupPlanMapping implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 手术分类名称
+     */
+    private String operationName;
+
+    /**
+     * 随访手术名称
+     */
+    private String standardName;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getOperationName() {
+        return operationName;
+    }
+
+    public void setOperationName(String operationName) {
+        this.operationName = operationName;
+    }
+    public String getStandardName() {
+        return standardName;
+    }
+
+    public void setStandardName(String standardName) {
+        this.standardName = standardName;
+    }
+
+    @Override
+    public String toString() {
+        return "FollowupPlanMapping{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", operationName=" + operationName +
+            ", standardName=" + standardName +
+        "}";
+    }
+}

+ 12 - 1
src/main/java/com/diagbot/facade/FollowupPlanInfoFacade.java

@@ -8,6 +8,7 @@ import com.diagbot.dto.PushPlansDTO;
 import com.diagbot.entity.FollowupPlanDetail;
 import com.diagbot.entity.FollowupPlanDetailHospital;
 import com.diagbot.entity.FollowupPlanInfo;
+import com.diagbot.entity.FollowupPlanMapping;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
@@ -40,6 +41,8 @@ public class FollowupPlanInfoFacade extends FollowupPlanInfoServiceImpl {
     FollowupPlanDetailFacade followupPlanDetailFacade;
     @Autowired
     FollowupPlanDetailHospitalFacade followupPlanDetailHospitalFacade;
+    @Autowired
+    FollowupPlanMappingFacade followupPlanMappingFacade;
 
     /**
      * @param operationName
@@ -67,9 +70,17 @@ public class FollowupPlanInfoFacade extends FollowupPlanInfoServiceImpl {
         pushPlansDTO.setItem(operationName);
         List<PushPlanDetailDTO> pushPlanDetails = Lists.newLinkedList();
 
+        QueryWrapper<FollowupPlanMapping> followupPlanMappingQueryWrapper = new QueryWrapper<>();
+        followupPlanMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("standard_name", operationName.getUniqueName());
+        FollowupPlanMapping followupPlanMapping = followupPlanMappingFacade.getOne(followupPlanMappingQueryWrapper, false);
+        if (followupPlanMapping == null) {
+            return pushPlanDTO;
+        }
+
         QueryWrapper<FollowupPlanInfo> followupPlanInfoQueryWrapper = new QueryWrapper<>();
         followupPlanInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("operation_name", operationName.getUniqueName());
+                .eq("operation_name", followupPlanMapping.getOperationName());
         FollowupPlanInfo followupPlanInfo = this.getOne(followupPlanInfoQueryWrapper, false);
         if (followupPlanInfo != null) {
             List<FollowupPlanDetailHospital> followupPlanDetailHospitalList = Lists.newLinkedList();

+ 13 - 0
src/main/java/com/diagbot/facade/FollowupPlanMappingFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.FollowupPlanMappingServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/9/24 15:23
+ */
+@Component
+public class FollowupPlanMappingFacade extends FollowupPlanMappingServiceImpl {
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/FollowupPlanMappingMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.FollowupPlanMapping;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 手术随访计划映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-24
+ */
+public interface FollowupPlanMappingMapper extends BaseMapper<FollowupPlanMapping> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/FollowupPlanMappingService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.FollowupPlanMapping;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 手术随访计划映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-24
+ */
+public interface FollowupPlanMappingService extends IService<FollowupPlanMapping> {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/FollowupPlanMappingServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.FollowupPlanMapping;
+import com.diagbot.mapper.FollowupPlanMappingMapper;
+import com.diagbot.service.FollowupPlanMappingService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 手术随访计划映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-24
+ */
+@Service
+public class FollowupPlanMappingServiceImpl extends ServiceImpl<FollowupPlanMappingMapper, FollowupPlanMapping> implements FollowupPlanMappingService {
+
+}

+ 17 - 0
src/main/resources/mapper/FollowupPlanMappingMapper.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.FollowupPlanMappingMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.FollowupPlanMapping">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="operation_name" property="operationName" />
+        <result column="standard_name" property="standardName" />
+    </resultMap>
+
+</mapper>