Commit fa85cf8c by 张祺

修改获取任务填报值的方法

parent 3a0ba982
......@@ -99,13 +99,14 @@ public class DataEnterCtrl {
@GetMapping("findEnterValues")
public Page<TaskIndValue> findEnterValues(@ApiParam("任务ID")@RequestParam("taskId") String taskId,
@ApiParam(value = "页码,从1开始", defaultValue = "1")@RequestParam("pageNo") int pageNo,
@ApiParam(value = "每页条数", defaultValue = "10")@RequestParam("pageSize") int pageSize
@ApiParam(value = "每页条数", defaultValue = "10")@RequestParam("pageSize") int pageSize,
@ApiParam(value = "是否包含需要计算的数据项(审核中、填报中的时候不要传true)", defaultValue = "false")@RequestParam("includeFormula") boolean includeFormula
) {
List<TaskIndValue> list = new ArrayList<>();
long total = taskService.findCountByTaskId(taskId, false);
long total = taskService.findCountByTaskId(taskId, includeFormula);
PageRequest request = PageRequest.of(pageNo - 1, pageSize);
if (total > 0) {
list = taskService.findByPageAndTaskId(taskId, request.getOffset(), pageSize, false);
list = taskService.findByPageAndTaskId(taskId, request.getOffset(), pageSize, includeFormula);
}
Page<TaskIndValue> pageResult = new PageImpl<>(list, request, total);
return pageResult;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment