chenweida 7 år sedan
förälder
incheckning
2cd7711a79

+ 28 - 0
common/common-entity/src/main/java/com/yihu/es/entity/HealthEduArticlePatient.java

@ -17,6 +17,10 @@ public class HealthEduArticlePatient {
    private String patientName;    // 患者标识
    private String sendCode;   // 发送人code
    private String sendName;   // 发送人名称
    private String sendPic;   // 发送人头像
    private String sendSex;   // 发送人性别
    private String sendLevel;   // 发送人级别  1专科医生,2全科医生,3健康管理师 4 管理员
    private Integer sendType;//发送类型 1医生发送 2卫纪委发送
    private Long adminTeamCode;// 行政团队
    private String adminTeamName;// 行政团队
@ -231,4 +235,28 @@ public class HealthEduArticlePatient {
    public void setAllCount(Integer allCount) {
        this.allCount = allCount;
    }
    public String getSendPic() {
        return sendPic;
    }
    public void setSendPic(String sendPic) {
        this.sendPic = sendPic;
    }
    public String getSendSex() {
        return sendSex;
    }
    public void setSendSex(String sendSex) {
        this.sendSex = sendSex;
    }
    public String getSendLevel() {
        return sendLevel;
    }
    public void setSendLevel(String sendLevel) {
        this.sendLevel = sendLevel;
    }
}

+ 14 - 2
patient-co/patient-co-wlyy/doc/技术文档/es/统计新增索引.txt

@ -15,11 +15,23 @@ POST http://172.19.103.68:9200/health_edu_article_patient_test/health_edu_articl
                    "type": "string",
                    "index": "not_analyzed"
                },
                "doctor": {
                "sendCode": {
                    "type": "string",
                    "index": "not_analyzed"
                },
                "doctorName": {
                "sendName": {
                    "type": "string",
                    "index": "not_analyzed"
                },
                "sendPic": {
                    "type": "string",
                    "index": "not_analyzed"
                },
                "sendSex": {
                    "type": "string",
                    "index": "not_analyzed"
                },
                "sendLevel": {
                    "type": "string",
                    "index": "not_analyzed"
                },

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


+ 23 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/controller/GcLoginController.java

@ -2,6 +2,7 @@ package com.yihu.wlyy.web.third.gateway.controller;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.login.LoginLog;
import com.yihu.wlyy.entity.organization.Hospital;
import com.yihu.wlyy.entity.security.Token;
import com.yihu.wlyy.service.common.SMSService;
import com.yihu.wlyy.service.common.account.DoctorService;
@ -10,19 +11,24 @@ import com.yihu.wlyy.service.common.account.TokenService;
import com.yihu.wlyy.service.common.login.LoginLogService;
import com.yihu.wlyy.util.MD5;
import com.yihu.wlyy.util.RSAUtils;
import com.yihu.wlyy.web.WeixinBaseController;
import com.yihu.wlyy.web.third.gateway.vo.HospitalModel;
import com.yihu.wlyy.web.third.gateway.vo.LoginModel;
import com.yihu.wlyy.web.third.gateway.vo.base.BaseResultModel;
import com.yihu.wlyy.web.third.gateway.vo.base.ResultOneModel;
import com.yihu.wlyy.web.third.gateway.vo.base.ResultPageListModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -34,7 +40,7 @@ import java.util.Map;
@RequestMapping(value = "/wlyygc", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
@Api(description = "用户登陆服务")
public class GcLoginController {
public class GcLoginController extends WeixinBaseController {
    @Autowired
    private DoctorService doctorService;
    @Autowired
@ -47,19 +53,20 @@ public class GcLoginController {
    private RoleService roleService;
    @Autowired
    private RSAUtils rsaUtils;
    /**
     * 公钥生成并返回接口
     *
     * @return
     */
    @RequestMapping(value = "public_key", method =  RequestMethod.GET)
    @RequestMapping(value = "public_key", method = RequestMethod.GET)
    @ApiOperation("获取公钥")
    public ResultOneModel publicKey() {
        try {
            String modulus = RSAUtils.getInstance(smsService).getModulus();
            String exponent = RSAUtils.getInstance(smsService).getExponent();
            if (StringUtils.isEmpty(modulus) || StringUtils.isEmpty(exponent)) {
                return new ResultOneModel(BaseResultModel.statusEm.login_publickey_error.getCode(),BaseResultModel.statusEm.login_publickey_error.getMessage());
                return new ResultOneModel(BaseResultModel.statusEm.login_publickey_error.getCode(), BaseResultModel.statusEm.login_publickey_error.getMessage());
            } else {
                JSONObject json = new JSONObject();
                json.put("modulus", modulus); //加密指数
@ -67,7 +74,7 @@ public class GcLoginController {
                return new ResultOneModel(json);
            }
        } catch (Exception e) {
            return new ResultOneModel(BaseResultModel.statusEm.login_publickey_error.getCode(),BaseResultModel.statusEm.login_publickey_error.getMessage());
            return new ResultOneModel(BaseResultModel.statusEm.login_publickey_error.getCode(), BaseResultModel.statusEm.login_publickey_error.getMessage());
        }
    }
@ -163,4 +170,16 @@ public class GcLoginController {
            return new ResultOneModel<>(BaseResultModel.statusEm.login_system_error.getCode(), BaseResultModel.statusEm.login_system_error.getMessage());
        }
    }
    @RequestMapping(value = "/wx_jsapi_ticket", method = RequestMethod.GET)
    @ApiOperation("获取微信的jsapi_ticket")
    public ResultOneModel<String> wx_jsapi_ticket() {
        return new ResultOneModel(super.getJsapi_ticketByToken());
    }
    @RequestMapping(value = "/wx_accesstoken", method = RequestMethod.GET)
    @ApiOperation("获取微信的accesstoken")
    public ResultOneModel<String> wx_accesstoken() {
        return new ResultOneModel(super.getAccessToken());
    }
}

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/controller/doctor/GcEduArticleController.java

@ -27,6 +27,7 @@ import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@ -137,7 +138,7 @@ public class GcEduArticleController extends WeixinBaseController {
            return new BaseResultModel(BaseResultModel.statusEm.opera_error.getCode(), BaseResultModel.statusEm.opera_error.getMessage() + ":" + e.getMessage());
        }
    }
    @Async
    private void sendWxTemplateAndIM(List<com.yihu.es.entity.HealthEduArticlePatient> healthEduArticlePatients, Integer sendType) throws Exception {
        String endMsg = "";//"为了您的健康," + doctor.getName() + "医生给您发送了一篇患教文章,请仔细查阅,如有问题,可随时咨询医生。";

+ 8 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/listener/HealthAricleListener.java

@ -0,0 +1,8 @@
package com.yihu.wlyy.web.third.gateway.listener;
/**
 * Created by chenweida on 2017/9/8.
 * 监听消费
 */
public class HealthAricleListener{
}

+ 7 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/service/GcEduArticleService.java

@ -164,16 +164,19 @@ public class GcEduArticleService {
            }
            healthEduArticlePatient.setBatchNo(batchNo);
            healthEduArticlePatient.setCreateTime(createTime);
            healthEduArticlePatient.setSendLevel(doctor.getLevel() + "");
            healthEduArticlePatient.setSendPic(doctor.getPhoto());
            healthEduArticlePatient.setSendSex(doctor.getSex() + "");
            healthEduArticlePatient.setArticleId(articleId);
            healthEduArticlePatient.setAttachedTitle(articleTitle);
            healthEduArticlePatient.setAttachedPic(articlePic);
            healthEduArticlePatient.setAttachedContent(articleContent);
            healthEduArticlePatient.setLevel(level);
            healthEduArticlePatient.setAttachedMessage(sendMessage);
            healthEduArticlePatient.setArticleType(articleType);
            healthEduArticlePatient.setLevel(level);
            healthEduArticlePatient.setLevel1Type(level1Type);
            healthEduArticlePatient.setLevel2Type(level2Type);
            healthEduArticlePatient.setAttachedMessage(sendMessage);
            healthEduArticlePatients.add(healthEduArticlePatient);
@ -218,8 +221,8 @@ public class GcEduArticleService {
            com.yihu.es.entity.HealthEduArticlePatient p = findOne(one.getArticleId());
            if (p != null) {
                p.setAllCount(one.getAllCount());
                HealthEduArticlePatientModel heapm=new HealthEduArticlePatientModel();
                BeanUtils.copyProperties(p,heapm);
                HealthEduArticlePatientModel heapm = new HealthEduArticlePatientModel();
                BeanUtils.copyProperties(p, heapm);
                returnList.add(heapm);
            }
        });