chenweida 7 роки тому
батько
коміт
102c29cf90

+ 4 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java

@ -73,6 +73,8 @@ public class PatientHealthIndexService extends BaseService {
    @Autowired
    private CommonUtil CommonUtil;
    @Autowired
    private PushMsgTask pushMsgTask;
@ -311,7 +313,7 @@ public class PatientHealthIndexService extends BaseService {
            // 批量保存消息
            messageDao.save(messages);
            // 推送消息给医生
            PushMsgTask.getInstance().put(array);
            pushMsgTask.put(array);
        }
        return model;
    }
@ -396,7 +398,7 @@ public class PatientHealthIndexService extends BaseService {
        // 批量保存消息
        messageDao.save(messages);
        // 推送消息给医生
        PushMsgTask.getInstance().put(array);
        pushMsgTask.put(array);
    }
    /**

+ 5 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -66,6 +66,9 @@ public class DoctorConsultController extends WeixinBaseController {
    private CommonUtil CommonUtil;
    @Autowired
    private ImUtill ImUtill;
    @Autowired
    private PushMsgTask pushMsgTask;
    /**
     * 三师咨询列表查询
     *
@ -686,11 +689,11 @@ public class DoctorConsultController extends WeixinBaseController {
            // 保存到数据库
            JSONObject result = consultTeamService.famousConsult(consult, getUID(), "2",null);
            // 推送消息给医生
            PushMsgTask.getInstance().put(consult.getDoctor(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_DOCTOR.D_CT_04.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_DOCTOR.名医咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_DOCTOR.您有新的名医咨询.name(), consult.getConsult());
            pushMsgTask.put(consult.getDoctor(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_DOCTOR.D_CT_04.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_DOCTOR.名医咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_DOCTOR.您有新的名医咨询.name(), consult.getConsult());
            if (StringUtils.isNotEmpty(images)) {
                String[] arr = images.split(",");
                for (String img : arr) {
                    PushMsgTask.getInstance().put(consult.getDoctor(), "2", MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_DOCTOR.名医咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_DOCTOR.您有新的名医咨询.name(), img);
                    pushMsgTask.put(consult.getDoctor(), "2", MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_DOCTOR.名医咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_DOCTOR.您有新的名医咨询.name(), img);
                }
            }
            return write(200,"创建成功!","data",result);

+ 4 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/intervene/DoctorInterveneController.java

@ -47,6 +47,8 @@ public class DoctorInterveneController extends BaseController {
	private PatientDeviceService patientDeviceService;
	@Autowired
	private PatientInspectionService patientInspectionService;
	@Autowired
	private PushMsgTask pushMsgTask;
	/**
	 * 患者可用设备查询接口
@ -145,7 +147,7 @@ public class DoctorInterveneController extends BaseController {
			// 保存到数据库
			patientInspectionService.save(inspection, items);
			// 推送消息给患者
			PushMsgTask.getInstance().put(patient, MessageType.MESSAGE_TYPE_PATIENT_SELF_INSPECTION.P_SI_01.name(), MessageType.MESSAGE_TYPE_PATIENT_SELF_INSPECTION.体测提醒.name(), MessageType.MESSAGE_TYPE_PATIENT_SELF_INSPECTION.您有新的体测提醒.name(), inspection.getCode());
			pushMsgTask.put(patient, MessageType.MESSAGE_TYPE_PATIENT_SELF_INSPECTION.P_SI_01.name(), MessageType.MESSAGE_TYPE_PATIENT_SELF_INSPECTION.体测提醒.name(), MessageType.MESSAGE_TYPE_PATIENT_SELF_INSPECTION.您有新的体测提醒.name(), inspection.getCode());
			return success("保存成功");
		} catch (Exception e) {
			error(e);
@ -186,7 +188,7 @@ public class DoctorInterveneController extends BaseController {
			// 保存到数据库
			PatientInspectionSuggest temp = patientInspectionService.save(pis);
			// 推送消息给患者
			PushMsgTask.getInstance().put(patient, MessageType.MESSAGE_TYPE_PATIENT_INSPECTION_SUGGEST.P_IS_01.name(), MessageType.MESSAGE_TYPE_PATIENT_INSPECTION_SUGGEST.检查检验.name(), MessageType.MESSAGE_TYPE_PATIENT_INSPECTION_SUGGEST.您有新的检查检验建议.name(), String.valueOf(temp.getId()));
			pushMsgTask.put(patient, MessageType.MESSAGE_TYPE_PATIENT_INSPECTION_SUGGEST.P_IS_01.name(), MessageType.MESSAGE_TYPE_PATIENT_INSPECTION_SUGGEST.检查检验.name(), MessageType.MESSAGE_TYPE_PATIENT_INSPECTION_SUGGEST.您有新的检查检验建议.name(), String.valueOf(temp.getId()));
			return success("保存成功");
		} catch (Exception e) {
			error(e);

+ 3 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/medical/DoctorMedicalRecordController.java

@ -42,6 +42,8 @@ public class DoctorMedicalRecordController extends BaseController {
	private MedicalRecordsService medicalRecordsService;
	@Autowired
	private ConsultTeamService consultTeamService;
	@Autowired
	private PushMsgTask pushMsgTask;
	/**
	 * 查询患者片段记录列表
@ -286,7 +288,6 @@ public class DoctorMedicalRecordController extends BaseController {
	/**
	 * 患者片段记录修改接口
	 * @param record 记录标识
	 * @param part 
	 * @param content
	 * @return
	 */
