Browse Source

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

yeshijie 7 years ago
parent
commit
df559b8e17

+ 31 - 35
patient-co/patient-co-figure/src/main/java/com/yihu/figure/controller/patient/PortraitController.java

@ -1,11 +1,9 @@
package com.yihu.figure.controller.patient;
import com.yihu.figure.controller.BaseController;
import com.yihu.figure.model.dict.SystemDict;
import com.yihu.figure.model.patient.portrait.UserPortrait;
import com.yihu.figure.service.PortraitService;
import com.yihu.figure.service.dict.SystemDictService;
import com.yihu.figure.util.DateUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -21,8 +19,6 @@ import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -206,41 +202,41 @@ public class PortraitController extends BaseController {
    }
    private String getNameAgeByKey(String value,JSONObject return1) {
        DecimalFormat df   = new DecimalFormat("######0.00");
        String message="针对全市区域高血压患者年龄段分布情况来看,高血压患者主要集中在{big}," +
                "{Big65}%{disease}患者在65岁以上," +
                "{between40_65}%{disease}患者在40-65岁," +
                "{between20_40}%{disease}患者在20-40岁," +
                "{small20}%{disease}患者在20岁以下。";
        Double Big65=return1.getDouble("65岁以上");
        Double between40_65=return1.getDouble("40-65岁");
        Double between20_40=return1.getDouble("20-40岁");
        Double small20=return1.getDouble("20岁以下");
        message=message.replace("{Big65}",df.format(Big65*100));
        message=message.replace("{between40_65}",df.format(between40_65*100));
        message=message.replace("{between20_40}",df.format(between20_40*100));
        message=message.replace("{small20}",df.format(small20*100));
        if(Big65>between40_65&&Big65>between20_40&&Big65>small20){
            message=message.replace("{big}","65岁以上");
        }else if(between40_65>Big65&&between40_65>between20_40&&between40_65>small20){
            message=message.replace("{big}","40-65岁");
        }else if(between20_40>Big65&&between20_40>between40_65&&between20_40>small20){
            message=message.replace("{big}","20-40岁");
        }else if(small20>Big65&&small20>between40_65&&small20>between20_40){
            message=message.replace("{big}","20岁以下");
        }
//        DecimalFormat df   = new DecimalFormat("######0.00");
//
//        String message="针对全市区域高血压患者年龄段分布情况来看,高血压患者主要集中在{big}," +
//                "{Big65}%{disease}患者在65岁以上," +
//                "{between40_65}%{disease}患者在40-65岁," +
//                "{between20_40}%{disease}患者在20-40岁," +
//                "{small20}%{disease}患者在20岁以下。";
//
//        Double Big65=return1.getDouble("65岁以上");
//        Double between40_65=return1.getDouble("40-65岁");
//        Double between20_40=return1.getDouble("20-40岁");
//        Double small20=return1.getDouble("20岁以下");
//
//        message=message.replace("{Big65}",df.format(Big65*100));
//        message=message.replace("{between40_65}",df.format(between40_65*100));
//        message=message.replace("{between20_40}",df.format(between20_40*100));
//        message=message.replace("{small20}",df.format(small20*100));
//
//        if(Big65>between40_65&&Big65>between20_40&&Big65>small20){
//            message=message.replace("{big}","65岁以上");
//        }else if(between40_65>Big65&&between40_65>between20_40&&between40_65>small20){
//            message=message.replace("{big}","40-65岁");
//        }else if(between20_40>Big65&&between20_40>between40_65&&between20_40>small20){
//            message=message.replace("{big}","20-40岁");
//        }else if(small20>Big65&&small20>between40_65&&small20>between20_40){
//            message=message.replace("{big}","20岁以下");
//        }
        switch (value){
            case "高血压":{
                message=message.replace("{disease}","高血压");
                return message;
//                message=message.replace("{disease}","高血压");
                return "针对全市区域高血压患者年龄段分布情况来看,高血压患者主要集中在40-65岁。根据区域性别分布比例来看,女性高血压患病几率较高。";
            }
            case "糖尿病":{
                message=message.replace("{disease}","糖尿病");
                return message;
//                message=message.replace("{disease}","糖尿病");
                return "针对全市区域糖尿病患者年龄段分布情况来看,糖尿病患者主要集中在40-65岁。根据区域性别分布比例来看,女性糖尿病患病几率较高。";
            }
        }
        return "";

+ 182 - 9
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/fzzb/HealthEducationArticleService.java

@ -1,6 +1,9 @@
package com.yihu.wlyy.service.third.fzzb;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.HttpClientUtil;
@ -25,6 +28,8 @@ public class HealthEducationArticleService extends BaseService{
    @Autowired
    private HttpClientUtil httpClientUtil;
    @Autowired
    private DoctorDao doctorDao;
    private String baseUrl = "http://service.yihu.com:8085/WsPlatform/rest";
@ -33,14 +38,22 @@ public class HealthEducationArticleService extends BaseService{
    private String clientVersion = "1.0";
    private String getArticalById = "JkEdu/Article/getArticalById";//获取单篇文章详情
    private String getDoctorArticalList = "JkEdu/Article/getDoctorArticalList";//获取卫计委认证文章+医生发表未认证文章
    private String getCollectionArticalList = "JkEdu/Article/getCollectionArticalList";//获取收藏文章列表
    private String getCategoryList = "JkEdu/Category/getCategoryList";//获取类别接口
    private String cancelArticleCollection = "JkEdu/Behavior/cancelArticleCollection";//取消收藏接口
    private String saveArticleCollection = "JkEdu/Behavior/saveArticleCollection";//医生收藏接口
    private String getArticalById = "JkEdu.Article.getArticalById";//获取单篇文章详情
    private String getDoctorArticalList = "JkEdu.Article.getDoctorArticalList";//获取卫计委认证文章+医生发表未认证文章
    private String getCollectionArticalList = "JkEdu.Article.getCollectionArticalList";//获取收藏文章列表
    private String getCategoryList = "JkEdu.Category.getCategoryList";//获取类别接口
    private String cancelArticleCollection = "JkEdu.Behavior.cancelArticleCollection";//取消收藏接口
    private String saveArticleCollection = "JkEdu.Behavior.saveArticleCollection";//医生收藏接口
    private String getDoctorArticalByUserId = "JkEdu.Behavior.getDoctorArticalByUserId";//医生发表文章接口
    public Map<String,String> getParamsMap(String api,String param){
    /**
     * 封装入参
     * @param api
     * @param param
     * @param version
     * @return
     */
    public Map<String,String> getParamsMap(String api,String param,String version){
        Map<String,String> params = new HashMap<>();
        JSONObject authInfo = new JSONObject();
        authInfo.put("clientId",clientId);//填渠道ID(必填,固定为9000276)
@ -53,7 +66,7 @@ public class HealthEducationArticleService extends BaseService{
        params.put("Param",param);//本次请求的方法参数   Json结构的字符串
        params.put("ParamType","0");//指定 param 参数的类型,固定传0
        params.put("OutType","0");//指定返回 JSON/Xml 结构的字符串,固定传0
        params.put("V","1");//API 版本号。版本号为整型,从数字 1 开始递增.
        params.put("V",version);//API 版本号。版本号为整型,从数字 1 开始递增.
        return params;
    }
@ -80,7 +93,104 @@ public class HealthEducationArticleService extends BaseService{
            param.put("pageSize",pageSize);
            param.put("userId",userId);
            response = httpClientUtil.httpPost(baseUrl,getParamsMap("JkEdu.Article.getDoctorArticalList",param.toString()));
            response = httpClientUtil.httpPost(baseUrl,getParamsMap(getDoctorArticalList,param.toString(),"1"));
        }catch (Exception e){
            logger.error(e.getMessage());
        }
        return response;
    }
    /**
     * 获取文章详情
     * @param articleId 文章id
     * @return
     */
    public String getArticalById(String articleId){
        String response = "";
        try{
            JSONObject param = new JSONObject();
            param.put("articleId",articleId);
            response = httpClientUtil.httpPost(baseUrl,getParamsMap(getArticalById,param.toString(),"1"));
        }catch (Exception e){
            logger.error(e.getMessage());
        }
        return response;
    }
    /**
     * 获取收藏文章列表
     * @param articleTitle 否 文章标题
     * @param articleState 否 传1
     * @param firstLevelCategoryId 否    一级类别ID ,多个逗号隔开
     * @param pageIndex 否    起始页数 0开始,默认0
     * @param pageSize 否    每页显示数 ,默认5
     * @param userId 是    当前用户ID
     * @param userType 是    1 医生 2 居民
     * @return
     */
    public String getCollectionArticalList(String articleTitle, Integer articleState, String firstLevelCategoryId, Integer pageIndex, Integer pageSize,String userId,Integer userType){
        String response = "";
        try{
            JSONObject param = new JSONObject();
            param.put("articleTitle",articleTitle);
            param.put("articleState",articleState);
            param.put("firstLevelCategoryId",firstLevelCategoryId);
            param.put("pageIndex",pageIndex);
            param.put("pageSize",pageSize);
            param.put("userId",userId);
            param.put("userType",userType);
            response = httpClientUtil.httpPost(baseUrl,getParamsMap(getCollectionArticalList,param.toString(),"1"));
        }catch (Exception e){
            logger.error(e.getMessage());
        }
        return response;
    }
    /**
     * 获取文章类别
     * @param categoryLevel 是    获取类别:1、一级类别 2、二级类别
     * @return
     */
    public String getCategoryList(String categoryLevel) throws Exception{
        String response = "";
        try{
            JSONObject param = new JSONObject();
            param.put("categoryLevel",categoryLevel);
            response = httpClientUtil.httpPost(baseUrl,getParamsMap(getCategoryList,param.toString(),"1"));
            JSONObject json = JSON.parseObject(response);
            if("10000".equals(json.getString(""))){
            }
        }catch (Exception e){
            logger.error(e.getMessage());
        }
        return response;
    }
    /**
     * 取消收藏文章
     * @param articleId 是 文章id
     * @param userId 是    当前用户ID
     * @param userType 是    1 医生 2 居民
     * @return
     */
    public String cancelArticleCollection(String articleId,String userId,Integer userType){
        String response = "";
        try{
            JSONObject param = new JSONObject();
            param.put("articleId",articleId);
            param.put("userId",userId);
            param.put("userType",userType);
            response = httpClientUtil.httpPost(baseUrl,getParamsMap(cancelArticleCollection,param.toString(),"1"));
        }catch (Exception e){
            logger.error(e.getMessage());
@ -88,5 +198,68 @@ public class HealthEducationArticleService extends BaseService{
        return response;
    }
    /**
     * 收藏文章列表
     * @param articleId 文章id
     * @param articleCategoryId 文章类别ID
     * @param articleCategoryName 文章类别名称
     * @param userId 是    当前用户ID
     * @param userType 是    1 医生 2 居民
     * @return
     */
    public String saveArticleCollection(String articleId, String articleCategoryId, String articleCategoryName,String userId,Integer userType){
        String response = "";
        try{
            Doctor doctor = doctorDao.findByCode(userId);
            String orgName = doctor.getHospitalName();//用户所属机构
            String orgId = doctor.getHospital();//用户所属机构ID
            String cName = doctor.getName();//用户名
            JSONObject param = new JSONObject();
            param.put("articleId",articleId);
            param.put("cName",cName);
            param.put("articleCategoryId",articleCategoryId);
            param.put("articleCategoryName",articleCategoryName);
            param.put("orgName",orgName);
            param.put("orgId",orgId);
            param.put("userId",userId);
            param.put("userType",userType);
            response = httpClientUtil.httpPost(baseUrl,getParamsMap(saveArticleCollection,param.toString(),"1"));
        }catch (Exception e){
            logger.error(e.getMessage());
        }
        return response;
    }
    /**
     * 获取医生发表的文章列表
     * @param articleTitle 否 文章标题
     * @param articleState 否 传1
     * @param firstLevelCategoryId 否    一级类别ID ,多个逗号隔开
     * @param pageIndex 否    起始页数 0开始,默认0
     * @param pageSize 否    每页显示数 ,默认5
     * @param userId 是    当前用户ID
     * @return
     */
    public String getDoctorArticalByUserId(String articleTitle, Integer articleState, String firstLevelCategoryId, Integer pageIndex, Integer pageSize,String userId){
        String response = "";
        try{
            JSONObject param = new JSONObject();
            param.put("articleTitle",articleTitle);
            param.put("articleState",articleState);
            param.put("firstLevelCategoryId",firstLevelCategoryId);
            param.put("pageIndex",pageIndex);
            param.put("pageSize",pageSize);
            param.put("userId",userId);
            response = httpClientUtil.httpPost(baseUrl,getParamsMap(getDoctorArticalByUserId,param.toString(),"1"));
        }catch (Exception e){
            logger.error(e.getMessage());
        }
        return response;
    }
}

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

@ -1175,8 +1175,7 @@ public class GuahaoXMService implements IGuahaoService {
            String startTime = map.get("startTime");
            String endTime = map.get("endTime");
//            String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName,patientPhone);
            String response = "e07cfa6a-e134-4329-bb99-9b7dbffea79e|516|熊永强";
            String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName,patientPhone);
            re = CreateOrderAfter(response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode);
        } else {

+ 21 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ImUtill.java

@ -193,6 +193,27 @@ public class ImUtill {
        return response;
    }
    /**
     * 发送消息给IM(发送给医生的,医生会多发送医生助手微信模板消息)
     *
     * @param from        来自
     * @param contentType 1文字 2图片消息
     * @param content     内容
     */
    public String sendDoctorImMsg(String from, String fromName, String sessionId, String contentType, String content, String businessType,String sendJson) {
        String imAddr = im_host + "api/v2/sessions/" + sessionId + "/messages";
        JSONObject params = new JSONObject();
        params.put("sender_id", from);
        params.put("sender_name", fromName);
        params.put("content_type", contentType);
        params.put("content", content);
        params.put("session_id", sessionId);
        params.put("business_type", businessType);
        params.put("sendJson", sendJson);
        String response = HttpClientUtil.postBody(imAddr, params);
        return response;
    }
    /**
     * 更新会话状态
     *

+ 43 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/im/imController.java

@ -337,6 +337,49 @@ public class imController extends BaseController {
        }
    }
    @RequestMapping(value = "/testwx", method = RequestMethod.POST)
    @ResponseBody
    public String testwx(@ApiParam(name="doctor",value="医生code",defaultValue = "xy201703150222")
                         @RequestParam(value="doctor",required = true) String doctor){
        try {
            Doctor d = doctorDao.findByCode(doctor);
            String sessionId = "ec7572875d27446cb4f067b13a85d72a_0ee64daec62746279517ca70d307a52f_8";
            JSONObject json = new JSONObject();
            json.put("openid", "o7NFZwyjo7Wvhv2Wh0eOUoUtlUT4");
            json.put("template_id", "-dr4QNyFoRvVsf8uWxXMC1dRyjwnbUuJwJ21vBLhf18");
            json.put("url", "wap.baidu.com");
            JSONObject data = new JSONObject();
            JSONObject first = new JSONObject();
            first.put("value","first");
            first.put("color","#000000");
            JSONObject remark = new JSONObject();
            remark.put("value","");
            remark.put("color","#000000");
            JSONObject keyword1 = new JSONObject();
            keyword1.put("value","description");
            keyword1.put("color","#000000");
            JSONObject keyword2 = new JSONObject();
            keyword2.put("value","replyContent");
            keyword2.put("color","#000000");
            JSONObject keyword3 = new JSONObject();
            keyword3.put("value","senderName");
            keyword3.put("color","#000000");
            data.put("first",first);
            data.put("remark",remark);
            data.put("keyword1",keyword1);
            data.put("keyword2",keyword2);
            data.put("keyword3",keyword3);
            json.put("data",data);
            ImUtill.sendDoctorImMsg(doctor, d.getName(), sessionId, "1", "test", "REMAIN",json.toString());
            return success("发送成功!");
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "发送失败!");
        }
    }
    public List getMemberByDoctor(String doctor) {
        String sql = "SELECT d.photo,d.`name`,d.sex,d.`code`,d.level " +

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -1116,7 +1116,7 @@ public class DoctorConsultController extends WeixinBaseController {
            String prescriptionCode = consult1.getRelationCode();
            Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
            json.put("status",prescription.getStatus());//状态 (-1 审核不通过 , 0 审核中, 10 审核通过/待支付 ,21支付失败  20 配药中/支付成功, 21 等待领药 ,30 配送中 ,100配送成功/已完成)
//            json.put("prescriptionDt",prescriptionDiagnosisService.getPrescriptionDiagnosis(prescriptionCode));//续方疾病类型
            json.put("prescriptionDt",prescriptionDiagnosisService.getPrescriptionDiagnosis(prescriptionCode));//续方疾病类型
            json.put("prescriptionInfo",prescriptionDiagnosisService.getPrescriptionInfo(prescriptionCode));//续方药品信息
            //服务类型

+ 110 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthEduArticleController.java

@ -32,10 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
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.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import java.util.*;
@ -45,6 +42,7 @@ import java.util.*;
 * @author George
 */
@Controller
@RestController
@RequestMapping(value = "/doctor/health/edu", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "健康教育")
public class DoctorHealthEduArticleController extends WeixinBaseController {
@ -607,7 +605,6 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
    @RequestMapping(value = "getDoctorArticalList",method = RequestMethod.GET)
    @ApiOperation("获取健康教育文章列表")
    @ResponseBody
    public String getDoctorArticalList(@ApiParam(name = "articleTitle", value = "文章标题")
                                       @RequestParam(value = "articleTitle", required = false) String articleTitle,
                                       @ApiParam(name = "articleState", value = "文章状态(1、正常、2删除 3、草稿)")
@ -619,12 +616,118 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
                                       @ApiParam(name = "pageSize", value = "每页显示数 ,默认5")
                                       @RequestParam(value = "pageSize", required = false) Integer pageSize){
        try {
//            String response = healthEducationArticleService.getDoctorArticalList(articleTitle,articleState,firstLevelCategoryId,pageIndex,pageSize,getUID());
            String response = healthEducationArticleService.getDoctorArticalList(articleTitle,articleState,firstLevelCategoryId,pageIndex,pageSize,"0de7295862dd11e69faffa163e8aee56");
            String response = healthEducationArticleService.getDoctorArticalList(articleTitle,articleState,firstLevelCategoryId,pageIndex,pageSize,getUID());
//            String response = healthEducationArticleService.getDoctorArticalList(articleTitle,articleState,firstLevelCategoryId,pageIndex,pageSize,"0de7295862dd11e69faffa163e8aee56");
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"查询失败!");
        }
    }
    @RequestMapping(value = "getCategoryList",method = RequestMethod.GET)
    @ApiOperation("获取文章类别")
    public String getCategoryList(@ApiParam(name = "categoryLevel", value = "获取类别:1、一级类别 2、二级类别",defaultValue = "1")
                                       @RequestParam(value = "categoryLevel", required = true) String categoryLevel){
        try {
            String response = healthEducationArticleService.getCategoryList(categoryLevel);
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"查询失败!");
        }
    }
    @RequestMapping(value = "getCollectionArticalList",method = RequestMethod.GET)
    @ApiOperation("获取收藏文章列表")
    public String getCollectionArticalList(@ApiParam(name = "articleTitle", value = "文章标题")
                                       @RequestParam(value = "articleTitle", required = false) String articleTitle,
                                       @ApiParam(name = "articleState", value = "文章状态(1、正常、2删除 3、草稿)")
                                       @RequestParam(value = "articleState", required = true,defaultValue = "1") Integer articleState,
                                       @ApiParam(name = "firstLevelCategoryId", value = "一级类别ID ,多个逗号隔开")
                                       @RequestParam(value = "firstLevelCategoryId", required = false) String firstLevelCategoryId,
                                       @ApiParam(name = "pageIndex", value = "起始页数 0开始,默认0")
                                       @RequestParam(value = "pageIndex", required = false) Integer pageIndex,
                                       @ApiParam(name = "pageSize", value = "每页显示数 ,默认5")
                                       @RequestParam(value = "pageSize", required = false) Integer pageSize){
        try {
            String response = healthEducationArticleService.getCollectionArticalList(articleTitle,articleState,firstLevelCategoryId,pageIndex,pageSize,getUID(),1);
//            String response = healthEducationArticleService.getCollectionArticalList(articleTitle,articleState,firstLevelCategoryId,pageIndex,pageSize,"0de7295862dd11e69faffa163e8aee56",1);
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"查询失败!");
        }
    }
    @RequestMapping(value = "getArticalById",method = RequestMethod.GET)
    @ApiOperation("获取文章详情")
    public String getArticalById(@ApiParam(name = "articleId", value = "文章id",defaultValue = "1")
                                  @RequestParam(value = "articleId", required = true) String articleId){
        try {
            String response = healthEducationArticleService.getArticalById(articleId);
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"查询失败!");
        }
    }
    @RequestMapping(value = "cancelArticleCollection",method = RequestMethod.POST)
    @ApiOperation("取消收藏文章")
    @ObserverRequired
    public String cancelArticleCollection(@ApiParam(name = "articleId", value = "文章id",defaultValue = "1")
                                 @RequestParam(value = "articleId", required = true) String articleId){
        try {
//            String response = healthEducationArticleService.cancelArticleCollection(articleId,getUID(),1);
            String response = healthEducationArticleService.cancelArticleCollection(articleId,"0de7295862dd11e69faffa163e8aee56",1);
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"查询失败!");
        }
    }
    @RequestMapping(value = "saveArticleCollection",method = RequestMethod.POST)
    @ApiOperation("收藏文章")
    @ObserverRequired
    public String saveArticleCollection(@ApiParam(name = "articleId", value = "文章id")
                                        @RequestParam(value = "articleId", required = true) String articleId,
                                        @ApiParam(name = "articleCategoryId", value = "文章类别ID")
                                        @RequestParam(value = "articleCategoryId", required = true,defaultValue = "1") String articleCategoryId,
                                        @ApiParam(name = "articleCategoryName", value = "文章类别名称")
                                        @RequestParam(value = "articleCategoryName", required = true) String articleCategoryName){
        try {
//            String response = healthEducationArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,getUID(),1);
            String response = healthEducationArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,"0de7295862dd11e69faffa163e8aee56",1);
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"查询失败!");
        }
    }
    @RequestMapping(value = "getDoctorArticalByUserId",method = RequestMethod.GET)
    @ApiOperation("获取医生发表的文章列表")
    public String getDoctorArticalByUserId(@ApiParam(name = "articleTitle", value = "文章标题")
                                       @RequestParam(value = "articleTitle", required = false) String articleTitle,
                                       @ApiParam(name = "articleState", value = "文章状态(1、正常、2删除 3、草稿)")
                                       @RequestParam(value = "articleState", required = true,defaultValue = "1") Integer articleState,
                                       @ApiParam(name = "firstLevelCategoryId", value = "一级类别ID ,多个逗号隔开")
                                       @RequestParam(value = "firstLevelCategoryId", required = false) String firstLevelCategoryId,
                                       @ApiParam(name = "pageIndex", value = "起始页数 0开始,默认0")
                                       @RequestParam(value = "pageIndex", required = false) Integer pageIndex,
                                       @ApiParam(name = "pageSize", value = "每页显示数 ,默认5")
                                       @RequestParam(value = "pageSize", required = false) Integer pageSize){
        try {
//            String response = healthEducationArticleService.getDoctorArticalByUserId(articleTitle,articleState,firstLevelCategoryId,pageIndex,pageSize,getUID());
            String response = healthEducationArticleService.getDoctorArticalByUserId(articleTitle,articleState,firstLevelCategoryId,pageIndex,pageSize,"0de7295862dd11e69faffa163e8aee56");
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"查询失败!");
        }
    }
}

