|
@@ -1,6 +1,7 @@
|
|
package com.management.platform.service.impl;
|
|
package com.management.platform.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.management.platform.entity.Report;
|
|
import com.management.platform.entity.Report;
|
|
import com.management.platform.mapper.ReportMapper;
|
|
import com.management.platform.mapper.ReportMapper;
|
|
import com.management.platform.service.ReportService;
|
|
import com.management.platform.service.ReportService;
|
|
@@ -28,22 +29,34 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
/**
|
|
/**
|
|
* 获取报告列表
|
|
* 获取报告列表
|
|
* 可以基于报告者id 报告种类 报告日期来筛选
|
|
* 可以基于报告者id 报告种类 报告日期来筛选
|
|
|
|
+ *
|
|
* @param creatorId
|
|
* @param creatorId
|
|
* @param reportType
|
|
* @param reportType
|
|
* @param startDate
|
|
* @param startDate
|
|
- * @param end
|
|
|
|
|
|
+ * @param endDate
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public HttpRespMsg getReportList(Integer creatorId, Integer reportType, String startDate, String end) {
|
|
|
|
- //以上筛选目前都没卵用
|
|
|
|
|
|
+ public HttpRespMsg getReportList(Integer pageIndex, Integer pageSize, Integer creatorId, Integer reportType,
|
|
|
|
+ String startDate, String endDate) {
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
- httpRespMsg.data = reportMapper.selectList(new QueryWrapper<>());
|
|
|
|
|
|
+ QueryWrapper<Report> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ if (creatorId != null) {
|
|
|
|
+ queryWrapper.eq("creator_id", creatorId);
|
|
|
|
+ }
|
|
|
|
+ if (reportType != null) {
|
|
|
|
+ queryWrapper.eq("report_type", reportType);
|
|
|
|
+ }
|
|
|
|
+ if (startDate != null && endDate != null) {
|
|
|
|
+ queryWrapper.between("create_date", startDate, endDate);
|
|
|
|
+ }
|
|
|
|
+ httpRespMsg.data = reportMapper.selectPage(new Page<>(pageIndex, pageSize), new QueryWrapper<>());
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 基于id修改报告内容
|
|
* 基于id修改报告内容
|
|
|
|
+ *
|
|
* @param reportId
|
|
* @param reportId
|
|
* @param content
|
|
* @param content
|
|
* @return
|
|
* @return
|
|
@@ -66,6 +79,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
|
|
|
/**
|
|
/**
|
|
* 基于id删除报告
|
|
* 基于id删除报告
|
|
|
|
+ *
|
|
* @param reportId
|
|
* @param reportId
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|