Explorar o código

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

huangwenjie %!s(int64=7) %!d(string=hai) anos
pai
achega
068e063340

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

@ -1255,6 +1255,12 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
        if (p == null) {
            throw new Exception("患者信息不存在!");
        }
        
        //判断居民是否有签约
        List<SignFamily> sign = signFamilyDao.findSSandJTByIdcard(p.getIdcard());
        if(sign == null || sign.size()==0){
            throw new Exception("未签约患者不能预约10天号源!");
        }
        Map<String, String> map = objectMapper.readValue(arrangeDate, Map.class);
        if (map.containsKey("sectionType") && map.containsKey("startTime")) {

+ 10 - 10
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/specialist/PatientSpecialistController.java

@ -72,16 +72,16 @@ public class PatientSpecialistController extends WeixinBaseController{
        }
    }
    @RequestMapping(value = "/agreeSpecialistTeam", method = RequestMethod.GET)
    @ApiOperation(value = "医生审核")
    public String agreeSpecialistTeam(String state,String relationCode,String remark,Long mesId)throws Exception {
        try {
            return write(200, "获取成功", "data", specialistService.agreeSpecialistTeam(getAccessToken(),state, relationCode, remark, mesId, labelcode, doctorcode));
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
//    @RequestMapping(value = "/agreeSpecialistTeam", method = RequestMethod.GET)
//    @ApiOperation(value = "医生审核")
//    public String agreeSpecialistTeam(String state,String relationCode,String remark,Long mesId)throws Exception {
//        try {
//            return write(200, "获取成功", "data", specialistService.agreeSpecialistTeam(getAccessToken(),state, relationCode, remark, mesId, labelcode, doctorcode));
//        } catch (Exception e) {
//            error(e);
//            return error(-1, "请求失败");
//        }
//    }
    @RequestMapping(value = "/findPatientTeamList", method = RequestMethod.GET)
    @ApiOperation(value = "获取居民所有专科医生签约信息")

+ 23 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/zysoft/BookingController.java

@ -1,10 +1,12 @@
package com.yihu.wlyy.web.third.zysoft;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.message.SMS;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.PatientReservation;
import com.yihu.wlyy.entity.wechat.WechatTemplateConfig;
import com.yihu.wlyy.logs.BusinessLogs;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.message.SMSDao;
import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
import com.yihu.wlyy.service.app.consult.ConsultService;
@ -80,6 +82,9 @@ public class BookingController extends WeixinBaseController {
    
    @Autowired
    private StringRedisTemplate redisTemplate;
    
    @Autowired
    private DoctorDao doctorDao;
    /**
@ -608,6 +613,24 @@ public class BookingController extends WeixinBaseController {
                                      @ApiParam(name="surveyCode",value = "筛选code",defaultValue = "a")
                                      @RequestParam(value = "surveyCode",required = false)String surveyCode) {
        try {
            
            String currentdoctorid = getUID();
            //获取当前登录的医生CODE,判断接口传递的代预约医生CODE是否一致
            if(StringUtils.isBlank(currentdoctorid) || !currentdoctorid.equals(dcode)){
                return error(-1, "创建挂号单失败10001:当前登录医生和代预约医生不一致!");
            }
    
            //判断接口传入的代预约医生CODE是否为空
            if(StringUtils.isBlank(dcode)){
                return error(-1, "创建挂号单失败10002:代预约医生不能为空!");
            }
    
            //判断接口传入的代预约医生CODE查询代预约医生是否存在
            Doctor doctor = doctorDao.findByCode(dcode);
            if(doctor == null || StringUtils.isBlank(doctor.getCode())){
                return error(-1, "创建挂号单失败:代预约的医生不存在!");
            }
            
            String orderCode = guahaoXM.CreateOrderByDoctor(hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, arrangeDate, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode,surveyCode);
            //获取预约信息查询是否挂号成功
            PatientReservation obj = patientReservationService.findByCode(orderCode);