|
|
@@ -3,14 +3,17 @@ package com.fs.his.controller;
|
|
|
import com.fs.common.annotation.Log;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
+import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.his.domain.FsUserIntegralLogs;
|
|
|
import com.fs.his.param.FsUserIntegralLogsParam;
|
|
|
+import com.fs.his.param.FsUserIntegralLogsStatisticsParam;
|
|
|
import com.fs.his.service.IFsUserIntegralLogsService;
|
|
|
import com.fs.his.vo.FsTestReportListVO;
|
|
|
import com.fs.his.vo.FsUserIntegralLogsListVO;
|
|
|
+import com.fs.his.vo.FsUserIntegralLogsStatisticsVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -110,4 +113,39 @@ public class FsUserIntegralLogsController extends BaseController
|
|
|
{
|
|
|
return toAjax(fsUserIntegralLogsService.deleteFsUserIntegralLogsByIds(ids));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 统计
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('his:statistics:integral')")
|
|
|
+ @GetMapping("/statistics")
|
|
|
+ public R statistics(FsUserIntegralLogsStatisticsParam param)
|
|
|
+ {
|
|
|
+ if (param.getType() != null && param.getType().equals(2)) {
|
|
|
+ if (param.getUserId() == null || param.getUserId() < 0L) {
|
|
|
+ return R.error("用户维度需要输入用户id");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<FsUserIntegralLogsStatisticsVo> list = fsUserIntegralLogsService.statisticsList(param);
|
|
|
+ return R.ok().put("list",list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出统计
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('his:statistics:commissionExport')")
|
|
|
+ @GetMapping("/exportCommission")
|
|
|
+ @Log(title = "积分统计导出", businessType = BusinessType.EXPORT)
|
|
|
+ public AjaxResult exportCommission(FsUserIntegralLogsStatisticsParam param)
|
|
|
+ {
|
|
|
+ if (param.getType() != null && param.getType().equals(2)) {
|
|
|
+ if (param.getUserId() == null || param.getUserId() < 0L) {
|
|
|
+ return AjaxResult.error("用户维度需要输入用户id");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<FsUserIntegralLogsStatisticsVo> list = fsUserIntegralLogsService.statisticsList(param);
|
|
|
+
|
|
|
+ ExcelUtil<FsUserIntegralLogsStatisticsVo> util = new ExcelUtil<FsUserIntegralLogsStatisticsVo>(FsUserIntegralLogsStatisticsVo.class);
|
|
|
+ return util.exportExcel(list, "积分统计数据");
|
|
|
+ }
|
|
|
}
|