| 
					
				 | 
			
			
				@ -1,8 +1,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				package com.yihu.wlyy.web.doctor.jimeiJkEduPC; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.alibaba.fastjson.JSONArray; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.alibaba.fastjson.JSONObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.aop.ObserverRequired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.service.third.jkEduArticle.ThirdJkEduArticleService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.web.BaseController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiOperation; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -11,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.http.MediaType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.Iterator; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * Created by Trick on 2017/11/14. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -21,10 +25,14 @@ public class DoctorJMJkEduArticlePCController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private JMJkEduArticleService jmJkEduArticleService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private ThirdJkEduArticleService thirdJkEduArticleService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "saveArticle", method = RequestMethod.POST) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation("添加文章") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public  String saveArticle(@ApiParam(name = "articleTitle", value = "文章标题") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public  String saveArticle(@ApiParam(name = "articleId", value = "文章Id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "articleId", required = true) String articleId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @ApiParam(name = "articleTitle", value = "文章标题") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "articleTitle", required = true) String articleTitle, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @ApiParam(name = "articleType", value = "文章类型") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "articleType", required = true) String articleType, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -42,16 +50,16 @@ public class DoctorJMJkEduArticlePCController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "content", required = true) String content, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @ApiParam(name = "imageUrl", value = "文章封面图片地址") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "imageUrl", required = true) String imageUrl, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @ApiParam(name = "operatorRoleCode", value = "操作人角色code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "operatorRoleCode", required = true) String operatorRoleCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @ApiParam(name = "opertorRoleLevel", value = "操作人角色级别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "opertorRoleLevel", required = true) String opertorRoleLevel, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                               @ApiParam(name = "operatorRoleCode", value = "操作人角色code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                               @RequestParam(value = "operatorRoleCode", required = true) String operatorRoleCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                               @ApiParam(name = "opertorRoleLevel", value = "操作人角色级别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                               @RequestParam(value = "opertorRoleLevel", required = true) String opertorRoleLevel, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @ApiParam(name = "userScope", value = "使用范围(1、全市使用,2、全区使用,3、全社区使用)") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "userScope", required = true) Integer userScope){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jmJkEduArticleService.saveArticle(getUID(),articleTitle,articleType,articlelevel,secondLevelCategoryId,imageUrl, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    secondLevelCategoryName,firstLevelCategoryId,firstLevelCategoryName,content,operatorRoleCode,opertorRoleLevel,userScope); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    secondLevelCategoryName,firstLevelCategoryId,firstLevelCategoryName,content,getCurrentRoleCode(),getCurrentRoleLevel(),userScope,articleId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success("添加成功!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -67,8 +75,6 @@ public class DoctorJMJkEduArticlePCController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param insertTimeEnd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param articlelevel 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param articleTitle 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param currentUserRole 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param currentUserRoleLevel 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "queryArticlePcList", method = RequestMethod.GET) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -85,18 +91,24 @@ 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 = "isAuthentication", value = "是否有权限") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                      @ApiParam(name = "currentUserRole", value = "当前登录的角色") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                      @RequestParam(value = "currentUserRole", required = true) String currentUserRole, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                      @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                      @RequestParam(value = "currentUserRoleLevel", required = true )String currentUserRoleLevel, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @ApiParam(name = "isAuthentication", value = "是否认证") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "isAuthentication", required = false) String isAuthentication, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @ApiParam(name = "isMyArticle", value = "是否过滤我的文章") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "isMyArticle", required = false) Boolean isMyArticle){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "isMyArticle", required = false) Boolean isMyArticle, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @ApiParam(name = "iDisplayStart", value = "当前页") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "iDisplayStart", required = true) Integer page, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @ApiParam(name = "iDisplayLength", value = "是否过滤我的文章") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "iDisplayLength", required = true) Integer pageSize){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONArray response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId,secondLevelCategoryId,insertTimeStart,insertTimeEnd,articlelevel,articleTitle, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    getUID(),currentUserRole,currentUserRoleLevel,isAuthentication,isMyArticle); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId,secondLevelCategoryId,insertTimeStart,insertTimeEnd,articlelevel,articleTitle, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    getUID(),getCurrentRoleCode(),getCurrentRoleLevel(),isAuthentication,isMyArticle,page,pageSize); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(200,"查询成功!","data",response); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -106,10 +118,11 @@ public class DoctorJMJkEduArticlePCController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "saveOrUpdateArticleQR", method = RequestMethod.POST) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation("保存或更新认证标识") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public  String saveOrUpdateArticleQR(@ApiParam(name = "currentRoleLevel", value = "当前登录角色的级别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "currentRoleLevel", required = true) String currentRoleLevel, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "currentRoleCode", value = "当前登录角色的code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "currentRoleCode", required = true) String currentRoleCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public  String saveOrUpdateArticleQR( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                        @ApiParam(name = "currentRoleLevel", value = "当前登录角色的级别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                         @RequestParam(value = "currentRoleLevel", required = true) String currentRoleLevel, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                         @ApiParam(name = "currentRoleCode", value = "当前登录角色的code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                         @RequestParam(value = "currentRoleCode", required = true) String currentRoleCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "position", value = "位置") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "position", required = false) Integer position, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "imgUrl", value = "二维码图片地址") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -118,7 +131,7 @@ public class DoctorJMJkEduArticlePCController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "id", required = false) Integer id){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jmJkEduArticleService.saveOrUpdateArticleQR(currentRoleLevel,currentRoleCode,position,imgUrl,getUID(),id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            jmJkEduArticleService.saveOrUpdateArticleQR(getCurrentRoleLevel(),getCurrentRoleCode(),position,imgUrl,getUID(),id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success("保存成功!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 |