Bladeren bron

代码修改

yeshijie 8 jaren geleden
bovenliggende
commit
d60ab44e6e

+ 6 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/archives/PatientArchivesController.java

@ -113,7 +113,8 @@ public class PatientArchivesController extends WeixinBaseController {
    public String getEventCatalog(@ApiParam(name="event",value="事件ID",defaultValue = "")
                                @RequestParam(value="event",required = true) String event) {
        try {
            List<Map<String,String>> result = patientRecordService.getEventCatalog(getUID(),event);
            List<Map<String,String>> result = patientRecordService.getEventCatalog(getRepUID(),event);
//            List<Map<String,String>> result = patientRecordService.getEventCatalog(getUID(),event);
            return write(200, "通过事件号获取档案类型列表成功!", "data", result);
        } catch (Exception e) {
@ -140,7 +141,8 @@ public class PatientArchivesController extends WeixinBaseController {
                               @ApiParam(name="pageSize",value="每页几行",defaultValue = "10")
                                   @RequestParam(value="pageSize",required = true) String pageSize) {
        try {
            String result = patientRecordService.getDrugsListPage(getUID(), page, pageSize);     //"P20161008001"
            String result = patientRecordService.getDrugsListPage(getRepUID(), page, pageSize);     //"P20161008001"
//            String result = patientRecordService.getDrugsListPage(getUID(), page, pageSize);     //"P20161008001"
            return write(200, "获取用药记录成功!", "data", result);
        } catch (Exception e) {
@ -261,7 +263,8 @@ public class PatientArchivesController extends WeixinBaseController {
                                 @RequestParam(value="data",required = true) String data)
    {
        try {
            patientEventService.saveEventDetail(data, getUID());
            patientEventService.saveEventDetail(data, getRepUID());
//            patientEventService.saveEventDetail(data, getUID());
            return write(200, "保存就诊事件成功!");
        } catch (Exception e) {

+ 2 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/booking/PatientBookingController.java

@ -64,7 +64,8 @@ public class PatientBookingController extends WeixinBaseController{
            if (re) {
                //更新状态
                patientReservationService.patientCancelOrder(orderId,getUID());//"9aa5c557e06a4324911487a035195545"
                patientReservationService.patientCancelOrder(orderId,getRepUID());//"9aa5c557e06a4324911487a035195545"
//                patientReservationService.patientCancelOrder(orderId,getUID());//"9aa5c557e06a4324911487a035195545"
                //微信消息
                Patient p = patientService.findByCode(obj.getPatient());
                if (StringUtils.isNotEmpty(p.getOpenid())) {

+ 8 - 12
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultMoviController.java

@ -1,23 +1,18 @@
package com.yihu.wlyy.web.patient.consult;
import com.yihu.wlyy.entity.consult.ConsultMoVi;
import com.yihu.wlyy.entity.doctor.profile.DoctorComment;
import com.yihu.wlyy.service.app.consult.ConsultMoviService;
import com.yihu.wlyy.service.app.consult.DoctorCommentService;
import com.yihu.wlyy.web.WeixinBaseController;
import io.swagger.annotations.Api;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.yihu.wlyy.entity.consult.ConsultMoVi;
import com.yihu.wlyy.entity.doctor.profile.DoctorComment;
import com.yihu.wlyy.service.app.consult.ConsultMoviService;
import com.yihu.wlyy.service.app.consult.DoctorCommentService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.web.WeixinBaseController;
/**
 * 患者端视频咨询控制类
 * 
@ -61,7 +56,7 @@ public class ConsultMoviController extends WeixinBaseController {
	 * @param hour_begin 预约开始时间
	 * @param hour_end 预约结束时间
	 * @param content 咨询内容说明
	 * @param imageUrls 图片URL,多图逗号分隔
	 * @param images 图片URL,多图逗号分隔
	 * @return
	 */
	@RequestMapping(value = "add")
@ -97,7 +92,8 @@ public class ConsultMoviController extends WeixinBaseController {
				doctor = consultMoviService.findToDoctor(consult);
			}
			// 保存评价
			DoctorComment comment = doctorCommentService.consultMoViComment(getUID(), consult, content, doctor, star, 1);
			DoctorComment comment = doctorCommentService.consultMoViComment(getRepUID(), consult, content, doctor, star, 1);
//			DoctorComment comment = doctorCommentService.consultMoViComment(getUID(), consult, content, doctor, star, 1);
			if (comment == null) {
				return error(-1, "评价失败!");
			}

+ 2 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/EvaluateController.java

@ -1,12 +1,10 @@
package com.yihu.wlyy.web.patient.consult;
import com.yihu.wlyy.entity.consult.ConsultTeam;
import com.yihu.wlyy.entity.consult.Evaluate;
import com.yihu.wlyy.entity.consult.EvaluateLabel;
import com.yihu.wlyy.service.app.consult.ConsultTeamService;
import com.yihu.wlyy.service.app.consult.EvaluateLabelService;
import com.yihu.wlyy.service.app.consult.EvaluateService;
import com.yihu.wlyy.util.ClazzReflect;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import org.json.JSONArray;
@ -44,7 +42,8 @@ public class EvaluateController  extends BaseController {
    @ResponseBody
    public String save(@RequestParam(required = true,value="evaluate") String evaluateJson){
        try{
            evaluateService.saveByJson(evaluateJson,getUID());
            evaluateService.saveByJson(evaluateJson,getRepUID());
//            evaluateService.saveByJson(evaluateJson,getUID());
            return  write(200,"保存成功!");
        }catch (Exception e){
            error(e);

+ 2 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/health/PatientHealthController.java

@ -390,7 +390,8 @@ public class PatientHealthController extends BaseController {
        try {
//            DevicePatientHealthIndex obj = healthIndexService.addPatientHealthIndex(data, type, getUID(), null);
            if(StringUtils.isBlank(patient)){
                patient = getUID();
                patient = getRepUID();
//                patient = getUID();
            }
            DevicePatientHealthIndex obj = healthIndexService.addPatientHealthIndex(data, type, patient, null);
            //血糖和血压需要校验

+ 2 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/health/PatientHealthGuidanceController.java

@ -34,7 +34,8 @@ public class PatientHealthGuidanceController extends BaseController {
	@ResponseBody
	public String modifyStatus() {
		try {
			patientHealthGuidanceService.modifyStatus(getUID(),"1");
			patientHealthGuidanceService.modifyStatus(getRepUID(),"1");
//			patientHealthGuidanceService.modifyStatus(getUID(),"1");
			return write(200, "设置成功!");
		} catch (Exception e) {
			error(e);

+ 21 - 13
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/FamilyContractController.java

@ -1,22 +1,22 @@
package com.yihu.wlyy.web.patient.sign;
import com.yihu.wlyy.entity.organization.Hospital;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.team.sign.DoctorPatientGroupInfo;
import com.yihu.wlyy.entity.message.Message;
import com.yihu.wlyy.entity.organization.Hospital;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.entity.patient.invitation.PatientInvitationLog;
import com.yihu.wlyy.repository.doctor.DoctorPatientGroupInfoDao;
import com.yihu.wlyy.service.app.family.FamilyService;
import com.yihu.wlyy.service.app.sign.FamilyContractService;
import com.yihu.wlyy.service.app.sign.SignWebService;
import com.yihu.wlyy.service.common.account.*;
import com.yihu.wlyy.service.common.account.DoctorService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdcardValidator;
import com.yihu.wlyy.util.RSAUtils;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.entity.patient.invitation.PatientInvitationLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
@ -24,7 +24,6 @@ import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.http.CacheControl;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@ -204,7 +203,8 @@ public class FamilyContractController extends BaseController {
    @ResponseBody
    public String homepage(String doctor) {
        try {
            JSONObject json = familyContractService.findDoctorMainPage(getUID(), doctor);
            JSONObject json = familyContractService.findDoctorMainPage(getRepUID(), doctor);
//            JSONObject json = familyContractService.findDoctorMainPage(getUID(), doctor);
            if (json == null) {
                return error(-1, "医生主页查询失败!");
@ -227,7 +227,8 @@ public class FamilyContractController extends BaseController {
    public String signStatus(String doctor) {
        try {
            // -1未签约,0待签约,1已签约,2患者申请取消签约,3医生申请取消签约
            int status = familyContractService.findSignStatus(getUID(), doctor);
            int status = familyContractService.findSignStatus(getRepUID(), doctor);
//            int status = familyContractService.findSignStatus(getUID(), doctor);
            return write(200, "数据加载成功!", "data", status);
        } catch (Exception e) {
            error(e);
@ -314,7 +315,8 @@ public class FamilyContractController extends BaseController {
            if (StringUtils.isEmpty(getOpenid())) {
                return error(-1, "无效的Openid!");
            }
            String doctor = familyContractService.checkPatient(getUID());
            String doctor = familyContractService.checkPatient(getRepUID());
//            String doctor = familyContractService.checkPatient(getUID());
            return write(200, "签约验证成功!", "data", doctor);
        } catch (Exception e) {
            error(e);
@ -352,7 +354,8 @@ public class FamilyContractController extends BaseController {
                return error(-1, "请输入正确的身份证号!");
            }
            Patient patient = patientService.findByCode(getUID());
            Patient patient = patientService.findByCode(getRepUID());
//            Patient patient = patientService.findByCode(getUID());
            if (!StringUtils.equals(patient.getIdcard(), idcard)) {
                return error(-1, "身份证号错误,请输入注册的身份证号!");
            }
@ -548,7 +551,8 @@ public class FamilyContractController extends BaseController {
            // return error(-1, "无效的用户请求!");
            // }
            // -1申请失败, 200申请成功,其他为状态已变化无法取消申请
            patientCode = StringUtils.isNoneBlank(patientCode) ? patientCode : getUID();
            patientCode = StringUtils.isNoneBlank(patientCode) ? patientCode : getRepUID();
//            patientCode = StringUtils.isNoneBlank(patientCode) ? patientCode : getUID();
            int res = familyContractService.unsign(patientCode, doctor);
            if (res == -1) {
                return error(-1, "取消签约失败!");
@ -575,7 +579,8 @@ public class FamilyContractController extends BaseController {
    public String surrender(String doctor, String doctorName, String reason,
                            @RequestParam(required = false) String patientCode) {
        try {
            patientCode = StringUtils.isNoneBlank(patientCode) ? patientCode : getUID();
            patientCode = StringUtils.isNoneBlank(patientCode) ? patientCode : getRepUID();
//            patientCode = StringUtils.isNoneBlank(patientCode) ? patientCode : getUID();
            Patient patient = patientService.findByCode(patientCode);
            int res = familyContractService.surrender(patient.getCode(), patient.getName(), patient.getPhoto(), doctor, doctorName, patient.getOpenid(), reason, patient.getSex());
            if (res == 0) {
@ -599,7 +604,8 @@ public class FamilyContractController extends BaseController {
    public String messages(long id, int pagesize) {
        try {
            JSONArray array = new JSONArray();
            Page<Message> list = familyContractService.findMessageByPatient(getUID(), id, pagesize);
//            Page<Message> list = familyContractService.findMessageByPatient(getUID(), id, pagesize);
            Page<Message> list = familyContractService.findMessageByPatient(getRepUID(), id, pagesize);
            if (list != null) {
                for (Message msg : list) {
                    if (msg == null) {
@ -651,7 +657,8 @@ public class FamilyContractController extends BaseController {
            if (StringUtils.isEmpty(doctor)) {
                return error(-1, "医生不能为空");
            }
            JSONObject result = familyContractService.isPatientAndDoctorExistSign(getUID(), doctor);
            JSONObject result = familyContractService.isPatientAndDoctorExistSign(getRepUID(), doctor);
//            JSONObject result = familyContractService.isPatientAndDoctorExistSign(getUID(), doctor);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            error(e);
@ -672,7 +679,8 @@ public class FamilyContractController extends BaseController {
            if (StringUtils.isEmpty(doctor)) {
                return error(-1, "医生不能为空");
            }
            JSONObject result = familyContractService.isPatientAndDoctorCanSign(getUID(), doctor);
            JSONObject result = familyContractService.isPatientAndDoctorCanSign(getRepUID(), doctor);
//            JSONObject result = familyContractService.isPatientAndDoctorCanSign(getUID(), doctor);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            error(e);

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/FamilyWithoutFilterController.java

@ -8,7 +8,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
/**
@ -30,7 +29,8 @@ public class FamilyWithoutFilterController extends BaseController {
    @ResponseBody
    public String homepage(String doctor) {
        try {
            JSONObject json = familyContractService.findDoctorMainPage(getUID(), doctor);
            JSONObject json = familyContractService.findDoctorMainPage(getRepUID(), doctor);
//            JSONObject json = familyContractService.findDoctorMainPage(getUID(), doctor);
            if (json == null) {
                return error(-1, "医生主页查询失败!");

+ 8 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/PatientSignController.java

@ -36,12 +36,14 @@ public class PatientSignController extends BaseController {
			@RequestParam(value = "startTime", required = false) String startTime, 
			@RequestParam(value = "endTime", required = false) String endTime) {
		try {
			List<Object> listDoctor = signWebService.getSignInfoByStatus(getUID());
			List<Object> listDoctor = signWebService.getSignInfoByStatus(getRepUID());
//			List<Object> listDoctor = signWebService.getSignInfoByStatus(getUID());
			if (listDoctor.size() > 0) {
				return error(-1, "存在已签约的医生,请确认!");
			}
			Page<Object> list = signWebService.getSignInfoByPatient(getUID(), 0, 0, 15);
			Page<Object> list = signWebService.getSignInfoByPatient(getRepUID(), 0, 0, 15);
//			Page<Object> list = signWebService.getSignInfoByPatient(getUID(), 0, 0, 15);
			if (list.getTotalPages() > 0) {
				return error(-1, "已存在申请签约的医生,请确认!");
			}
@ -56,7 +58,8 @@ public class PatientSignController extends BaseController {
			}
			SignWeb signWeb = new SignWeb();
			signWeb.setUser(getUID());
			signWeb.setUser(getRepUID());
//			signWeb.setUser(getUID());
			signWeb.setDoctor(doctor);
			signWeb.setStatus(0);
			SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
@ -191,7 +194,8 @@ public class PatientSignController extends BaseController {
				iStatus = Integer.parseInt(status);
			}
			Page<Object> listSign = signWebService.getSignInfoByPatient(getUID(), iStatus, id, pageSize);
//			Page<Object> listSign = signWebService.getSignInfoByPatient(getUID(), iStatus, id, pageSize);
			Page<Object> listSign = signWebService.getSignInfoByPatient(getRepUID(), iStatus, id, pageSize);
			JSONArray jsonArray = new JSONArray();
			if (listSign != null) {