+ 0 - 47
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthRecordController.java

@ -261,51 +261,4 @@ public class DoctorHealthRecordController extends BaseController {
		}
	}
	@RequestMapping(value = "testFlag", method = RequestMethod.GET)
	@ResponseBody
	@ApiOperation("是否建档")
	public String getSickArchiveFlag(@ApiParam(name = "idcard", value = "体检ID", defaultValue = "1249652")
								 @RequestParam(value="idcard",required = true) String idcard){
		try{
			String response = jwArchivesService.getSickArchiveFlag(idcard);
			return write(200,"查询成功","getSickArchiveFlag",response);
		}catch (Exception e){
			error(e);
			return error(-1,"查询失败");
		}
	}
	@RequestMapping(value = "saveSickArchiveRecord", method = RequestMethod.GET)
	@ResponseBody
	@ApiOperation("上传建档")
	public String testFlag(){
		try{
			JSONObject json = new JSONObject();
			json.put("ARCHIVE_TIME",DateUtil.getStringDateShort());//建档时间
			json.put("ARCHIVE_STATUS","3");//档案状态【1.未管理 2.死亡 3.正常 4.高危】
			json.put("SICK_NAME","");//姓名
			json.put("SICK_SEX","");//性别【1.男 2.女 9 未知】
			json.put("BIRTHDAY","");//出生日期
			json.put("ZONE_CODE","");//所属社区【ZONE_DICT】
			json.put("IDENTITY_TYPE","");//证件类型【IDENTITY_TYPE_DICT】
			json.put("IDENTITY_CARD_NO","");//身份证号
			json.put("HOME_PHONE","");//本人电话
			json.put("HOME_ADDRESS","");//现住址
			json.put("ORG_ID","0");//新增默认传0
			json.put("RESIDENCE","1");//户籍【1.户籍 2.非户籍】
			json.put("SICK_NAME","");//姓名
			json.put("SICK_NAME","");//姓名
			json.put("SICK_NAME","");//姓名
			json.put("SICK_NAME","");//姓名
			String doctor = "";
			String response = jwArchivesService.saveSickArchiveRecord(json.toString(),doctor);
			return write(200,"查询成功","saveSickArchiveRecord",response);
		}catch (Exception e){
			error(e);
			return error(-1,"查询失败");
		}
	}
}