|
@ -148,7 +148,31 @@ public class SignWebService extends BaseService {
|
|
(status == 3 ? " and expenses_status = '1'" : "") + " order by begin desc ) a " +
|
|
(status == 3 ? " and expenses_status = '1'" : "") + " order by begin desc ) a " +
|
|
" ,wlyy_patient b " +
|
|
" ,wlyy_patient b " +
|
|
" where a.patient = b.code order by applyDate desc limit " + page * pageSize + "," + pageSize;
|
|
" where a.patient = b.code order by applyDate desc limit " + page * pageSize + "," + pageSize;
|
|
|
|
|
|
|
|
// 查询已经签约语句
|
|
|
|
String isSignSql = "select " +
|
|
|
|
" a.code " +
|
|
|
|
" ,a.doctor " +
|
|
|
|
" ,b.code as patient" +
|
|
|
|
" ,b.idcard " +
|
|
|
|
" ,b.name " +
|
|
|
|
" ,b.province_name as provinceName" +
|
|
|
|
" ,b.city_name as cityName" +
|
|
|
|
" ,b.town_name as townName" +
|
|
|
|
" ,b.address " +
|
|
|
|
" ,b.photo " +
|
|
|
|
" ,a.status " +
|
|
|
|
" ,a.id " +
|
|
|
|
(status == 1 ? " ,a.patient_apply_date as applyDate " : " ,a.expenses_time as applyDate ") +
|
|
|
|
" ,a.reason " +
|
|
|
|
" ,b.street_name as streetName" +
|
|
|
|
" ,b.sex" +
|
|
|
|
" ,b.openid" +
|
|
|
|
" ,a.renew_flag as renewFlag" +
|
|
|
|
" from " +
|
|
|
|
" ( select renew_flag,code,patient,doctor,status,id,apply_date,patient_apply_date,expenses_time,reason,begin from wlyy_sign_family where (doctor = ? or doctor_health = ?) and status = ? and type = 2" +
|
|
|
|
(status == 3 ? " and expenses_status = '1'" : "") + " order by begin desc ) a " +
|
|
|
|
" ,wlyy_patient b " +
|
|
|
|
" where a.patient = b.code order by applyDate desc limit " + page * pageSize + "," + pageSize;
|
|
// 未缴费查询语句
|
|
// 未缴费查询语句
|
|
String sqlExpenses = "select " +
|
|
String sqlExpenses = "select " +
|
|
" a.code " +
|
|
" a.code " +
|
|
@ -170,7 +194,7 @@ public class SignWebService extends BaseService {
|
|
" ,b.openid" +
|
|
" ,b.openid" +
|
|
" ,a.renew_flag as renewFlag" +
|
|
" ,a.renew_flag as renewFlag" +
|
|
" from " +
|
|
" from " +
|
|
" ( select patient_apply_date,renew_flag,code,patient,doctor,status,id,apply_date,reason,begin,expenses_status,LENGTH(trim(ifnull(expenses_status,''))) len from wlyy_sign_family where doctor = ? and status > ? and type = 2 order by begin desc ) a " +
|
|
|
|
|
|
" ( select patient_apply_date,renew_flag,code,patient,doctor,status,id,apply_date,reason,begin,expenses_status,LENGTH(trim(ifnull(expenses_status,''))) len from wlyy_sign_family where (doctor = ? or doctor_health = ?) and status > ? and type = 2 order by begin desc ) a " +
|
|
" ,wlyy_patient b " +
|
|
" ,wlyy_patient b " +
|
|
" where a.patient = b.code and (a.expenses_status = '0' or a.len < 1) order by applyDate desc limit " + page * pageSize + "," + pageSize;
|
|
" where a.patient = b.code and (a.expenses_status = '0' or a.len < 1) order by applyDate desc limit " + page * pageSize + "," + pageSize;
|
|
|
|
|
|
@ -195,7 +219,7 @@ public class SignWebService extends BaseService {
|
|
" ,b.openid" +
|
|
" ,b.openid" +
|
|
" ,a.renew_flag as renewFlag" +
|
|
" ,a.renew_flag as renewFlag" +
|
|
" from " +
|
|
" from " +
|
|
" ( select patient_apply_date,renew_flag,code,patient,doctor,status,id,apply_date,apply_unsign_date,reason,begin from wlyy_sign_family where doctor = ? and ( status = ? or status = ? ) and type = 2 order by begin desc ) a " +
|
|
|
|
|
|
" ( select patient_apply_date,renew_flag,code,patient,doctor,status,id,apply_date,apply_unsign_date,reason,begin from wlyy_sign_family where (doctor = ? or doctor_health = ?) and ( status = ? or status = ? ) and type = 2 order by begin desc ) a " +
|
|
" ,wlyy_patient b " +
|
|
" ,wlyy_patient b " +
|
|
" where a.patient = b.code order by applyDate desc limit " + page * pageSize + "," + pageSize;
|
|
" where a.patient = b.code order by applyDate desc limit " + page * pageSize + "," + pageSize;
|
|
|
|
|
|
@ -212,7 +236,7 @@ public class SignWebService extends BaseService {
|
|
patients = jdbcTemplate.queryForList(sql, new Object[]{doctor, 2});
|
|
patients = jdbcTemplate.queryForList(sql, new Object[]{doctor, 2});
|
|
break;
|
|
break;
|
|
case 3:// 已签约
|
|
case 3:// 已签约
|
|
patients = jdbcTemplate.queryForList(sql, new Object[]{doctor, 1});
|
|
|
|
|
|
patients = jdbcTemplate.queryForList(isSignSql, new Object[]{doctor, 1});
|
|
break;
|
|
break;
|
|
case 4:// 4已经解约
|
|
case 4:// 4已经解约
|
|
patients = jdbcTemplate.queryForList(surrSql, new Object[]{doctor, -3, -4});
|
|
patients = jdbcTemplate.queryForList(surrSql, new Object[]{doctor, -3, -4});
|