Pārlūkot izejas kodu

手术随访计划(持续检验检查)推送

zhaops 4 gadi atpakaļ
vecāks
revīzija
721af3dc0e
24 mainītis faili ar 988 papildinājumiem un 5 dzēšanām
  1. 2 2
      src/main/java/com/diagbot/dto/PushPlanDetailDTO.java
  2. 186 0
      src/main/java/com/diagbot/entity/FollowupPlanDetail.java
  3. 199 0
      src/main/java/com/diagbot/entity/FollowupPlanDetailHospital.java
  4. 121 0
      src/main/java/com/diagbot/entity/FollowupPlanInfo.java
  5. 13 0
      src/main/java/com/diagbot/facade/FollowupPlanDetailFacade.java
  6. 13 0
      src/main/java/com/diagbot/facade/FollowupPlanDetailHospitalFacade.java
  7. 157 0
      src/main/java/com/diagbot/facade/FollowupPlanInfoFacade.java
  8. 20 1
      src/main/java/com/diagbot/facade/PushFacade.java
  9. 16 0
      src/main/java/com/diagbot/mapper/FollowupPlanDetailHospitalMapper.java
  10. 16 0
      src/main/java/com/diagbot/mapper/FollowupPlanDetailMapper.java
  11. 16 0
      src/main/java/com/diagbot/mapper/FollowupPlanInfoMapper.java
  12. 16 0
      src/main/java/com/diagbot/service/FollowupPlanDetailHospitalService.java
  13. 16 0
      src/main/java/com/diagbot/service/FollowupPlanDetailService.java
  14. 16 0
      src/main/java/com/diagbot/service/FollowupPlanInfoService.java
  15. 20 0
      src/main/java/com/diagbot/service/impl/FollowupPlanDetailHospitalServiceImpl.java
  16. 20 0
      src/main/java/com/diagbot/service/impl/FollowupPlanDetailServiceImpl.java
  17. 20 0
      src/main/java/com/diagbot/service/impl/FollowupPlanInfoServiceImpl.java
  18. 2 2
      src/main/java/com/diagbot/web/CoreController.java
  19. 20 0
      src/main/java/com/diagbot/web/FollowupPlanDetailController.java
  20. 20 0
      src/main/java/com/diagbot/web/FollowupPlanDetailHospitalController.java
  21. 20 0
      src/main/java/com/diagbot/web/FollowupPlanInfoController.java
  22. 22 0
      src/main/resources/mapper/FollowupPlanDetailHospitalMapper.xml
  23. 21 0
      src/main/resources/mapper/FollowupPlanDetailMapper.xml
  24. 16 0
      src/main/resources/mapper/FollowupPlanInfoMapper.xml

+ 2 - 2
src/main/java/com/diagbot/dto/PushPlanDetailDTO.java

@@ -20,7 +20,7 @@ public class PushPlanDetailDTO {
     //描述
     private String description;
     //检验
-    private List<PushBaseDTO> lis = new ArrayList<>();
+    private List<String> lis = new ArrayList<>();
     //检查
-    private List<PushBaseDTO> pacs = new ArrayList<>();
+    private List<String> pacs = new ArrayList<>();
 }

+ 186 - 0
src/main/java/com/diagbot/entity/FollowupPlanDetail.java

@@ -0,0 +1,186 @@
+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-18
+ */
+@TableName("tran_followup_plan_detail")
+public class FollowupPlanDetail 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;
+
+    /**
+     * 随访计划id
+     */
+    private Long followUpPlanId;
+
+    /**
+     * 随访时间
+     */
+    private String followUpTime;
+
+    /**
+     * 随访时间间隔月数
+     */
+    private Integer intervalMonth;
+
+    /**
+     * 项目名称
+     */
+    private String itemName;
+
+    /**
+     * 项目类型(1:检验,2:检查)
+     */
+    private Integer itemType;
+
+    /**
+     * 排序
+     */
+    private Integer orderNo;
+
+    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 Long getFollowUpPlanId() {
+        return followUpPlanId;
+    }
+
+    public void setFollowUpPlanId(Long followUpPlanId) {
+        this.followUpPlanId = followUpPlanId;
+    }
+    public String getFollowUpTime() {
+        return followUpTime;
+    }
+
+    public void setFollowUpTime(String followUpTime) {
+        this.followUpTime = followUpTime;
+    }
+    public Integer getIntervalMonth() {
+        return intervalMonth;
+    }
+
+    public void setIntervalMonth(Integer intervalMonth) {
+        this.intervalMonth = intervalMonth;
+    }
+    public String getItemName() {
+        return itemName;
+    }
+
+    public void setItemName(String itemName) {
+        this.itemName = itemName;
+    }
+    public Integer getItemType() {
+        return itemType;
+    }
+
+    public void setItemType(Integer itemType) {
+        this.itemType = itemType;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    @Override
+    public String toString() {
+        return "FollowupPlanDetail{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", followUpPlanId=" + followUpPlanId +
+            ", followUpTime=" + followUpTime +
+            ", intervalMonth=" + intervalMonth +
+            ", itemName=" + itemName +
+            ", itemType=" + itemType +
+            ", orderNo=" + orderNo +
+        "}";
+    }
+}

