|
@ -112,7 +112,8 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
|
@ApiParam(name = "labelServeType", value = "标签类型 3:服务类型,多个用逗号分隔", required = false) @RequestParam(value = "labelServeType", required = false, defaultValue = "") String labelServeType,
|
|
|
@ApiParam(name = "labelDiseaseType", value = "标签类型 4:疾病类型,多个用逗号分隔", required = false) @RequestParam(value = "labelDiseaseType", required = false, defaultValue = "") String labelDiseaseType,
|
|
|
@ApiParam(name = "labelHealthType", value = "标签类型 5:健康情况,多个用逗号分隔", required = false) @RequestParam(value = "labelHealthType", required = false, defaultValue = "") String labelHealthType,
|
|
|
@ApiParam(name = "articleId", value = "文章ID", required = true) @RequestParam(value = "articleId", required = true) String articleId
|
|
|
@ApiParam(name = "articleId", value = "文章ID", required = true) @RequestParam(value = "articleId", required = true) String articleId,
|
|
|
@ApiParam(name = "leaveWords", value = "医生留言", required = false) @RequestParam(value = "leaveWords", required = false) String leaveWords
|
|
|
){
|
|
|
try {
|
|
|
|
|
@ -121,7 +122,7 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
|
jmJkEduArticleService.initPatient(patientSet,labelUnitType,labelSexType,labelServeType,labelDiseaseType,labelHealthType,getUID());
|
|
|
// patientSet.add(patientService.findByCode("wjw00000001000e6badcfa163e424525"));
|
|
|
//获取保存发送记录
|
|
|
HealthEduArticlePatient healthEduArticlePatient = jmJkEduArticleService.saveArticle(patientSet, getUID(), 2,"", 0L, articleId);
|
|
|
HealthEduArticlePatient healthEduArticlePatient = jmJkEduArticleService.saveArticle(patientSet, getUID(), 2,"", 0L, articleId,leaveWords);
|
|
|
//推送微信模板消息和发送im消息
|
|
|
new Thread(() -> {
|
|
|
//发送任务到redis
|
|
@ -241,7 +242,8 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
|
@RequestParam(value = "group", required = false, defaultValue = "") String group,
|
|
|
@RequestParam(value = "labelType", required = false) String labelType,
|
|
|
@RequestParam(value = "teamCode", required = false) long teamCode,
|
|
|
@RequestParam(value = "articleId", required = false) String articleId){
|
|
|
@RequestParam(value = "articleId", required = false) String articleId,
|
|
|
@RequestParam(value = "leaveWords", required = false) String leaveWords){
|
|
|
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(code)) {
|
|
@ -265,7 +267,7 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
|
if (patientSet.size() == 0) {
|
|
|
return new BaseResultModel("请至少选择一个患者!");
|
|
|
}
|
|
|
HealthEduArticlePatient healthEduArticlePatient = jmJkEduArticleService.saveArticle(patientSet, getUID(), 1,"", teamCode, articleId);
|
|
|
HealthEduArticlePatient healthEduArticlePatient = jmJkEduArticleService.saveArticle(patientSet, getUID(), 1,"", teamCode, articleId,leaveWords);
|
|
|
//推送微信模板消息和发送im消息
|
|
|
new Thread(() -> {
|
|
|
//发送任务到redis
|
|
@ -282,13 +284,14 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
|
@ApiOperation("医生文章单个患者推送")
|
|
|
public BaseResultModel doctorSendArticleToSingle(
|
|
|
@ApiParam(name = "patientCode", value = "患者Code", required = true) @RequestParam(value = "patientCode", required = true) String patientCode,
|
|
|
@ApiParam(name = "articleId", value = "文章ID", required = true) @RequestParam(value = "articleId", required = true) String articleId){
|
|
|
@ApiParam(name = "articleId", value = "文章ID", required = true) @RequestParam(value = "articleId", required = true) String articleId,
|
|
|
@ApiParam(name = "leaveWords", value = "医生留言", required = false) @RequestParam(value = "leaveWords", required = false) String leaveWords){
|
|
|
try {
|
|
|
Set<String> patientSet = new HashSet<>(); //放入set中可以去重复
|
|
|
//得到需要发送的患者
|
|
|
patientSet.add(patientCode);
|
|
|
// jmJkEduArticleService.initPatients(patientSet,labelType,condition,groupType,teamId,getUID());
|
|
|
HealthEduArticlePatient healthEduArticlePatient = jmJkEduArticleService.saveArticle(patientSet, getUID(), 1,"", 0L, articleId);
|
|
|
HealthEduArticlePatient healthEduArticlePatient = jmJkEduArticleService.saveArticle(patientSet, getUID(), 1,"", 0L, articleId,leaveWords);
|
|
|
//推送微信模板消息和发送im消息
|
|
|
new Thread(() -> {
|
|
|
//发送任务到redis
|
|
@ -338,8 +341,8 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
|
@RequestParam(value = "articleTitle", required = false) String articleTitle,
|
|
|
@ApiParam(name = "currentUserRole", value = "当前登录的角色")
|
|
|
@RequestParam(value = "currentUserRole", required = true) String currentUserRole,
|
|
|
@ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别",defaultValue = "4")
|
|
|
@RequestParam(value = "currentUserRoleLevel", required = false ,defaultValue = "4")String currentUserRoleLevel,
|
|
|
@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 = "是否过滤我的文章")
|
|
@ -352,8 +355,8 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
com.alibaba.fastjson.JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId,secondLevelCategoryId,insertTimeStart,insertTimeEnd,articlelevel,articleTitle,
|
|
|
getUID(),currentUserRole,currentUserRoleLevel,isAuthentication,isMyArticle,page,pageSize);
|
|
|
com.alibaba.fastjson.JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId, secondLevelCategoryId, insertTimeStart, insertTimeEnd, articlelevel, articleTitle,
|
|
|
"0de7295862dd11e69faffa163e8aee56", currentUserRole, currentUserRoleLevel, isAuthentication, isMyArticle, page, pageSize,null);
|
|
|
|
|
|
return write(200,"查询成功!","data",response);
|
|
|
} catch (Exception e){
|