|
@ -136,9 +136,11 @@ public class ExpensesRemindService extends BaseService {
|
|
|
throw new Exception("patient info can not find");
|
|
|
}
|
|
|
|
|
|
remindPatientExpenses(p, doc, hos);
|
|
|
|
|
|
return 1;
|
|
|
if(remindPatientExpenses(p, doc, hos) == 1){
|
|
|
return 1;
|
|
|
}else{
|
|
|
return 0;
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return 0;
|
|
@ -153,7 +155,7 @@ public class ExpensesRemindService extends BaseService {
|
|
|
* @param hos 医院
|
|
|
* @return
|
|
|
*/
|
|
|
public void remindPatientExpenses(Patient p, Doctor doc, Hospital hos) throws Exception {
|
|
|
public int remindPatientExpenses(Patient p, Doctor doc, Hospital hos) throws Exception {
|
|
|
try {
|
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
SimpleDateFormat dft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
@ -184,9 +186,13 @@ public class ExpensesRemindService extends BaseService {
|
|
|
|
|
|
if(wFlag || mFlag) {
|
|
|
redisTemplate.opsForValue().set("expenses:remind:" + p.getCode(), df.format(new Date()));
|
|
|
return 1;
|
|
|
}else{
|
|
|
return 0;
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
|
}
|