Browse Source

Merge remote-tracking branch 'origin/master'

MarkHuang 4 years ago
parent
commit
6ea32eb62f
27 changed files with 1195 additions and 236 deletions
  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. 191 226
      src/main/java/com/diagbot/facade/TestFacade.java
  10. 16 0
      src/main/java/com/diagbot/mapper/FollowupPlanDetailHospitalMapper.java
  11. 16 0
      src/main/java/com/diagbot/mapper/FollowupPlanDetailMapper.java
  12. 16 0
      src/main/java/com/diagbot/mapper/FollowupPlanInfoMapper.java
  13. 16 0
      src/main/java/com/diagbot/service/FollowupPlanDetailHospitalService.java
  14. 16 0
      src/main/java/com/diagbot/service/FollowupPlanDetailService.java
  15. 16 0
      src/main/java/com/diagbot/service/FollowupPlanInfoService.java
  16. 20 0
      src/main/java/com/diagbot/service/impl/FollowupPlanDetailHospitalServiceImpl.java
  17. 20 0
      src/main/java/com/diagbot/service/impl/FollowupPlanDetailServiceImpl.java
  18. 20 0
      src/main/java/com/diagbot/service/impl/FollowupPlanInfoServiceImpl.java
  19. 2 0
      src/main/java/com/diagbot/vo/TestIndicationVO.java
  20. 2 2
      src/main/java/com/diagbot/web/CoreController.java
  21. 20 0
      src/main/java/com/diagbot/web/FollowupPlanDetailController.java
  22. 20 0
      src/main/java/com/diagbot/web/FollowupPlanDetailHospitalController.java
  23. 20 0
      src/main/java/com/diagbot/web/FollowupPlanInfoController.java
  24. 14 5
      src/main/java/com/diagbot/web/TestController.java
  25. 22 0
      src/main/resources/mapper/FollowupPlanDetailHospitalMapper.xml
  26. 21 0
      src/main/resources/mapper/FollowupPlanDetailMapper.xml
  27. 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;
+    }
 }

+ 191 - 226
src/main/java/com/diagbot/facade/TestFacade.java

@@ -7,6 +7,8 @@ import com.diagbot.client.StandConvertServiceClient;
 import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.StandConvertCrfBatchDTO;
 import com.diagbot.dto.StandConvertCrfDTO;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
 import com.diagbot.util.ExcelUtils;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
