Parcourir la source

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

trick9191 il y a 7 ans
Parent
commit
e0c5b3efb4

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

@ -1085,8 +1085,12 @@ public class PrescriptionInfoService extends BaseService {
            param.add(endDate + " 23:59:59");
            param.add(endDate + " 23:59:59");
        }
        }
        if (StringUtils.isNotBlank(hospital)) {
        if (StringUtils.isNotBlank(hospital)) {
            pre_sql.append(" AND e.hospital_code = ? ");
            param.add(hospital);
            if("other".equals(hospital)){
                pre_sql.append(" AND (e.patient_hospital_code IS NULL OR e.patient_hospital_code ='') ");
            }else{
                pre_sql.append(" AND e.patient_hospital_code = ? ");
                param.add(hospital);
            }
        }
        }
        if (StringUtils.isNotBlank(state)) {
        if (StringUtils.isNotBlank(state)) {
            pre_sql.append(" AND pr.status = ? ");
            pre_sql.append(" AND pr.status = ? ");
@ -1126,8 +1130,12 @@ public class PrescriptionInfoService extends BaseService {
            param.add(endDate + " 23:59:59");
            param.add(endDate + " 23:59:59");
        }
        }
        if (StringUtils.isNotBlank(hospital)) {
        if (StringUtils.isNotBlank(hospital)) {
            pre_sql.append(" AND e.hospital_code = ? ");
            param.add(hospital);
            if("other".equals(hospital)){
                pre_sql.append(" AND (e.patient_hospital_code IS NULL OR e.patient_hospital_code ='')");
            }else{
                pre_sql.append(" AND e.patient_hospital_code = ? ");
                param.add(hospital);
            }
        }
        }
        if (StringUtils.isNotBlank(state)) {
        if (StringUtils.isNotBlank(state)) {
            pre_sql.append(" AND pr.status = ? ");
            pre_sql.append(" AND pr.status = ? ");
@ -1174,8 +1182,22 @@ public class PrescriptionInfoService extends BaseService {
        //
        //
        Doctor d = doctorDao.findByCode(doctor);
        Doctor d = doctorDao.findByCode(doctor);
        if (d != null && StringUtils.isNotBlank(d.getHospital())) {
        if (d != null && StringUtils.isNotBlank(d.getHospital())) {
            String h = d.getHospital().substring(0, 8);
            String sql = "SELECT h.`code`,h.`name` FROM dm_hospital h WHERE h.`code` LIKE '%" + h + "%' ";
            //String h = d.getHospital().substring(0, 8);
            // String sql = "SELECT h.`code`,h.`name` FROM dm_hospital h WHERE h.`code` LIKE '%" + h + "%' ";
            String sql = " SELECT " +
                    " e.patient_hospital_name AS name, " +
                    " e.patient_hospital_code AS code " +
                    " FROM " +
                    " wlyy_prescription_expressage e " +
                    " WHERE " +
                    " ( " +
                    "  e.accept_code = '"+doctor+"' " +
                    "  OR e.expressage_code = '"+doctor+"' " +
                    " ) " +
                    " AND e.patient_hospital_code IS NOT NULL " +
                    " AND e.patient_hospital_code <> '' " +
                    " GROUP BY " +
                    " e.patient_hospital_code ";
            List<Map<String, Object>> hs = jdbcTemplate.queryForList(sql);
            List<Map<String, Object>> hs = jdbcTemplate.queryForList(sql);
            rs.put("hospitals", hs);
            rs.put("hospitals", hs);
        } else {
        } else {
@ -1367,8 +1389,12 @@ public class PrescriptionInfoService extends BaseService {
            param.add(endDate + " 23:59:59");
            param.add(endDate + " 23:59:59");
        }
        }
        if (StringUtils.isNotBlank(hospital)) {
        if (StringUtils.isNotBlank(hospital)) {
            pre_sql.append(" AND e.patient_hospital_code = ? ");
            param.add(hospital);
            if("other".equals(hospital)){
                pre_sql.append(" AND (e.patient_hospital_code IS NULL OR e.patient_hospital_code ='')");
            }else{
                pre_sql.append(" AND e.patient_hospital_code = ? ");
                param.add(hospital);
            }
        }
        }
        if (StringUtils.isNotBlank(state)) {
        if (StringUtils.isNotBlank(state)) {
            pre_sql.append(" AND pr.status = ? ");
            pre_sql.append(" AND pr.status = ? ");
@ -1409,8 +1435,12 @@ public class PrescriptionInfoService extends BaseService {
            param.add(endDate + " 23:59:59");
            param.add(endDate + " 23:59:59");
        }
        }
        if (StringUtils.isNotBlank(hospital)) {
        if (StringUtils.isNotBlank(hospital)) {
            pre_sql.append(" AND e.patient_hospital_code = ? ");
            param.add(hospital);
            if("other".equals(hospital)){
                pre_sql.append(" AND (e.patient_hospital_code IS NULL OR e.patient_hospital_code ='')");
            }else{
                pre_sql.append(" AND e.patient_hospital_code = ? ");
                param.add(hospital);
            }
        }
        }
        if (StringUtils.isNotBlank(state)) {
        if (StringUtils.isNotBlank(state)) {
            pre_sql.append(" AND pr.status = ? ");
            pre_sql.append(" AND pr.status = ? ");

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthController.java

@ -290,6 +290,7 @@ public class DoctorHealthController extends BaseController {
			}
			}
			return write(200, "查询成功", "data", map);
			return write(200, "查询成功", "data", map);
		} catch (Exception ex) {
		} catch (Exception ex) {
			error(ex);
			return invalidUserException(ex, -1, ex.getMessage());
			return invalidUserException(ex, -1, ex.getMessage());
		}
		}
	}
	}