Browse Source

Merge branch 'dev' of zd_123/patient-co-management into dev

huangwenjie 7 years ago
parent
commit
973e6d6dec

+ 5 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/PatientInfoService.java

@ -1751,7 +1751,11 @@ public class PatientInfoService extends BaseService {
       /* String sql = "SELECT p.code,p.name,CASE p.sex WHEN 1 THEN '男' WHEN 2 THEN '女' END sex,p.idcard,f.doctor_name" +
                " FROM wlyy_patient p  LEFT JOIN wlyy_sign_family f ON p.code = f.patient" +
                " WHERE f.status = 1 AND p.name LIKE '%"+keyWord+"%' OR p.idcard LIKE '%"+keyWord+"%' and f.hospital = '"+hospital+"'"+" limit ?,?";*/
        String sql ="SELECT f.patient as code,f.name,f.idcard,f.doctor_name FROM wlyy_sign_family f where f.status > 0 AND f.hospital = '"+hospital+"' AND f.name LIKE '%"+keyWord+"%' OR f.idcard LIKE '%"+keyWord+"%' limit ?,?";
        String sql ="SELECT f.patient as code,f.name,f.idcard,f.doctor_name FROM wlyy_sign_family f where f.status > 0 AND f.hospital = '"+hospital+"' " ;
        if (StringUtils.isNotEmpty(keyWord)){
            sql +=  "AND f.name LIKE '%"+keyWord+"%' OR f.idcard LIKE '%"+keyWord+"%'";
        }
        sql += " limit ?,?";
        patientList = jdbcTemplate.queryForList(sql ,new Object[]{start,pageSize});
        String patientDeviceSql = "SELECT user as patientCode FROM wlyy_patient_device WHERE device_sn='"+deviceSn+"'";

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/device/PatientDeviceLogService.java

@ -74,7 +74,7 @@ public class PatientDeviceLogService extends BaseService {
                "  SELECT sf.name, pd.* FROM wlyy_patient_device_log pd" +
                "  LEFT JOIN wlyy_sign_family sf ON pd.patient = sf.patient" +
                "  WHERE" +
                "   pd.is_del = 1 and sf.doctor= '" +doctor+"'"+
                "   pd.is_del = 1 and (sf.doctor= '" +doctor+"' or sf.doctor_health = '"+doctor+"'"+
                "  ORDER BY" +
                "  create_time DESC) a" +
                " GROUP BY a.device_sn) b" +

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/PatientInfoController.java

@ -528,7 +528,7 @@ public class PatientInfoController extends BaseController {
    @RequestMapping(value = "/getPatientSignByNameOrIdCard",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("在绑定设备的时候查找患者(带签约信息)")
    public String getPatientSignByNameOrIdCard(@ApiParam(value = "关键搜索词", name = "keyWord") @RequestParam(value = "keyWord",required = true)String keyWord,
    public String getPatientSignByNameOrIdCard(@ApiParam(value = "关键搜索词", name = "keyWord") @RequestParam(value = "keyWord",required = false)String keyWord,
                                               @ApiParam(value = "设备sn码", name = "deviceSn") @RequestParam(value = "deviceSn",required = true)String deviceSn,
                                               @ApiParam(name="page",value="第几页",defaultValue = "1") @RequestParam(value="page",required = true) String page,
                                               @ApiParam(name="pageSize",value="",defaultValue = "10") @RequestParam(value="pageSize",required = true) String pageSize){

+ 2 - 1
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -99,7 +99,8 @@ wechat:
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/
  #yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/
  yihu_OpenPlatform_url: http://58.22.123.195:1480/OpenPlatform/cgiBin/1.0/
  yihu_OpenPlatform_appId: 9000276
  yihu_OpenPlatform_secret: OKC8BS1KGXTDE9GPP1EO4VYLUXF8DJ7QUP72H613ZXA