浏览代码

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

trick9191 7 年之前
父节点
当前提交
c2f88868fb

+ 22 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/PatientReservation.java

@ -79,8 +79,13 @@ public class PatientReservation extends IdEntity {
	private Integer signType;
	private Integer signType;
	// 行政团队
	// 行政团队
	private Long adminTeamCode;
	private Long adminTeamCode;
	//关联电话记录Code
	//关联电话记录Code(通过客服系统预约才有值)
	private String callCode;
	private String callCode;
	//客服系统客服code(通过客服系统预约才有值)
	private String userCode;
	//客服系统客服name(通过客服系统预约才有值)
	private String userName;
	public String getCode() {
	public String getCode() {
		return code;
		return code;
@ -329,4 +334,20 @@ public class PatientReservation extends IdEntity {
	public void setCallCode(String callCode) {
	public void setCallCode(String callCode) {
		this.callCode = callCode;
		this.callCode = callCode;
	}
	}
	public String getUserCode() {
		return userCode;
	}
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
}
}

+ 1 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/config/SpringSecurityConfig.java

@ -30,6 +30,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
                "/login/**",
                "/login/**",
                "/yueren/**",
                "/yueren/**",
                "/customer/**",
                "/customer/**",
                "/third/**",
                "/admin/hos/doctor/importFromExcel",
                "/admin/hos/doctor/importFromExcel",
                "/admin/hos/doctor/importData",
                "/admin/hos/doctor/importData",
                "/admin/team/importData",
                "/admin/team/importData",

文件差异内容过多而无法显示
+ 65 - 6
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/BookingController.java


+ 21 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/PatientReservation.java

@ -79,8 +79,12 @@ public class PatientReservation extends IdEntity {
	// 行政团队
	// 行政团队
	private Long adminTeamCode;
	private Long adminTeamCode;
	//关联电话记录Code
	//关联电话记录Code(通过客服系统预约才有值)
	private String callCode;
	private String callCode;
	//客服系统客服code(通过客服系统预约才有值)
	private String userCode;
	//客服系统客服name(通过客服系统预约才有值)
	private String userName;
	public String getCode() {
	public String getCode() {
		return code;
		return code;
@ -329,4 +333,20 @@ public class PatientReservation extends IdEntity {
	public void setCallCode(String callCode) {
	public void setCallCode(String callCode) {
		this.callCode = callCode;
		this.callCode = callCode;
	}
	}
	public String getUserCode() {
		return userCode;
	}
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
}
}

+ 14 - 5
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/jw/GuahaoXMService.java

@ -5,8 +5,10 @@ import com.yihu.wlyy.entity.Patient;
import com.yihu.wlyy.entity.PatientReservation;
import com.yihu.wlyy.entity.PatientReservation;
import com.yihu.wlyy.entity.SignFamily;
import com.yihu.wlyy.entity.SignFamily;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.repository.PatientReservationDao;
import com.yihu.wlyy.repository.PatientReservationDao;
import com.yihu.wlyy.repository.SignFamilyDao;
import com.yihu.wlyy.repository.SignFamilyDao;
import com.yihu.wlyy.repository.UserDao;
import com.yihu.wlyy.repository.organization.HospitalMappingDao;
import com.yihu.wlyy.repository.organization.HospitalMappingDao;
import com.yihu.wlyy.service.common.ConsultService;
import com.yihu.wlyy.service.common.ConsultService;
import com.yihu.wlyy.service.common.PatientService;
import com.yihu.wlyy.service.common.PatientService;
@ -63,12 +65,15 @@ public class GuahaoXMService implements IGuahaoService {
    @Autowired
    @Autowired
    private ConsultService consultService;
    private ConsultService consultService;
    @Autowired
    private UserDao userDao;
    private ObjectMapper objectMapper = new ObjectMapper();
    private ObjectMapper objectMapper = new ObjectMapper();
    /**
    /**
     * 解析挂号后
     * 解析挂号后
     */
     */
    private String CreateOrderAfter(String response, String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String sectionType, String startTime, String endTime, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode,String callCode) throws Exception {
    private String CreateOrderAfter(String userCode,String response, String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String sectionType, String startTime, String endTime, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode,String callCode) throws Exception {
        String code = "";
        String code = "";
        if (response.startsWith("error") || response.startsWith("System-Error")) {
        if (response.startsWith("error") || response.startsWith("System-Error")) {
            throw new Exception(response);
            throw new Exception(response);
@ -102,6 +107,10 @@ public class GuahaoXMService implements IGuahaoService {
        reservation.setDoctorName(doctorName);
        reservation.setDoctorName(doctorName);
        //关联通话记录
        //关联通话记录
        reservation.setCallCode(callCode);
        reservation.setCallCode(callCode);
        reservation.setUserCode(userCode);
        User u  = userDao.findByCode(userCode);
        reservation.setUserName(u.getName());
        if(doctor!=null){
        if(doctor!=null){
            reservation.setDoctorJob(doctor.getTitle());
            reservation.setDoctorJob(doctor.getTitle());
            reservation.setDoctorPhoto(doctor.getPhoto());
            reservation.setDoctorPhoto(doctor.getPhoto());
@ -595,7 +604,7 @@ public class GuahaoXMService implements IGuahaoService {
    /**
    /**
     * 创建挂号单
     * 创建挂号单
     */
     */
    public String CreateOrder(String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String arrangeDate, String patient, String patientName, String cardNo, String clinicCard, String patientPhone,String callCode) throws Exception {
    public String CreateOrder(String userCode,String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String arrangeDate, String patient, String patientName, String cardNo, String clinicCard, String patientPhone,String callCode) throws Exception {
        String re = "";
        String re = "";
        Patient p = patientService.findByCode(patient);
        Patient p = patientService.findByCode(patient);
@ -656,7 +665,7 @@ public class GuahaoXMService implements IGuahaoService {
            verificationXml(response,"获取医生排班表失败!",ORDER_CREATE,content,method,msgBody,res);
            verificationXml(response,"获取医生排班表失败!",ORDER_CREATE,content,method,msgBody,res);
            //保存http日志
            //保存http日志
            logService.saveHttpLog(true,ORDER_CREATE,content,method,null,msgBody,res,null,logService.archiveType);
            logService.saveHttpLog(true,ORDER_CREATE,content,method,null,msgBody,res,null,logService.archiveType);
            re = CreateOrderAfter(response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, null, null,callCode);
            re = CreateOrderAfter(userCode,response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, null, null,callCode);
        } else {
        } else {
            throw new Exception("该排班信息错误或者不存在!");
            throw new Exception("该排班信息错误或者不存在!");
        }
        }
@ -1164,7 +1173,7 @@ public class GuahaoXMService implements IGuahaoService {
    /**
    /**
     * 转诊预约挂号
     * 转诊预约挂号
     */
     */
    public String CreateOrderByDoctor(String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String arrangeDate, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode,String callCode) throws Exception {
    public String CreateOrderByDoctor(String userCode,String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String arrangeDate, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode,String callCode) throws Exception {
        String re = "";
        String re = "";
        Patient p = patientService.findByCode(patient);
        Patient p = patientService.findByCode(patient);
@ -1180,7 +1189,7 @@ public class GuahaoXMService implements IGuahaoService {
            String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName,patientPhone);
            String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName,patientPhone);
            re = CreateOrderAfter(response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode,callCode);
            re = CreateOrderAfter(userCode,response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode,callCode);
        } else {
        } else {
            throw new Exception("该排班信息错误或者不存在!");
            throw new Exception("该排班信息错误或者不存在!");
        }
        }

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/jw/IGuahaoService.java

@ -36,7 +36,7 @@ public interface IGuahaoService {
	/**
	/**
	 * 创建挂号单
	 * 创建挂号单
	 */
	 */
	public String CreateOrder(String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String arrangeDate, String patient, String patientName, String cardNo, String clinicCard, String patientPhone,String callCode) throws Exception;
	public String CreateOrder(String userCode,String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String arrangeDate, String patient, String patientName, String cardNo, String clinicCard, String patientPhone,String callCode) throws Exception;
	/**
	/**
	 * 获取医生信息
	 * 获取医生信息

+ 16 - 3
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/jw/JwSmjkService.java

@ -1,5 +1,7 @@
package com.yihu.wlyy.service.jw;
package com.yihu.wlyy.service.jw;
import com.yihu.wlyy.entity.Patient;
import com.yihu.wlyy.repository.PatientDao;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.HttpClientUtil;
import com.yihu.wlyy.util.HttpClientUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
@ -7,7 +9,9 @@ import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONArray;
import org.json.JSONObject;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.annotation.AccessType;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.ArrayList;
@ -24,6 +28,8 @@ public class JwSmjkService {
    //基卫服务地址
    //基卫服务地址
    @Value("${sign.check_upload}")
    @Value("${sign.check_upload}")
    private String jwUrl;
    private String jwUrl;
    @Autowired
    private PatientDao patientDao;
//    private ObjectMapper objectMapper = new ObjectMapper();
//    private ObjectMapper objectMapper = new ObjectMapper();
@ -362,14 +368,21 @@ public class JwSmjkService {
    /**
    /**
     * 根据患者医保卡获取近三个月的预约记录
     * 根据患者医保卡获取近三个月的预约记录
     * @param patient
     * @param keyword
     * @return
     * @return
     * @throws Exception
     * @throws Exception
     */
     */
    public String GetRegList(String patient) throws Exception{
    public String GetRegList(String keyword) throws Exception{
        Patient p = patientDao.findByIdcard(keyword);
        if(p==null){
            p = patientDao.findBySsc(keyword);
        }
        if(p==null){
            return null;
        }
        String url = jwUrl + "/third/guahao/GetRegList";
        String url = jwUrl + "/third/guahao/GetRegList";
        List<NameValuePair> params = new ArrayList<>();
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("patient", patient));
        params.add(new BasicNameValuePair("patient", p.getCode()));
        String response = HttpClientUtil.post(url, params, "UTF-8");
        String response = HttpClientUtil.post(url, params, "UTF-8");
        return response;
        return response;

+ 4 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/task/RemindFocusWechatTask.java

@ -39,7 +39,10 @@ public class RemindFocusWechatTask implements Runnable {
    public void run() {
    public void run() {
        for (Map<String, Object> p : patients) {
        for (Map<String, Object> p : patients) {
            try {
            try {
                if (p.get("mobile") == null || StringUtils.isEmpty(p.get("mobile").toString())||Integer.parseInt(p.get("status").toString())!=1) {
//                if (p.get("mobile") == null || StringUtils.isEmpty(p.get("mobile").toString())||Integer.parseInt(p.get("status").toString())!=1) {
//                    continue;
//                }
                if (p.get("mobile") == null || StringUtils.isEmpty(p.get("mobile").toString())) {
                    continue;
                    continue;
                }
                }
                String msg = "尊敬的" + p.get("name").toString() + "," + doctor.getName() + "医生提醒您:" +
                String msg = "尊敬的" + p.get("name").toString() + "," + doctor.getName() + "医生提醒您:" +