+ 199 - 0
src/main/java/com/diagbot/entity/FollowupPlanDetailHospital.java

@@ -0,0 +1,199 @@
+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-18
+ */
+@TableName("tran_followup_plan_detail_hospital")
+public class FollowupPlanDetailHospital 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;
+
+    /**
+     * 医院id
+     */
+    private Long hospitalId;
+
+    /**
+     * 随访计划id
+     */
+    private Long followUpPlanId;
+
+    /**
+     * 随访时间
+     */
+    private String followUpTime;
+
+    /**
+     * 随访时间间隔月数
+     */
+    private Integer intervalMonth;
+
+    /**
+     * 项目名称
+     */
+    private String itemName;
+
+    /**
+     * 项目类型(1:检验,2:检查)
+     */
+    private Integer itemType;
+
+    /**
+     * 排序
+     */
+    private Integer orderNo;
+
+    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 Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public Long getFollowUpPlanId() {
+        return followUpPlanId;
+    }
+
+    public void setFollowUpPlanId(Long followUpPlanId) {
+        this.followUpPlanId = followUpPlanId;
+    }
+    public String getFollowUpTime() {
+        return followUpTime;
+    }
+
+    public void setFollowUpTime(String followUpTime) {
+        this.followUpTime = followUpTime;
+    }
+    public Integer getIntervalMonth() {
+        return intervalMonth;
+    }
+
+    public void setIntervalMonth(Integer intervalMonth) {
+        this.intervalMonth = intervalMonth;
+    }
+    public String getItemName() {
+        return itemName;
+    }
+
+    public void setItemName(String itemName) {
+        this.itemName = itemName;
+    }
+    public Integer getItemType() {
+        return itemType;
+    }
+
+    public void setItemType(Integer itemType) {
+        this.itemType = itemType;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    @Override
+    public String toString() {
+        return "FollowupPlanDetailHospital{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", followUpPlanId=" + followUpPlanId +
+            ", followUpTime=" + followUpTime +
+            ", intervalMonth=" + intervalMonth +
+            ", itemName=" + itemName +
+            ", itemType=" + itemType +
+            ", orderNo=" + orderNo +
+        "}";
+    }
+}

+ 121 - 0
src/main/java/com/diagbot/entity/FollowupPlanInfo.java

@@ -0,0 +1,121 @@
+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-18
+ */
+@TableName("tran_followup_plan_info")
+public class FollowupPlanInfo 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;
+
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return "FollowupPlanInfo{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", operationName=" + operationName +
+        "}";
+    }
+}

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

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

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

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

+ 157 - 0
src/main/java/com/diagbot/facade/FollowupPlanInfoFacade.java

