From b5960d1968e007b91d4d33dd7cbb74f1b566f2c1 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 24 May 2024 10:20:01 +0800
Subject: [PATCH] 到期时间修改

---
 src/main/java/org/springblade/modules/apply/service/impl/ExamPaymentServiceImpl.java |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/apply/service/impl/ExamPaymentServiceImpl.java b/src/main/java/org/springblade/modules/apply/service/impl/ExamPaymentServiceImpl.java
index a341db3..bd02073 100644
--- a/src/main/java/org/springblade/modules/apply/service/impl/ExamPaymentServiceImpl.java
+++ b/src/main/java/org/springblade/modules/apply/service/impl/ExamPaymentServiceImpl.java
@@ -18,6 +18,10 @@
 import org.springblade.modules.apply.vo.ExamPaymentVO;
 import org.springblade.modules.exam.entity.ExamPaper;
 import org.springblade.modules.exam.service.ExamPaperService;
+import org.springblade.modules.system.entity.Dept;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IDeptService;
+import org.springblade.modules.system.service.IUserService;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -37,6 +41,10 @@
 
 	private final ApplyService applyService;
 
+	private final IDeptService deptService;
+
+	private final IUserService userService;
+
 
 	/**
 	 * 自定义分页数据
@@ -50,6 +58,22 @@
 		for (ExamPaymentVO examPaymentVO : examPaymentVOS) {
 			//查询人数
 			examPaymentVO.setNum(applyService.getApplyNum(examPaymentVO.getApplyCode()));
+			//如果为公司缴费
+			if (examPaymentVO.getType()==1){
+				//查询公司名称
+				Dept dept = deptService.getById(examPaymentVO.getWorkerId());
+				if (null!=dept){
+					examPaymentVO.setDeptName(dept.getDeptName());
+				}
+			}
+			//如果为个人缴费
+			if (examPaymentVO.getType()==2){
+				//查询公司名称
+				User user = userService.getById(examPaymentVO.getWorkerId());
+				if (null!=user){
+					examPaymentVO.setDeptName(user.getRealName());
+				}
+			}
 		}
 		return page.setRecords(examPaymentVOS);
 	}

--
Gitblit v1.9.3