|
@ -105,7 +105,7 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
if(StringUtils.isEmpty(currentRoleLevel)){
|
|
if(StringUtils.isEmpty(currentRoleLevel)){
|
|
currentRoleLevel = getCurrentRoleLevel();
|
|
currentRoleLevel = getCurrentRoleLevel();
|
|
}
|
|
}
|
|
List<HealthEduArticlePatientModel> eduArticlePatients = jmJkEduArticleService.pushArticleList(page, pagesize, getUID(),firstLevelCategoryId,secondLevelCategoryId,myArticle,sendType,currentRoleCode,currentRoleLevel,articleTitle,sendTimeStart,sendTimeEnd);
|
|
|
|
|
|
List<HealthEduArticlePatientModel> eduArticlePatients = jmJkEduArticleService.pushArticleList(page, pagesize, "xh1D2017031502222",firstLevelCategoryId,secondLevelCategoryId,myArticle,sendType,currentRoleCode,currentRoleLevel,articleTitle,sendTimeStart,sendTimeEnd);
|
|
// Long count = jmJkEduArticleService.pushArticleListCount(getUID(),2);
|
|
// Long count = jmJkEduArticleService.pushArticleListCount(getUID(),2);
|
|
return new ResultPageListModel(
|
|
return new ResultPageListModel(
|
|
page,
|
|
page,
|
|
@ -218,22 +218,44 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
@RequestParam(value = "teamCode", required = false) long teamCode,
|
|
@RequestParam(value = "teamCode", required = false) long teamCode,
|
|
@RequestParam(value = "articleId", required = false) String articleId){
|
|
@RequestParam(value = "articleId", required = false) String articleId){
|
|
try {
|
|
try {
|
|
|
|
|
|
if (StringUtils.isEmpty(articleId)) {
|
|
|
|
|
|
String[] articles = new String[]{};
|
|
|
|
String[] patients = new String[]{};
|
|
|
|
String[] groups = new String[]{};
|
|
|
|
if (StringUtils.isBlank(articleId)) {
|
|
return error(-1,"请至少选择一篇文章!");
|
|
return error(-1,"请至少选择一篇文章!");
|
|
|
|
}else{
|
|
|
|
if(articleId.contains(",")){
|
|
|
|
articles = articleId.split(",");
|
|
|
|
}else{
|
|
|
|
articles = new String[]{articleId};
|
|
|
|
}
|
|
}
|
|
}
|
|
if (StringUtils.isEmpty(patient) && StringUtils.isEmpty(group)) {
|
|
|
|
|
|
if (StringUtils.isBlank(patient) && StringUtils.isBlank(group)) {
|
|
return error(-1,"请至少选择一个患者!");
|
|
return error(-1,"请至少选择一个患者!");
|
|
|
|
}else{
|
|
|
|
if(StringUtils.isNotBlank(patient)){
|
|
|
|
if(patient.contains(",")){
|
|
|
|
patients = patient.split(",");
|
|
|
|
}else{
|
|
|
|
patients = new String[]{patient};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(StringUtils.isNotBlank(group)){
|
|
|
|
if(group.contains(",")){
|
|
|
|
groups = group.split(",");
|
|
|
|
}else{
|
|
|
|
groups = new String[]{group};
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
String[] articles = articleId.split(",");
|
|
|
|
String[] patients = patient.split(",");
|
|
|
|
String[] groups = group.split(",");
|
|
|
|
|
|
|
|
if (articles.length == 0) {
|
|
if (articles.length == 0) {
|
|
return error(-1,"请至少选择一篇文章!");
|
|
return error(-1,"请至少选择一篇文章!");
|
|
}
|
|
}
|
|
if (patients.length == 0 && groups.length == 0) {
|
|
if (patients.length == 0 && groups.length == 0) {
|
|
return error(-1,"请至少选择一个患者!");
|
|
return error(-1,"请至少选择一个患者!");
|
|
}
|
|
}
|
|
|
|
|
|
com.alibaba.fastjson.JSONObject response = jmJkEduArticleService.pushArticleConfirm(getUID(),groups,group,labelType,teamCode,patients,articleId);
|
|
com.alibaba.fastjson.JSONObject response = jmJkEduArticleService.pushArticleConfirm(getUID(),groups,group,labelType,teamCode,patients,articleId);
|
|
return write(200,"查询成功!","data",response);
|
|
return write(200,"查询成功!","data",response);
|
|
}catch (Exception e) {
|
|
}catch (Exception e) {
|
|
@ -279,15 +301,36 @@ public class DoctorJMJkEduArticleController extends BaseController {
|
|
@RequestParam(value = "currentUserRoleLevel", required = false ,defaultValue = "4")String currentUserRoleLevel){
|
|
@RequestParam(value = "currentUserRoleLevel", required = false ,defaultValue = "4")String currentUserRoleLevel){
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
String[] articles = new String[]{};
|
|
|
|
String[] patients = new String[]{};
|
|
|
|
String[] groups = new String[]{};
|
|
if (StringUtils.isEmpty(articleId)) {
|
|
if (StringUtils.isEmpty(articleId)) {
|
|
return new BaseResultModel("请至少选择一篇文章!");
|
|
return new BaseResultModel("请至少选择一篇文章!");
|
|
|
|
}else{
|
|
|
|
if(articleId.contains(",")){
|
|
|
|
articles = articleId.split(",");
|
|
|
|
}else{
|
|
|
|
articles = new String[]{articleId};
|
|
|
|
}
|
|
}
|
|
}
|
|
if (StringUtils.isEmpty(patient) && StringUtils.isEmpty(group)) {
|
|
if (StringUtils.isEmpty(patient) && StringUtils.isEmpty(group)) {
|
|
return new BaseResultModel("请至少选择一个患者!");
|
|
return new BaseResultModel("请至少选择一个患者!");
|
|
|
|
}else{
|
|
|
|
if(StringUtils.isNotBlank(patient)){
|
|
|
|
if(patient.contains(",")){
|
|
|
|
patients = patient.split(",");
|
|
|
|
}else{
|
|
|
|
patients = new String[]{patient};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(StringUtils.isNotBlank(group)){
|
|
|
|
if(group.contains(",")){
|
|
|
|
groups = group.split(",");
|
|
|
|
}else{
|
|
|
|
groups = new String[]{group};
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
String[] articles = articleId.split(",");
|
|
|
|
String[] patients = patient.split(",");
|
|
|
|
String[] groups = group.split(",");
|
|
|
|
if (articles.length == 0) {
|
|
if (articles.length == 0) {
|
|
return new BaseResultModel("请至少选择一篇文章!");
|
|
return new BaseResultModel("请至少选择一篇文章!");
|
|
}
|
|
}
|