|
@ -3,6 +3,7 @@ package com.yihu.wlyy.web.common.util;
|
|
|
import com.yihu.wlyy.job.QuartzHelper;
|
|
|
import com.yihu.wlyy.job.consult.FamousConsultTimesJob;
|
|
|
import com.yihu.wlyy.service.app.disease.PatientDiseaseService;
|
|
|
import com.yihu.wlyy.service.app.scheduling.DoctorWorkTimeService;
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
@ -10,6 +11,8 @@ import org.springframework.data.redis.hash.HashMapper;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
/**
|
|
@ -25,6 +28,8 @@ public class ManagerUtilController extends BaseController{
|
|
|
StringRedisTemplate redisTemplate;
|
|
|
@Autowired
|
|
|
QuartzHelper quartzHelper;
|
|
|
@Autowired
|
|
|
DoctorWorkTimeService workTimeService;
|
|
|
|
|
|
/**
|
|
|
* 更新到redis
|
|
@ -81,4 +86,15 @@ public class ManagerUtilController extends BaseController{
|
|
|
return error(-1,"启动失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/famous_doctor/times_update")
|
|
|
public String famousConsultTimeUpdate(){
|
|
|
try{
|
|
|
workTimeService.consultTimesRemain(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
|
|
|
return write(200,"更新成功");
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return error(-1,"更新失败");
|
|
|
}
|
|
|
}
|
|
|
}
|