Selaa lähdekoodia

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

yeshijie 7 vuotta sitten
vanhempi
commit
b0b703b714

+ 27 - 13
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java

@ -469,6 +469,8 @@ public class JwPrescriptionService {
                        JSONArray dataArray = jwData.getJSONArray("DATA");
                        logger.info("从基卫获取随访信息数量"+ dataArray.size()+",社区名称:"+hospitalMapping.getName());
                        for (int i = 0; i < dataArray.size(); i++) {
    
//                            logger.info("同步单条随访记录-开始,时间:"+DateUtil.getStringDate());
                            Followup followup = new Followup();
                    
                            JSONObject json = dataArray.getJSONObject(i);
@ -798,6 +800,7 @@ public class JwPrescriptionService {
                                followupContentESDO10.setFollowup_project("10");
                                newList.add(followupContentESDO10);
    
//                                logger.info("同步单条随访记录-ES数据对象组装完毕,时间:"+DateUtil.getStringDate());
                                //ES保存新数据
                                this.esSaveFollowupContentData(String.valueOf(followupId),newList);
                        
@ -884,30 +887,32 @@ public class JwPrescriptionService {
    
                    //转MAP
                    followupResultMap =  this.operaESFollowUpContentData(followupContentESDOList);
    
                    String JW_ORG_CODE = followup.getJworgCode();//基卫机构编码
                    String ORG_CODE = followup.getOrgCode();//本地机构编码
                    if(StringUtils.isBlank(JW_ORG_CODE)){
                        JW_ORG_CODE = hospitalMappingDao.getMappingCode(ORG_CODE,"1");
                        followup.setJworgCode(JW_ORG_CODE);
                    }
                    
                    String OPERATOR = followup.getJwdoctorCode();//操作员&录入医生
                    if (StringUtils.isBlank(OPERATOR)) {
                        OPERATOR = doctorMappingDao.findByDocotrCodeAndJwDoctorHospital(followup.getDoctorCode(), followup.getOrgCode());
                        OPERATOR = doctorMappingDao.findByDocotrCodeAndJwDoctorHospital(followup.getDoctorCode(), followup.getJworgCode());
                        followup.setJwdoctorCode(OPERATOR);
                    }
                    
                    followupResultMap.put("OPERATOR",OPERATOR);
                    
                    String FOLLOWUP_NO = followup.getFollowupNo();//家庭医生服务随访主表ID
                    if (StringUtils.isBlank(FOLLOWUP_NO)) {
                        FOLLOWUP_NO = "0";
                    }else{
                    
                    }
                    
                    followupResultMap.put("FOLLOWUP_ID",String.valueOf(followup.getId()));
                    followupResultMap.put("FOLLOWUP_NO",FOLLOWUP_NO);
                    
                    String FAMILY_FOLLOWUP_TYPE = "3";//随访类型,必传值3 【必填】
                    String ORG_CODE = followup.getOrgCode();//本地机构编码
                    String JW_ORG_CODE = followup.getJworgCode();//基卫机构编码
                    if(StringUtils.isBlank(JW_ORG_CODE)){
                        JW_ORG_CODE = hospitalMappingDao.getMappingCode(ORG_CODE,"1");
                        followup.setJworgCode(JW_ORG_CODE);
                    }
                    String FOLLOWUP_SOURCE = "3";//健康之路移动端
                    String IDENTITY_CARD_NO = followup.getIdcard();
                    String FAMILY_FOLLOWUP_CLASS_NAMES = followup.getFollowupClass();
@ -992,18 +997,19 @@ public class JwPrescriptionService {
                        continue;
                    }
    
                    DecimalFormat df = new DecimalFormat("######0.00");
//                    DecimalFormat df = new DecimalFormat("######0.00");
    
                    //普通药品
//                    if(!followupDrugsNormal.isEmpty()){
                        for (int i = 0; i <= 6; i++) {
                            int tag = i+1;
                            if( !followupDrugsNormal.isEmpty() && followupDrugsNormal.size() >0 && followupDrugsNormal.size() <= tag){
                            if( !followupDrugsNormal.isEmpty() && followupDrugsNormal.size() >0 && i < followupDrugsNormal.size()){
                                followupResultMap.put("PHYSIC_NAME"+tag,followupDrugsNormal.get(i).getDrugsName());
                                followupResultMap.put("FREQUENCY"+tag,followupDrugsNormal.get(i).getFrequency());
                                followupResultMap.put("PHYSIC_UNIT"+tag,followupDrugsNormal.get(i).getUnit());
                                if(followupDrugsNormal.get(i).getDose() !=null){
                                    followupResultMap.put("PHYSIC_DOSE"+tag,df.format(followupDrugsNormal.get(i).getDose()));
                                    followupResultMap.put("PHYSIC_DOSE"+tag,followupDrugsNormal.get(i).getDose());
//                                    followupResultMap.put("PHYSIC_DOSE"+tag,df.format(followupDrugsNormal.get(i).getDose()));
                                }else{
                                    followupResultMap.put("PHYSIC_DOSE"+tag,"");
                                }
@ -1024,7 +1030,8 @@ public class JwPrescriptionService {
                            followupResultMap.put("INSULIN_FREQUENCY"+tag,followupDrugsInsulin.get(j).getFrequency());
                            followupResultMap.put("INSULIN_UNIT"+tag,followupDrugsInsulin.get(j).getUnit());
                            if(followupDrugsInsulin.get(j).getDose() !=null){
                                followupResultMap.put("INSULIN_DOSE"+tag,df.format(followupDrugsInsulin.get(j).getDose()));
                                followupResultMap.put("INSULIN_DOSE"+tag,followupDrugsInsulin.get(j).getDose());
//                                followupResultMap.put("INSULIN_DOSE"+tag,df.format(followupDrugsInsulin.get(j).getDose()));
                            }else{
                                followupResultMap.put("INSULIN_DOSE","");
                            }
@ -1200,6 +1207,7 @@ public class JwPrescriptionService {
        JestClient jestClient = null;
        
        try {
//            logger.info("同步单条随访记录-开始建立ES数据连接,时间:"+DateUtil.getStringDate());
            jestClient = elasticFactory.getJestClient();
            //先根据条件查找出来
            SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
@ -1209,13 +1217,19 @@ public class JwPrescriptionService {
            );
            Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(esIndex).addType(esType).build();
            SearchResult result = jestClient.execute(search);
//            logger.info("同步单条随访记录-开始查询ES数据,时间:"+DateUtil.getStringDate());
            List<FollowupContentESDO> dataList = result.getSourceAsObjectList(FollowupContentESDO.class);
//            logger.info("同步单条随访记录-ES数据查询成功,时间:"+DateUtil.getStringDate());
            if(!dataList.isEmpty()){
                //删除原有记录
//                logger.info("同步单条随访记录-开始删除ES数据,时间:"+DateUtil.getStringDate());
                this.esDeleteFollowUpContent(dataList);
//                logger.info("同步单条随访记录-ES数据删除成功,时间:"+DateUtil.getStringDate());
            }
            //保存新的随访详情记录
//            logger.info("同步单条随访记录-开始保存ES数据,时间:"+DateUtil.getStringDate());
            elastricSearchSave.save(newdatalist,esIndex,esType);
//            logger.info("同步单条随访记录-ES数据保存成功,时间:"+DateUtil.getStringDate());
            jestClient.shutdownClient();
        }catch (Exception e){
            logger.error(" save error :" + e.getMessage());

+ 96 - 96
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEdu/DoctorJMJkEduArticleController.java

@ -342,69 +342,69 @@ public class DoctorJMJkEduArticleController extends BaseController {
        }
    }
    @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 {
            com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,getUID());
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return error(-1,"查询失败!");
        }
    }
    /**
     * 医生端端文章列表
     * @param firstLevelCategoryId
     * @param secondLevelCategoryId
     * @param insertTimeStart
     * @param articlelevel
     * @param articleTitle
     * @return
     */
    @RequestMapping(value = "queryArticlePcList", method = RequestMethod.GET)
    @ApiOperation("医生端文章列表")
    public  String queryArticlePcList(@ApiParam(name = "firstLevelCategoryId", value = "文章一级分类")
                                      @RequestParam(value = "firstLevelCategoryId", required = false) String firstLevelCategoryId,
                                      @ApiParam(name = "secondLevelCategoryId", value = "文章二级分类")
                                      @RequestParam(value = "secondLevelCategoryId", required = false) String secondLevelCategoryId,
                                      @ApiParam(name = "insertTimeStart", value = "新增文章开始时间")
                                      @RequestParam(value = "insertTimeStart", required = false) String insertTimeStart,
                                      @ApiParam(name = "insertTimeEnd", value = "新增文章结束时间")
                                      @RequestParam(value = "insertTimeEnd", required = false) String insertTimeEnd,
                                      @ApiParam(name = "articlelevel", value = "文章级别")
                                      @RequestParam(value = "articlelevel", required = false) String articlelevel,
                                      @ApiParam(name = "articleTitle", value = "文章标题关键字")
                                      @RequestParam(value = "articleTitle", required = false) String articleTitle,
                                      @ApiParam(name = "currentUserRole", value = "当前登录的角色")
                                      @RequestParam(value = "currentUserRole", required = true) String currentUserRole,
                                      @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别")
                                      @RequestParam(value = "currentUserRoleLevel", required = false )String currentUserRoleLevel,
                                      @ApiParam(name = "isAuthentication", value = "是否认证")
                                      @RequestParam(value = "isAuthentication", required = false) String isAuthentication,
                                      @ApiParam(name = "isMyArticle", value = "是否过滤我的文章")
                                      @RequestParam(value = "isMyArticle", required = false) Boolean isMyArticle,
                                      @ApiParam(name = "page", value = "当前页")
                                      @RequestParam(value = "page", required = true) Integer page,
                                      @ApiParam(name = "pageSize", value = "分页数")
                                      @RequestParam(value = "pageSize", required = true) Integer pageSize,
                                      @ApiParam(name = "roleType", value = "1、普通医生,2、管理员")
                                      @RequestParam(value = "roleType", required = false) Integer roleType){
        try {
            com.alibaba.fastjson.JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId, secondLevelCategoryId, insertTimeStart, insertTimeEnd, articlelevel, articleTitle,
                    getUID(), currentUserRole, currentUserRoleLevel, isAuthentication, isMyArticle, page, pageSize,null,roleType);
//    @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 {
//            com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,getUID());
//            return write(200,"查询成功!","data",response);
//        }catch (Exception e){
//            e.printStackTrace();
//            return error(-1,"查询失败!");
//        }
//    }
            return write(200,"查询成功!","data",response);
        } catch (Exception e){
            e.printStackTrace();
            return error(-1,"查询失败!");
        }
    }
//    /**
//     * 医生端端文章列表
//     * @param firstLevelCategoryId
//     * @param secondLevelCategoryId
//     * @param insertTimeStart
//     * @param articlelevel
//     * @param articleTitle
//     * @return
//     */
//    @RequestMapping(value = "queryArticlePcList", method = RequestMethod.GET)
//    @ApiOperation("医生端文章列表")
//    public  String queryArticlePcList(@ApiParam(name = "firstLevelCategoryId", value = "文章一级分类")
//                                      @RequestParam(value = "firstLevelCategoryId", required = false) String firstLevelCategoryId,
//                                      @ApiParam(name = "secondLevelCategoryId", value = "文章二级分类")
//                                      @RequestParam(value = "secondLevelCategoryId", required = false) String secondLevelCategoryId,
//                                      @ApiParam(name = "insertTimeStart", value = "新增文章开始时间")
//                                      @RequestParam(value = "insertTimeStart", required = false) String insertTimeStart,
//                                      @ApiParam(name = "insertTimeEnd", value = "新增文章结束时间")
//                                      @RequestParam(value = "insertTimeEnd", required = false) String insertTimeEnd,
//                                      @ApiParam(name = "articlelevel", value = "文章级别")
//                                      @RequestParam(value = "articlelevel", required = false) String articlelevel,
//                                      @ApiParam(name = "articleTitle", value = "文章标题关键字")
//                                      @RequestParam(value = "articleTitle", required = false) String articleTitle,
//                                      @ApiParam(name = "currentUserRole", value = "当前登录的角色")
//                                      @RequestParam(value = "currentUserRole", required = true) String currentUserRole,
//                                      @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别")
//                                      @RequestParam(value = "currentUserRoleLevel", required = false )String currentUserRoleLevel,
//                                      @ApiParam(name = "isAuthentication", value = "是否认证")
//                                      @RequestParam(value = "isAuthentication", required = false) String isAuthentication,
//                                      @ApiParam(name = "isMyArticle", value = "是否过滤我的文章")
//                                      @RequestParam(value = "isMyArticle", required = false) Boolean isMyArticle,
//                                      @ApiParam(name = "page", value = "当前页")
//                                      @RequestParam(value = "page", required = true) Integer page,
//                                      @ApiParam(name = "pageSize", value = "分页数")
//                                      @RequestParam(value = "pageSize", required = true) Integer pageSize,
//                                      @ApiParam(name = "roleType", value = "1、普通医生,2、管理员")
//                                      @RequestParam(value = "roleType", required = false) Integer roleType){
//        try {
//
//
//
//            com.alibaba.fastjson.JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId, secondLevelCategoryId, insertTimeStart, insertTimeEnd, articlelevel, articleTitle,
//                    getUID(), currentUserRole, currentUserRoleLevel, isAuthentication, isMyArticle, page, pageSize,null,roleType);
//
//            return write(200,"查询成功!","data",response);
//        } catch (Exception e){
//            e.printStackTrace();
//            return error(-1,"查询失败!");
//        }
//    }
//    @RequestMapping(value = "saveArticle", method = RequestMethod.POST)
//    @ApiOperation("添加文章")
@ -445,40 +445,40 @@ public class DoctorJMJkEduArticleController extends BaseController {
//        }
//    }
    @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 = false,defaultValue = "1") String articleCategoryId,
                                        @ApiParam(name = "articleCategoryName", value = "文章类别名称")
                                        @RequestParam(value = "articleCategoryName", required = false) String articleCategoryName){
        try {
            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,getUID(),1);
//            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,"0de7295862dd11e69faffa163e8aee56",1);
            return success("收藏成功!");
        }catch (Exception e){
            e.printStackTrace();
            return error(-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 {
            thirdJkEduArticleService.cancelArticleCollection(articleId,getUID(),1);
//            thirdJkEduArticleService.cancelArticleCollection(articleId,"0de7295862dd11e69faffa163e8aee56",1);
            return success("取消成功!");
        }catch (Exception e){
            e.printStackTrace();
            return error(-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 = false,defaultValue = "1") String articleCategoryId,
//                                        @ApiParam(name = "articleCategoryName", value = "文章类别名称")
//                                        @RequestParam(value = "articleCategoryName", required = false) String articleCategoryName){
//        try {
//            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,getUID(),1);
////            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,"0de7295862dd11e69faffa163e8aee56",1);
//
//            return success("收藏成功!");
//        }catch (Exception e){
//            e.printStackTrace();
//            return error(-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 {
//            thirdJkEduArticleService.cancelArticleCollection(articleId,getUID(),1);
////            thirdJkEduArticleService.cancelArticleCollection(articleId,"0de7295862dd11e69faffa163e8aee56",1);
//            return success("取消成功!");
//        }catch (Exception e){
//            e.printStackTrace();
//            return error(-1,"取消失败!");
//        }
//    }
    /*************************************************************************医生角色end***************************************************************************************************/

+ 11 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEduPC/DoctorJMJkEduArticlePCController.java

@ -94,10 +94,10 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
                                      @RequestParam(value = "articlelevel", required = false) String articlelevel,
                                      @ApiParam(name = "articleTitle", value = "文章标题关键字")
                                      @RequestParam(value = "articleTitle", required = false) String articleTitle,
//                                      @ApiParam(name = "currentUserRole", value = "当前登录的角色")
//                                      @RequestParam(value = "currentUserRole", required = true) String currentUserRole,
//                                      @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别")
//                                      @RequestParam(value = "currentUserRoleLevel", required = true )String currentUserRoleLevel,
                                      @ApiParam(name = "currentUserRole", value = "当前登录的角色")
                                      @RequestParam(value = "currentUserRole", required = false) String currentUserRole,
                                      @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别")
                                      @RequestParam(value = "currentUserRoleLevel", required = false )String currentUserRoleLevel,
                                      @ApiParam(name = "isAuthentication", value = "是否认证")
                                      @RequestParam(value = "isAuthentication", required = false) String isAuthentication,
                                      @ApiParam(name = "isMyArticle", value = "是否过滤我的文章")
@ -111,10 +111,15 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
                                      @ApiParam(name = "roleType", value = "1、普通医生,2、管理员")
                                      @RequestParam(value = "roleType", required = false) Integer roleType){
        try {
            if(StringUtils.isNotEmpty(currentUserRole)){
                currentUserRole=getCurrentRoleCode();
            }
            if(StringUtils.isNotEmpty(currentUserRoleLevel)){
                currentUserRoleLevel=getCurrentRoleLevel();
            }
            JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId,secondLevelCategoryId,insertTimeStart,insertTimeEnd,articlelevel,articleTitle,
                    getUID(),getCurrentRoleCode(),getCurrentRoleLevel(),isAuthentication,isMyArticle,page,pageSize,sEcho,roleType);
                    getUID(),currentUserRole,currentUserRoleLevel,isAuthentication,isMyArticle,page,pageSize,sEcho,roleType);
            return write(200,"查询成功!","data",response);
        } catch (Exception e){

+ 47 - 47
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/health/HealthEduArticleController.java

@ -268,52 +268,52 @@ public class HealthEduArticleController extends BaseController {
        }
    }
    
    @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 = false,defaultValue = "1") String articleCategoryId,
                                        @ApiParam(name = "articleCategoryName", value = "文章类别名称")
                                        @RequestParam(value = "articleCategoryName", required = false) String articleCategoryName){
        try {
            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,getRepUID(),2);
//            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,"0de7295862dd11e69faffa163e8aee56",1);
            
            return success("收藏成功!");
        }catch (Exception e){
            e.printStackTrace();
            return error(-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 {
            thirdJkEduArticleService.cancelArticleCollection(articleId,getRepUID(),2);
//            thirdJkEduArticleService.cancelArticleCollection(articleId,"0de7295862dd11e69faffa163e8aee56",1);
            return success("取消成功!");
        }catch (Exception e){
            e.printStackTrace();
            return error(-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 {
            com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,getRepUID());
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return error(-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 = false,defaultValue = "1") String articleCategoryId,
//                                        @ApiParam(name = "articleCategoryName", value = "文章类别名称")
//                                        @RequestParam(value = "articleCategoryName", required = false) String articleCategoryName){
//        try {
//            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,getRepUID(),2);
////            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,"0de7295862dd11e69faffa163e8aee56",1);
//
//            return success("收藏成功!");
//        }catch (Exception e){
//            e.printStackTrace();
//            return error(-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 {
//            thirdJkEduArticleService.cancelArticleCollection(articleId,getRepUID(),2);
////            thirdJkEduArticleService.cancelArticleCollection(articleId,"0de7295862dd11e69faffa163e8aee56",1);
//            return success("取消成功!");
//        }catch (Exception e){
//            e.printStackTrace();
//            return error(-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 {
//            com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,getRepUID());
//            return write(200,"查询成功!","data",response);
//        }catch (Exception e){
//            e.printStackTrace();
//            return error(-1,"查询失败!");
//        }
//    }
}

+ 10 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkEduArticle/ThirdJkEduArticleController.java

@ -87,7 +87,7 @@ public class ThirdJkEduArticleController extends BaseController {
    public String getArticalById(@ApiParam(name = "articleId", value = "文章id",defaultValue = "1")
                                 @RequestParam(value = "articleId", required = true) String articleId){
        try {
            com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,"");
            com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,getRepUID());
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
@ -99,9 +99,12 @@ public class ThirdJkEduArticleController extends BaseController {
    @ApiOperation("取消收藏文章")
    @ObserverRequired
    public String cancelArticleCollection(@ApiParam(name = "articleId", value = "文章id",defaultValue = "1")
                                          @RequestParam(value = "articleId", required = true) String articleId){
                                          @RequestParam(value = "articleId", required = true) String articleId,
                                          @ApiParam(name = "userType", value = "用户类型:1医生,2居民",defaultValue = "1")
                                          @RequestParam(value = "userType", required = true) Integer userType
                                          ){
        try {
            thirdJkEduArticleService.cancelArticleCollection(articleId,getRepUID(),1);
            thirdJkEduArticleService.cancelArticleCollection(articleId,getRepUID(),userType);
//            thirdJkEduArticleService.cancelArticleCollection(articleId,"0de7295862dd11e69faffa163e8aee56",1);
            return success("取消成功!");
        }catch (Exception e){
@ -118,9 +121,11 @@ public class ThirdJkEduArticleController extends BaseController {
                                        @ApiParam(name = "articleCategoryId", value = "文章类别ID")
                                        @RequestParam(value = "articleCategoryId", required = false,defaultValue = "1") String articleCategoryId,
                                        @ApiParam(name = "articleCategoryName", value = "文章类别名称")
                                        @RequestParam(value = "articleCategoryName", required = false) String articleCategoryName){
                                        @RequestParam(value = "articleCategoryName", required = false) String articleCategoryName,
                                        @ApiParam(name = "userType", value = "用户类型:1医生,2居民",defaultValue = "1")
                                            @RequestParam(value = "userType", required = true) Integer userType){
        try {
            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,getRepUID(),1);
            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,getRepUID(),userType);
//            thirdJkEduArticleService.saveArticleCollection(articleId,articleCategoryId,articleCategoryName,"0de7295862dd11e69faffa163e8aee56",1);
            return success("收藏成功!");