|
@ -64,7 +64,7 @@ public class DoctorHealthEduArticleController extends BaseController {
|
|
*/
|
|
*/
|
|
@RequestMapping(value = "list")
|
|
@RequestMapping(value = "list")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String list(@RequestParam(value = "page",required = true)int page, @RequestParam(value = "pagesize",required = true)int pagesize,@RequestParam(value = "filter",required = false)String filter) {
|
|
|
|
|
|
public String list(@RequestParam(value = "page",required = true)int page, @RequestParam(value = "pagesize",required = true)int pagesize,@RequestParam(value = "filter",required = false)String filter,@RequestParam(value = "patient",required = false)String patient) {
|
|
try {
|
|
try {
|
|
Page<HealthEduArticle> list = healthEduArticleService.findAll(page, pagesize,filter,getUID());
|
|
Page<HealthEduArticle> list = healthEduArticleService.findAll(page, pagesize,filter,getUID());
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|
|
@ -89,6 +89,16 @@ public class DoctorHealthEduArticleController extends BaseController {
|
|
int readAmount = healthEduArticleOpHistoryService.countReadAmount(article.getCode());
|
|
int readAmount = healthEduArticleOpHistoryService.countReadAmount(article.getCode());
|
|
int repeatAmount = healthEduArticleOpHistoryService.countRepeatAmount(article.getCode());
|
|
int repeatAmount = healthEduArticleOpHistoryService.countRepeatAmount(article.getCode());
|
|
HealthEduArticleDoctor healthEduArticleDoctor = healthEduArticleDoctorService.findByArticle(article.getCode(), getUID());
|
|
HealthEduArticleDoctor healthEduArticleDoctor = healthEduArticleDoctorService.findByArticle(article.getCode(), getUID());
|
|
|
|
if(StringUtils.isNotBlank(patient)){
|
|
|
|
List<HealthEduArticlePatient> healthEduArticlePatients = healthEduArticlePatientService.findByArticleAndPatient(article.getCode(),patient);
|
|
|
|
if(healthEduArticlePatients!=null&&healthEduArticlePatients.size()>0){
|
|
|
|
json.put("send", 1);
|
|
|
|
}else{
|
|
|
|
json.put("send", 0);
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
json.put("send", 0);
|
|
|
|
}
|
|
//阅读量
|
|
//阅读量
|
|
json.put("readAmount", readAmount);
|
|
json.put("readAmount", readAmount);
|
|
//收藏量
|
|
//收藏量
|
|
@ -118,7 +128,7 @@ public class DoctorHealthEduArticleController extends BaseController {
|
|
*/
|
|
*/
|
|
@RequestMapping(value = "listDoctor")
|
|
@RequestMapping(value = "listDoctor")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String listDoctor(@RequestParam(value = "page",required = true)int page, @RequestParam(value = "pagesize",required = true)int pagesize,@RequestParam(value = "filter",required = false)String filter) {
|
|
|
|
|
|
public String listDoctor(@RequestParam(value = "page",required = true)int page, @RequestParam(value = "pagesize",required = true)int pagesize,@RequestParam(value = "filter",required = false)String filter,@RequestParam(value = "patient",required = false)String patient) {
|
|
try {
|
|
try {
|
|
List<Object> list = healthEduArticleDoctorService.list(page, pagesize,filter,getUID());
|
|
List<Object> list = healthEduArticleDoctorService.list(page, pagesize,filter,getUID());
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|
|
@ -143,6 +153,16 @@ public class DoctorHealthEduArticleController extends BaseController {
|
|
int readAmount = healthEduArticleOpHistoryService.countReadAmount(healthEduArticle.getCode());
|
|
int readAmount = healthEduArticleOpHistoryService.countReadAmount(healthEduArticle.getCode());
|
|
int repeatAmount = healthEduArticleOpHistoryService.countRepeatAmount(healthEduArticle.getCode());
|
|
int repeatAmount = healthEduArticleOpHistoryService.countRepeatAmount(healthEduArticle.getCode());
|
|
HealthEduArticleDoctor healthEduArticleDoctor = healthEduArticleDoctorService.findByArticle(healthEduArticle.getCode(), getUID());
|
|
HealthEduArticleDoctor healthEduArticleDoctor = healthEduArticleDoctorService.findByArticle(healthEduArticle.getCode(), getUID());
|
|
|
|
if(StringUtils.isNotBlank(patient)){
|
|
|
|
List<HealthEduArticlePatient> healthEduArticlePatients = healthEduArticlePatientService.findByArticleAndPatient(healthEduArticle.getCode(),patient);
|
|
|
|
if(healthEduArticlePatients!=null&&healthEduArticlePatients.size()>0){
|
|
|
|
json.put("send", 1);
|
|
|
|
}else{
|
|
|
|
json.put("send", 0);
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
json.put("send", 0);
|
|
|
|
}
|
|
//阅读量
|
|
//阅读量
|
|
json.put("readAmount", readAmount);
|
|
json.put("readAmount", readAmount);
|
|
//收藏量
|
|
//收藏量
|