@@ -0,0 +1,157 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.biz.push.entity.Item;
+import com.diagbot.dto.PushPlanDTO;
+import com.diagbot.dto.PushPlanDetailDTO;
+import com.diagbot.dto.PushPlansDTO;
+import com.diagbot.entity.FollowupPlanDetail;
+import com.diagbot.entity.FollowupPlanDetailHospital;
+import com.diagbot.entity.FollowupPlanInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.FollowupPlanInfoServiceImpl;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/9/18 15:39
+ */
+@Component
+public class FollowupPlanInfoFacade extends FollowupPlanInfoServiceImpl {
+    @Autowired
+    FollowupPlanDetailFacade followupPlanDetailFacade;
+    @Autowired
+    FollowupPlanDetailHospitalFacade followupPlanDetailHospitalFacade;
+
+    /**
+     *
+     * @param operationName
+     * @param hospitalId
+     * @return
+     */
+    public PushPlanDTO getFollowUpPlans(Item operationName, Long hospitalId) {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        PushPlanDTO pushPlanDTO = new PushPlanDTO();
+        List<PushPlansDTO> pushPlans = new ArrayList<>();
+        if (operationName == null
+                || StringUtil.isBlank(operationName.getUniqueName())
+                || StringUtil.isBlank(operationName.getDateValue())) {
+            return pushPlanDTO;
+        }
+        Date date = null;
+        try {
+            date = dateFormat.parse(operationName.getDateValue());
+        } catch (ParseException e) {
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "开单日期格式错误,请转成(yyyy-MM-dd HH:mm:ss)格式");
+        }
+
+        PushPlansDTO pushPlansDTO = new PushPlansDTO();
+        pushPlansDTO.setItem(operationName);
+        List<PushPlanDetailDTO> pushPlanDetails = Lists.newLinkedList();
+
+        QueryWrapper<FollowupPlanInfo> followupPlanInfoQueryWrapper = new QueryWrapper<>();
+        followupPlanInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("operation_name", operationName.getUniqueName());
+        FollowupPlanInfo followupPlanInfo = this.getOne(followupPlanInfoQueryWrapper, false);
+        if (followupPlanInfo != null) {
+            List<FollowupPlanDetailHospital> followupPlanDetailHospitalList = Lists.newLinkedList();
+            List<FollowupPlanDetail> followupPlanDetailList = Lists.newLinkedList();
+            Map<String, Map<String, List<String>>> itemMap = new HashMap<>();
+            if (hospitalId != null) {
+                QueryWrapper<FollowupPlanDetailHospital> followupPlanDetailHospitalQueryWrapper = new QueryWrapper<>();
+                followupPlanDetailHospitalQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq("hospital_id", hospitalId)
+                        .eq("follow_up_plan_id", followupPlanInfo.getId())
+                        .orderByAsc("interval_month", "order_no");
+                followupPlanDetailHospitalList = followupPlanDetailHospitalFacade.list(followupPlanDetailHospitalQueryWrapper);
+            }
+            if (ListUtil.isEmpty(followupPlanDetailHospitalList)) {
+                QueryWrapper<FollowupPlanDetail> followupPlanDetailQueryWrapper = new QueryWrapper<>();
+                followupPlanDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq("follow_up_plan_id", followupPlanInfo.getId())
+                        .orderByAsc("interval_month", "order_no");
+                followupPlanDetailList = followupPlanDetailFacade.list(followupPlanDetailQueryWrapper);
+            }
+            if (ListUtil.isNotEmpty(followupPlanDetailHospitalList)) {
+                Map<Integer, List<FollowupPlanDetailHospital>> detailMap
+                        = EntityUtil.makeEntityListMap(followupPlanDetailHospitalList, "intervalMonth");
+                for (Map.Entry<Integer, List<FollowupPlanDetailHospital>> entry : detailMap.entrySet()) {
+
+                    if (ListUtil.isNotEmpty(entry.getValue())) {
+                        PushPlanDetailDTO pushPlanDetailDTO = new PushPlanDetailDTO();
+                        pushPlanDetailDTO.setExamineDate(DateUtil.addMonth(date, entry.getKey()));
+                        pushPlanDetailDTO.setDescription(entry.getValue().get(0).getFollowUpTime());
+                        Map<Integer, List<FollowupPlanDetailHospital>> itemTypeMap
+                                = EntityUtil.makeEntityListMap(entry.getValue(), "itemType");
+                        //检验
+                        if (itemTypeMap.containsKey(1)) {
+                            pushPlanDetailDTO.setLis(itemTypeMap.get(1)
+                                    .stream()
+                                    .map(i -> i.getItemName())
+                                    .collect(Collectors.toList()));
+                        }
+                        //检查
+                        if (itemTypeMap.containsKey(2)) {
+                            pushPlanDetailDTO.setPacs(itemTypeMap.get(2)
+                                    .stream()
+                                    .map(i -> i.getItemName())
+                                    .collect(Collectors.toList()));
+                        }
+                        pushPlanDetails.add(pushPlanDetailDTO);
+                    }
+                }
+            } else if (ListUtil.isNotEmpty(followupPlanDetailList)) {
+                Map<Integer, List<FollowupPlanDetail>> detailMap
+                        = EntityUtil.makeEntityListMap(followupPlanDetailList, "intervalMonth");
+                for (Map.Entry<Integer, List<FollowupPlanDetail>> entry : detailMap.entrySet()) {
+
+                    if (ListUtil.isNotEmpty(entry.getValue())) {
+                        PushPlanDetailDTO pushPlanDetailDTO = new PushPlanDetailDTO();
+                        pushPlanDetailDTO.setExamineDate(DateUtil.addMonth(date, entry.getKey()));
+                        pushPlanDetailDTO.setDescription(entry.getValue().get(0).getFollowUpTime());
+                        Map<Integer, List<FollowupPlanDetail>> itemTypeMap
+                                = EntityUtil.makeEntityListMap(entry.getValue(), "itemType");
+                        //检验
+                        if (itemTypeMap.containsKey(1)) {
+                            pushPlanDetailDTO.setLis(itemTypeMap.get(1)
+                                    .stream()
+                                    .map(i -> i.getItemName())
+                                    .collect(Collectors.toList()));
+                        }
+                        //检查
+                        if (itemTypeMap.containsKey(2)) {
+                            pushPlanDetailDTO.setPacs(itemTypeMap.get(2)
+                                    .stream()
+                                    .map(i -> i.getItemName())
+                                    .collect(Collectors.toList()));
+                        }
+                        pushPlanDetails.add(pushPlanDetailDTO);
+                    }
+                }
+            }
+        }
+
+        pushPlansDTO.setPushPlanDetails(pushPlanDetails);
+        pushPlans.add(pushPlansDTO);
+        pushPlanDTO.setPushPlans(pushPlans);
+        return pushPlanDTO;
+    }
+}

