|
@@ -19,6 +19,7 @@
|
|
|
|
|
|
package com.qunzhixinxi.hnqz.admin.controller;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -56,6 +57,7 @@ import java.io.File;
|
|
|
import java.io.FileInputStream;
|
|
|
import java.io.IOException;
|
|
|
import java.lang.reflect.Field;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
@@ -80,6 +82,8 @@ public class SysExportController {
|
|
|
|
|
|
private final WmScorePackageService wmScorePackageService;
|
|
|
|
|
|
+ private final WmScorePackageSettleNoteService wmScorePackageSettleNoteService;
|
|
|
+
|
|
|
private final WmScorePackageMapper wmScorePackageMapper;
|
|
|
|
|
|
private final SysDeptService sysDeptService;
|
|
@@ -112,6 +116,8 @@ public class SysExportController {
|
|
|
|
|
|
private final JavaMailSender sender;
|
|
|
|
|
|
+ private final SysExportService sysExportService;
|
|
|
+
|
|
|
/**
|
|
|
* 新增查询列表功能
|
|
|
*/
|
|
@@ -811,13 +817,17 @@ public class SysExportController {
|
|
|
if (listPackageIds.size() > 0) {
|
|
|
List<WmScorePackage> wmScorePackageList = wmScorePackageService.listByIds(listPackageIds);
|
|
|
Integer totalScorePackage = 0;
|
|
|
+ BigDecimal settleAmount = new BigDecimal("0");
|
|
|
if (wmScorePackageList.size() > 0) {
|
|
|
for (WmScorePackage wmScorePackage : wmScorePackageList) {
|
|
|
totalScorePackage += wmScorePackage.getScore();
|
|
|
+ if (wmScorePackage.getSettleStatus() != null && wmScorePackage.getSettleStatus() == 1){
|
|
|
+ settleAmount = settleAmount.add(wmScorePackage.getSettleAmount());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- excelMap.put("totalscorePackageScore", totalScorePackage);
|
|
|
+ excelMap.put("settleAmount","0".equals(settleAmount.toString()) ? " " : settleAmount);
|
|
|
+ excelMap.put("settleAmount",settleAmount.toString());
|
|
|
}
|
|
|
|
|
|
excelMap.put("rwmxTable", wmTaskDetialMap);
|
|
@@ -866,6 +876,16 @@ public class SysExportController {
|
|
|
excelMap.put("ztTable", wmTaskCount);
|
|
|
}
|
|
|
|
|
|
+ // 计算所有所有提交任务积分
|
|
|
+ List<WmTask> tasks = wmTaskService.list(Wrappers.<WmTask>lambdaQuery()
|
|
|
+ .in(WmTask::getScorePackageId, wmTask.getExtIds()));
|
|
|
+
|
|
|
+ if (CollUtil.isNotEmpty(tasks)){
|
|
|
+ int sum = tasks.stream().mapToInt(WmTask::getScore).sum();
|
|
|
+ excelMap.put("submitAmount", sum);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
String agentId = "";
|
|
|
if (sysDept.getLevel() == 3) {
|
|
|
agentId = sysDept.getLevel2Id() + "";
|
|
@@ -967,8 +987,6 @@ public class SysExportController {
|
|
|
|
|
|
}
|
|
|
|
|
|
- private final SysExportService sysExportService;
|
|
|
-
|
|
|
@GetMapping("/exportZbInfo")
|
|
|
public R exportZbInfo(WmTask wmTask) {
|
|
|
|