Browse Source

Merge branch 'dev' of trick9191/wlyy2.0 into dev

trick9191 5 năm trước cách đây
mục cha
commit
783b2e4660

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/file_upload/FileUploadService.java

@ -206,7 +206,7 @@ public class FileUploadService {
    
    
    /**
     * 调用健康上传语音文件
     * 调用健康上传语音文件.
     * @param voices_Path
     * @return
     * @throws Exception

+ 13 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -869,12 +869,20 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            sql+= " AND h.org_code = '"+orgCode+"'";
        }
        if(StringUtils.isNotBlank(chargeType)){
            sql+=" AND d.charge_type ='"+chargeType+"'";
            if("all".equals(chargeType)){
                //查询全部号源
            }else{
                sql+=" AND d.charge_type ='"+chargeType+"'";
            }
        }else{
            sql+=" AND d.charge_type is not null ";
        }
        if(StringUtils.isNotBlank(outpatientType)){
            sql+=" AND d.outpatient_type like'%"+outpatientType+"%'";
            if("all".equals(outpatientType)){
                //查询全部权限
            }else{
                sql+=" AND d.outpatient_type like'%"+outpatientType+"%'";
            }
        }else{
            sql+=" AND d.outpatient_type is not null ";
        }
@ -896,6 +904,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    " AND t.start_time <='"+endDate+"'"+
                    " )";
        }
        logger.info("findDoctorByHospitalAndDept sql:"+sql);
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if(list!=null&&list.size()>0&&StringUtils.isNotBlank(doctorCode)){

+ 32 - 23
business/es-service/src/main/java/com/yihu/jw/es/es/ElasticFactory.java

@ -19,6 +19,7 @@ import java.util.Arrays;
import java.util.concurrent.TimeUnit;
/**
 * 中山医院版本
 * Created by chenweida on 2017/6/5.
 */
@ -34,6 +35,8 @@ public class ElasticFactory {
    private String clusterName;
    @Value("${es.securityUser}")
    private String securityUser;
    @Value("${es.pwflag}")
    private String pwflag;
//-----------------------------------jestClient----------------------------------------
    /**
@ -75,7 +78,12 @@ public class ElasticFactory {
    public Client getTransportClient() {
        try {
            initTranClient();
            //1需要加密初始化
            if("1".equals(pwflag)){
                initTranClientPw();
            }else {
                initTranClient();
            }
            return transportClient;
        } catch (Exception e) {
            e.printStackTrace();
@ -85,37 +93,36 @@ public class ElasticFactory {
    /**
     * 9300
     *
     * 互联网医院版本需要密码
     * @throws UnknownHostException
     */
//    private synchronized void initTranClient() throws UnknownHostException {
//        if (transportClient == null) {
//            String[] hosts = tHost.split(",");
//            Settings settings = Settings.settingsBuilder()
//                    // .put("client.transport.sniff", true)//开启嗅探功能
//                    .put("cluster.name", StringUtils.isEmpty(clusterName) ? "jkzl" : clusterName)//默认集群名字是jkzl
//                    .build();
//
//            transportClient = TransportClient.builder().settings(settings).build();
//
//            for (String oneHost : hosts) {
//                String[] hostAndport = oneHost.split(":");
//                transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(hostAndport[0]), Integer.valueOf(hostAndport[1])));
//            }
//        }
//    }
    private synchronized void initTranClientPw() throws Exception {
        if (transportClient == null) {
            String[] hosts = tHost.split(",");
            Settings settings = getSettings();
            transportClient = TransportClient.builder().addPlugin(ShieldPlugin.class).settings(settings).build();
            for (String oneHost : hosts) {
                String[] hostAndport = oneHost.split(":");
                transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(hostAndport[0]), Integer.valueOf(hostAndport[1])));
            }
        }
    }
    /**
     * 9300
     *
     * 厦门I健康版本不需要密码
     * @throws UnknownHostException
     */
    private synchronized void initTranClient() throws Exception {
    private synchronized void initTranClient() throws UnknownHostException {
        if (transportClient == null) {
            String[] hosts = tHost.split(",");
            Settings settings = getSettings();
            transportClient = TransportClient.builder().addPlugin(ShieldPlugin.class).settings(settings).build();
            Settings settings = Settings.settingsBuilder()
                    // .put("client.transport.sniff", true)//开启嗅探功能
                    .put("cluster.name", StringUtils.isEmpty(clusterName) ? "jkzl" : clusterName)//默认集群名字是jkzl
                    .build();
            transportClient = TransportClient.builder().settings(settings).build();
            for (String oneHost : hosts) {
                String[] hostAndport = oneHost.split(":");
                transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(hostAndport[0]), Integer.valueOf(hostAndport[1])));
@ -123,6 +130,7 @@ public class ElasticFactory {
        }
    }
    /**
     * 配置连接
     * @return
@ -136,5 +144,6 @@ public class ElasticFactory {
        settingBuilder.put("transport.address.list", tHost);
        return settingBuilder.build();
    }
}

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

@ -133,6 +133,7 @@ im:
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
  type:
@ -196,6 +197,7 @@ im:
  data_base_name: im_internet_hospital
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
  type:
@ -266,6 +268,7 @@ im:
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_prod
  type:
@ -349,6 +352,7 @@ FileTempPath:
  voice_path : /var/local/upload/voice
  chat_file_path : /var/local/upload/chat
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
  type:
@ -422,6 +426,7 @@ FileTempPath:
  voice_path : /var/local/upload/voice
  chat_file_path : /var/local/upload/chat
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
  type:
@ -493,6 +498,7 @@ FileTempPath:
  voice_path : /var/local/upload/voice
  chat_file_path : /var/local/upload/chat
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
  type:
@ -562,6 +568,7 @@ FileTempPath:
  voice_path : /var/local/upload/voice
  chat_file_path : /var/local/upload/chat
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
  type:
@ -637,6 +644,7 @@ testPattern:
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
es:
  pwflag: 0 # 1需要密码,0不需要密码
  index:
    Statistics: hlw_quota_test
  type: