|
@ -990,8 +990,31 @@ public class SignWebService extends BaseService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public int sendRenewOverToPatients(String access_token, String doctor) throws Exception {
|
|
|
String sql = "SELECT p.name,p.openid,t.doctor_name doctorName,p.code,p.mobile FROM wlyy_sign_family t ,wlyy_patient p " +
|
|
|
"WHERE t.patient = p.code AND t.doctor = ? AND t.status =-4 AND t.expenses_status ='1' ";
|
|
|
String sql = "SELECT " +
|
|
|
" p. NAME, " +
|
|
|
" p.openid, " +
|
|
|
" t.doctor_name doctorName, " +
|
|
|
" p. CODE, " +
|
|
|
" p.mobile " +
|
|
|
" FROM " +
|
|
|
" wlyy_sign_family t, " +
|
|
|
" wlyy_patient p " +
|
|
|
" WHERE " +
|
|
|
" t.patient = p. CODE " +
|
|
|
" AND t.doctor = '"+doctor+"' " +
|
|
|
" AND t.status =-4 " +
|
|
|
" AND t.expenses_status = '1' " +
|
|
|
" AND t.sign_year = '"+(DateUtil.getSignYear()-1)+"' " +
|
|
|
" AND NOT EXISTS ( " +
|
|
|
" SELECT " +
|
|
|
" 1 " +
|
|
|
" FROM " +
|
|
|
" wlyy_sign_family a " +
|
|
|
" WHERE " +
|
|
|
" a.patient = t.patient " +
|
|
|
" AND a.status>0 " +
|
|
|
" AND a.sign_year = '"+DateUtil.getSignYear()+"' " +
|
|
|
")";
|
|
|
|
|
|
List<Map<String, Object>> signFamilies = jdbcTemplate.queryForList(sql, new Object[]{doctor});
|
|
|
|