瀏覽代碼

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

# Conflicts:
#	svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/wechat/WechatMenuController.java
wangzhinan 4 年之前
父節點
當前提交
284bbfe020

+ 130 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/TnyyEntranceService.java

@ -692,13 +692,142 @@ public class TnyyEntranceService {
                object.put("jclx",jsonObject.getString("jclx"));
                object.put("JCMC",jsonObject.getString("JCMC"));
                array.add(object);
            }
        }
        return array;
    }
    /**
     * 查询某个门诊患者记录
     * @param doctor
     * @return
     * @throws Exception
     */
    public JSONArray selectMzRecord(String doctor) throws Exception {
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
        String condition = "";
        if (doctorMappingDO!=null){
            condition = " and mz.YSDM ='"+doctorMappingDO.getMappingCode()+"' ";
        }
        String sql = "SELECT br.BRID,br.BRXM,br.BRXB,CONVERT(varchar(100), br.CSNY, 120) as birthDay,br.MZHM,br.SFZH from MS_BRDA br WHERE br.BRID IN(SELECT mz.BRBH FROM YS_MZ_JZLS mz where 1=1 "+condition+" GROUP BY mz.BRBH ) and br.SFZH is not null and br.BRXM !='作废' ";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("selectMzRecord:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        JSONArray array = new JSONArray();
        if(status!=null&&status == 200){
            array = rs.getJSONArray("detailModelList");
            logger.info("selectMzRecord size:"+array.size());
        }
        return array;
    }
    /**
     * 查询某个医生住院患者记录
     * @param doctor
     * @return
     * @throws Exception
     */
    public JSONArray selectZyRecord(String doctor) throws Exception {
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
        String condition = "";
        if (doctorMappingDO!=null){
            condition = " and (brry.zyys= '"+doctorMappingDO.getMappingCode()+"' or brry.zzys= '"+doctorMappingDO.getMappingCode()+"' or brry.szys= '"+doctorMappingDO.getMappingCode()+"') ";
        }else {
            return null;
        }
        String sql = "SELECT br.BRID,br.BRXM,br.BRXB,CONVERT(varchar(100), br.CSNY, 120) as birthDay ,br.MZHM,br.SFZH from MS_BRDA br WHERE br.BRID IN(SELECT cast(brry.BAHM as numeric(18,0)) FROM ZY_BRRY brry where 1=1 and isnumeric(brry.BAHM) = 1 "+condition+" GROUP BY brry.BAHM) and br.BRXM !='作废' and br.SFZH is not null ";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("selectZyRecord:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        JSONArray array = new JSONArray();
        if(status!=null&&status == 200){
            array = rs.getJSONArray("detailModelList");
            logger.info("selectZyRecord size:"+array.size());
        }
        return array;
    }
    /**
     * 健康档案中门诊记录
     * @throws Exception
     */
    public JSONArray findJKTA_V_ZKSG_HZCX_HIS(String brid) throws Exception{
        String sql = "SELECT h.JZXH,h.GHXH,h.BRBH,h.KSDM,h.YSDM,h.ZYZD,h.KSSJ,h.JSSJ,h.JZZT,h.FZRQ,h.GHFZ,ks.KSMC,yg.YGXM  from YS_MZ_JZLS h,GY_KSDM ks,GY_YGDM yg WHERE yg.YGDM=h.YSDM and ks.KSDM=h.KSDM and  h.BRBH = "+brid+" ";
        sql += " order by h.KSSJ desc";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("findJKTA_V_ZKSG_HZCX_HIS:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            return rs.getJSONArray("detailModelList");
        }
        return new JSONArray();
    }
    /**
     * 获取健康档案住院记录
     * @param brid
     * @return
     * @throws Exception
     */
    public JSONArray findJKTA_ZY_RECORD(String brid) throws Exception{
        String sql = "SELECT\n" +
                "\tbrry.ZYH,\n" +
                "\tbrry.ZYHM,\n" +
                "\tbrry.ZYDM,\n" +
                "\tbrry.ZYYS,\n" +
                "\tbrry.ZZYS,\n" +
                "\tbrry.SZYS,\n" +
                "\tbrry.zyysxm ,\n" +
                "\tbrry.zzysxm ,\n" +
                "\tbrry.szysxm ,\n" +
                "\tbrry.KSRQ,\n" +
                "\tbrry.JSRQ,\n" +
                "\tbrry.JGDM,\n" +
                "\tbrry.KSMC,\n" +
                "\tbrry.BAHM,\n" +
                "\tbrry.BRXM\n" +
                "FROM\n" +
                "\tV_ZY_BRRY brry\n" +
                "where\n" +
                "  brry.BAHM ='"+brid+"' ";
        sql += " order by h.KSSJ desc";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("findJKTA_ZY_RECORD:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            return rs.getJSONArray("detailModelList");
        }
        return new JSONArray();
    }
    public List<Map<String,Object>> queryBySql(String sql){

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

@ -498,6 +498,14 @@ public class BaseHospitalRequestMapping {
        //作废处方
        public static final String disablePrescription="/disablePrescription";
        public static final String selectMzRecord = "/selectMzRecord";
        public static final String selectZyRecord = "/selectZyRecord";
        public static final String findJKTA_V_ZKSG_HZCX_HIS = "/findJKTA_V_ZKSG_HZCX_HIS";
        public static final String findJKTA_ZY_RECORD = "/findJKTA_ZY_RECORD";
        /*
        关注医生信息
         */

+ 1 - 1
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -345,7 +345,7 @@ express:
spring:
  profiles: tnJwprod
  datasource:
    url: jdbc:mysql://10.9.1.247:3306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false #jdbc:mysql://192.0.33.27:3306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    url: jdbc:mysql://10.9.1.247:3310/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false #jdbc:mysql://192.0.33.27:3306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: wlyy
    password: qY#j2n5O

+ 39 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -2358,5 +2358,44 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.selectMzRecord)
    @ApiOperation(value = "查询门诊记录下的患者列表")
    public Envelop selectMzRecord(
            @ApiParam(name = "doctor", value = "doctor")
            @RequestParam(value = "doctor",defaultValue = "",required = true) String doctor) throws Exception {
        return success(tnyyEntranceService.selectMzRecord(doctor));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.selectZyRecord)
    @ApiOperation(value = "查询住院记录下的患者列表")
    public Envelop selectZyRecord(
            @ApiParam(name = "doctor", value = "doctor")
            @RequestParam(value = "doctor",defaultValue = "",required = true) String doctor) throws Exception {
        return success(tnyyEntranceService.selectZyRecord(doctor));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findJKTA_V_ZKSG_HZCX_HIS)
    @ApiOperation(value = "查询某个患者的住院记录")
    public Envelop findJKTA_V_ZKSG_HZCX_HIS(
            @ApiParam(name = "brid", value = "患者id")
            @RequestParam(value = "brid",defaultValue = "",required = true) String brid) throws Exception {
        return success(tnyyEntranceService.findJKTA_V_ZKSG_HZCX_HIS(brid));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findJKTA_ZY_RECORD)
    @ApiOperation(value = "查询某个患者的住院记录")
    public Envelop findJKTA_ZY_RECORD(
            @ApiParam(name = "brid", value = "患者id")
            @RequestParam(value = "brid",defaultValue = "",required = true) String brid) throws Exception {
        return success(tnyyEntranceService.findJKTA_ZY_RECORD(brid));
    }
}

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

@ -869,7 +869,7 @@ spring:
  profiles: tnJwprod
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://10.9.1.247:3306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
    url: jdbc:mysql://10.9.1.247:3310/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
    username: wlyy
    password: qY#j2n5O
#  elasticsearch: