Browse Source

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

wangzhinan 6 years ago
parent
commit
bc8e9b6f4c

+ 3 - 0
svr/svr-base/pom.xml

@ -133,6 +133,9 @@
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.yihu.SvrBaseApplication</mainClass>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>

+ 5 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/activemq/MessageManager.java

@ -47,9 +47,11 @@ public class MessageManager {
                });
                groups.put(mqMessageDo.getTopic(), subUrl);
            }
            executorService = Executors.newFixedThreadPool(groups.size());
            for (String key : groups.keySet()) {
                executorService.execute(new ConsumerRunner(key, groups.get(key)));
            if(groups.size()>0){
                executorService = Executors.newFixedThreadPool(groups.size());
                for (String key : groups.keySet()) {
                    executorService.execute(new ConsumerRunner(key, groups.get(key)));
                }
            }
        } catch (Exception e) {
            LOGGER.error(e.getMessage(), e);

+ 15 - 15
svr/svr-base/src/main/resources/application.yml

@ -62,8 +62,8 @@ spring:
    broker-url: tcp://172.19.103.87:61616
    user: admin
    password: admin
  zipkin:
    base-url: http://localhost:9411 #日志追踪的地址
#  zipkin:
#    base-url: http://localhost:9411 #日志追踪的地址
fastDFS:
  fastdfs_file_url: http://172.19.103.54:80/
@ -86,31 +86,31 @@ spring:
    broker-url: tcp://172.19.103.87:61616
    user: admin
    password: admin
  zipkin:
    base-url: http://localhost:9411 #日志追踪的地址
#  zipkin:
#    base-url: http://localhost:9411 #日志追踪的地址
fastDFS:
  fastdfs_file_url: http://172.19.103.54:80/
---
spring:
  profiles: jwprod
  profiles: prod
  datasource:
    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: 123456
    url: jdbc:mysql://59.61.92.90:9069/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: wlyy
    password: jkzlehr@123
  elasticsearch:
    cluster-name: jkzl #集群名 默认elasticsearch
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    cluster-nodes: 59.61.92.90:9066,59.61.92.90:9068 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
      uris: http://59.61.92.90:9065,http://59.61.92.90:9067
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
    broker-url: tcp://172.19.103.87:61616
    user: admin
    password: admin
  zipkin:
    base-url: http://localhost:9411 #日志追踪的地址
    broker-url: tcp://59.61.92.90:9103
    user: jkzl
    password: jkzlehr
#  zipkin:
#    base-url: http://localhost:9411 #日志追踪的地址
fastDFS:
  fastdfs_file_url: http://172.19.103.54:80/

+ 3 - 3
svr/svr-base/src/main/resources/bootstrap.yml

@ -25,8 +25,8 @@ spring:
---
spring:
  profiles: jwprod
  profiles: prod
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://172.17.110.212:1221}
      label: ${wlyy.spring.config.label:jwprod}
      uri: ${wlyy.pring.config.uri:http://192.168.120.153:1221}
      label: ${wlyy.spring.config.label:prod}

+ 3 - 2
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java

@ -200,9 +200,10 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
    @PostMapping(value = SpecialistMapping.rehabilitation.createServiceQrCode)
    @ApiOperation(value = "根据康复计划明细id和医生code生成服务码")
    public MixEnvelop<String,String> createServiceQrCode(@ApiParam(name = "planDetailId", value = "康复计划项目明细ID")@RequestParam(value = "planDetailId", required = true)String planDetailId,
                                                         @ApiParam(name = "doctorCode", value = "医生code")@RequestParam(value = "doctorCode", required = true)String doctorCode){
                                                         @ApiParam(name = "doctorCode", value = "医生code")@RequestParam(value = "doctorCode", required = true)String doctorCode,
                                                         @ApiParam(name = "imageUrl",value = "二维码地址")@RequestParam(value = "imageUrl",required = true)String imageUrl){
        try {
            return rehabilitationPlanService.createServiceQrCode(planDetailId,doctorCode);
            return rehabilitationPlanService.createServiceQrCode(planDetailId,doctorCode,imageUrl);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());

+ 2 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/rehabilitation/PatientRehabilitationPlanDao.java

@ -2,6 +2,7 @@ package com.yihu.jw.dao.rehabilitation;
import com.yihu.jw.entity.specialist.PatientHospitalRecordDO;
import com.yihu.jw.entity.specialist.rehabilitation.PatientRehabilitationPlanDO;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
@ -16,6 +17,7 @@ public interface PatientRehabilitationPlanDao extends PagingAndSortingRepository
    PatientRehabilitationPlanDO findById(String id);
    @Query(" select p from PatientRehabilitationPlanDO p where p.patient=?1 and p.createUser=?2 order by p.createTime desc ")
    List<PatientRehabilitationPlanDO> findByPatientAndCreateUser(String patient, String doctor);
    @Query(" select p from PatientRehabilitationPlanDO p where p.patient=?1 order by p.createTime desc ")

+ 1 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -21,6 +21,7 @@ import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Sort;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

+ 7 - 4
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationPlanService.java

@ -298,8 +298,8 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
        patientRehabilitationPlanDao.updateServicePackageId(planId, servicePackageId);
    }
    public MixEnvelop<String,String> createServiceQrCode(String planDetailId,String doctorCode){
        RehabilitationDetailDO rehabilitationDetailDO = rehabilitationDetailDao.findById(planDetailId);
    public MixEnvelop<String,String> createServiceQrCode(String planDetailId,String doctorCode,String imageUrl){
        /*RehabilitationDetailDO rehabilitationDetailDO = rehabilitationDetailDao.findById(planDetailId);
        String fileUrl = "";
        if (rehabilitationDetailDO!=null) {
            if (org.apache.commons.lang3.StringUtils.isNotBlank(rehabilitationDetailDO.getServiceQrCode())) {
@ -341,8 +341,11 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
                String sql = "update wlyy_rehabilitation_plan_detail set service_qr_code='" + fileUrl + "' where id='" + planDetailId + "'";
                jdbcTemplate.update(sql);
            }
        }
        return MixEnvelop.getSuccess("获取二维码成功!",fileUrl);
        }*/
        //更新到康复计划居民关系表中
        String sql = "update wlyy_rehabilitation_plan_detail set service_qr_code='" + imageUrl + "' where id='" + planDetailId + "'";
        jdbcTemplate.update(sql);
        return MixEnvelop.getSuccess("获取二维码成功!",imageUrl);
    }
    public Map<String,Object> checkAfterQrCode(String planDetailId,String patietCode)throws Exception{