Преглед на файлове

杭州七院中间表删除接口添加

wangsy преди 10 месеца
родител
ревизия
ba7b667ffc

+ 1 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -66,6 +66,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/behospitalInfo/sendRuleWarn").permitAll()
                 .antMatchers("/qc/behospitalInfo/checkRule").permitAll()
                 .antMatchers("/qc/behospitalInfo/upState").permitAll()
+                .antMatchers("/qc/behospitalInfo/delState").permitAll()
                 .antMatchers("/qc/module/getById").permitAll()
                 .antMatchers("/qc/module/getModuleMap").permitAll()
                 .antMatchers("/qc/cases/getQcCases").permitAll()

+ 1 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -141,6 +141,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/behospitalInfo/sendRuleWarn", request)
                 || matchers("/qc/behospitalInfo/checkRule", request)
                 || matchers("/qc/behospitalInfo/upState", request)
+                || matchers("/qc/behospitalInfo/delState", request)
                 || matchers("/qc/module/getById", request)
                 || matchers("/qc/module/getModuleMap", request)
                 || matchers("/qc/cases/getQcCases", request)

+ 5 - 5
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -869,7 +869,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         if (ListUtil.isNotEmpty(strAdmissionNoteList)) {
             newAddData("入院记录", strAdmissionNoteList, recMap, medrecVoList);
         } else {
-            addDataHZQY("入院记录", recMap, medrecVoList, "1", analyzeVO.getBehospitalCode());
+            addDataHZQY("入院记录", recMap, medrecVoList, "1", analyzeVO);
         }
 
         //输血效果评价
@@ -919,7 +919,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         if (ListUtil.isNotEmpty(strFirstRecordList)) {
             newAddData("首次病程录", strFirstRecordList, recMap, medrecVoList);
         } else {
-            addDataHZQY("首次病程录", recMap, medrecVoList, "2", analyzeVO.getBehospitalCode());
+            addDataHZQY("首次病程录", recMap, medrecVoList, "2", analyzeVO);
         }
 
         //病危通知单
@@ -1182,12 +1182,12 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
      * @param recMap
      * @param medrecVoList
      */
-    public void addDataHZQY(String key, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList, String modeId,String behospitalCode) {
+    public void addDataHZQY(String key, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList, String modeId, AnalyzeVO analyzeVO) {
         List<RecordContentDTO> list = recMap.get(key);
         List<MedicalRecord> recordList = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
                 .eq("mode_id", modeId)
-                .eq("hospital_id", "14")
-                .eq("behospital_code", behospitalCode)
+                .eq("hospital_id", analyzeVO.getHospitalId())
+                .eq("behospital_code", analyzeVO.getBehospitalCode())
                 .orderByAsc("rec_date")
         );
 

+ 21 - 2
src/main/java/com/diagbot/facade/QcresultInfoFacade.java

@@ -136,8 +136,8 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
 //                    .set("is_deleted", IsDeleteEnum.Y.getKey())
 //                    .set("modifier", userId.toString())
 //                    .set("gmt_modified", now));
-            String sql = "INSERT INTO JKCDSS.JKCDSS_RULE_WARN (ID, USER_ID, BEHOSPITAL_CODE, STATE, URL, GMT_CREATE, GMT_MODIFIED, CREATOR, MODIFIER, REMARK) " +
-                    "VALUES (" + new Date().getTime() + ", " + userId + ", '" + qcRuleWarnVO.getBehospitalCode() + "', 0, '" + url + "', SYSDATE, SYSDATE, 'LT', 'LT', '" + qcRuleWarnVO.getMsg() + "')";
+            String sql = "INSERT INTO JKCDSS.JKCDSS_RULE_WARN (ID, USER_ID, BEHOSPITAL_CODE, STATE, URL, GMT_CREATE, GMT_MODIFIED, CREATOR, MODIFIER, REMARK, MSG) " +
+                    "VALUES (" + new Date().getTime() + ", " + userId + ", '" + qcRuleWarnVO.getBehospitalCode() + "', 0, '" + url + "', SYSDATE, SYSDATE, 'LT', 'LT', 'NULL', '" + qcRuleWarnVO.getMsg() + "')";
             System.out.println("插入sql语句为--------------------------:" + sql);
             tzDBConn.setRule(sql);
         }
