| | |
| | | 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; |
| | | |
| | |
| | | |
| | | private final ApplyService applyService; |
| | | |
| | | private final IDeptService deptService; |
| | | |
| | | private final IUserService userService; |
| | | |
| | | |
| | | /** |
| | | * 自定义分页数据 |
| | |
| | | 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); |
| | | } |