From 75dbe78b0d332644655b25e69c8485950ff3f3fc Mon Sep 17 00:00:00 2001
From: chenyuxi <chenyuxi@wanxin-holdings.com>
Date: Thu, 20 Mar 2025 17:57:28 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=A5=E7=A6=BB=E8=81=8C=E7=99=BB?=
 =?UTF-8?q?=E8=AE=B0=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../common/dapr/util/ArchivesDaprUtil.java    |  4 +-
 .../EmployeeRegistrationController.java       | 29 ++++++++++
 .../service/EmployeeRegistrationService.java  | 16 ++++++
 .../impl/EmployeeRegistrationServiceImpl.java | 53 ++++++++++++++++---
 4 files changed, 94 insertions(+), 8 deletions(-)

diff --git a/yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java b/yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
index 67126ea45..d41e6127b 100644
--- a/yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+++ b/yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
@@ -568,9 +568,9 @@ public class ArchivesDaprUtil {
 	public R<SysAutoDictItemVo> getDictListByDeptNo(String deptNo){
 		SysAutoDictItemVo dictItemVo = new SysAutoDictItemVo();
 		dictItemVo.setDeptNo(deptNo);
-		R<SysAutoDictItemVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainSelectVoById",dictItemVo, SysAutoDictItemVo.class, SecurityConstants.FROM_IN);
+		R<SysAutoDictItemVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/sysautodictitem/getSettleDomainSelectVoById",dictItemVo, SysAutoDictItemVo.class, SecurityConstants.FROM_IN);
 		if (Common.isEmpty(res)){
-			return R.failed("获取派单校验需要的档案信息失败!");
+			return R.failed("获取项目字典项失败!");
 		}
 		return res;
 	}
diff --git a/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/EmployeeRegistrationController.java b/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/EmployeeRegistrationController.java
index dbdccf31b..9fc6e3ead 100644
--- a/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/EmployeeRegistrationController.java
+++ b/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/EmployeeRegistrationController.java
@@ -77,6 +77,21 @@ public class EmployeeRegistrationController {
 		return new R<>(employeeRegistrationService.getHrEmployeeRegistrationPage(page, employeeRegistration));
 	}
 
+	/**
+	 * 作业自动化-入离职登记列表简单分页查询
+	 *
+	 * @param page                 分页对象
+	 * @param employeeRegistration 入离职登记表
+	 * @return
+	 */
+	@Operation(description = "作业自动化-入离职登记列表简单分页查询")
+	@GetMapping("/hrRegistrationPage")
+	public R<IPage<EmployeeRegistration>> getHrAutoEmployeeRegistrationPage(Page<EmployeeRegistration> page, EmployeeRegistrationSearchVo employeeRegistration) {
+		YifuUser user = SecurityUtils.getUser();
+		menuUtil.setAuthSql(user, employeeRegistration);
+		return new R<>(employeeRegistrationService.getHrAutoEmployeeRegistrationPage(page, employeeRegistration));
+	}
+
 	/**
 	 * 通过id查询入离职登记表
 	 *
@@ -182,6 +197,20 @@ public class EmployeeRegistrationController {
 		employeeRegistrationService.listHrExport(response, searchVo);
 	}
 
+	/**
+	 * 作业自动化-入离职登记导出
+	 *
+	 * @author huych
+	 * @date 2025-02-25 14:48:11
+	 **/
+	@Operation(description = "作业自动化-入离职登记导出")
+	@PostMapping("/hrRegistrationExport")
+	public void hrRegistrationExport(HttpServletResponse response, @RequestBody EmployeeRegistrationSearchVo searchVo) {
+		YifuUser user = SecurityUtils.getUser();
+		menuUtil.setAuthSql(user, searchVo);
+		employeeRegistrationService.hrRegistrationExport(response, searchVo);
+	}
+
 	/**
 	 * @Description: 获取已接收的入离职申请,同时更新为已处理
 	 * @Author: hgw
diff --git a/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/EmployeeRegistrationService.java b/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/EmployeeRegistrationService.java
index 3648bb9e2..8b8312e59 100644
--- a/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/EmployeeRegistrationService.java
+++ b/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/EmployeeRegistrationService.java
@@ -38,6 +38,14 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
 	 */
 	IPage<EmployeeRegistration> getHrEmployeeRegistrationPage(Page<EmployeeRegistration> page, EmployeeRegistrationSearchVo employeeRegistration);
 
+	/**
+	 * 作业自动化-入离职登记列表简单分页查询
+	 * @param employeeRegistration 入离职登记表
+	 * @return
+	 */
+	IPage<EmployeeRegistration> getHrAutoEmployeeRegistrationPage(Page<EmployeeRegistration> page, EmployeeRegistrationSearchVo employeeRegistration);
+
+
 	/**
 	 * 入职待确认简单分页查询
 	 * @param employeeRegistration 入离职登记表
@@ -87,6 +95,14 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
 	 */
 	void listHrExport(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo);
 
+	/**
+	 * 作业自动化-入离职登记导出
+	 * @param searchVo 入离职登记
+	 * @return
+	 */
+	void hrRegistrationExport(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo);
+
+
 	/**
 	 * 入职待确认表导出
 	 * @param searchVo 入离职登记
diff --git a/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java b/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
index 9ae8becbe..203018d43 100644
--- a/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+++ b/yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
@@ -104,12 +104,25 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
 	@Override
 	public IPage<EmployeeRegistration> getHrEmployeeRegistrationPage(Page<EmployeeRegistration> page, EmployeeRegistrationSearchVo employeeRegistration) {
 		YifuUser user = SecurityUtils.getUser();
+		// 全服管理者
 		long roleId = 1839501715787390978L;
 		boolean isSsc = this.haveRole(user, roleId);
 		if (isSsc) {
 			employeeRegistration.setCustomerUserLoginname(null);
 		}
-		// 前端客服的所有项目权限赋值
+		return baseMapper.getEmployeeRegistrationPage(page, employeeRegistration);
+	}
+
+	/**
+	 * 作业自动化-入离职登记列表简单分页查询
+	 *
+	 * @param employeeRegistration 入离职登记表
+	 * @return
+	 */
+	@Override
+	public IPage<EmployeeRegistration> getHrAutoEmployeeRegistrationPage(Page<EmployeeRegistration> page, EmployeeRegistrationSearchVo employeeRegistration) {
+		employeeRegistration.setCustomerUserLoginname(null);
+		// 项目权限赋值
 		employeeRegistration.setType(CommonConstants.TWO_STRING);
 		initSearchVo(employeeRegistration);
 		return baseMapper.getEmployeeRegistrationPage(page, employeeRegistration);
@@ -182,10 +195,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
 	}
 
 	/**
-	 * 入离职登记表批量导出
+	 * 入离职代办表批量导出
 	 *
 	 * @param searchVo 入离职登记表
-	 * @return
 	 */
 	@Override
 	public void listHrExport(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo) {
@@ -196,11 +208,39 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
 		if (isSsc) {
 			searchVo.setCustomerUserLoginname(null);
 		}
+
+		String fileName = "入离职待办任务表批量导出" + DateUtil.getThisTime() + ".xlsx";
+
+		this.hrExportCommon(response,searchVo,fileName);
+	}
+
+	/**
+	 * 作业自动化-入离职登记导出
+	 *
+	 * @param searchVo 入离职登记表
+	 * @since 1.9.8
+	 * @author chenyuxi
+	 */
+	@Override
+	public void hrRegistrationExport(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo) {
+		// 1.9.8: 前端客服去掉指定人查询
+		searchVo.setCustomerUserLoginname(null);
+		// 1.9.8: 项目权限赋值
 		searchVo.setType(CommonConstants.TWO_STRING);
-		// 1.9.8: 前端客服的所有项目权限赋值
 		initSearchVo(searchVo);
 
-		String fileName = "入离职待办任务表批量导出" + DateUtil.getThisTime() + ".xlsx";
+		String fileName = "入离职登记批量导出" + DateUtil.getThisTime() + ".xlsx";
+
+		this.hrExportCommon(response,searchVo,fileName);
+
+	}
+
+	/**
+	 * 入离职导出公共
+	 *
+	 * @param searchVo 入离职登记表
+	 */
+	private void hrExportCommon(HttpServletResponse response, EmployeeRegistrationSearchVo searchVo, String fileName){
 		//获取要导出的列表
 		List<EmployeeRegistrationHrExportVo> list = new ArrayList<>();
 		long count = baseMapper.selectExportCount(searchVo);
@@ -240,6 +280,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
 		}
 	}
 
+
 	/**
 	 * 入职待确认批量导出
 	 * @param searchVo 入职待确认
@@ -311,7 +352,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
 
 		// 1.9.8:获取项目配置的字典值
 		List<String> postConfigList = new ArrayList<>();
-		R<SysAutoDictItemVo> domainDictR = archivesDaprUtil.getDictListByDeptNo(selectVo.getDepartNo());
+		R<SysAutoDictItemVo> domainDictR = archivesDaprUtil.getDictListByDeptNo(deptId);
 		if (Common.isNotNull(domainDictR) && Common.isNotNull(domainDictR.getData()) && Common.isNotNull(domainDictR.getData().getSysAutoDictItemList())) {
 			List<SysAutoDictItem> dictItemList = domainDictR.getData().getSysAutoDictItemList();
 			for(SysAutoDictItem sysAutoDictItem : dictItemList){
-- 
2.18.1