浏览代码

湘雅三院修改后代码

shiyue 3 年之前
父节点
当前提交
e56743a713

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

@@ -169,6 +169,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/data/getColumnZhAndCh").permitAll()
                 .antMatchers("/qc/data/analyseRec").permitAll()
                 .antMatchers("/qc/data/hisDataDeal").permitAll()
+                .antMatchers("/qc/data/sendDateOld").permitAll()
                 .antMatchers("/qc/data/sendDataOld").permitAll()
                 .antMatchers("/qc/data/sendOldData").permitAll()
                 .antMatchers("/qc/data/sendDataOldOne").permitAll()

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

@@ -215,6 +215,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/data/hisDataDeal", request)
                 || matchers("/qc/data/sendDataOld", request)
                 || matchers("/qc/data/sendDataOldOne", request)
+                || matchers("/qc/data/sendDateOld", request)
                 || matchers("/qc/data/sendOldData", request)
                 || matchers("/qc/data_str/sendAdmissionNote", request)
                 || matchers("/qc/data_str/sendBloodResult", request)

+ 4 - 3
src/main/java/com/diagbot/facade/FilterFacade.java

@@ -185,10 +185,11 @@ public class FilterFacade {
      * @param filterVO
      */
     public void filterVOSet(FilterVO filterVO) {
-        String hospitalId = SysUserUtils.getCurrentHospitalID();
-        String userId = SysUserUtils.getCurrentPrincipleID();
+//        String hospitalId = SysUserUtils.getCurrentHospitalID();
+//        String userId = SysUserUtils.getCurrentPrincipleID();
+        String hospitalId ="35";
         filterVO.setHospitalId(hospitalId);
-        filterVO.setUserId(Long.valueOf(userId));
+//        filterVO.setUserId(Long.valueOf(userId));
         if (filterVO.getLimitCount() == null || filterVO.getLimitCount().equals(0)) {
             filterVO.setLimitCount(10);
         }

+ 1 - 0
src/main/java/com/diagbot/facade/QcClientFacade.java

@@ -49,6 +49,7 @@ public class QcClientFacade {
         if (StringUtil.isBlank(url)) {
             throw new CommonException(CommonErrorCode.NOT_EXISTS, "配置表内找不到评分接口地址数据!");
         }
+//        String url="http://127.0.0.1:6010";
         try {
             uri = new URI(url);
         } catch (Exception e) {

+ 210 - 91
src/main/java/com/diagbot/facade/ViewFacade.java

@@ -2,9 +2,11 @@ package com.diagbot.facade;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.biz.push.entity.Lis;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.*;
+import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.facade.data.*;
 import com.diagbot.util.DateUtil;
 import com.diagbot.util.EntityUtil;
@@ -20,6 +22,7 @@ import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.commons.httpclient.NameValuePair;
 import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.lang.StringUtils;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
 import org.apache.http.client.methods.CloseableHttpResponse;
@@ -34,6 +37,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import java.time.LocalDateTime;
+import java.time.temporal.ChronoUnit;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -81,42 +86,88 @@ public class ViewFacade {
      */
     public void executeOldData() {
         String deptSql = "select * from dept where deptType='临床' and station='住院' ";
-        String doctorAdviceSql = "select * from doctor_order where daStartDate >= to_date('"+ DateUtil.yesterdayFormate()+"','yyyy-MM-dd')";
+        String doctorAdviceSql = "select * from doctor_order where daStartDate >= to_date('" + DateUtil.yesterdayFormate() + "','yyyy-MM-dd')";
+        String lisSql = "select * from ASSAY_LIST where repDate >= '" + DateUtil.yesterdayFormate() + "' and behospitalNum is not null";
+        String pacsSql = "select * from CHECK_LIST where repDate >= '" + DateUtil.yesterdayFormate()+ "' and behospitalNum is not null";
+        String infoSql = "select * from admission_pat_regist where leaveHospitalDate >= '" + DateUtil.yesterdayFormate() + "'";
 
+        try {
+            Long startTime = System.currentTimeMillis();
+            //更新前一天出院的入院登记信息
+            this.getInfo(infoSql);
+
+            //得到全部的科室信息并添加修改
+            this.getDeptInfo(deptSql);
+
+            //得到前一天的医嘱信息并添加修改
+            this.getDoctorAdvice(doctorAdviceSql);
+
+            //得到前一天的化验信息和相应的化验结果并添加修改
+            this.getLisInfo(lisSql);
+
+            //得到前一天的检查信息和相应的检查结果并添加修改
+            this.getPacsInfo(pacsSql);
 
-        Long startTime=System.currentTimeMillis();
-        //得到全部的科室信息并添加修改
-        this.getDeptInfo(deptSql);
-        Long startTime1=System.currentTimeMillis();
-        System.out.println("获取科室所用时间:----"+(startTime1-startTime)+"----");
+            Long startTime2 = System.currentTimeMillis();
 
+            aMedAbnormalInfoFacade.saveAbnormalInfo("每天拉去历史数据成功", "", "所用时间" + (startTime2 - startTime), DateUtil.now().toString(), "");
+
+        } catch (Exception e) {
+            aMedAbnormalInfoFacade.saveAbnormalInfo("每天拉去历史数据失败", "", "", DateUtil.now().toString(), e.getMessage());
+
+        }
 
-        //得到前一天的医嘱信息并添加修改
-        this.getDoctorAdvice(doctorAdviceSql);
-        Long startTime2=System.currentTimeMillis();
-        System.out.println("获取医嘱所用时间:----"+(startTime2-startTime1)+"----");
+    }
+    /**
+     * 根据出院时间来拉取历史数据
+     *
+     * @param startDate
+     * @param stopDate
+     */
+    public void executeData(String startDate, String stopDate) {
+        //获取入院登记表中的信息
+        String infoSql = "select * from admission_pat_regist where leaveHospitalDate >= '" + startDate + "' and leaveHospitalDate <= '" + stopDate + "'";
+        List<BehospitalInfo> behospitalInfoList = this.getInfo(infoSql);
+        this.a(behospitalInfoList);
     }
 
     /**
-     * 根据时间来拉取历史数据
+     * 根据入院时间来拉取历史数据
+     *
      * @param startDate
      * @param stopDate
      */
-    public void executeOldData(String startDate,String stopDate) {
+    public void executeOldData(String startDate, String stopDate) {
         //获取入院登记表中的信息
-        String infoSql="select * from admission_pat_regist where behospitalDate >= '"+startDate+"' and behospitalDate <= '"+stopDate+"'";
-        List<BehospitalInfo> behospitalInfoList=this.getInfo( infoSql);
-        //根据入院登记表的信息来查所需文书
-        if (behospitalInfoList.size()>0){
-            behospitalInfoList.forEach(s->{
-                //获取拼接前的behospitalCode和behospitalNum
-                String behospitalCode=s.getBehospitalCode();
-                String hospitalCode=behospitalCode.substring(0,behospitalCode.indexOf("_"));
-                String hospitalNum =behospitalCode.substring(hospitalCode.length()+1,behospitalCode.length());
+        String infoSql = "select * from admission_pat_regist where behospitalDate >= '" + startDate + "' and behospitalDate <= '" + stopDate + "'";
+        List<BehospitalInfo> behospitalInfoList = this.getInfo(infoSql);
+        this.a(behospitalInfoList);
+    }
 
-                //获取文书信息和文书详情信息
-                String  recordSql="select * from record_list where behospitalCode= '"+hospitalCode+"' and behospitalnum= '"+hospitalNum+"'";
-                this.getRecord(recordSql);
+    /**
+     * 根据住院号来拉取历史数据
+     *
+     * @param behospitalCode
+     * @param behospitalNum
+     */
+    public void executeOldDataOne(String behospitalCode, String behospitalNum) {
+        //获取入院登记表中的信息
+        String infoSql = "select * from admission_pat_regist where behospitalCode = '" + behospitalCode + "' and behospitalNum = '" + behospitalNum + "'";
+        List<BehospitalInfo> behospitalInfoList = this.getInfo(infoSql);
+        this.a(behospitalInfoList);
+    }
+
+    /**
+     * 单独更新病案首页
+     */
+    public void executeHome(){
+        List<BehospitalInfo> behospitalInfoList = aBehospitalInfoFacade.list();
+        if (behospitalInfoList.size() > 0) {
+            behospitalInfoList.forEach(s -> {
+                //获取拼接前的behospitalCode和behospitalNum
+                String behospitalCode = s.getBehospitalCode();
+                String hospitalCode = behospitalCode.substring(0, behospitalCode.indexOf("_"));
+                String hospitalNum = behospitalCode.substring(hospitalCode.length() + 1, behospitalCode.length());
 
                 //获取病案首页
                 XyHomePageVo xyHomePageVo = new XyHomePageVo();
@@ -127,27 +178,24 @@ public class ViewFacade {
                 this.getHomePageByView(xyHomePageVo);
             });
         }
-        System.out.println("没有数据--------------------------开始时间--+"+startDate+"--结束时间--"+stopDate);
     }
+
     /**
-     * 根据住院号来拉取历史数据
-     * @param behospitalCode
-     * @param behospitalNum
+     * 获取病人信息
+     *
+     * @param behospitalInfoList
      */
-    public void executeOldDataOne(String behospitalCode,String behospitalNum) {
-        //获取入院登记表中的信息
-        String infoSql="select * from admission_pat_regist where behospitalCode = '"+behospitalCode+"' and behospitalNum = '"+behospitalNum+"'";
-        List<BehospitalInfo> behospitalInfoList=this.getInfo( infoSql);
+    public void a(List<BehospitalInfo> behospitalInfoList) {
         //根据入院登记表的信息来查所需文书
-        if (behospitalInfoList.size()>0){
-            behospitalInfoList.forEach(s->{
+        if (behospitalInfoList.size() > 0) {
+            behospitalInfoList.forEach(s -> {
                 //获取拼接前的behospitalCode和behospitalNum
-                String behospitalCode1=s.getBehospitalCode();
-                String hospitalCode=behospitalCode1.substring(0,behospitalCode1.indexOf("_"));
-                String hospitalNum =behospitalCode1.substring(hospitalCode.length()+1,behospitalCode1.length());
+                String behospitalCode = s.getBehospitalCode();
+                String hospitalCode = behospitalCode.substring(0, behospitalCode.indexOf("_"));
+                String hospitalNum = behospitalCode.substring(hospitalCode.length() + 1, behospitalCode.length());
 
                 //获取文书信息和文书详情信息
-                String  recordSql="select * from record_list where behospitalCode= '"+hospitalCode+"' and behospitalnum= '"+hospitalNum+"'";
+                String recordSql = "select * from record_list where behospitalCode= '" + hospitalCode + "' and behospitalnum= '" + hospitalNum + "'";
                 this.getRecord(recordSql);
 
                 //获取病案首页
@@ -157,39 +205,43 @@ public class ViewFacade {
                 xyHomePageVo.setFileCode(hospitalNum);
                 xyHomePageVo.setDockModeType("0");
                 this.getHomePageByView(xyHomePageVo);
+                //获取病人医嘱
+                String doctorAdviceSql = "select * from doctor_order where behospitalCode= '" + hospitalCode + "' and behospitalnum= '" + hospitalNum + "'";
+                this.getDoctorAdvice(doctorAdviceSql);
             });
         }
-        System.out.println("没有数据--------------------------住院号--+"+behospitalCode+"--住院次数--"+behospitalNum);
     }
 
+
     /**
-     *   从试图获取病案首页(诊断和手术)
+     * 从试图获取病案首页(诊断和手术)
      */
-        public RespDTO<Map<String, Object>> getHomePageByView(XyHomePageVo xyHomePageVo){
-            //保存入参
-            aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页入参", xyHomePageVo.getHomePageId(), xyHomePageVo.getBehospitalCode(), JSON.toJSONString(xyHomePageVo), "");
-            Long modeId=Long.valueOf("6");//病案首页默认为6
-            String behospitalCode=xyHomePageVo.getBehospitalCode()+"_"+xyHomePageVo.getFileCode();
-            //从视图拉取数据
-
-            String homepageSql="select * from homePage where behospitalCode= '"+xyHomePageVo.getBehospitalCode()+"' and behospitalnum= '"+xyHomePageVo.getFileCode()+"'";
-            String diagSql="select * from homePage_diag where behospitalCode= '"+xyHomePageVo.getBehospitalCode()+"' and behospitalnum= '"+xyHomePageVo.getFileCode()+"'";
-            String opsSql="select * from homePage_operation where behospitalCode= '"+xyHomePageVo.getBehospitalCode()+"' and behospitalnum= '"+xyHomePageVo.getFileCode()+"'";
-
-            this.getHomePage(homepageSql);
-            this.getHomeDiagnose(diagSql);
-            this.getHomeOperation(opsSql);
-
-
-            //根据传过来的方案编码来判断是否返回评分(1:返回评分,其他只保存数据)
-            if (xyHomePageVo.getDockModeType().equals("1")){
-                String url=readProperties.getProcessQcUrl()+"?behospitalCode="+behospitalCode+"&hospitalId="+xyHomePageVo.getHospitalId()+"&modeId="+modeId;
-                Map<String,Object> map=new HashMap<String,Object>();
-                map.put("url",url);
-                return RespDTO.onSuc(map);
-            }
-            return RespDTO.onSuc(true);
+    public RespDTO<Map<String, Object>> getHomePageByView(XyHomePageVo xyHomePageVo) {
+        //保存入参
+        aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页入参", xyHomePageVo.getHomePageId(), xyHomePageVo.getBehospitalCode(), JSON.toJSONString(xyHomePageVo), "");
+        Long modeId = Long.valueOf("6");//病案首页默认为6
+        String behospitalCode = xyHomePageVo.getBehospitalCode() + "_" + xyHomePageVo.getFileCode();
+        //从视图拉取数据
+
+        String homepageSql = "select * from homePage where behospitalCode= '" + xyHomePageVo.getBehospitalCode() + "' and behospitalnum= '" + xyHomePageVo.getFileCode() + "'";
+        String diagSql = "select * from homePage_diag where behospitalCode= '" + xyHomePageVo.getBehospitalCode() + "' and behospitalnum= '" + xyHomePageVo.getFileCode() + "'";
+        String opsSql = "select * from homePage_operation where behospitalCode= '" + xyHomePageVo.getBehospitalCode() + "' and behospitalnum= '" + xyHomePageVo.getFileCode() + "'";
+
+        this.getHomePage(homepageSql);
+        this.getHomeDiagnose(diagSql);
+        this.getHomeOperation(opsSql);
+
+
+        //根据传过来的方案编码来判断是否返回评分(1:返回评分,其他只保存数据)
+        if (xyHomePageVo.getDockModeType().equals("1")) {
+            String url = readProperties.getProcessQcUrl() + "?behospitalCode=" + behospitalCode + "&hospitalId=" + xyHomePageVo.getHospitalId() + "&modeId=" + modeId;
+            Map<String, Object> map = new HashMap<String, Object>();
+            map.put("url", url);
+            return RespDTO.onSuc(map);
         }
+        return RespDTO.onSuc(true);
+    }
+
     /**
      * 从视图获取科室信息
      *
@@ -280,6 +332,11 @@ public class ViewFacade {
         try {
             lisInfos = tzDBConn.getLisInfo(sql);
             aMedLisInfoFacade.execute(lisInfos);
+            if (lisInfos.size()>0){
+                lisInfos.forEach(lis->{
+                    this.getLisResult(lis.getRepNo());
+                });
+            }
             aMedAbnormalInfoFacade.saveAbnormalInfo("从试图拉取化验信息正常", "", sql, JSON.toJSONString(lisInfos), "");
         } catch (Exception e) {
             aMedAbnormalInfoFacade.saveAbnormalInfo("从试图拉取化验信息错误", "", sql, JSON.toJSONString(lisInfos), e.getMessage());
@@ -290,10 +347,11 @@ public class ViewFacade {
     /**
      * 从视图获取化验结果信息
      *
-     * @param sql
+     * @param repNo
      */
-    public void getLisResult(String sql) {
+    public void getLisResult(String repNo) {
         List<MedLisResult> lisResults = new ArrayList<>();
+        String sql="select * from ASSAY_DETAILS where repNo='"+repNo+"'";
         try {
             lisResults = tzDBConn.getLisResult(sql);
             aMedLisResultFacade.execute(lisResults);
@@ -313,6 +371,11 @@ public class ViewFacade {
         try {
             pacsInfos = tzDBConn.getPacsInfo(sql);
             aMedPacsInfoFacade.execute(pacsInfos);
+            if (pacsInfos.size()>0){
+                pacsInfos.forEach(pacs->{
+                    this.getPacsResult(pacs.getRepNo());
+                });
+            }
             aMedAbnormalInfoFacade.saveAbnormalInfo("从试图拉取检查信息正常", "", sql, JSON.toJSONString(pacsInfos), "");
         } catch (Exception e) {
             aMedAbnormalInfoFacade.saveAbnormalInfo("从试图拉取检查信息错误", "", sql, JSON.toJSONString(pacsInfos), e.getMessage());
@@ -322,10 +385,11 @@ public class ViewFacade {
     /**
      * 从视图获取检查结果信息
      *
-     * @param sql
+     * @param repNo
      */
-    public void getPacsResult(String sql) {
+    public void getPacsResult(String repNo) {
         List<MedPacsResult> pacsResults = new ArrayList<>();
+        String sql="select * from CHECK_DETAILS where repNo='"+repNo+"'";
         try {
             pacsResults = tzDBConn.getPacsResult(sql);
             aMedPacsResultFacade.execute(pacsResults);
@@ -361,13 +425,13 @@ public class ViewFacade {
         List<MedicalRecord> medicalRecordList = new ArrayList<>();
         try {
             medicalRecordList = tzDBConn.getMedicalRecord(sql);
-            if (medicalRecordList.size()>0){
-                medicalRecordList.forEach(s->{
+            if (medicalRecordList.size() > 0) {
+                medicalRecordList.forEach(s -> {
                     //获取文书详情
-                    String recId=s.getRecId();
+                    String recId = s.getRecId();
                     //截取rec_id後面的_次數跟接口相對潁上
                     int inedx = s.getRecId().lastIndexOf("_");
-                    s.setRecId(s.getRecId().substring(0,inedx));
+                    s.setRecId(s.getRecId().substring(0, inedx));
                     this.getRecordContent(recId);
                 });
             }
@@ -386,7 +450,12 @@ public class ViewFacade {
     public void getRecordContent(String recId) {
         List<MedicalRecordContent> medicalRecordContentList = new ArrayList<>();
         try {
-            String html=this.getHtml(recId);
+            String html = this.getHtml(recId);
+            if (StringUtils.isBlank(html) || html.equals("<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" +
+                    "<string xmlns=\"http://www.healthcare.supcon.com/wsmeddoc/\" />")) {
+                aMedAbnormalInfoFacade.saveAbnormalInfo("从webService获取文书详情信息为空", "", recId, JSON.toJSONString(html), "");
+                return;
+            }
             MedicalRecordContent medicalRecordContent = new MedicalRecordContent();
             medicalRecordContent.setRecId(recId);
             medicalRecordContent.setHospitalId(Long.valueOf("35"));
@@ -395,7 +464,7 @@ public class ViewFacade {
             medicalRecordContent.setXmlText(html);
             //截取rec_id後面的_次數跟接口相對潁上
             int inedx = medicalRecordContent.getRecId().lastIndexOf("_");
-            medicalRecordContent.setRecId(medicalRecordContent.getRecId().substring(0,inedx));
+            medicalRecordContent.setRecId(medicalRecordContent.getRecId().substring(0, inedx));
             medicalRecordContentList.add(medicalRecordContent);
 
             aMedicalRecordContentFacade.execute(medicalRecordContentList);
@@ -407,46 +476,96 @@ public class ViewFacade {
     }
 
 
-    public String getHtml(String recId){
-        String url ="http://132.147.254.142:8093/DocService.asmx/GetDocsHTML";
+    public String getHtml(String recId) {
+        String url = "http://132.147.254.142:8093/DocService.asmx/GetDocsHTML";
         try {
             PostMethod postMethod = null;
             postMethod = new PostMethod(url);
-            postMethod.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
-            NameValuePair[] data ={
+            postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+            NameValuePair[] data = {
 //                    new NameValuePair("startTime",""),
-                    new NameValuePair("szDocIDs",recId)
+                    new NameValuePair("szDocIDs", recId)
             };
             postMethod.setRequestBody(data);
-            org.apache.commons.httpclient.HttpClient httpClient=new org.apache.commons.httpclient.HttpClient();
-            int response =httpClient.executeMethod(postMethod);
-            String result =postMethod.getResponseBodyAsString();
-            String html=this.decode(result);
+            org.apache.commons.httpclient.HttpClient httpClient = new org.apache.commons.httpclient.HttpClient();
+            int response = httpClient.executeMethod(postMethod);
+            String result = postMethod.getResponseBodyAsString();
+            String html = this.decode(result);
             return html;
-        }catch (Exception e){
+        } catch (Exception e) {
 //            System.out.println("请求异常"+e.getMessage());
             throw new RuntimeException(e.getMessage());
-        }finally {
+        } finally {
 
         }
     }
+
     /**
      * 数值行代码转换成中文
+     *
      * @param result
      * @return
      */
-    public String  decode(String result){
-        String html=StringEscapeUtils.unescapeXml(result);
-        String[] tmp =html.split("&#|&#|;");
+    public String decode(String result) {
+        String html = StringEscapeUtils.unescapeXml(result);
+        String[] tmp = html.split("&#|&#|;");
         StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < tmp.length ; i++) {
-            if (tmp[i].matches("\\d{5}")){
+        for (int i = 0; i < tmp.length; i++) {
+            if (tmp[i].matches("\\d{5}")) {
                 sb.append((char) Integer.parseInt(tmp[i]));
-            }else {
+            } else {
                 sb.append(tmp[i]);
             }
         }
         return sb.toString();
     }
 
+    /**
+     * 查看30天前的病人住院登记信息
+     */
+    public void execute(String date) {
+        LocalDateTime now = LocalDateTime.now();
+        now = now.minus(Integer.parseInt(date), ChronoUnit.DAYS);
+        List<BehospitalInfo> list = aBehospitalInfoFacade.list(new QueryWrapper<BehospitalInfo>()
+                .le("leave_hospital_date", DateUtil.now())
+                .ge("leave_hospital_date", now));
+        if (list.size() > 0) {
+            list.forEach(behospitalInfo -> {
+                this.IfCoincide(behospitalInfo.getBehospitalCode());
+            });
+        }
+    }
+
+    /**
+     * 判断文书量跟视图是否一致
+     *
+     * @param code
+     */
+    public void IfCoincide(String code) {
+        try {
+            Integer myCount = 0;
+            myCount = aMedicalRecordFacade.count(new QueryWrapper<MedicalRecord>()
+                    .eq("behospital_code", code)
+                    .eq("hospital_id", Long.valueOf("35"))
+                    .eq("is_deleted", IsDeleteEnum.N.getKey()));
+            String hospitalCode = code.substring(0, code.indexOf("_"));
+            String hospitalNum = code.substring(hospitalCode.length() + 1, code.length());
+            String sql = "select count(*) as count from record_list where behospitalCode= '" + hospitalCode + "' and behospitalnum= '" + hospitalNum + "'";
+            Integer count = tzDBConn.getCount(sql);
+            if (count != 0) {
+                if (count != myCount) {
+                    aMedicalRecordFacade.remove(new QueryWrapper<MedicalRecord>()
+                            .eq("behospital_code", code)
+                            .eq("hospital_id", Long.valueOf("35")));
+                    this.executeOldDataOne(hospitalCode, hospitalNum);
+                    aMedAbnormalInfoFacade.saveAbnormalInfo("补传数据成功", code, "视图文书数量为" + count, "本地数量为" + myCount, "");
+                }
+            }
+        } catch (Exception e) {
+            aMedAbnormalInfoFacade.saveAbnormalInfo("补传数据失败", code, "", e.getMessage(), "");
+
+        }
+
+    }
+
 }

+ 6 - 2
src/main/java/com/diagbot/facade/data/ABehospitalInfoFacade.java

@@ -128,10 +128,14 @@ public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
         List<BehospitalInfo> addE = Lists.newLinkedList();
         List<BehospitalInfo> updateE = Lists.newLinkedList();
         behospitalInfoList.stream().forEach(s -> {
+            s.setIsDeleted("N");
+            if (null != s.getLeaveHospitalDate()){
+                s.setIsPlacefile("1");
+            }
             BehospitalInfo behospitalInfo = this.getOne(new QueryWrapper<BehospitalInfo>()
                     .eq("behospital_code", s.getBehospitalCode())
-                    .eq("hospital_id", s.getHospitalId())
-                    .eq("is_deleted",IsDeleteEnum.N), false);
+                    .eq("hospital_id", s.getHospitalId()));
+//                    .eq("is_deleted",IsDeleteEnum.N), false);
             if (behospitalInfo != null) {
                 s.setGmtModified(new Date());
                 s.setQcTypeId(initQcTypeId(s));

+ 18 - 9
src/main/java/com/diagbot/facade/data/AMedLisInfoFacade.java

@@ -75,16 +75,25 @@ public class AMedLisInfoFacade extends MedLisInfoServiceImpl {
         List<MedLisInfo> updateE = Lists.newLinkedList();
         if (medLisInfoList != null && medLisInfoList.size() > 0) {
             medLisInfoList.stream().forEach(s -> {
-                MedLisInfo medLisInfo = this.getOne(new QueryWrapper<MedLisInfo>()
-                        .eq("rep_no", s.getRepNo())
-                        .eq("hospital_id", s.getHospitalId()), false);
-                if (medLisInfo != null) {
-                    s.setGmtModified(new Date());
-                    updateE.add(s);
-                } else {
-                    s.setGmtCreate(new Date());
-                    addE.add(s);
+                try{
+                    MedLisInfo medLisInfo = this.getOne(new QueryWrapper<MedLisInfo>()
+                            .eq("rep_no", s.getRepNo())
+                            .eq("hospital_id", s.getHospitalId()), false);
+                    if (medLisInfo != null) {
+                        s.setGmtModified(new Date());
+                        UpdateWrapper<MedLisInfo> updateWrapper=new UpdateWrapper<>();
+                        updateWrapper.eq("rep_no", s.getRepNo())
+                                .eq("hospital_id", s.getHospitalId())
+                                .eq("is_deleted", IsDeleteEnum.N);
+                        this.update(s,updateWrapper);
+                    } else {
+                        s.setGmtCreate(new Date());
+                        this.save(s);
+                    }
+                }catch (Exception e){
+                    aMedAbnormalInfoFacade.saveAbnormalInfo("检验信息-异常",s.getBehospitalCode(), JSON.toJSONString(s),"",e.getMessage());
                 }
+
             });
         }
         if(addE.size()>0){

+ 51 - 42
src/main/java/com/diagbot/facade/data/AMedPacsInfoFacade.java

@@ -34,90 +34,99 @@ public class AMedPacsInfoFacade extends MedPacsInfoServiceImpl {
     @Value("${log_switch.enable}")
     private boolean logSwitch;
 
-    
+
     public RespDTO dealData(List<AMedPacsInfoVO> list) {
         try {
-            if(list!=null && list.size()>0){
+            if (list != null && list.size() > 0) {
                 //循环验证数据有效性
-                for (AMedPacsInfoVO aMedPacsInfoVO:list) {
-                    if(StringUtil.isEmpty(aMedPacsInfoVO.getRepNo())){
+                for (AMedPacsInfoVO aMedPacsInfoVO : list) {
+                    if (StringUtil.isEmpty(aMedPacsInfoVO.getRepNo())) {
                         return RespDTO.onError("请输入报告单号!");
-                    }else if(aMedPacsInfoVO.getHospitalId()==null){
+                    } else if (aMedPacsInfoVO.getHospitalId() == null) {
                         return RespDTO.onError("请输入医院编码!");
-                    }else if(StringUtil.isEmpty(aMedPacsInfoVO.getBehospitalCode())) {
+                    } else if (StringUtil.isEmpty(aMedPacsInfoVO.getBehospitalCode())) {
                         return RespDTO.onError("请输入病人住院编码!");
                     }
                 }
 
-                List<MedPacsInfo> medPacsInfoList=Lists.newArrayList();
-                list.stream().forEach(s->{
-                    MedPacsInfo medPacsInfo=new MedPacsInfo();
-                    BeanUtil.copyProperties(s,medPacsInfo);
+                List<MedPacsInfo> medPacsInfoList = Lists.newArrayList();
+                list.stream().forEach(s -> {
+                    MedPacsInfo medPacsInfo = new MedPacsInfo();
+                    BeanUtil.copyProperties(s, medPacsInfo);
                     medPacsInfoList.add(medPacsInfo);
                 });
                 execute(medPacsInfoList);
 
-                if(logSwitch){
-                    medPacsInfoList.forEach(s->{
-                        aMedAbnormalInfoFacade.saveAbnormalInfo("检查信息-正常","", JSON.toJSONString(list),"","");
+                if (logSwitch) {
+                    medPacsInfoList.forEach(s -> {
+                        aMedAbnormalInfoFacade.saveAbnormalInfo("检查信息-正常", "", JSON.toJSONString(list), "", "");
                     });
                 }
                 return RespDTO.onSuc("操作正常!");
-            }else{
+            } else {
                 return RespDTO.onError("未接收到数据!");
             }
-        }catch (Exception e){
-            aMedAbnormalInfoFacade.saveAbnormalInfo("检查信息-异常","",JSON.toJSONString(list),"",e.getMessage());
+        } catch (Exception e) {
+            aMedAbnormalInfoFacade.saveAbnormalInfo("检查信息-异常", "", JSON.toJSONString(list), "", e.getMessage());
             return RespDTO.onError(e.getMessage());
         }
     }
-    
-    public void execute(List<MedPacsInfo> medPacsInfoList){
+
+    public void execute(List<MedPacsInfo> medPacsInfoList) {
         List<MedPacsInfo> addE = Lists.newLinkedList();
         List<MedPacsInfo> updateE = Lists.newLinkedList();
         if (medPacsInfoList != null && medPacsInfoList.size() > 0) {
             medPacsInfoList.stream().forEach(s -> {
-                MedPacsInfo medPacsInfo = this.getOne(new QueryWrapper<MedPacsInfo>()
-                        .eq("rep_no", s.getRepNo())
-                        .eq("hospital_id", s.getHospitalId()), false);
-                if (medPacsInfo != null) {
-                    s.setGmtModified(new Date());
-                    updateE.add(s);
-                } else {
-                    s.setGmtCreate(new Date());
-                    addE.add(s);
+                try {
+                    MedPacsInfo medPacsInfo = this.getOne(new QueryWrapper<MedPacsInfo>()
+                            .eq("rep_no", s.getRepNo())
+                            .eq("hospital_id", s.getHospitalId()), false);
+                    if (medPacsInfo != null) {
+                        UpdateWrapper<MedPacsInfo> updateWrapper = new UpdateWrapper<>();
+                        updateWrapper.eq("rep_no", s.getRepNo())
+                                .eq("hospital_id", s.getHospitalId())
+                                .eq("is_deleted", IsDeleteEnum.N);
+                        s.setGmtModified(new Date());
+                        this.update(s, updateWrapper);
+                    } else {
+                        s.setGmtCreate(new Date());
+                        this.save(s);
+                    }
+                } catch (Exception e) {
+                    aMedAbnormalInfoFacade.saveAbnormalInfo("检查信息-异常",s.getBehospitalCode(), JSON.toJSONString(s),"",e.getMessage());
+
                 }
             });
         }
-        if(addE.size()>0){
-            medPacsInfoServiceImpl.saveBatch(addE);
-        }
-        if(updateE.size()>0){
-            this.baseMapper.updateBatchByKey(updateE);
-        }
+//        if(addE.size()>0){
+//            medPacsInfoServiceImpl.saveBatch(addE);
+//        }
+//        if(updateE.size()>0){
+//            this.baseMapper.updateBatchByKey(updateE);
+//        }
     }
 
-    public RespDTO deleteFlag(ADeleteFlagVO aDeleteFlagVO){
+    public RespDTO deleteFlag(ADeleteFlagVO aDeleteFlagVO) {
         try {
             //验证数据是否存在
-            if(StringUtil.isEmpty(aDeleteFlagVO.getRepNo())){
+            if (StringUtil.isEmpty(aDeleteFlagVO.getRepNo())) {
                 return RespDTO.onError("请输入报告单号!");
-            }else if(aDeleteFlagVO.getHospitalId()==null){
+            } else if (aDeleteFlagVO.getHospitalId() == null) {
                 return RespDTO.onError("请输入医院编码!");
-            }else {
-                UpdateWrapper<MedPacsInfo> updateWrapper=new UpdateWrapper<>();
+            } else {
+                UpdateWrapper<MedPacsInfo> updateWrapper = new UpdateWrapper<>();
                 updateWrapper.eq("rep_no", aDeleteFlagVO.getRepNo())
                         .eq("hospital_id", aDeleteFlagVO.getHospitalId())
                         .eq("is_deleted", IsDeleteEnum.N)
-                        .set("is_deleted",IsDeleteEnum.Y)
+                        .set("is_deleted", IsDeleteEnum.Y)
                         .set("gmt_modified", DateUtil.now());
 
-                Boolean flag=update(new MedPacsInfo(),updateWrapper);
+                Boolean flag = update(new MedPacsInfo(), updateWrapper);
                 //aMedAbnormalInfoFacade.saveAbnormalInfo("检查-删除",JSON.toJSONString(aDeleteFlagVO),JSON.toJSONString(RespDTO.onSuc(flag)),"操作成功!");
                 return RespDTO.onSuc(flag);
             }
-        }catch (Exception e){
-            aMedAbnormalInfoFacade.saveAbnormalInfo("检查信息-删除异常",aDeleteFlagVO.getRecId(), JSON.toJSONString(aDeleteFlagVO),"",e.getMessage());
+        } catch (Exception e) {
+            aMedAbnormalInfoFacade.saveAbnormalInfo("检查信息-删除异常", aDeleteFlagVO.getRecId(), JSON.toJSONString(aDeleteFlagVO), "", e.getMessage());
             return RespDTO.onError(e.getMessage());
         }
     }

+ 17 - 9
src/main/java/com/diagbot/facade/data/AMedPacsResultFacade.java

@@ -89,15 +89,23 @@ public class AMedPacsResultFacade extends MedPacsResultServiceImpl {
         List<MedPacsResult> updateE = Lists.newLinkedList();
         if (medPacsResultList != null && medPacsResultList.size() > 0) {
             medPacsResultList.stream().forEach(s -> {
-                MedPacsResult medPacsResult = this.getOne(new QueryWrapper<MedPacsResult>()
-                        .eq("rep_no", s.getRepNo())
-                        .eq("hospital_id", s.getHospitalId()), false);
-                if (medPacsResult != null) {
-                    s.setGmtModified(new Date());
-                    updateE.add(s);
-                } else {
-                    s.setGmtCreate(new Date());
-                    addE.add(s);
+                try {
+                    MedPacsResult medPacsResult = this.getOne(new QueryWrapper<MedPacsResult>()
+                            .eq("rep_no", s.getRepNo())
+                            .eq("hospital_id", s.getHospitalId()), false);
+                    if (medPacsResult != null) {
+                        s.setGmtModified(new Date());
+                        UpdateWrapper<MedPacsResult> updateWrapper = new UpdateWrapper<>();
+                        updateWrapper.eq("rep_no", s.getRepNo())
+                                .eq("hospital_id", s.getHospitalId())
+                                .eq("is_deleted", IsDeleteEnum.N);
+                        this.update(s, updateWrapper);
+                    } else {
+                        s.setGmtCreate(new Date());
+                        this.save(s);
+                    }
+                }catch (Exception e){
+                    aMedAbnormalInfoFacade.saveAbnormalInfo("检查结果信息-异常",s.getBehospitalCode(), JSON.toJSONString(s),"",e.getMessage());
                 }
             });
         }

+ 9 - 0
src/main/java/com/diagbot/facade/data/AMedicalRecordFacade.java

@@ -65,6 +65,8 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
 
     @Autowired
     private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
+    @Autowired
+    private ViewFacade viewFacade;
 
     @Value("${encrypt.enable}")
     Boolean encryptFlag;
@@ -410,6 +412,13 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
                             Long qcTypeId = initQcTypeId(behospitalInfo);
                             behospitalInfo.setQcTypeId(qcTypeId);
                             behospitalInfoList.add(behospitalInfo);
+                        }else {
+                            //如果不存在则取视图上查询并添加
+                            String code =s.getBehospitalCode();
+                            String hospitalCode = code.substring(0, code.indexOf("_"));
+                            String hospitalNum = code.substring(hospitalCode.length() + 1, code.length());
+                            String infoSql = "select * from admission_pat_regist where behospitalCode = '" + hospitalCode + "' and behospitalNum = '" + hospitalNum + "'";
+                            viewFacade.getInfo(infoSql);
                         }
                     }
                     s.setModeId(modeId);

+ 72 - 0
src/main/java/com/diagbot/task/ViewOldTask.java

@@ -0,0 +1,72 @@
+package com.diagbot.task;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.entity.SysTaskCron;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.facade.SysTaskCronFacade;
+import com.diagbot.facade.ViewFacade;
+import com.diagbot.facade.data.ABasDeptInfoFacade;
+import com.diagbot.util.StringUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.Trigger;
+import org.springframework.scheduling.TriggerContext;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.SchedulingConfigurer;
+import org.springframework.scheduling.config.ScheduledTaskRegistrar;
+import org.springframework.scheduling.support.CronTrigger;
+
+import java.time.LocalDateTime;
+import java.util.Date;
+
+@Configuration      //1.主要用于标记配置类,兼备Component的效果。
+@EnableScheduling   // 2.开启定时任务
+@Slf4j
+public class ViewOldTask implements SchedulingConfigurer{
+
+	@Autowired
+    private SysTaskCronFacade sysTaskCronFacade;
+
+    private SysTaskCron taskDate = new SysTaskCron();
+
+    @Autowired
+	private ABasDeptInfoFacade aBasDeptInfoFacade;
+
+    @Autowired
+    private ViewFacade viewFacade;
+
+    /**
+     * 执行定时任务.
+     */
+    @Override
+    public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
+        taskRegistrar.addTriggerTask(new Runnable() {
+            @Override
+            public void run() {
+                //1.添加任务内容(Runnable)
+                if (null != taskDate
+                        && taskDate.getIsDeleted().equals(IsDeleteEnum.N.getKey())
+                        && taskDate.getIsUsed().equals(1)) {
+                    log.info("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
+                    System.out.println("aaaaaaaaaaaaaaaaaaaaaaaa");
+                    viewFacade.execute(taskDate.getParam());
+                }
+            }
+        }, new Trigger() {
+            @Override
+            public Date nextExecutionTime(TriggerContext triggerContext) {
+                //2.1 从数据库获取执行周期
+                taskDate = sysTaskCronFacade.getOne(new QueryWrapper<SysTaskCron>()
+                        .eq("cron_code", "ViewOldTASK"), false);
+                String cron = "0 0 23 * * ? ";
+                //2.2 合法性校验.
+                if (null != taskDate && StringUtil.isNotBlank(taskDate.getCron())) {
+                    cron = taskDate.getCron();
+                }
+                CronTrigger trigger = new CronTrigger(cron);
+                return trigger.nextExecutionTime(triggerContext);
+            }
+        });
+    }
+}

+ 27 - 10
src/main/java/com/diagbot/util/TZDBConn.java

@@ -135,7 +135,25 @@ public class TZDBConn {
 		}
 		return basDeptInfoList;
 	}
-
+	/**
+	 * 从视图中获取医院科室数据,根据修改时间同步数据
+	 * @return
+	 */
+	public Integer getCount(String sql) {
+		Integer count =0;
+		try {
+			TZDBConn dbconn=new TZDBConn();
+			ResultSet rs =dbconn.Query(sql, null);
+			while(rs.next()){
+				count=rs.getInt("count");
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}finally {
+			close();
+		}
+		return count;
+	}
 
 	/**
 	 * 病案诊断
@@ -195,7 +213,7 @@ public class TZDBConn {
 				homeOperationVO.setOperationLevel(rs.getString("operationLevel"));//手术级别
 				homeOperationVO.setAnaesthesiaName(rs.getString("anaesthesiaName"));//麻醉方式
 				homeOperationVO.setShamOperationName(rs.getString("shamOperationName"));//拟手术名称
-				homeOperationVO.setAnaesthesiaDoctor("anaesthesiaDoctor");//麻醉医师
+				homeOperationVO.setAnaesthesiaDoctor(rs.getString("anaesthesiaDoctor"));//麻醉医师
 				homeOperationVOList.add(homeOperationVO);
 			}
 		} catch (Exception e) {
@@ -385,7 +403,7 @@ public class TZDBConn {
 				DoctorAdvice doctorAdviceVO=new DoctorAdvice();
 				doctorAdviceVO.setDoctorAdviceId(rs.getString("doctorAdviceId"));//病人医嘱ID
 				doctorAdviceVO.setHospitalId(HOSPITAL_ID);//医院ID
-				doctorAdviceVO.setBehospitalCode(rs.getString("behospitalCode"));//病人ID
+				doctorAdviceVO.setBehospitalCode(rs.getString("behospitalCode")+"_"+rs.getString("behospitalNum"));//病人ID
 				doctorAdviceVO.setOrderDoctorName(rs.getString("orderDoctorName"));//医生开单判别
 				doctorAdviceVO.setFrequency(rs.getString("frequency"));//医嘱频率判别
 				doctorAdviceVO.setParentTypeId(rs.getString("parentTypeId"));//父类医嘱ID
@@ -434,7 +452,7 @@ public class TZDBConn {
 				MedLisInfo medLisInfo=new MedLisInfo();
 				medLisInfo.setRepNo(rs.getString("repNo"));//报告单号
 				medLisInfo.setHospitalId(HOSPITAL_ID+"");//医院ID
-				medLisInfo.setBehospitalCode(rs.getString("behospitalCode"));//住院病人ID
+				medLisInfo.setBehospitalCode(rs.getString("behospitalCode")+"_"+rs.getString("behospitalNum"));//住院病人ID
 				medLisInfo.setRepName(rs.getString("repName"));//报告名称
 				medLisInfo.setRepType(rs.getString("repType"));//报告类型代码
 				medLisInfo.setRepTypeName(rs.getString("repTypeName"));//检查类型名称
@@ -470,7 +488,7 @@ public class TZDBConn {
 				MedLisResult medLisResult=new MedLisResult();
 				medLisResult.setRepNo(rs.getString("repNo"));//报告单号
 				medLisResult.setHospitalId(HOSPITAL_ID);//医院ID
-				medLisResult.setBehospitalCode(rs.getString("behospitalCode"));//住院病人ID
+				medLisResult.setBehospitalCode(rs.getString("behospitalCode")+"_"+rs.getString("behospitalNum"));//住院病人ID
 				medLisResult.setItemCode(rs.getString("itemCode"));//报告代码
 				medLisResult.setItemName(rs.getString("itemName"));//报告名称
 				medLisResult.setResult(rs.getString("result"));//检验结果
@@ -505,7 +523,7 @@ public class TZDBConn {
 				MedPacsInfo medPacsInfo=new MedPacsInfo();
 				medPacsInfo.setRepNo(rs.getString("repNo"));//报告单号
 				medPacsInfo.setHospitalId(HOSPITAL_ID+"");//医院ID
-				medPacsInfo.setBehospitalCode(rs.getString("behospitalCode"));//住院病人ID
+				medPacsInfo.setBehospitalCode(rs.getString("behospitalCode")+"_"+rs.getString("behospitalNum"));//住院病人ID
 				medPacsInfo.setRepName(rs.getString("repName"));//报告名称
 				medPacsInfo.setRepType(rs.getString("repType"));//报告类型代码
 				medPacsInfo.setRepTypeName(rs.getString("repTypeName"));//检查类型名称
@@ -540,15 +558,14 @@ public class TZDBConn {
 				MedPacsResult medPacsResult=new MedPacsResult();
 				medPacsResult.setRepNo(rs.getString("repNo"));//报告单号
 				medPacsResult.setHospitalId(HOSPITAL_ID);
-				medPacsResult.setBehospitalCode(rs.getString("behospitalCode"));//住院病人ID
-				medPacsResult.setReptName(rs.getString("reptName"));//报告名称
+				medPacsResult.setBehospitalCode(rs.getString("behospitalCode")+"_"+rs.getString("behospitalNum"));//住院病人ID
+				medPacsResult.setReptName(rs.getString("repName"));//报告名称
 				medPacsResult.setPart(rs.getString("part"));//检查部位
 				medPacsResult.setClinicSight(rs.getString("clinicSight"));//检查所见
 				medPacsResult.setReptDiag(rs.getString("reptDiag"));//检查结果(诊断)
-				medPacsResult.setRemark(rs.getString("remark"));//观察记录
 				medPacsResult.setClinicDiag(rs.getString("clinicDiag"));//临床诊断
 				medPacsResult.setApplyDoctor(rs.getString("applyDoctor"));//申请医生
-				medPacsResult.setCheckerDoctor(rs.getString("checkerDoctor"));//审核医生
+				medPacsResult.setCheckerDoctor(rs.getString("checker"));//审核医生
 				medPacsResult.setReportDoctor(rs.getString("reportDoctor"));//报告医生
 				medPacsResult.setDeptName(rs.getString("deptName"));//科室名称
 

+ 12 - 3
src/main/java/com/diagbot/web/DataController.java

@@ -226,7 +226,7 @@ public class DataController {
         }
         return RespDTO.onSuc(b);
     }
-    @ApiOperation(value = "数据引擎-历史数据拉取(时间)")
+    @ApiOperation(value = "数据引擎-历史数据拉取(入院时间)")
     @PostMapping("/sendDataOld")
     @SysLogger("sendDataOld")
     public void sendDataOld(String startDate,String stopDate){
@@ -241,11 +241,20 @@ public class DataController {
         viewFacade.executeOldDataOne(behospitalCode,behospitalNum);
     }
 
-    @ApiOperation(value = "数据引擎-定时拉去前一天历史数据")
+    @ApiOperation(value = "数据引擎-历史数据拉取(出院时间)")
+    @PostMapping("/sendDateOld")
+    @SysLogger("sendDateOld")
+    public void sendDateOld(String startDate,String stopDate){
+        viewFacade.executeData(startDate,stopDate);
+    }
+
+
+
+    @ApiOperation(value = "测试")
     @PostMapping("/sendOldData")
     @SysLogger("sendOldData")
     public void sendOldData(){
-        viewFacade.executeOldData();
+        viewFacade.executeHome();
     }
 
     /*

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -2,7 +2,7 @@ spring:
   application:
     name: mrqc-sys
   profiles:
-    active: test
+    active: local
   main:
     allow-bean-definition-overriding: true
 

+ 7 - 1
src/main/resources/jdbc.properties

@@ -9,6 +9,12 @@ jdbc.url=jdbc:oracle:thin:@132.147.254.159:1521/dbserver
 jdbc.username=langtong
 jdbc.password=langtong
 
+
+#jdbc.driverClassName=oracle.jdbc.OracleDriver
+#jdbc.url=jdbc:oracle:thin:@132.147.254.166:1521/his166
+#jdbc.username=langtong
+#jdbc.password=langtong
+
 #jdbc.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
 #jdbc.url=jdbc:sqlserver://192.168.100.39\\tzmhemr;DatabaseName=bigemr
 #jdbc.username=zjlt
@@ -18,7 +24,7 @@ jdbc.password=langtong
 remote.address.ver=http://192.18.101.207:2030/index.html
 remote.address.hor=http://192.18.101.207:2030/indexHorizontal.html
 
-process.qc.url=http://192.168.100.157:1489/index.html
+process.qc.url=http://132.147.253.31:1489/index.html
 
 #his\u65b9\u60a3\u8005\u63a5\u53e3\u5730\u5740
 his.patient.url=

+ 3 - 0
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -5700,6 +5700,9 @@
                 <if test="item.modifier != null">
                     modifier = #{item.modifier},
                 </if>
+                <if test="item.isDeleted != null">
+                    is_deleted= #{item.isDeleted},
+                </if>
             </set>
             where behospital_code = #{item.behospitalCode} and hospital_id = #{item.hospitalId}
         </foreach>