Commit 75dbe78b authored by chenyuxi's avatar chenyuxi

feat: 入离职登记调整

parent 92fb48c8
......@@ -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;
}
......
......@@ -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
......
......@@ -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 入离职登记
......
......@@ -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){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment