|
@ -333,7 +333,7 @@ public class SignWebService extends BaseService {
|
|
* @param doctor
|
|
* @param doctor
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public JSONObject getSignWebByDoctorCount(String doctor) {
|
|
|
|
|
|
public JSONObject getSignWebByDoctorCount(String doctor, String patientInfo) {
|
|
|
|
|
|
Doctor d = doctorDao.findByCode(doctor);
|
|
Doctor d = doctorDao.findByCode(doctor);
|
|
String sql ;
|
|
String sql ;
|
|
@ -350,6 +350,7 @@ public class SignWebService extends BaseService {
|
|
" AND STATUS = 0 " +
|
|
" AND STATUS = 0 " +
|
|
" AND type = 2 " +
|
|
" AND type = 2 " +
|
|
" AND expenses_status = '0' " +
|
|
" AND expenses_status = '0' " +
|
|
|
|
" AND (`name` or mobile like ? ) " +
|
|
" ) AS waitSignCount, " +
|
|
" ) AS waitSignCount, " +
|
|
"( " +
|
|
"( " +
|
|
" SELECT " +
|
|
" SELECT " +
|
|
@ -361,6 +362,7 @@ public class SignWebService extends BaseService {
|
|
" AND STATUS > 0 " +
|
|
" AND STATUS > 0 " +
|
|
" AND type = 2 " +
|
|
" AND type = 2 " +
|
|
" AND expenses_status = '0' " +
|
|
" AND expenses_status = '0' " +
|
|
|
|
" AND (`name` or mobile like ? ) " +
|
|
" ) AS waitPayCount, " +
|
|
" ) AS waitPayCount, " +
|
|
"( " +
|
|
"( " +
|
|
" SELECT " +
|
|
" SELECT " +
|
|
@ -372,6 +374,7 @@ public class SignWebService extends BaseService {
|
|
" AND STATUS = 1 " +
|
|
" AND STATUS = 1 " +
|
|
" AND type = 2 " +
|
|
" AND type = 2 " +
|
|
" AND expenses_status = '1' " +
|
|
" AND expenses_status = '1' " +
|
|
|
|
" AND (`name` or mobile like ? ) " +
|
|
" ) AS signCount";
|
|
" ) AS signCount";
|
|
}else{
|
|
}else{
|
|
sql ="SELECT " +
|
|
sql ="SELECT " +
|
|
@ -385,6 +388,7 @@ public class SignWebService extends BaseService {
|
|
" AND STATUS = 0 " +
|
|
" AND STATUS = 0 " +
|
|
" AND type = 2 " +
|
|
" AND type = 2 " +
|
|
" AND expenses_status = '0' " +
|
|
" AND expenses_status = '0' " +
|
|
|
|
" AND (`name` or mobile like ? ) " +
|
|
" ) AS waitSignCount, " +
|
|
" ) AS waitSignCount, " +
|
|
"( " +
|
|
"( " +
|
|
" SELECT " +
|
|
" SELECT " +
|
|
@ -396,6 +400,7 @@ public class SignWebService extends BaseService {
|
|
" AND STATUS > 0 " +
|
|
" AND STATUS > 0 " +
|
|
" AND type = 2 " +
|
|
" AND type = 2 " +
|
|
" AND expenses_status = '0' " +
|
|
" AND expenses_status = '0' " +
|
|
|
|
" AND (`name` or mobile like ? ) " +
|
|
" ) AS waitPayCount, " +
|
|
" ) AS waitPayCount, " +
|
|
"( " +
|
|
"( " +
|
|
" SELECT " +
|
|
" SELECT " +
|
|
@ -407,10 +412,11 @@ public class SignWebService extends BaseService {
|
|
" AND STATUS = 1 " +
|
|
" AND STATUS = 1 " +
|
|
" AND type = 2 " +
|
|
" AND type = 2 " +
|
|
" AND expenses_status = '1' " +
|
|
" AND expenses_status = '1' " +
|
|
|
|
" AND (`name` or mobile like ? ) " +
|
|
" ) AS signCount";
|
|
" ) AS signCount";
|
|
}
|
|
}
|
|
|
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
List<Map<String,Object>> list = StringUtils.isBlank(patientInfo) ? jdbcTemplate.queryForList(sql, new Object[]{"%%", "%%", "%%"}) : jdbcTemplate.queryForList(sql, new Object[]{ "%"+patientInfo + "%", "%"+patientInfo + "%", "%"+patientInfo + "%"});
|
|
|
|
|
|
if(list!=null&&list.size()>0){
|
|
if(list!=null&&list.size()>0){
|
|
return new JSONObject(list.get(0));
|
|
return new JSONObject(list.get(0));
|