trick9191 7 år sedan
förälder
incheckning
1d754fa697

+ 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 Long adminTeamCode;
	//关联电话记录Code
	//关联电话记录Code(通过客服系统预约才有值)
	private String callCode;
	//客服系统客服code(通过客服系统预约才有值)
	private String userCode;
	//客服系统客服name(通过客服系统预约才有值)
	private String userName;
	public String getCode() {
		return code;
@ -329,4 +334,20 @@ public class PatientReservation extends IdEntity {
	public void setCallCode(String 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/**",
                "/yueren/**",
                "/customer/**",
                "/third/**",
                "/admin/hos/doctor/importFromExcel",
                "/admin/hos/doctor/importData",
                "/admin/team/importData",

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 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;
	//关联电话记录Code
	//关联电话记录Code(通过客服系统预约才有值)
	private String callCode;
	//客服系统客服code(通过客服系统预约才有值)
	private String userCode;
	//客服系统客服name(通过客服系统预约才有值)
	private String userName;
	public String getCode() {
		return code;
@ -329,4 +333,20 @@ public class PatientReservation extends IdEntity {
	public void setCallCode(String 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.SignFamily;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.repository.PatientReservationDao;
import com.yihu.wlyy.repository.SignFamilyDao;
import com.yihu.wlyy.repository.UserDao;
import com.yihu.wlyy.repository.organization.HospitalMappingDao;
import com.yihu.wlyy.service.common.ConsultService;
import com.yihu.wlyy.service.common.PatientService;
@ -63,12 +65,15 @@ public class GuahaoXMService implements IGuahaoService {
    @Autowired
    private ConsultService consultService;
    @Autowired
    private UserDao userDao;
    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 = "";
        if (response.startsWith("error") || response.startsWith("System-Error")) {
            throw new Exception(response);
@ -102,6 +107,10 @@ public class GuahaoXMService implements IGuahaoService {
        reservation.setDoctorName(doctorName);
        //关联通话记录
        reservation.setCallCode(callCode);
        reservation.setUserCode(userCode);
        User u  = userDao.findByCode(userCode);
        reservation.setUserName(u.getName());
        if(doctor!=null){
            reservation.setDoctorJob(doctor.getTitle());
            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 = "";
        Patient p = patientService.findByCode(patient);
@ -656,7 +665,7 @@ public class GuahaoXMService implements IGuahaoService {
            verificationXml(response,"获取医生排班表失败!",ORDER_CREATE,content,method,msgBody,res);
            //保存http日志
            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 {
            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 = "";
        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);
            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 {
            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;
import com.yihu.wlyy.entity.Patient;
import com.yihu.wlyy.repository.PatientDao;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.HttpClientUtil;
import org.apache.commons.lang3.StringUtils;
@ -7,7 +9,9 @@ import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.annotation.AccessType;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@ -24,6 +28,8 @@ public class JwSmjkService {
    //基卫服务地址
    @Value("${sign.check_upload}")
    private String jwUrl;
    @Autowired
    private PatientDao patientDao;
//    private ObjectMapper objectMapper = new ObjectMapper();
@ -362,14 +368,21 @@ public class JwSmjkService {
    /**
     * 根据患者医保卡获取近三个月的预约记录
     * @param patient
     * @param keyword
     * @return
     * @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";
        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");
        return response;