瀏覽代碼

处方查询新增状态过滤

wangjun 4 年之前
父節點
當前提交
2690e2b673

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionDao.java

@ -41,7 +41,7 @@ public interface PrescriptionDao extends PagingAndSortingRepository<WlyyPrescrip
    @Query("update WlyyPrescriptionDO p set p.status=?1 ,p.finishTime =?2 where p.outpatientId=?3")
    void updateStatusByOutPatientId(Integer status, Date date,String id);
    @Query("select a from WlyyPrescriptionDO a where a.outpatientId = ?1 ")
    @Query("select a from WlyyPrescriptionDO a where a.outpatientId = ?1 and a.checkStatus <>4 ")
    List<WlyyPrescriptionDO> findByOutpatientId(String outpatientId);
    List<WlyyPrescriptionDO> findById(String id);

+ 2 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -609,7 +609,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " count(1) AS \"total\" " +
                " FROM " +
                " wlyy_prescription p ";
        totalSql += " WHERE 1=1 and p.check_status <>3 ";
        totalSql += " WHERE 1=1 and p.check_status <>3 and p.check_status <>4";
        if (StringUtils.isNotBlank(patient)) {
            totalSql += " AND p.patient_code ='" + patient + "'";
        }
@ -8389,6 +8389,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(id);
        if (null!=wlyyPrescriptionDO){
            wlyyPrescriptionDO.setCheckStatus(4);
            wlyyPrescriptionDO.setStatus(-1);
        }
        wlyyPrescriptionDO =  prescriptionDao.save(wlyyPrescriptionDO);
        return wlyyPrescriptionDO;

+ 3 - 0
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/job/PrescriptionOverdueJob.java

@ -4,6 +4,7 @@ import com.yihu.jw.service.channel.PrescriptionStatusUpdateService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.Trigger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -20,6 +21,8 @@ public class PrescriptionOverdueJob implements Job {
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        logger.info("START========PrescriptionOverdueJob========");
        try {
            Trigger trigger =jobExecutionContext.getTrigger();
            System.out.println("执行时间为"+trigger.getNextFireTime());
            prescriptionStatusUpdateService.setOutPatientOver();
            logger.info("END========PrescriptionOverdueJob========");
        } catch (Exception e) {

+ 1 - 1
svr/svr-internet-hospital-job/src/main/resources/system.properties

@ -3,7 +3,7 @@
prescriptionStatus_update_job=0 */2 * * * ?
# 门诊记录过期job,每天1 点触发
prescription_overdue_job=0 0 1 * * ?
prescription_overdue_job=0 0 2 * * ?
#每天13 点触发
data_upload_job=0 0 2 * * ?