@@ -95,97 +97,79 @@ public class TestFacade {
 
             if (StringUtil.isNotEmpty(bean.getNeoType())) {
                 switch (bean.getNeoType()) {
-                    // case "1" : // 性别
-                    //     if ("男性".equals(bean.getNeoName())) {
-                    //         indicationPushVO.setSex(1);
-                    //     } else if ("女性".equals(bean.getNeoName())) {
-                    //         indicationPushVO.setSex(2);
-                    //     }
-                    //     break;
-                    // case "2" : // 化验, 示例:血小板计数,<,50,10^9/L
-                    //     String lisStr = bean.getNeoName();
-                    //     String[] lisArr = lisStr.split(",");
-                    //
-                    //     List<Lis> lisList = new ArrayList<>();
-                    //     Lis lisBean = new Lis();
-                    //     lisBean.setUniqueName(lisArr[0]);
-                    //     lisBean.setName(lisArr[0]);
-                    //     lisBean.setDetailName(lisArr[0]);
-                    //     lisBean.setValue(getValue(lisArr));
-                    //     lisList.add(lisBean);
-                    //     indicationPushVO.setLis(lisList);
-                    //     break;
-                    // case "3" : // 临床表现
-                    //     indicationPushVO.setChief(bean.getNeoName());
-                    //     break;
-                    // case "4": //辅助检查描述
-                    //     indicationPushVO.setSymptom("B超:提示"+bean.getNeoName());
-                    //     break;
-                    // case "5" : // 诊断
-                    //     List<Item> diag = new ArrayList<>();
-                    //     Item diagItem = new Item();
-                    //     diagItem.setName(bean.getNeoName());
-                    //     diagItem.setUniqueName(bean.getNeoName());
-                    //     diag.add(diagItem);
-                    //     indicationPushVO.setDiag(diag);
-                    //     break;
-                    // case "6" : // 服用药品
-                    //     StringBuffer symptom = new StringBuffer("发病来,神志清,精神可,胃纳一般,睡眠可,二便无殊。一直服用");
-                    //     symptom.append(bean.getNeoName()).append("。");
-                    //     indicationPushVO.setSymptom(symptom.toString());
-                    //     break;
-                    // case "12": // 体征
-                    //    StringBuffer sbVital = new StringBuffer();
-                    //    String[] vitalArr = bean.getNeoName().split(",");
-                    //    if (vitalArr.length > 1) {
-                    //        if ("收缩压".equals(vitalArr[0]) || "舒张压".equals(vitalArr[0])) {
-                    //            if ("收缩压".equals(vitalArr[0])) {
-                    //                sbVital.append("血压");
-                    //                sbVital.append(getValue(vitalArr) + "/100mmHg");
-                    //                indicationPushVO.setVital(sbVital.toString());
-                    //            } else if ("舒张压".equals(vitalArr[0])) {
-                    //                sbVital.append("血压");
-                    //                sbVital.append("100/" + getValue(vitalArr) + "mmHg");
-                    //                indicationPushVO.setVital(sbVital.toString());
-                    //            }
-                    //        } else {
-                    //            // 其他数值类型
-                    //            sbVital.append(vitalArr[0]);
-                    //            sbVital.append(getValue(vitalArr));
-                    //            sbVital.append(vitalArr[3]);
-                    //            indicationPushVO.setVital(sbVital.toString());
-                    //        }
-                    //    } else {
-                    //        sbVital.append(vitalArr[0]);
-                    //        indicationPushVO.setVital(sbVital.toString());
-                    //    }
-                    //    break;
-                    // default:
-                    //     continue;
+                    case "1" : // 性别
+                        if ("男性".equals(bean.getNeoName())) {
+                            indicationPushVO.setSex(1);
+                        } else if ("女性".equals(bean.getNeoName())) {
+                            indicationPushVO.setSex(2);
+                        }
+                        break;
+                    case "2" : // 化验, 示例:血小板计数,<,50,10^9/L
+                        String lisStr = bean.getNeoName();
+                        String[] lisArr = lisStr.split(",");
+
+                        List<Lis> lisList = new ArrayList<>();
+                        Lis lisBean = new Lis();
+                        lisBean.setUniqueName(lisArr[0]);
+                        lisBean.setName(lisArr[0]);
+                        lisBean.setDetailName(lisArr[0]);
+                        lisBean.setValue(getValue(lisArr));
+                        lisList.add(lisBean);
+                        indicationPushVO.setLis(lisList);
+                        break;
+                    case "3" : // 临床表现
+                        indicationPushVO.setChief(bean.getNeoName());
+                        break;
+                    case "4": //辅助检查描述
+                        indicationPushVO.setSymptom("B超:提示"+bean.getNeoName());
+                        break;
+                    case "5" : // 诊断
+                        List<Item> diag = new ArrayList<>();
+                        Item diagItem = new Item();
+                        diagItem.setName(bean.getNeoName());
+                        diagItem.setUniqueName(bean.getNeoName());
+                        diag.add(diagItem);
+                        indicationPushVO.setDiag(diag);
+                        break;
+                    case "6" : // 服用药品
+                        StringBuffer symptom = new StringBuffer("发病来,神志清,精神可,胃纳一般,睡眠可,二便无殊。一直服用");
+                        symptom.append(bean.getNeoName()).append("。");
+                        indicationPushVO.setSymptom(symptom.toString());
+                        break;
+                    case "12": // 体征
+                       StringBuffer sbVital = new StringBuffer();
+                       String[] vitalArr = bean.getNeoName().split(",");
+                       if (vitalArr.length > 1) {
+                           if ("收缩压".equals(vitalArr[0]) || "舒张压".equals(vitalArr[0])) {
+                               if ("收缩压".equals(vitalArr[0])) {
+                                   sbVital.append("血压");
+                                   sbVital.append(getValue(vitalArr) + "/100mmHg");
+                                   indicationPushVO.setVital(sbVital.toString());
+                               } else if ("舒张压".equals(vitalArr[0])) {
+                                   sbVital.append("血压");
+                                   sbVital.append("100/" + getValue(vitalArr) + "mmHg");
+                                   indicationPushVO.setVital(sbVital.toString());
+                               }
+                           } else {
+                               // 其他数值类型
+                               sbVital.append(vitalArr[0]);
+                               sbVital.append(getValue(vitalArr));
+                               sbVital.append(vitalArr[3]);
+                               indicationPushVO.setVital(sbVital.toString());
+                           }
+                       } else {
+                           sbVital.append(vitalArr[0]);
+                           indicationPushVO.setVital(sbVital.toString());
+                       }
+                       break;
+                    default:
+                        continue;
                 }
             }
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = new LinkedHashMap<>();
-
-        List<String> msg = new ArrayList<>();
-        List<String> errMsg = new ArrayList<>();
-        for (IndicationPushVO indicationPushVO : indicationPushVOList) {
-            try {
-                IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
-                if (ListUtil.isEmpty(indicationDTO.getBillMsgList())) {
-                    msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
-                }
-            } catch (Exception e) {
-                System.out.println(indicationPushVO.getIdNum() + "行出错了!" + e.getMessage());
-                errMsg.add(indicationPushVO.getIdNum() + "行出错了");
-            }
-        }
-        map.put("总条数", indicationPushVOList.size() + "条");
-        map.put("出错条数", msg.size() + "条");
-        map.put("出错信息", msg);
-        map.put("程序报错", errMsg);
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "2");
         return map;
     }
 
@@ -251,25 +235,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = new LinkedHashMap<>();
-
-        List<String> msg = new ArrayList<>();
-        List<String> errMsg = new ArrayList<>();
-        for (IndicationPushVO indicationPushVO : indicationPushVOList) {
-            try {
-                IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
-                if (ListUtil.isEmpty(indicationDTO.getBillMsgList())) {
-                    msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
-                }
-            } catch (Exception e) {
-                System.out.println(indicationPushVO.getIdNum() + "行出错了!" + e.getMessage());
-                errMsg.add(indicationPushVO.getIdNum() + "行出错了");
-            }
-        }
-        map.put("总条数", indicationPushVOList.size() + "条");
-        map.put("出错条数", msg.size() + "条");
-        map.put("出错信息", msg);
-        map.put("程序报错", errMsg);
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "2");
         return map;
     }
 
@@ -301,25 +267,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = new LinkedHashMap<>();
-
-        List<String> msg = new ArrayList<>();
-        List<String> errMsg = new ArrayList<>();
-        for (IndicationPushVO indicationPushVO : indicationPushVOList) {
-            try {
-                IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
-                if (ListUtil.isEmpty(indicationDTO.getHighRiskList())) {
-                    msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
-                }
-            } catch (Exception e) {
-                System.out.println(e.getMessage());
-                errMsg.add(indicationPushVO.getIdNum() + "行出错了");
-            }
-        }
-        map.put("总条数", indicationPushVOList.size() + "条");
-        map.put("出错条数", msg.size() + "条");
-        map.put("出错信息", msg);
-        map.put("程序报错", errMsg);
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "3");
         return map;
     }
 
@@ -365,25 +313,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = new LinkedHashMap<>();
-
-        List<String> msg = new ArrayList<>();
-        List<String> errMsg = new ArrayList<>();
-        for (IndicationPushVO indicationPushVO : indicationPushVOList) {
-            try {
-                IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
-                if (ListUtil.isEmpty(indicationDTO.getOtherList())) {
-                    msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
-                }
-            } catch (Exception e) {
-                System.out.println(e.getMessage());
-                errMsg.add(indicationPushVO.getIdNum() + "行出错了");
-            }
-        }
-        map.put("总条数", indicationPushVOList.size() + "条");
-        map.put("出错条数", msg.size() + "条");
-        map.put("出错信息", msg);
-        map.put("程序报错", errMsg);
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "4");
         return map;
     }
 
@@ -450,25 +380,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = new LinkedHashMap<>();
-
-        List<String> msg = new ArrayList<>();
-        List<String> errMsg = new ArrayList<>();
-        for (IndicationPushVO indicationPushVO : indicationPushVOList) {
-            try {
-                IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
-                if (ListUtil.isEmpty(indicationDTO.getOtherList())) {
-                    msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
-                }
-            } catch (Exception e) {
-                System.out.println(e.getMessage());
-                errMsg.add(indicationPushVO.getIdNum() + "行出错了");
-            }
-        }
-        map.put("总条数", indicationPushVOList.size() + "条");
-        map.put("出错条数", msg.size() + "条");
-        map.put("出错信息", msg);
-        map.put("程序报错", errMsg);
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "4");
         return map;
     }
 
@@ -517,24 +429,7 @@ public class TestFacade {
             }
         }
 
-        Map<String, Object> map = new LinkedHashMap<>();
-        List<String> msg = new ArrayList<>();
-        List<String> errMsg = new ArrayList<>();
-        for (IndicationPushVO indicationPushVO : indicationPushVOList) {
-            try {
-                IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
-                if (ListUtil.isEmpty(indicationDTO.getOtherList())) {
-                    msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
-                }
-            } catch (Exception e) {
-                System.out.println(e.getMessage());
-                errMsg.add(indicationPushVO.getIdNum() + "行出错了");
-            }
-        }
-        map.put("总条数", indicationPushVOList.size() + "条");
-        map.put("出错条数", msg.size() + "条");
-        map.put("出错信息", msg);
-        map.put("程序报错", errMsg);
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "4");
         return map;
     }
 
@@ -566,34 +461,16 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = new LinkedHashMap<>();
-
-        List<String> msg = new ArrayList<>();
-        List<String> errMsg = new ArrayList<>();
-        for (IndicationPushVO indicationPushVO : indicationPushVOList) {
-            try {
-                IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
-                if (ListUtil.isEmpty(indicationDTO.getHighRiskList())) {
-                    msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
-                }
-            } catch (Exception e) {
-                System.out.println(e.getMessage());
-                errMsg.add(indicationPushVO.getIdNum() + "行出错了");
-            }
-        }
-        map.put("总条数", indicationPushVOList.size() + "条");
-        map.put("出错条数", msg.size() + "条");
-        map.put("出错信息", msg);
-        map.put("程序报错", errMsg);
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "3");
         return map;
     }
 
     /**
-     * 危急值数据测试
+     * 危急值数据测试——化验
      *
      * @param file
      */
-    public Map<String, Object> importCriticalExcel(MultipartFile file, TestLineVO testLineVO) {
+    public Map<String, Object> importCriticalLisExcel(MultipartFile file, TestLineVO testLineVO) {
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -633,25 +510,38 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = new LinkedHashMap<>();
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "1");
+        return map;
+    }
 
-        List<String> msg = new ArrayList<>();
-        List<String> errMsg = new ArrayList<>();
-        for (IndicationPushVO indicationPushVO : indicationPushVOList) {
-            try {
-                IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
-                if (ListUtil.isEmpty(indicationDTO.getCriticalValList())) {
-                    msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
-                }
-            } catch (Exception e) {
-                System.out.println(e.getMessage());
-                errMsg.add(indicationPushVO.getIdNum() + "行出错了");
+    /**
+     * 危急值数据测试——辅检
+     *
+     * @param file
+     */
+    public Map<String, Object> importCriticalPacsExcel(MultipartFile file, TestLineVO testLineVO) {
+        List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
+        List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
+        for (TestIndicationVO bean : data) {
+            if (StringUtil.isNotEmpty(testLineVO.getIdNum()) && !testLineVO.getIdNum().equals(bean.getIdNum())) {
+                continue;
             }
+            IndicationPushVO indicationPushVO = new IndicationPushVO();
+            indicationPushVO.setRuleType("1");
+
+            List<Pacs> pacsList = new ArrayList<>();
+            Pacs pacs = new Pacs();
+            pacs.setName("腹部B超");
+            pacs.setUniqueName("腹部B超");
+            pacs.setResult(bean.getRuleText());
+            pacsList.add(pacs);
+            indicationPushVO.setPacs(pacsList);
+            indicationPushVO.setIdNum(bean.getIdNum());
+
+            indicationPushVOList.add(indicationPushVO);
         }
-        map.put("总条数", indicationPushVOList.size() + "条");
-        map.put("出错条数", msg.size() + "条");
-        map.put("出错信息", msg);
-        map.put("程序报错", errMsg);
+
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "1");
         return map;
     }
 
@@ -722,6 +612,13 @@ public class TestFacade {
         return standConvertCrfBatchDTO;
     }
 
+    /**
+     * 复杂高危手术测试API
+     *
+     * @param file
+     * @param testLineVO
+     * @return
+     */
     public Map<String, Object> testHighRiskProcess(MultipartFile file, TestLineVO testLineVO) {
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
@@ -729,20 +626,31 @@ public class TestFacade {
             if (StringUtil.isNotEmpty(testLineVO.getIdNum()) && !testLineVO.getIdNum().equals(bean.getIdNum())) {
                 continue;
             }
-            // 3,4是高危手术
+            // 只留下等级为2的数据
             if ("0" .equals(bean.getOperationLevel()) || "1" .equals(bean.getOperationLevel())
                     || "3" .equals(bean.getOperationLevel()) || "4" .equals(bean.getOperationLevel())) {
                 continue;
             }
             IndicationPushVO indicationPushVO = new IndicationPushVO();
+            String operationName = bean.getOperationName();
+            List<Item> operation = new ArrayList<>();
+            String[] operationStrArray = operationName.split(",");
+            for(String str :operationStrArray){
+                Item item = new Item();
+                item.setName(str);
+                item.setUniqueName(str);
+                operation.add(item);
+            }
+/*            indicationPushVO.setOperation(operation);
             //年龄
             String[] split = bean.getAgeAll().split(",");
             indicationPushVO.setAge((int) getValueNum(split));
             indicationPushVO.setMsg("年龄");
             indicationPushVO.setRuleType("3");
-            indicationPushVO.setIdNum(bean.getIdNum());
+            indicationPushVO.setIdNum(bean.getIdNum());*/
+
+           /* //体格
 
-            //体格
             String physique = bean.getPhysique();
             String[] physiqueStrArray = physique.split(",");
             for (String str : physiqueStrArray) {
@@ -759,18 +667,17 @@ public class TestFacade {
                     indphysiquePushVO.setMsg("体格"+str);
                     indicationPushVOList.add(indicationPushVO);
                 }
-            }
+            }*/
             //化验
             String lisAll = bean.getLisAll();
             String[] physiquelisAll = lisAll.split(",");
-
             for (String str : physiquelisAll) {
                 IndicationPushVO indicationPushVOlisList = new IndicationPushVO();
+                setname(indicationPushVOlisList,bean);
                 List<Lis> lisList = new ArrayList<>();
                 if (str.contains(",")) {
                     //包含英文逗号
                     String[] strArray = str.split(",");
-                    String lisStr = bean.getNeoName();
                     Lis lisBean = new Lis();
                     lisBean.setUniqueName(strArray[0]);
                     lisBean.setName(strArray[0]);
@@ -783,7 +690,7 @@ public class TestFacade {
                 }
             }
 
-            //辅检
+           /* //辅检
             String pacsAll = bean.getPacsAll();
             String[] physiquepacsAll = pacsAll.split(",");
             indicationPushVO.setSymptom(pacsAll);
@@ -814,13 +721,13 @@ public class TestFacade {
                 indicationPushVOpacs.setMsg("诊断"+diseaseStr);
                 indicationPushVOpacs.setDiag(diag);
                 indicationPushVOList.add(indicationPushVOpacs);
-            }
+            }*/
             List<Item> operationOrder = new ArrayList<>();
             Item item = new Item();
             item.setUniqueName(bean.getOperationName());
             item.setName(bean.getOperationName());
             operationOrder.add(item);
-            //indicationPushVO.setOperationOrder(operationOrder);
+            indicationPushVO.setOperationOrder(operationOrder);
             indicationPushVOList.add(indicationPushVO);
         }
 
@@ -845,4 +752,62 @@ public class TestFacade {
         map.put("程序报错", errMsg);
         return map;
     }
+
+    /**
+     * 提示方法
+     *
+     * @param indicationPushVOList
+     * @param ruleType
+     * @return
+     */
+    public Map getDebugMap(List<IndicationPushVO> indicationPushVOList, String ruleType) {
+        Map<String, Object> map = new LinkedHashMap<>();
+        List<String> msg = new ArrayList<>();
+        List<String> errMsg = new ArrayList<>();
+        for (IndicationPushVO indicationPushVO : indicationPushVOList) {
+            try {
+                IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
+                switch (ruleType) {
+                    case "1":
+                        if (ListUtil.isEmpty(indicationDTO.getCriticalValList())) {
+                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
+                        }
+                        break;
+                    case "2":
+                        if (ListUtil.isEmpty(indicationDTO.getBillMsgList())) {
+                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
+                        }
+                        break;
+                    case "3":
+                        if (ListUtil.isEmpty(indicationDTO.getHighRiskList())) {
+                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
+                        }
+                        break;
+                    case "4":
+                        if (ListUtil.isEmpty(indicationDTO.getOtherList())) {
+                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
+                        }
+                        break;
+                    default:
+                        throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "ruleType格式不对");
+                }
+            } catch (Exception e) {
+                System.out.println(e.getMessage());
+                errMsg.add(indicationPushVO.getIdNum() + "行出错了");
+            }
+        }
+        map.put("总条数", indicationPushVOList.size() + "条");
+        map.put("出错条数", msg.size() + "条");
+        map.put("出错信息", msg);
+        map.put("程序报错", errMsg);
+        return map;
+    }
+    public  void setname(IndicationPushVO indicationPushVO,TestIndicationVO bean){
+        List<Item> operationOrder = new ArrayList<>();
+        Item item = new Item();
+        item.setUniqueName(bean.getOperationName());
+        item.setName(bean.getOperationName());
+        operationOrder.add(item);
+        indicationPushVO.setOperationOrder(operationOrder);
+    }
 }

+ 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 - 0
src/main/java/com/diagbot/vo/TestIndicationVO.java

@@ -243,4 +243,6 @@ public class TestIndicationVO implements Serializable {
     private String pacsAll;
     @Excel(name="年龄T")
     private String ageAll;
+    @Excel(name="规则")
+    private String ruleText;
 }

+ 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 {
+
+}

+ 14 - 5
src/main/java/com/diagbot/web/TestController.java

@@ -49,12 +49,20 @@ public class TestController {
         return RespDTO.onSuc(testFacade.testIndicationTransfusion(file, testLineVO));
     }
 
-    @ApiOperation(value = "危急值测试API[zhoutg]",
+    @ApiOperation(value = "危急值测试API——化验[zhoutg]",
             notes = "idNum:指定行测试<br>" +
                     "sheetIndex:sheet的下标,默认为0,表示第一个sheet")
-    @PostMapping("/testCritical")
-    public RespDTO<Map<String, Object>> testCritical(@RequestParam("file") MultipartFile file, TestLineVO testLineVO) {
-        return RespDTO.onSuc(testFacade.importCriticalExcel(file, testLineVO));
+    @PostMapping("/testCriticalLis")
+    public RespDTO<Map<String, Object>> testCriticalLis(@RequestParam("file") MultipartFile file, TestLineVO testLineVO) {
+        return RespDTO.onSuc(testFacade.importCriticalLisExcel(file, testLineVO));
+    }
+
+    @ApiOperation(value = "危急值测试API——辅检[zhoutg]",
+            notes = "idNum:指定行测试<br>" +
+                    "sheetIndex:sheet的下标,默认为0,表示第一个sheet")
+    @PostMapping("/testCriticalPacs")
+    public RespDTO<Map<String, Object>> testCriticalPacs(@RequestParam("file") MultipartFile file, TestLineVO testLineVO) {
+        return RespDTO.onSuc(testFacade.importCriticalPacsExcel(file, testLineVO));
     }
 
     @ApiOperation(value = "高危手术测试API[zhoutg]",
@@ -89,7 +97,6 @@ public class TestController {
         return RespDTO.onSuc(testFacade.testOtherTipPacs(file, testLineVO));
     }
 
-
     @ApiOperation(value = "其他值提醒测试——输血API[zhoutg]",
             notes = "idNum:指定行测试<br>" +
                     "sheetIndex:sheet的下标,默认为0,表示第一个sheet")
@@ -109,6 +116,7 @@ public class TestController {
     public RespDTO<StandConvertCrfBatchDTO> testStandConvertBatch(@RequestBody List<StandConvertCrfVO> standConvertCrfVOList) {
         return RespDTO.onSuc(testFacade.testStandConvertBatch(standConvertCrfVOList));
     }
+
     @ApiOperation(value = "复杂高危手术测试API[zhoutg]",
             notes = "idNum:指定行测试<br>" +
                     "sheetIndex:sheet的下标,默认为0,表示第一个sheet")
@@ -116,5 +124,6 @@ public class TestController {
     public RespDTO<Map<String, Object>> testHighRiskProcess(@RequestParam("file") MultipartFile file, TestLineVO testLineVO) {
         return RespDTO.onSuc(testFacade.testHighRiskProcess(file, testLineVO));
     }
+
 }
 

+ 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>