Explorar o código

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

yeshijie %!s(int64=3) %!d(string=hai) anos
pai
achega
8f97404c2a

+ 115 - 0
business/es-service/src/main/java/com/yihu/jw/es/service/yqfk/YqfkService.java

@ -0,0 +1,115 @@
package com.yihu.jw.es.service.yqfk;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
 *
 * 卫建局疫情防控
 *
 * Created by wangzhinan on 2020/08/21
 */
@Service
public class YqfkService {
    private Logger logger = LoggerFactory.getLogger(YqfkService.class);
    @Autowired
    private JdbcTemplate jdbcTemplate;
    /**
     * 疫情防控头部总数统计
     * @param startTime
     * @param endTime
     * @return
     */
    public JSONObject yqfkStatisticsHead(String startTime,String endTime){
        JSONObject object = new JSONObject();
        String sql = "select COUNT(1) as confirmedTotal from MID_CDC_CASE_INFO where ";
        object.put("confirmed","");//现有确诊
        object.put("newHome","");//新增本土
        object.put("newAsymptomatic","");//新增无症状;
        object.put("confirmedTotal","");//累计确诊
        object.put("cureTotal","");//累计治愈
        object.put("deathTotal","");//累计死亡
        return object;
    }
    public JSONObject yqfkStatisticsTail(String startTime,String endTime){
        JSONObject object = new JSONObject();
        JSONObject MjObject = new JSONObject();//在厦密接
        MjObject.put("zyTotal","");//正转运
        MjObject.put("jdTotal","");//在酒店/已采核酸
        MjObject.put("dlsTotal","");//待落实
        MjObject.put("total","");//总计
        JSONObject CmObject = new JSONObject();//在厦次密
        CmObject.put("zyTotal","");//正转运
        CmObject.put("jdTotal","");//在酒店/已采核酸
        CmObject.put("dlsTotal","");//待落实
        CmObject.put("total","");//总计
        JSONObject ybObject = new JSONObject();//在厦一般接触者
        ybObject.put("zyTotal","");//正转运
        ybObject.put("jdTotal","");//在酒店/已采核酸
        ybObject.put("dlsTotal","");//待落实
        ybObject.put("total","");//总计
        object.put("MjObject",MjObject);
        object.put("CmObject", CmObject);
        object.put("ybObject",ybObject);
        return object;
    }
    public  List<Map<String, Object>> confirmedList(){
        String confirmedListSql = "select PATIENT_ID as \"patientId\",PATIENT_NAME as \"patientName\",PATIENT_SEX as \"patientSex\",PATIENT_AGE as \"patientAge\",DIAG_TIME as \"diagTime\" from MID_CDC_CASE_INFO ";
        List<Map<String, Object>> confirmedList = jdbcTemplate.queryForList(confirmedListSql);
        if (confirmedList!=null&&confirmedList.size()!=0){
            for (Map<String,Object> map:confirmedList){
                String patientId = map.get("patientId").toString();
                //密接人数计算
                String mjTotalSql = "select count(1) as total from MID_CDC_CCC_INFO where PATIENT_ID='"+patientId+"'";
                List<Map<String, Object>> mjList = jdbcTemplate.queryForList(mjTotalSql);
                Integer mjTotal = 0;//密接人数
                if (mjList!=null&&mjList.size()!=0){
                    mjTotal = Integer.parseInt(mjList.get(0).get("total").toString());
                }
                map.put("mjTotal",mjTotal);
                //次密接人数计算
                String cmjTotalSql = "select count(1) as total from MID_CDC_CCC_SED_INFO where PATIENT_ID='"+patientId+"'";
                List<Map<String, Object>> cmjList = jdbcTemplate.queryForList(cmjTotalSql);
                Integer cmjTotal = 0;//密接人数
                if (cmjList!=null&&cmjList.size()!=0){
                    cmjTotal = Integer.parseInt(cmjList.get(0).get("total").toString());
                }
                map.put("cmjTotal",cmjTotal);
                //一般接触人数计算
                String ybmjTotalSql = "select count(1) as total from MID_KEYNOTE_CROWD_INFO where PATIENT_ID='"+patientId+"'";
                List<Map<String, Object>> ybmjList = jdbcTemplate.queryForList(ybmjTotalSql);
                Integer ybmjTotal = 0;//密接人数
                if (ybmjList!=null&&ybmjList.size()!=0){
                    ybmjTotal = Integer.parseInt(ybmjList.get(0).get("total").toString());
                }
                map.put("ybmjTotal",ybmjTotal);
            }
        }
        return confirmedList;
    }
}

+ 6 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -1494,6 +1494,12 @@ public class BaseHospitalRequestMapping {
        public static final String findDeptHomepageBanner = "/findDeptHomepageBanner";
        public static final String updateDeptHomepageBanner = "/updateDeptHomepageBanner";
        public static final String delDeptHomepageBanner = "/delDeptHomepageBanner";
        //疫情防控
        public static final String confirmedList = "/confirmedList";//确诊列表
        public static final String yqfkStatisticsHead = "/yqfkStatisticsHead";//头部确诊数量
        public static final String yqfkStatisticsTail = "/yqfkStatisticsTail";//密接数量统计
    }
    /**

+ 9 - 0
gateway/ag-basic/src/main/resources/bootstrap.yml

@ -152,4 +152,13 @@ spring:
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://192.168.250.39:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: yqfk
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}

+ 33 - 0
server/svr-authentication/src/main/resources/application.yml

@ -538,6 +538,39 @@ spring:
    password: Kb6wKDQP1W4
iHealth:
  user-info-uri: http://www.xmtyw.cn/wlyy/iHealth/userInfo
zhongshanHospital:
  user-info-uri: http://laptop-u738dn2p:10023/mqsdk/getUserInfoByOpenid
fastDFS:
  fastdfs_file_url: http://192.168.120.103:6002
wlyy:
  url: http://www.xmtyw.cn/wlyy/
testPattern: #文件服务器上传配置 0本地,1.I健康,2.内网调用
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream
wechat:
  id: xm_hcyy_wx  # base库中,wx_wechat 的id字段
im:
  im_list_get: http://127.0.0.1:3000/
kick:
    eachOther: 1 #互踢 1开通 0关闭
---
spring:
  profiles: yqfk
  datasource:
    url: jdbc:mysql://10.90.32.3:22042/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true&useSSL=false
    username: jkzl_root
    password: jkzlehr@2020%
  redis:
    host: 127.0.0.1 # Redis server host.
    port: 6380 # Redis server port.
    password: Kb6wKDQP1W4
iHealth:
  user-info-uri: http://www.xmtyw.cn/wlyy/iHealth/userInfo
zhongshanHospital:

+ 8 - 0
server/svr-authentication/src/main/resources/bootstrap.yml

@ -154,4 +154,12 @@ spring:
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://192.168.250.39:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: yqfk
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}

+ 15 - 0
server/svr-configuration/src/main/resources/bootstrap.yml

@ -227,6 +227,21 @@ spring:
---
spring:
  profiles: hcyyProd
##git配置
  cloud:
    config:
      failFast: true #启动快速失败 即链接不到配置服务就启动失败
      server:
        git:
          uri: ${wlyy.spring.config.git.uri:http://127.0.0.1:3001/jkzl/wlyy2.0.config.git}
          basedir: /data/wlyy2.0/wlyy2.0.config
          username: jkzl
          password: jkzl
        default-label: ${wlyy.spring.config.git.label:master}
---
spring:
  profiles: yqfk
##git配置
  cloud:
    config:

+ 4 - 3
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/endpoint/WebSocketServer.java

@ -6,7 +6,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.websocket.*;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint;
@ -20,7 +20,7 @@ import com.alibaba.fastjson.JSON;
 * @Auther: shi kejing
 * @Date: 2021/8/20 14:20
 */
@ServerEndpoint("/imserver/{userId}")
@ServerEndpoint("/")
@Component
public class WebSocketServer {
@ -33,12 +33,13 @@ public class WebSocketServer {
    /**与某个客户端的连接会话,需要通过它来给客户端发送数据*/
    private Session session;
    /**接收userId*/
    private String userId="";
    private String userId="ijk";
    /**
     * 连接建立成功调用的方法*/
    @OnOpen
    public void onOpen(Session session,@PathParam("userId") String userId) {
        userId="ijk";
        log.info("userId = "+userId);
        this.session = session;
        this.userId=userId;

+ 16 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -26,6 +26,7 @@ import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.entity.util.AesEncryptUtils;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.es.service.StatisticsEsService;
import com.yihu.jw.es.service.yqfk.YqfkService;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.hospital.dao.consult.KnowledgeArticleUserDao;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
@ -230,7 +231,9 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    @Autowired
    private TasyNatService tasyNatService;
    @Autowired
    private WxTemplateConfigDao wxTemplateConfigDao;
    private YqfkService yqfkService;
    @GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.findDoctorByHospitalAndDiseaseAndDept)
    @ApiOperation(value = "根据疾病名称,热门部门查询医生", notes = "根据疾病名称,热门部门查询医生")
@ -2563,4 +2566,16 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
            return failedMixEnvelopException(e);
        }
    }
    @GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.confirmedList)
    @ApiOperation(value = "确诊列表", notes = "确诊列表")
    public ListEnvelop confirmedList(){
        try {
            return success(yqfkService.confirmedList());
        } catch (Exception e){
            return  failedListEnvelopException(e);
        }
    }
}

+ 82 - 0
svr/svr-internet-hospital/src/main/resources/application.yml

@ -1122,5 +1122,87 @@ express:
  sf_check_word: TGUQASFNAZyjt9112
---
spring:
  profiles: yqfk
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://10.90.32.3:22042/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
    username: jkzl_root
    password: jkzlehr@2020%
  activemq:
    broker-url: tcp://59.61.92.90:9103
    user: jkzl
    password: jkzlehr
  redis:
    host: 127.0.0.1 # Redis server host.
    port: 6380 # Redis server port.
    password: Kb6wKDQP1W4
fastDFS:
  fastdfs_file_url: https://hlwyy.xmzsh.com/fastdfs/
fast-dfs:
  tracker-server: 192.168.120.103:6002 #服务器地址
wechat:
  id: xm_hcyy_wx  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: true #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage # 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置
myFamily:
  qrCodeFailurTime: 2 # mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: true #支付支付
pay:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://127.0.0.1:3000/
  data_base_name: im
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_prod
  type:
    Statistics: hlw_quota_prod
  host:  http://192.168.120.103:6005
  tHost: 192.168.120.103:6006
  securityUser: elastic:elastic
  clusterName: jkzl
  user: lion
  password: jkzlehr
FileTempPath: # 上传文件临时路径配置
  upload_temp_path : /var/local/temp
  image_path : /var/local/upload/images
  voice_path : /var/local/upload/voice
  chat_file_path : /var/local/upload/chat
testPattern: #文件服务器上传配置 0本地,1.I健康,2.内网调用
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
qywx:
  url: https://hlwyy.xmzsh.com/hlwyy
  id: zsyy
express:
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000102
  sf_check_word: TGUQASFNAZyjt9112

+ 8 - 0
svr/svr-internet-hospital/src/main/resources/bootstrap.yml

@ -112,4 +112,12 @@ spring:
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://192.168.250.39:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: yqfk
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}