Browse Source

代码修改

yeshijie 7 years ago
parent
commit
646cb0a467

+ 38 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -28,11 +28,11 @@ import com.yihu.wlyy.service.app.label.SignPatientLabelInfoService;
import com.yihu.wlyy.service.app.message.MessageService;
import com.yihu.wlyy.service.app.scheduling.DoctorWorkTimeService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.service.third.fzzb.HealthEducationArticleService;
import com.yihu.wlyy.service.third.jw.JwArchivesService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.task.SignUploadTask;
import com.yihu.wlyy.util.*;
import com.yihu.wlyy.web.third.gateway.controller.doctor.GcDoctorController;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
import org.apache.commons.lang3.StringUtils;
@ -139,6 +139,8 @@ public class FamilyContractService extends BaseService {
    private JwArchivesService jwArchivesService;
    @Autowired
    private FamilyContractService familyContractService;
    @Autowired
    private HealthEducationArticleService healthEducationArticleService;
    @Autowired
    private ImUtill ImUtill;
@ -368,6 +370,41 @@ public class FamilyContractService extends BaseService {
        return json;
    }
    /**
     * 查询集美医生主页信息
     *
     * @param doctor  医生标识
     * @param patient 患者标识
     * @return
     */
    public JSONObject findJiMeiDoctorMainPage(String patient, String doctor) {
        JSONObject json = new JSONObject();
        // 查询医生基本信息
        Doctor d = doctorDao.findByCode(doctor);
        json.put("doctor", d.getCode());
        json.put("evaluateScore", d.getEvaluateScore());
        json.put("name", d.getName());
        json.put("photo", d.getPhoto());
        json.put("sex", d.getSex());
        json.put("job", d.getJob());
        json.put("jobName", d.getJobName());
        json.put("hospital", d.getHospitalName());
        json.put("dept", d.getDeptName());
        json.put("intro", d.getIntroduce());
        json.put("expertise", d.getExpertise());
        json.put("level", d.getLevel());
        //获取健康文章
        com.alibaba.fastjson.JSONArray jsonArray = new com.alibaba.fastjson.JSONArray();
        try {
            jsonArray = healthEducationArticleService.getDoctorArticalByUserId(null,1,null,0,3,doctor);
        }catch (Exception e){
            logger.error("获取福州健康文章失败,"+e.getMessage());
        }
        json.put("healthEduArticles",jsonArray);
        return json;
    }
    /**
     * 查询患者与医生的签约信息
     *

+ 15 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/FamilyContractController.java

@ -19,6 +19,7 @@ import com.yihu.wlyy.util.RSAUtils;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
@ -222,6 +223,20 @@ public class FamilyContractController extends BaseController {
        }
    }
    @RequestMapping(value = "jimeiHomepage",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("集美家签医生主页")
    public String jimeiHomepage(@ApiParam(name = "doctor", value = "医生编码")
                                @RequestParam(value = "doctor", required = true) String doctor){
        try{
            JSONObject json = familyContractService.findJiMeiDoctorMainPage(getRepUID(), doctor);
            return write(200, "医生主页查询成功!", "data", json);
        }catch (Exception e){
            error(e);
            return error(-1, "医生主页查询失败!");
        }
    }
    /**
     * 与指定医生的签约状态查询接口
     *