Forráskód Böngészése

患者预约记录修改

yeshijie 8 éve
szülő
commit
d26eb850cc

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientReservationDao.java

@ -35,6 +35,6 @@ public interface PatientReservationDao extends PagingAndSortingRepository<Patien
	PatientReservation findByPatientAndCancelerAndCancelTime(String patient,String canceler,String cancelerTime);
	//根据患者医获取近三个月的已取消的预约记录
	@Query("select a from PatientReservation a where a.patient = ?1 and a.startTime between ?2 and ?3 and a.status = 0 order by a.czrq desc")
	List<PatientReservation> findByPatientAndStartTime(String patientCode, String strStart, String strEnd);
	@Query("select a from PatientReservation a where a.patient = ?1 and (a.startTime between ?2 and ?3 or a.startTime between ?4 and ?5 ) and a.status = 0 order by a.czrq desc")
	List<PatientReservation> findByPatientAndStartTime(String patientCode, String strStart, String strEnd,String startTime,String endTime);
}

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/GuahaoXMService.java

@ -868,7 +868,7 @@ public class GuahaoXMService implements IGuahaoService {
    /**
     * 根据患者医保卡获取近三个月的预约记录
     */
    public List<PatientReservation> GetRegList(String patientCode, String strStart, String strEnd) throws Exception {
    public List<PatientReservation> GetRegList(String patientCode, String strStart, String strEnd,String strStartTime,String strEndTime) throws Exception {
        Patient patient = patientService.findByCode(patientCode);
        if (patient == null) {
            throw new Exception("不存在该用户!");
@ -982,7 +982,7 @@ public class GuahaoXMService implements IGuahaoService {
        }
        //根据患者医保卡获取近三个月的已取消的预约记录
        List<PatientReservation> list = patientReservationDao.findByPatientAndStartTime(patientCode,strStart,strEnd);
        List<PatientReservation> list = patientReservationDao.findByPatientAndStartTime(patientCode,strStart,strEnd,strStartTime,strEndTime);
        if(list.size()>0){
            patientRegList.addAll(list);
        }

+ 2 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/BookingController.java

@ -574,10 +574,11 @@ public class BookingController extends WeixinBaseController {
                             @RequestParam(value = "patient", required = false) String patient) {
        try {
            SimpleDateFormat sm = new SimpleDateFormat("yyyy-MM-dd");
            SimpleDateFormat sm2 = new SimpleDateFormat("yyyy/M/d");
            Date nowDate = new Date();
            Date oneMonthAfter = getMonthBefore(nowDate, -1);
            Date threeMonthBefore = getMonthBefore(nowDate, 3);        //三个月历史记录
            List<PatientReservation> list = guahaoXM.GetRegList(patient, sm.format(threeMonthBefore), sm.format(oneMonthAfter));
            List<PatientReservation> list = guahaoXM.GetRegList(patient, sm.format(threeMonthBefore), sm.format(oneMonthAfter), sm2.format(threeMonthBefore), sm2.format(oneMonthAfter));
            return write(200, "获取患者预约信息列表成功!", "data", list);
        } catch (Exception e) {
            return error(-1, e.getMessage());