+ 20 - 1
src/main/java/com/diagbot/facade/PushFacade.java

@@ -1,9 +1,11 @@
 package com.diagbot.facade;
 
 import com.diagbot.dto.PushDTO;
+import com.diagbot.dto.PushPlanDTO;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.process.PushProcess;
 import com.diagbot.util.CoreUtil;
+import com.diagbot.vo.PushPlanVO;
 import com.diagbot.vo.PushVO;
 import com.diagbot.vo.StandConvert;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -26,8 +28,12 @@ public class PushFacade {
     CommonFacade commonFacade;
     @Autowired
     NeoFacade neoFacade;
+    @Autowired
+    FollowupPlanInfoFacade followupPlanInfoFacade;
+
     /**
      * 推送业务
+     *
      * @param
      * @return
      */
@@ -50,7 +56,7 @@ public class PushFacade {
 
         // 推送
         long pushStart = System.currentTimeMillis();
-        PushDTO process = pushProcess.process(pushVo,standConvertMap,wordCrfDTO);
+        PushDTO process = pushProcess.process(pushVo, standConvertMap, wordCrfDTO);
         CoreUtil.getDebugStr(pushStart, "推送耗时", debug);
         process.setDebug(debug);
 
@@ -58,4 +64,17 @@ public class PushFacade {
         return process;
     }
 
+    /**
+     * 手术随访计划(持续检验检查)推送
+     *
+     * @param pushPlanVO
+     * @return
+     */
+    public PushPlanDTO pushPlan(PushPlanVO pushPlanVO) {
+        PushPlanDTO pushPlanDTO = new PushPlanDTO();
+        if (pushPlanVO.getOperationName() != null) {
+            pushPlanDTO = followupPlanInfoFacade.getFollowUpPlans(pushPlanVO.getOperationName(), pushPlanVO.getHospitalId());
+        }
+        return pushPlanDTO;
+    }
 }

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.FollowupPlanDetailHospital;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 手术随访计划明细表(医院定制表) Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-18
+ */
+public interface FollowupPlanDetailHospitalMapper extends BaseMapper<FollowupPlanDetailHospital> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.FollowupPlanDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 手术随访计划明细表(标准表) Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-18
+ */
+public interface FollowupPlanDetailMapper extends BaseMapper<FollowupPlanDetail> {
+
+}

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

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

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.FollowupPlanDetailHospital;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 手术随访计划明细表(医院定制表) 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-18
+ */
+public interface FollowupPlanDetailHospitalService extends IService<FollowupPlanDetailHospital> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.FollowupPlanDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 手术随访计划明细表(标准表) 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-18
+ */
+public interface FollowupPlanDetailService extends IService<FollowupPlanDetail> {
+
+}

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

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

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.FollowupPlanDetailHospital;
+import com.diagbot.mapper.FollowupPlanDetailHospitalMapper;
+import com.diagbot.service.FollowupPlanDetailHospitalService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 手术随访计划明细表(医院定制表) 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-18
+ */
+@Service
+public class FollowupPlanDetailHospitalServiceImpl extends ServiceImpl<FollowupPlanDetailHospitalMapper, FollowupPlanDetailHospital> implements FollowupPlanDetailHospitalService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.FollowupPlanDetail;
+import com.diagbot.mapper.FollowupPlanDetailMapper;
+import com.diagbot.service.FollowupPlanDetailService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 手术随访计划明细表(标准表) 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-18
+ */
+@Service
+public class FollowupPlanDetailServiceImpl extends ServiceImpl<FollowupPlanDetailMapper, FollowupPlanDetail> implements FollowupPlanDetailService {
+
+}

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

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

+ 2 - 2
src/main/java/com/diagbot/web/CoreController.java

@@ -49,10 +49,10 @@ public class CoreController {
         return RespDTO.onSuc(pushDTO);
     }
 
-    @ApiOperation(value = "推送持续检验检查计划API[zhoutg]", notes = "")
+    @ApiOperation(value = "推送持续检验检查计划API[zhaops]", notes = "operation:随访手术")
     @PostMapping("/pushPlan")
     public RespDTO<PushPlanDTO> pushPlan(@RequestBody PushPlanVO pushPlanVO) {
-        PushPlanDTO pushPlanDTO = new PushPlanDTO();
+        PushPlanDTO pushPlanDTO = pushFacade.pushPlan(pushPlanVO);
         return RespDTO.onSuc(pushPlanDTO);
     }
 }

