浏览代码

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

chenweida 7 年之前
父节点
当前提交
adafbf52f0

二进制
patient-co/patient-co-wlyy/doc/接口文档/对外接口文档/集美健康教育/集美健康教育对外接口文档.docx


+ 23 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/gateway/controller/patient/GcPatientController.java

@ -2,6 +2,8 @@ package com.yihu.wlyy.web.gateway.controller.patient;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.common.account.DoctorService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.web.gateway.vo.DoctorModel;
@ -27,6 +29,8 @@ import org.springframework.web.bind.annotation.*;
public class GcPatientController {
    @Autowired
    private PatientService patientService;
    @Autowired
    private SignFamilyDao signFamilyDao;
    @RequestMapping(value = "/patient", method = RequestMethod.GET)
@ -36,8 +40,27 @@ public class GcPatientController {
    ) {
        Patient patient = patientService.findByCode(code);
        PatientModel patientModel = new PatientModel();
        SignFamily signFamily = signFamilyDao.findSignByPatient(patient.getCode());
        BeanUtils.copyProperties(patient, patientModel);
        if (signFamily != null) {
            patientModel.setIsSign(1);
        } else {
            patientModel.setIsSign(0);
        }
        return new ResultOneModel(patientModel);
    }
    @RequestMapping(value = "/patientHasSign", method = RequestMethod.GET)
    @ApiOperation("判断患者是否签约")
    public ResultOneModel<Integer> patientHasSign(
            @ApiParam(name = "code", value = "患者code", required = true) @RequestParam(value = "code", required = true) String code
    ) {
        Integer isSign = 0;
        SignFamily signFamily = signFamilyDao.findSignByPatient(code);
        if (signFamily != null) {
            isSign = 1;
        }
        return new ResultOneModel(isSign);
    }
}

+ 10 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/gateway/vo/PatientModel.java

@ -79,6 +79,8 @@ public class PatientModel {
    @ApiModelProperty(value = "绑定电子社保卡时间", required = false, access = "response")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date sicardTime;
    @ApiModelProperty(value = "是否签约(1是 0否)", required = false, access = "response")
    private Integer isSign;
    public String getCode() {
@ -256,4 +258,12 @@ public class PatientModel {
    public void setSicardTime(Date sicardTime) {
        this.sicardTime = sicardTime;
    }
    public Integer getIsSign() {
        return isSign;
    }
    public void setIsSign(Integer isSign) {
        this.isSign = isSign;
    }
}