Bläddra i källkod

feat: 新版个人报告导出接口-加syslog

lixuesong 1 år sedan
förälder
incheckning
d82eabdbb2

+ 9 - 6
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/ReportExportController.java

@@ -613,6 +613,7 @@ public class ReportExportController {
 	 * @param wmScorePackage 积分包
 	 * @return 结果
 	 */
+	@SysLog("新版企业的报告导出")
 	@GetMapping("/new-nba-export")
 	public R<?> newDrugEntExport(WmScorePackage wmScorePackage) {
 		// 查询是否配置了模板
@@ -651,6 +652,7 @@ public class ReportExportController {
 	 * @param newReportExportDTO 参数
 	 * @return 结果
 	 */
+	@SysLog("新版个人的报告导出")
 	@GetMapping("/new-personal-export")
 	public R<?> newPersonalExport(@Validated NewReportExportDTO newReportExportDTO) {
 		// 查询是否配置了模板
@@ -684,23 +686,24 @@ public class ReportExportController {
 	}
 
 	/**
-	 * 新版excel版的导出
+	 * 新版excel通用版的导出
 	 *
-	 * @param wmScorePackage 积分包
+	 * @param newReportExportDTO 参数
 	 * @return 结果
 	 */
+	@SysLog("新版excel通用版的导出")
 	@GetMapping("/new-excel-export")
-	public R<?> newExcelExport(WmScorePackage wmScorePackage) {
+	public R<?> newExcelCommonExport(@Validated NewReportExportDTO newReportExportDTO) {
 		// 查询是否配置了模板
 		Integer deptId = SecurityUtils.getUser().getDeptId();
 		int count = reportHandlerDeptRelationMapper.selectCount(Wrappers.<ReportHandlerDeptRelation>lambdaQuery()
 				.eq(ReportHandlerDeptRelation::getDetpId, deptId)
-				.eq(ReportHandlerDeptRelation::getReportType, ReportTypeEnum.NEW_EXCEL_NBA.getType()));
+				.eq(ReportHandlerDeptRelation::getReportType, ReportTypeEnum.NEW_EXCEL_COMMON.getType()));
 		if (count <= 0) {
 			return R.failed("该企业尚未配置新模版,请联系客服人员进行模版配置");
 		}
 
-		String key = String.format(CacheConstants.NEW_EXCEL_COMMON_REPORT_CACHE, wmScorePackage.getId());
+		String key = String.format(CacheConstants.NEW_EXCEL_COMMON_REPORT_CACHE, newReportExportDTO.getId());
 
 		String o = redisTemplate.opsForValue().get(key);
 
@@ -711,7 +714,7 @@ public class ReportExportController {
 		}
 
 		BaseMap map = new BaseMap();
-		map.put("requestBody", JSONUtil.toJsonStr(wmScorePackage));
+		map.put("requestBody", JSONUtil.toJsonStr(newReportExportDTO));
 
 		rabbitMqClient.sendMessage(MqConstants.DIRECT_MODE_NEW_EXCEL_DRUG_ENT_REPORT_EXPORT_QUEUE, map);
 

+ 1 - 1
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/enums/ReportTypeEnum.java

@@ -28,7 +28,7 @@ public enum ReportTypeEnum {
 
 	NEW_DRUG_ENT("NEW_DRUG_ENT", "新版企业承接任务的报告、任务中心单的报告"),
     NEW_PERSONAL("NEW_PERSONAL", "新版个人承接任务-按积分值/个人承接任务-按积分值-任务审核/多人承接任务-按积分值/个人报告导出——导出、合并导出"),
-    NEW_EXCEL_NBA("NEW_EXCEL_NBA", "新版excel版企业承接任务的报告、任务中心单的报告");
+    NEW_EXCEL_COMMON("NEW_EXCEL_COMMON", "新版excel版的通用报告");
 
     /**
      * 报告类型