@@ -227,6 +227,25 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
 
     }
 
+    /**
+     * 删除中间表信息
+     *
+     * @param behospitalCodeVO
+     * @return QcRuleWarnDTO
+     */
+    public Boolean delState(RecordContentVO behospitalCodeVO) {
+
+        try {
+            String sql = "DELETE FROM JKCDSS_RULE_WARN WHERE BEHOSPITAL_CODE='" + behospitalCodeVO.getBehospitalCode() + "'";
+            tzDBConn.upRule(sql);
+        } catch (Exception e) {
+            throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL, "oracle数据删除失败!");
+        }
+
+        return true;
+
+    }
+
 
     /**
      * 修改评分结果信息

+ 3 - 1
src/main/java/com/diagbot/facade/data/AHomePageFacade.java

@@ -197,7 +197,7 @@ public class AHomePageFacade extends HomePageServiceImpl{
             execute(homePageList);
         }catch (Exception e){
             log.error(e.getMessage(),e);
-            aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页","", JSON.toJSONString(aHomePageIngVO),"",e.getMessage());
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页更新异常","", JSON.toJSONString(aHomePageIngVO),"",e.getMessage());
         }
     }
 
@@ -236,6 +236,7 @@ public class AHomePageFacade extends HomePageServiceImpl{
             String url=readProperties.getProcessQcUrl()+"?behospitalCode="+behospitalCode+"&hospitalId="+hospitalId+"&modeId="+modeId;
             Map<String,Object> map=new HashMap<String,Object>();
             map.put("url",url);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页页面推送模式验证1","", JSON.toJSONString(aHomePageIngVO),url,"");
             return RespDTO.onSuc(map);
         }else if(aHomePageIngVO.getDockModeType().equals("2")){
             AnalyzeRunVO analyzeRunVO=new AnalyzeRunVO();
@@ -262,6 +263,7 @@ public class AHomePageFacade extends HomePageServiceImpl{
                 map.put("url",url);
                 map.put("analyze",analyzeRunDTO.getMsgDTOList());
             }
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页页面模式+接口引擎模式","", JSON.toJSONString(aHomePageIngVO),url,"");
             return RespDTO.onSuc(map);
         }
     }

+ 9 - 0
src/main/java/com/diagbot/web/BehospitalInfoController.java

@@ -152,6 +152,15 @@ public class BehospitalInfoController {
         return RespDTO.onSuc(qcresultInfoFacade.upState(behospitalCodeVO));
     }
 
+    @ApiOperation(value = "根据住院号删除中间表的信息[by:dsYun]",
+            notes = "")
+    @PostMapping("/delState")
+    @SysLogger("delState")
+    @Transactional
+    public RespDTO<Boolean> delState(@RequestBody RecordContentVO behospitalCodeVO) {
+        return RespDTO.onSuc(qcresultInfoFacade.delState(behospitalCodeVO));
+    }
+
     @ApiOperation(value = "新增质控条目[by:zhoutg]",
             notes = "")
     @PostMapping("/addCase")

+ 2 - 2
src/main/resources/application-pre.yml

@@ -59,7 +59,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.31:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+      url: jdbc:mysql://173.18.12.191:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
       username: root
       password: dsYun8!@#
       # 连接池的配置信息
@@ -111,7 +111,7 @@ spring:
     database:
       cache: 8 # cache索引
       token: 8 # Token索引
-    host: 192.168.2.31  #Redis服务器地址
+    host: 173.18.12.191  #Redis服务器地址
     port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: # Redis服务器连接密码(默认为空)
     lettuce: