Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

yeshijie 7 years ago
parent
commit
edd624172d

+ 46 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -1576,4 +1576,50 @@ public class PrescriptionInfoService extends BaseService {
        //System.out.println("list:"+list.size());
        return  new JSONArray(list);
    }
    public JSONObject getHDoctorInDoctorHosiptal(String name,String doctor,Integer page,Integer size){
        Doctor d = doctorDao.findByCode(doctor);
        String sql = "SELECT " +
                " d.`code`," +
                " d.`name`," +
                " d.job," +
                " d.photo " +
                " FROM" +
                " wlyy_doctor d" +
                " WHERE" +
                " d.hospital = ?" +
                " AND d.`level` = 3 " ;
                if(StringUtils.isNotBlank(name)){
                    sql +=" AND d.`name` LIKE '%"+name+"%' ";
                }
                if(page!=null&&size!=null){
                    sql += " LIMIT "+(page-1)+","+size;
                }
        String totalSql = "SELECT " +
                " count(1) AS total" +
                " FROM" +
                " wlyy_doctor d" +
                " WHERE" +
                " d.hospital = ?" +
                " AND d.`level` = 3 ";
        if(StringUtils.isNotBlank(name)){
            totalSql +=" AND d.`name` LIKE '%"+name+"%' ";
        }
        JSONObject jsonObject = new JSONObject();
        List<Map<String,Object>> totalList = jdbcTemplate.queryForList(totalSql,new Object[]{d.getHospital()});
        if(totalList!=null&&totalList.size()>0){
            jsonObject.put("total",totalList.get(0).get("total"));
        }else{
            jsonObject.put("total",0L);
            jsonObject.put("doctors","");
            return jsonObject;
        }
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql,new Object[]{d.getHospital()});
        if(list!=null&&list.size()>0){
            jsonObject.put("doctors",list);
        }else{
            jsonObject.put("doctors","");
        }
        return jsonObject;
    }
}

+ 13 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -546,4 +546,17 @@ public class PrescriptionInfoController extends BaseController {
        }
    }
    @RequestMapping(value = "/getHDoctorInDoctorHosiptal", method = RequestMethod.GET)
    @ApiOperation(value = "获取当前登录医生所在社区健管师列表")
    public String getHDoctorInDoctorHosiptal(@RequestParam(required = false) @ApiParam(name = "name", value = "健康管理师姓名关键字")String name,
                                             @RequestParam(required = false) @ApiParam(name = "page", value = "页数从1开始")Integer page,
                                             @RequestParam(required = false) @ApiParam(name = "size", value = "每页大小")Integer size){
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getHDoctorInDoctorHosiptal(name,getUID(),page,size));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
}

+ 5 - 7
patient-co/patient-co-wlyy/src/main/resources/application-local.yml

@ -1,6 +1,6 @@
##内网环境
##开发连测试用这个版本的配置
spring:
  profiles: local
  profiles: devtest
  datasource:
    wlyy:
@ -85,14 +85,11 @@ express:
#  sf_url: https://bsp-ois.sit.sf-express.com:9443/bsp-ois/sfexpressServic
  sf_code: SDDF
  sf_check_word: ttzlgGyOQu4L
pushMes:
  # 1为推送redis,0为推送消息队列
# 1为推送redis,0为推送消息队列
  method: 1
  # redis队列名称
  redis_prescription_title: redisPrescription
es:
  index:
    HealthEduArticlePatient: health_edu_article_patient_test
@ -103,10 +100,11 @@ es:
  tPort: 9300
  clusterName: jkzl
#消息队列
activemq:
  username: admin
  password: admin
  url: tcp://172.19.103.87:61616
  queue:
    healtHarticleQueue: healthArticleChannel_local  #健康文章推送
    healtHarticleQueue: healthArticleChannel_devtest  #健康文章推送

+ 12 - 4
patient-co/patient-co-wlyy/src/main/resources/application-localtest.yml

@ -1,6 +1,6 @@
##内网环境连测试环境
##开发连测试用这个版本的配置
spring:
  profiles: local_test
  profiles: devtest
  datasource:
    wlyy:
@ -90,6 +90,15 @@ pushMes:
  method: 1
  # redis队列名称
  redis_prescription_title: redisPrescription
es:
  index:
    HealthEduArticlePatient: health_edu_article_patient_test
  type:
    HealthEduArticlePatient: health_edu_article_patient_test
  host: 172.19.103.68
  port: 9200
  tPort: 9300
  clusterName: jkzl
#消息队列
@ -98,5 +107,4 @@ activemq:
  password: admin
  url: tcp://172.19.103.87:61616
  queue:
    healtHarticleQueue: healthArticleChannel_localtest  #健康文章推送
    healtHarticleQueue: healthArticleChannel_devtest  #健康文章推送