瀏覽代碼

手术随访计划

zhaops 4 年之前
父節點
當前提交
1ece9d077c

+ 3 - 1
src/main/java/com/diagbot/dto/PushPlanDetailDTO.java

@@ -21,8 +21,10 @@ public class PushPlanDetailDTO {
     private Date examineDate;
     //描述
     private String description;
+    //是否历史数据
+    private Integer history;
     //检验
     private List<String> lis = new ArrayList<>();
     //检查
     private List<String> pacs = new ArrayList<>();
-}
+}

+ 15 - 3
src/main/java/com/diagbot/facade/FollowupPlanInfoFacade.java

@@ -42,13 +42,13 @@ public class FollowupPlanInfoFacade extends FollowupPlanInfoServiceImpl {
     FollowupPlanDetailHospitalFacade followupPlanDetailHospitalFacade;
 
     /**
-     *
      * @param operationName
      * @param hospitalId
      * @return
      */
     public PushPlanDTO getFollowUpPlans(Item operationName, Long hospitalId) {
         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date now = DateUtil.now();
         PushPlanDTO pushPlanDTO = new PushPlanDTO();
         List<PushPlansDTO> pushPlans = new ArrayList<>();
         if (operationName == null
@@ -97,8 +97,14 @@ public class FollowupPlanInfoFacade extends FollowupPlanInfoServiceImpl {
 
                     if (ListUtil.isNotEmpty(entry.getValue())) {
                         PushPlanDetailDTO pushPlanDetailDTO = new PushPlanDetailDTO();
-                        pushPlanDetailDTO.setExamineDate(DateUtil.addMonth(date, entry.getKey()));
+                        Date examineDate = DateUtil.addMonth(date, entry.getKey());
+                        pushPlanDetailDTO.setExamineDate(examineDate);
                         pushPlanDetailDTO.setDescription(entry.getValue().get(0).getFollowUpTime());
+                        if (examineDate.after(now)) {
+                            pushPlanDetailDTO.setHistory(0);
+                        } else {
+                            pushPlanDetailDTO.setHistory(1);
+                        }
                         Map<Integer, List<FollowupPlanDetailHospital>> itemTypeMap
                                 = EntityUtil.makeEntityListMap(entry.getValue(), "itemType");
                         //检验
@@ -125,8 +131,14 @@ public class FollowupPlanInfoFacade extends FollowupPlanInfoServiceImpl {
 
                     if (ListUtil.isNotEmpty(entry.getValue())) {
                         PushPlanDetailDTO pushPlanDetailDTO = new PushPlanDetailDTO();
-                        pushPlanDetailDTO.setExamineDate(DateUtil.addMonth(date, entry.getKey()));
+                        Date examineDate = DateUtil.addMonth(date, entry.getKey());
+                        pushPlanDetailDTO.setExamineDate(examineDate);
                         pushPlanDetailDTO.setDescription(entry.getValue().get(0).getFollowUpTime());
+                        if (examineDate.after(now)) {
+                            pushPlanDetailDTO.setHistory(0);
+                        } else {
+                            pushPlanDetailDTO.setHistory(1);
+                        }
                         Map<Integer, List<FollowupPlanDetail>> itemTypeMap
                                 = EntityUtil.makeEntityListMap(entry.getValue(), "itemType");
                         //检验