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

1、增加获取his确认状态接口

liuqq пре 3 година
родитељ
комит
e71b79d438

+ 17 - 0
src/main/java/com/diagbot/facade/his/FeedbackHosFacade.java

@@ -4,9 +4,15 @@ import com.diagbot.dto.RespDTO;
 import com.diagbot.util.PushFeedbackConn;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.his.FeedbackHosVO;
+import com.google.common.collect.Lists;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
 @Component
 @Slf4j
 public class FeedbackHosFacade {
@@ -36,4 +42,15 @@ public class FeedbackHosFacade {
             return RespDTO.onError("推送缺陷反馈失败,请联系维护人员!!!");
         }
     }
+
+    public RespDTO statusQuery(FeedbackHosVO feedbackHosVO){
+        try{
+            //List<FeedbackHosVO>
+            List<FeedbackHosVO> statusList=conn.statusQuery(feedbackHosVO);
+            return RespDTO.onSuc(statusList);
+        }catch (Exception e){
+            return RespDTO.onError("获取状态异常!!");
+        }
+
+    }
 }

+ 27 - 0
src/main/java/com/diagbot/util/PushFeedbackConn.java

@@ -1,8 +1,11 @@
 package com.diagbot.util;
 
+import com.diagbot.entity.BasDoctorInfo;
 import com.diagbot.vo.his.FeedbackHosVO;
+import com.google.common.collect.Lists;
 
 import java.sql.*;
+import java.util.List;
 import java.util.ResourceBundle;
 
 public class PushFeedbackConn {
@@ -239,4 +242,28 @@ public class PushFeedbackConn {
 
     }
 
+    public List<FeedbackHosVO> statusQuery(FeedbackHosVO feedbackHosVO){
+        List<FeedbackHosVO> statusList= Lists.newLinkedList();
+        try {
+            connection = getConnection();
+            connection.setAutoCommit(false);//事物开始
+            String sql =" select DETAIL_CODE,MSG_STATUS from MEDICAL_QC_MSG ";
+            sql+=" where DETAIL_CODE in("+feedbackHosVO.getIds()+")";
+            rs =this.Query(sql, null);
+            while(rs.next()){
+                FeedbackHosVO hosVO=new FeedbackHosVO();
+                hosVO.setId(Long.valueOf(rs.getString("DETAIL_CODE")));
+                hosVO.setMsgStatus(rs.getString("MSG_STATUS"));
+
+                statusList.add(hosVO);
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }finally {
+            close();
+        }
+        return statusList;
+    }
+
 }

+ 5 - 0
src/main/java/com/diagbot/vo/his/FeedbackHosVO.java

@@ -3,10 +3,13 @@ package com.diagbot.vo.his;
 import lombok.Data;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 @Data
 public class FeedbackHosVO {
 
+    private String ids;
+
     private Long id;
     /**
      * 操作类型 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复
@@ -77,4 +80,6 @@ public class FeedbackHosVO {
      * 抄送人姓名集合
      */
     private String ccNames;
+
+    private String msgStatus;
 }

+ 6 - 0
src/main/java/com/diagbot/web/DataViewController.java

@@ -52,6 +52,12 @@ public class DataViewController {
         return feedbackHosFacade.pushFeedback(feedbackHosVO);
     }
 
+    @ApiOperation(value = "从HIS获取待确认缺陷状态")
+    @PostMapping("/statusQuery")
+    @SysLogger("statusQuery")
+    public RespDTO statusQuery(@RequestBody FeedbackHosVO feedbackHosVO){
+        return feedbackHosFacade.statusQuery(feedbackHosVO);
+    }
 
 
 }