|
@ -5,6 +5,7 @@ package com.yihu.wlyy.web.third.health.bank;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.wlyy.service.app.health.bank.CreditLogService;
|
|
|
import com.yihu.wlyy.service.app.health.bank.TaskService;
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@ -31,6 +32,8 @@ public class AccountController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private CreditLogService service;
|
|
|
@Autowired
|
|
|
private TaskService taskService;
|
|
|
|
|
|
|
|
|
|
|
@ -66,13 +69,15 @@ public class AccountController extends BaseController {
|
|
|
@ApiOperation("获取活动所有排名")
|
|
|
public String selectByActivityRanking1(@ApiParam(name = "activityId",value = "活动id")
|
|
|
@RequestParam(name = "activityId") String activityId,
|
|
|
@ApiParam(name = "patientId",value = "居民id")
|
|
|
@RequestParam(value = "patientId",required = true)String patientId,
|
|
|
@ApiParam(name = "page", value = "第几页,从1开始")
|
|
|
@RequestParam(value = "page", defaultValue = "1",required = false)Integer page,
|
|
|
@ApiParam(name = "size",defaultValue = "10",value = ",每页分页大小")
|
|
|
@RequestParam(value = "size", required = false)Integer size){
|
|
|
try {
|
|
|
|
|
|
return write(200,"查询成功","data",service.selectByActivityRanking1(activityId,page,size));
|
|
|
return write(200,"查询成功","data",service.selectByActivityRanking1(activityId,patientId,page,size));
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return error(-1,e.getMessage());
|
|
@ -100,4 +105,23 @@ public class AccountController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 添加历史记录
|
|
|
*
|
|
|
* @param activeRecord {"patientId":"","taskCode":"","originalStatus","currentStatus":""}
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/createActiveRecord",method = RequestMethod.POST)
|
|
|
@ApiOperation("添加记录")
|
|
|
public String createActiveRecord(@ApiParam(name = "activeRecord",value = "对象JSON")
|
|
|
@RequestParam(name = "activeRecord") String activeRecord){
|
|
|
try {
|
|
|
JSONObject object = JSONObject.parseObject(activeRecord);
|
|
|
JSONObject result = taskService.createActiveRecord(object);
|
|
|
return write(200,"获取成功","data",result);
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return error(-1,e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
}
|