|
@ -404,7 +404,7 @@ public class SignWebService extends BaseService {
|
|
|
jsonObject.put("applyDate",renew.getApplyDate());
|
|
|
jsonObject.put("createTime",renew.getCzrq());
|
|
|
jsonObject.put("type",renew.getType());
|
|
|
jsonObject.put("typeName",renew.getType()==1?"三师签约":"家庭签约");
|
|
|
jsonObject.put("typeName",renew.getType()==1?"三师签约":"家庭签约续签");
|
|
|
String statusName = "";
|
|
|
switch (jsonObject.getInt("status")){
|
|
|
case -4 : statusName = "已到期";break;
|
|
@ -748,8 +748,9 @@ public class SignWebService extends BaseService {
|
|
|
" ,b.street_name as streetName" +
|
|
|
" ,b.sex" +
|
|
|
" ,b.openid" +
|
|
|
" ,a.czrq" +
|
|
|
" from " +
|
|
|
" ( select code,patient,doctor,status,id,apply_date,patient_apply_date,expenses_time,reason,begin from wlyy_sign_family_renew where (doctor = ? or doctor_health = ?) and status = ? and type = 2" +
|
|
|
" ( select czrq,code,patient,doctor,status,id,apply_date,patient_apply_date,expenses_time,reason,begin from wlyy_sign_family_renew where (doctor = ? or doctor_health = ?) and status = ? and type = 2" +
|
|
|
" order by begin desc ) a " +
|
|
|
" ,wlyy_patient b " +
|
|
|
" where a.patient = b.code order by a.begin desc limit " + page * pageSize + "," + pageSize;
|
|
@ -773,10 +774,37 @@ public class SignWebService extends BaseService {
|
|
|
" ,b.street_name as streetName" +
|
|
|
" ,b.sex" +
|
|
|
" ,b.openid" +
|
|
|
" ,a.czrq" +
|
|
|
" from " +
|
|
|
" ( select code,patient,doctor,status,id,apply_date,reason,begin,expenses_status,LENGTH(trim(ifnull(expenses_status,''))) len from wlyy_sign_family_renew where (doctor = ? or doctor_health = ?) and status > ? and type = 2 order by begin desc ) a " +
|
|
|
" ( select czrq,code,patient,doctor,status,id,apply_date,reason,begin,expenses_status,LENGTH(trim(ifnull(expenses_status,''))) len from wlyy_sign_family_renew where (doctor = ? or doctor_health = ?) and status > ? and type = 2 order by begin desc ) a " +
|
|
|
" ,wlyy_patient b " +
|
|
|
" where a.patient = b.code and (a.expenses_status = '0' or a.len < 1) order by a.begin desc limit " + page * pageSize + "," + pageSize;
|
|
|
" where a.patient = b.code and a.expenses_status = '0' order by a.begin desc limit " + page * pageSize + "," + pageSize;
|
|
|
|
|
|
// 已签约
|
|
|
String signedSql = "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.czrq" +
|
|
|
" from " +
|
|
|
" ( select expenses_status,czrq,code,patient,doctor,status,id,apply_date,patient_apply_date,expenses_time,reason,begin from wlyy_sign_family_renew where (doctor = ? or doctor_health = ?) and status = ? and type = 2" +
|
|
|
" order by begin desc ) a " +
|
|
|
" ,wlyy_patient b " +
|
|
|
" where a.patient = b.code and a.expenses_status = '1' order by a.begin desc limit " + page * pageSize + "," + pageSize;
|
|
|
|
|
|
|
|
|
//1:待签约 2, 待缴费 3 已签约
|
|
@ -787,10 +815,10 @@ public class SignWebService extends BaseService {
|
|
|
patients = jdbcTemplate.queryForList(sql, new Object[]{doctor, doctor, 0});
|
|
|
break;
|
|
|
case 2:// 待缴费
|
|
|
patients = jdbcTemplate.queryForList(sqlExpenses, new Object[]{doctor, doctor, 1});
|
|
|
patients = jdbcTemplate.queryForList(sqlExpenses, new Object[]{doctor, doctor, 0});
|
|
|
break;
|
|
|
case 3:// 已签约
|
|
|
patients = jdbcTemplate.queryForList(sql, new Object[]{doctor, doctor, 1});
|
|
|
patients = jdbcTemplate.queryForList(signedSql, new Object[]{doctor, doctor, 1});
|
|
|
break;
|
|
|
}
|
|
|
|
|
@ -934,9 +962,9 @@ public class SignWebService extends BaseService {
|
|
|
* 获取年度列表
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getRenewYearCount(String doctorCode){
|
|
|
public JSONObject getRenewYearCount(Long teamCode){
|
|
|
StringBuffer sql = new StringBuffer("SELECT t.sign_year labelCode,COUNT(1) amount " +
|
|
|
"FROM wlyy_sign_family t WHERE t.doctor ='"+doctorCode+"' AND t.end <=NOW() AND t.status=-4 AND sign_year IS NOT NULL GROUP BY t.sign_year DESC");
|
|
|
"FROM wlyy_sign_family t WHERE t.admin_team_code ='"+teamCode+"' AND t.end <=NOW() AND t.status=-4 AND sign_year IS NOT NULL GROUP BY t.sign_year DESC");
|
|
|
List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql.toString());
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("result",rs);
|