|
@@ -19,7 +19,6 @@ import com.qunzhixinxi.hnqz.admin.entity.dto.NewReportExportDTO;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.input.WmPackageExportApiInput;
|
|
|
import com.qunzhixinxi.hnqz.admin.enums.ReportTypeEnum;
|
|
|
import com.qunzhixinxi.hnqz.admin.mapper.ReportHandlerDeptRelationMapper;
|
|
|
-import com.qunzhixinxi.hnqz.admin.mapper.WmScorePackageMapper;
|
|
|
import com.qunzhixinxi.hnqz.admin.service.*;
|
|
|
import com.qunzhixinxi.hnqz.common.core.entity.BaseMap;
|
|
|
import com.qunzhixinxi.hnqz.common.core.util.R;
|
|
@@ -33,7 +32,6 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.mail.javamail.JavaMailSender;
|
|
|
import org.springframework.mail.javamail.MimeMessageHelper;
|
|
|
-import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@@ -44,6 +42,7 @@ import javax.mail.internet.MimeMessage;
|
|
|
import java.io.IOException;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
@@ -67,7 +66,8 @@ public class ReportExportController {
|
|
|
|
|
|
private final SysDeptService sysDeptService;
|
|
|
|
|
|
- private final WmScorePackageMapper scorePackageMapper;
|
|
|
+ private final WmScorePackageService wmScorePackageService;
|
|
|
+
|
|
|
private final ReportHandlerDeptRelationMapper reportHandlerDeptRelationMapper;
|
|
|
|
|
|
private final JavaMailSender sender;
|
|
@@ -809,4 +809,35 @@ public class ReportExportController {
|
|
|
|
|
|
return opt;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取所有个人报告导出状态
|
|
|
+ *
|
|
|
+ * @param packageId 积分包id
|
|
|
+ * @return {@link WmReportOpt} 结果
|
|
|
+ */
|
|
|
+ @GetMapping("/all-personal-report-status")
|
|
|
+ public R<Map<String, WmReportOpt>> getAllPersonalReportStatus(@RequestParam("id") String packageId) {
|
|
|
+ Map<String, WmReportOpt> result = new HashMap<>();
|
|
|
+
|
|
|
+ WmScorePackage scorePackage = new WmScorePackage();
|
|
|
+ scorePackage.setId(packageId);
|
|
|
+ scorePackage.setReportMqName(CacheConstants.EXPORT_ZB_REPORT_CACHE);
|
|
|
+ wmScorePackageService.getReportOpt(scorePackage);
|
|
|
+ result.put("reportOpt", scorePackage.getReportOpt());
|
|
|
+
|
|
|
+ // 封装excel报告状态
|
|
|
+ wmScorePackageService.getExcelReportOpt(scorePackage, CacheConstants.EXCEL_EXPORT_ZB_REPORT_CACHE);
|
|
|
+ result.put("excelReportOpt", scorePackage.getExcelReportOpt());
|
|
|
+
|
|
|
+ // 封装新版报告状态
|
|
|
+ WmReportOpt newReportOpt = wmScorePackageService.getNewReportOpt(scorePackage, CacheConstants.NEW_PERSONAL_REPORT_CACHE);
|
|
|
+ result.put("newReportOpt", newReportOpt);
|
|
|
+
|
|
|
+ // 封装新版excel报告状态
|
|
|
+ WmReportOpt newExcelReportOpt = wmScorePackageService.getNewReportOpt(scorePackage, CacheConstants.NEW_EXCEL_COMMON_REPORT_CACHE);
|
|
|
+ result.put("newExcelReportOpt", newExcelReportOpt);
|
|
|
+
|
|
|
+ return R.ok(result);
|
|
|
+ }
|
|
|
}
|