+ 20 - 0
src/main/java/com/diagbot/web/FollowupPlanDetailController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 手术随访计划明细表(标准表) 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-18
+ */
+@Controller
+@RequestMapping("/followupPlanDetail")
+public class FollowupPlanDetailController {
+
+}

+ 20 - 0
src/main/java/com/diagbot/web/FollowupPlanDetailHospitalController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 手术随访计划明细表(医院定制表) 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-18
+ */
+@Controller
+@RequestMapping("/followupPlanDetailHospital")
+public class FollowupPlanDetailHospitalController {
+
+}

+ 20 - 0
src/main/java/com/diagbot/web/FollowupPlanInfoController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 手术随访计划表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-09-18
+ */
+@Controller
+@RequestMapping("/followupPlanInfo")
+public class FollowupPlanInfoController {
+
+}

+ 22 - 0
src/main/resources/mapper/FollowupPlanDetailHospitalMapper.xml

@@ -0,0 +1,22 @@
+<?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.FollowupPlanDetailHospitalMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.FollowupPlanDetailHospital">
+        <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="hospital_id" property="hospitalId" />
+        <result column="follow_up_plan_id" property="followUpPlanId" />
+        <result column="follow_up_time" property="followUpTime" />
+        <result column="interval_month" property="intervalMonth" />
+        <result column="item_name" property="itemName" />
+        <result column="item_type" property="itemType" />
+        <result column="order_no" property="orderNo" />
+    </resultMap>
+
+</mapper>

+ 21 - 0
src/main/resources/mapper/FollowupPlanDetailMapper.xml

@@ -0,0 +1,21 @@
+<?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.FollowupPlanDetailMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.FollowupPlanDetail">
+        <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="follow_up_plan_id" property="followUpPlanId" />
+        <result column="follow_up_time" property="followUpTime" />
+        <result column="interval_month" property="intervalMonth" />
+        <result column="item_name" property="itemName" />
+        <result column="item_type" property="itemType" />
+        <result column="order_no" property="orderNo" />
+    </resultMap>
+
+</mapper>

+ 16 - 0
src/main/resources/mapper/FollowupPlanInfoMapper.xml

@@ -0,0 +1,16 @@
+<?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.FollowupPlanInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.FollowupPlanInfo">
+        <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" />
+    </resultMap>
+
+</mapper>