فهرست منبع

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 7 سال پیش
والد
کامیت
b029dc9abb

+ 11 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/job/PrescriptionPayOverdueJob.java

@ -1,5 +1,6 @@
package com.yihu.wlyy.job;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
@ -23,7 +24,16 @@ public class PrescriptionPayOverdueJob implements Job {
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        try {
            logger.info("Prescription_Pay_Overdue_Job_start");
            StringBuffer sql = new StringBuffer("UPDATE wlyy_prescription SET status = -3 WHERE TIMESTAMPDIFF(second,create_time,NOW())>=172800");
            StringBuffer sql = new StringBuffer("UPDATE wlyy_prescription " +
                    " JOIN wlyy_prescription_reviewed ON wlyy_prescription_reviewed.prescription_code = wlyy_prescription. CODE " +
                    " SET wlyy_prescription.`status` = -3 " +
                    " WHERE " +
                    " wlyy_prescription.`status` = " + PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue() +
                    " AND TIMESTAMPDIFF( " +
                    " SECOND, " +
                    " wlyy_prescription_reviewed.reviewed_time, " +
                    " NOW() " +
                    " ) >= 86400");
            jdbcTemplate.execute(sql.toString());
            logger.info("Prescription_Pay_Overdue_Job_end");
        }catch (Exception e){

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -317,7 +317,7 @@ public class PrescriptionInfoService extends BaseService {
        if (prescription!=null&&reviewed != null && prescription.getStatus() == PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue()&&reviewed.getReviewedTime()!=null) {
            Long s = (new Date().getTime()-reviewed.getReviewedTime().getTime()) / 1000;
            //rs.put("time",s);
            if (s > 172800) {
            if (s > 86400) {
                prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_outtime.getValue());
                prescriptionDao.save(prescription);
            }
@ -814,7 +814,7 @@ public class PrescriptionInfoService extends BaseService {
            if (state != null && state == 1) {
                prescriptionNoticesService.sendMessages(prescription.getPatient(), prescription.getDoctorName(), null, 1, 1, "prescription/html/re-prescription_info.html?openid=" + p.getOpenid() + "&toUser=" + p.getCode() + "&toName=" + p.getName() + "&code=" + prescription.getCode());
            } else {
                prescriptionNoticesService.sendMessages(prescription.getPatient(), prescription.getDoctorName(), null, 1, 2, "prescription/html/re-prescription_info.html?openid=" + p.getOpenid() + "&toUser=" + p.getCode() + "&toName=" + p.getName() + "&code=" + prescription.getCode());
                prescriptionNoticesService.sendMessages(prescription.getPatient(), prescription.getDoctorName(), null, 1, 0, "prescription/html/re-prescription_info.html?openid=" + p.getOpenid() + "&toUser=" + p.getCode() + "&toName=" + p.getName() + "&code=" + prescription.getCode());
            }
            return 1;
        } catch (Exception e) {

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java

@ -66,7 +66,7 @@ public class PatientService extends TokenService {
    private Clock clock = Clock.DEFAULT;
    //可续签月份
    private int[] canRenewMonth = {4, 5, 6, 7};
    private int[] canRenewMonth = {1,2,3,4,5,6,7,8,9,10,11,12};
    public void setClock(Clock clock) {
        this.clock = clock;