@ -355,7 +356,7 @@ public class DoctorMedicalRecordController extends BaseController {
		try {
			PatientMedicalRecords temp = medicalRecordsService.addRecord(getUID(), patient, consult, title, parts);
			//推送消息给患者
			PushMsgTask.getInstance().put(patient, MessageType.MESSAGE_TYPE_PATIENT_MEDICAL_RECORD.P_MR_01.name(), MessageType.MESSAGE_TYPE_PATIENT_MEDICAL_RECORD.病历夹.name(), MessageType.MESSAGE_TYPE_PATIENT_MEDICAL_RECORD.您有新的病历记录.name(), temp.getCode());
			pushMsgTask.put(patient, MessageType.MESSAGE_TYPE_PATIENT_MEDICAL_RECORD.P_MR_01.name(), MessageType.MESSAGE_TYPE_PATIENT_MEDICAL_RECORD.病历夹.name(), MessageType.MESSAGE_TYPE_PATIENT_MEDICAL_RECORD.您有新的病历记录.name(), temp.getCode());
			return success("保存成功!");
		} catch (Exception e) {
			error(e);

+ 3 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultCommunicationController.java

@ -36,6 +36,8 @@ public class ConsultCommunicationController extends WeixinBaseController {
	@Autowired
	private CommonUtil CommonUtil;
	@Autowired
	private PushMsgTask pushMsgTask;
	/**
	 * 添加病友圈帖子
	 * @param question 问题
@ -162,7 +164,7 @@ public class ConsultCommunicationController extends WeixinBaseController {
			String patient = consultCommunicationService.addReply(reply);
			if (!StringUtils.equals(patient, getUID())) {
				// 推送消息给患者
				PushMsgTask.getInstance().put(patient, MessageType.MESSAGE_TYPE_PATIENT_CONSULT_COMMUNICATION_REPLY.P_CC_01.name(), MessageType.MESSAGE_TYPE_PATIENT_CONSULT_COMMUNICATION_REPLY.病友圈.name(), MessageType.MESSAGE_TYPE_PATIENT_CONSULT_COMMUNICATION_REPLY.您有新的回复内容.name(), consult);
				pushMsgTask.put(patient, MessageType.MESSAGE_TYPE_PATIENT_CONSULT_COMMUNICATION_REPLY.P_CC_01.name(), MessageType.MESSAGE_TYPE_PATIENT_CONSULT_COMMUNICATION_REPLY.病友圈.name(), MessageType.MESSAGE_TYPE_PATIENT_CONSULT_COMMUNICATION_REPLY.您有新的回复内容.name(), consult);
			}
			return success("回复成功!");
		} catch (Exception e) {

+ 5 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultController.java

@ -75,6 +75,8 @@ public class ConsultController extends WeixinBaseController {
    private ImUtill ImUtill;
    @Autowired
    private HttpUtil httpUtil;
    @Autowired
    private PushMsgTask pushMsgTask;
    /**
     * 患者咨询记录查询
@ -372,7 +374,7 @@ public class ConsultController extends WeixinBaseController {
//            }
            // 推送消息给医生
            PushMsgTask.getInstance().put(doctor, MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.D_CT_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_PRESCRIPTION.续方咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_PRESCRIPTION.您有新的续方咨询.name(), consult.getConsult());
           pushMsgTask.put(doctor, MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.D_CT_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_PRESCRIPTION.续方咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_PRESCRIPTION.您有新的续方咨询.name(), consult.getConsult());
            BusinessLogs.info(BusinessLogs.BusinessType.consult, getRepUID(), getUID(), new JSONObject(consult));
            return write(200, "提交成功", "data", consult);
@ -468,7 +470,7 @@ public class ConsultController extends WeixinBaseController {
            }
            // 推送消息给医生
            PushMsgTask.getInstance().put(consult.getDoctor(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.D_CT_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.指定咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.您有新的指定咨询.name(), consult.getConsult());
           pushMsgTask.put(consult.getDoctor(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.D_CT_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.指定咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.您有新的指定咨询.name(), consult.getConsult());
            BusinessLogs.info(BusinessLogs.BusinessType.consult, getRepUID(), getUID(), new JSONObject(consult));
            return write(200, "提交成功", "data", consult);
        } catch (Exception ex) {
@ -562,7 +564,7 @@ public class ConsultController extends WeixinBaseController {
            //名医咨询次数减一
            doctorWorkTimeService.setDoctorCurrentConsultTimesRemain(doctorCode);
            // 推送消息给医生
            PushMsgTask.getInstance().put(consult.getDoctor(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM.D_CT_03.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM.名医咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM.您有新的名医咨询.name(), consult.getConsult());
           pushMsgTask.put(consult.getDoctor(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM.D_CT_03.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM.名医咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM.您有新的名医咨询.name(), consult.getConsult());
            BusinessLogs.info(BusinessLogs.BusinessType.consult, getRepUID(), getUID(), new JSONObject(consult));
            return write(200, "提交成功", "data", resultConsult);
        } catch (Exception ex) {