|
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
|
+import com.sckw.core.model.constant.NumberConstant;
|
|
|
|
|
+import com.sckw.core.model.enums.MessageLogEnum;
|
|
|
import com.sckw.core.model.enums.ReportTypeEnum;
|
|
import com.sckw.core.model.enums.ReportTypeEnum;
|
|
|
import com.sckw.core.model.page.PageRes;
|
|
import com.sckw.core.model.page.PageRes;
|
|
|
import com.sckw.core.utils.StringUtils;
|
|
import com.sckw.core.utils.StringUtils;
|
|
@@ -91,6 +93,9 @@ public class ReportService {
|
|
|
.set(KwsReportData::getDelFlag, 1));
|
|
.set(KwsReportData::getDelFlag, 1));
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ Map<String, Object> logMap = new HashMap<>(NumberConstant.SIXTEEN);
|
|
|
|
|
+ logMap.put("count", list.size());
|
|
|
|
|
+ commonService.insertLog(MessageLogEnum.REPORT_BATCH_DELETE, headerData, logMap, headerData.getUpdateBy() == null ? null : Long.parseLong(headerData.getUpdateBy()));
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -100,6 +105,7 @@ public class ReportService {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public HttpResult export(String ids, HttpServletRequest request) {
|
|
public HttpResult export(String ids, HttpServletRequest request) {
|
|
|
|
|
+ HeaderData headerData = commonService.getHeaderData(request);
|
|
|
List<Long> list = StringUtils.splitStrToList(ids, Long.class);
|
|
List<Long> list = StringUtils.splitStrToList(ids, Long.class);
|
|
|
List<KwsReportData> kwsReportData = reportDataMapper.selectList(new LambdaQueryWrapper<KwsReportData>()
|
|
List<KwsReportData> kwsReportData = reportDataMapper.selectList(new LambdaQueryWrapper<KwsReportData>()
|
|
|
.eq(KwsReportData::getDelFlag, 0)
|
|
.eq(KwsReportData::getDelFlag, 0)
|
|
@@ -107,6 +113,9 @@ public class ReportService {
|
|
|
List<String> fileUrls = new ArrayList<>();
|
|
List<String> fileUrls = new ArrayList<>();
|
|
|
if (!CollectionUtils.isEmpty(kwsReportData)) {
|
|
if (!CollectionUtils.isEmpty(kwsReportData)) {
|
|
|
fileUrls = kwsReportData.stream().map(KwsReportData::getFileUrl).collect(Collectors.toList());
|
|
fileUrls = kwsReportData.stream().map(KwsReportData::getFileUrl).collect(Collectors.toList());
|
|
|
|
|
+ Map<String, Object> logMap = new HashMap<>(NumberConstant.SIXTEEN);
|
|
|
|
|
+ logMap.put("count", fileUrls.size());
|
|
|
|
|
+ commonService.insertLog(MessageLogEnum.REPORT_BATCH_EXPORT, headerData, logMap, headerData.getUpdateBy() == null ? null : Long.parseLong(headerData.getUpdateBy()));
|
|
|
}
|
|
}
|
|
|
return HttpResult.ok(fileUrls);
|
|
return HttpResult.ok(fileUrls);
|
|
|
}
|
|
}
|