Commit a6ecf01a authored by huyuchen's avatar huyuchen

huych-入离职登记提交

parent 9c4eb02f
...@@ -69,7 +69,7 @@ public class EmployeeRegistrationPreExportVo implements Serializable { ...@@ -69,7 +69,7 @@ public class EmployeeRegistrationPreExportVo implements Serializable {
@ExcelAttribute(name = "前端客服") @ExcelAttribute(name = "前端客服")
@Schema(description = "前端客服") @Schema(description = "前端客服")
@ExcelProperty("前端客服") @ExcelProperty("前端客服")
private String customerUsername; private String customerUsernameNew;
@ExcelAttribute(name = "预计收集时间", isDate = true) @ExcelAttribute(name = "预计收集时间", isDate = true)
@Schema(description = "预计收集时间") @Schema(description = "预计收集时间")
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 入职确认信息导出
*
* @author huych
* @date 2025-03-172 15:51:36
*/
@Data
@ColumnWidth(17)
public class EmployeeRegistrationPreInfoExportVo implements Serializable {
@ExcelAttribute(name = "项目名称")
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
@ExcelAttribute(name = "项目编码")
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
@ExcelAttribute(name = "员工姓名")
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelAttribute(name = "身份证号")
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelAttribute(name = "手机号码")
@Schema(description = "手机号码")
@ExcelProperty("手机号码")
private String empPhone;
@ExcelAttribute(name = "就职岗位")
@Schema(description = "就职岗位")
@ExcelProperty("就职岗位")
private String position;
@ExcelAttribute(name = "入职日期", isDate = true)
@Schema(description = "入职日期")
@ExcelProperty("入职日期")
private Date joinLeaveDate;
@ExcelAttribute(name = "确认人")
@Schema(description = "确认人")
@ExcelProperty("确认人")
private String confirmUser;
@ExcelAttribute(name = "确认时间", isDate = true)
@Schema(description = "确认时间")
@ExcelProperty("确认时间")
private Date confirmTime;
@ExcelAttribute(name = "服务事项")
@Schema(description = "服务事项")
@ExcelProperty("服务事项")
private String serverItem;
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型")
@ExcelProperty("员工类型")
private String empNature;
@ExcelAttribute(name = "合同类型(字典值)", isDataId = true,dataType = ExcelAttributeConstants.PERSONNEL_TYPE)
@Schema(description = "合同类型(字典值)")
@ExcelProperty("合同类型")
private String contractType;
@ExcelAttribute(name = "档案所在地")
@Schema(description = "档案所在地")
@ExcelProperty("档案所在地")
private String fileAdress;
}
...@@ -49,6 +49,6 @@ public class EmployeeRegistrationPreSearchVo extends EmployeeRegistrationPre { ...@@ -49,6 +49,6 @@ public class EmployeeRegistrationPreSearchVo extends EmployeeRegistrationPre {
@TableField(exist = false) @TableField(exist = false)
private List<String> deptNoList; private List<String> deptNoList;
@Schema(description = "列表类型 1 待办 2监控") @Schema(description = "列表类型 1 待办 2监控 3入职确认信息")
private String type; private String type;
} }
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 入职待待完善
*
* @author huych
* @date 2025-03-17 15:23:19
*/
@Data
@ColumnWidth(17)
public class EmployeeRegistrationProjectListVo implements Serializable {
@ExcelAttribute(name = "项目名称")
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
@ExcelAttribute(name = "项目编码")
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
@ExcelAttribute(name = "员工姓名")
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelAttribute(name = "身份证号")
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelAttribute(name = "手机号码")
@Schema(description = "手机号码")
@ExcelProperty("手机号码")
private String empPhone;
@ExcelAttribute(name = "入职日期", isDate = true)
@Schema(description = "入职日期")
@ExcelProperty("入职日期")
private Date joinLeaveDate;
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型")
@ExcelProperty("员工类型")
private String empNature;
@ExcelAttribute(name = "合同类型(字典值)", isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_TYPE)
@Schema(description = "合同类型(字典值)")
@ExcelProperty("合同类型")
private String contractType;
@ExcelAttribute(name = "前端客服")
@Schema(description = "前端客服")
@ExcelProperty("前端客服")
private String customerUsernameNew;
@ExcelAttribute(name = "数据来源")
@Schema(description = "数据来源")
@ExcelProperty("数据来源")
private String dataSource;
@ExcelAttribute(name = "不完善类型")
@Schema(description = "不完善类型")
@ExcelProperty("不完善类型")
private String type;
@ExcelAttribute(name = "状态")
@Schema(description = "状态")
@ExcelProperty("状态")
private String processStatus;
@ExcelAttribute(name = "项目档案id" ,isExport = false)
@Schema(description = "项目档案id")
@ExcelProperty("项目档案id")
private String empProjectId;
@ExcelAttribute(name = "人员档案id",isExport = false)
@Schema(description = "人员档案id")
@ExcelProperty("人员档案id")
private String empInfoId;
}
...@@ -95,6 +95,17 @@ public class EmployeeRegistrationPreController { ...@@ -95,6 +95,17 @@ public class EmployeeRegistrationPreController {
employeeRegistrationPreService.listExport(response,searchVo); employeeRegistrationPreService.listExport(response,searchVo);
} }
/**
* 入职确认信息 批量导出
* @author huych
* @date 2025-03-17 16:26:26
**/
@Operation(description = "导出入职确认信息")
@PostMapping("/confirmExport")
public void confirmExport(HttpServletResponse response, @RequestBody EmployeeRegistrationPreSearchVo searchVo) {
employeeRegistrationPreService.confirmExport(response,searchVo);
}
/** /**
* @Author huyc * @Author huyc
* @Description 新增入职待建档信息 * @Description 新增入职待建档信息
......
...@@ -4,9 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,9 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor; import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCompleteMonitorService; import com.yifu.cloud.plus.v1.yifu.archives.service.TCompleteMonitorService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpMainDetailVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
...@@ -164,4 +162,29 @@ public class TCompleteMonitorController { ...@@ -164,4 +162,29 @@ public class TCompleteMonitorController {
tCompleteMonitorService.updateProjectStatusByDeptNo(deptNo); tCompleteMonitorService.updateProjectStatusByDeptNo(deptNo);
return R.ok(); return R.ok();
} }
/**
* 简单分页查询
* @param page 分页对象
* @param searchVo 档案待完善
* @return
*/
@Operation(description = "档案待完善列表分页查询")
@GetMapping("/archivesPage")
public R<IPage<EmployeeRegistrationProjectListVo>> getAllLackArchivesPage(Page<EmployeeRegistrationProjectListVo> page, EmployeeRegistrationPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
return new R<>(tCompleteMonitorService.getAllLackArchivesPage(page,searchVo));
}
/**
* 档案待完善 批量导出
* @author huyc
* @date 2025-03-17 16:24:38
**/
@Operation(description = "导出档案待完善")
@PostMapping("/archivesExport")
public void archivesExport(HttpServletResponse response, @RequestBody EmployeeRegistrationPreSearchVo searchVo) {
tCompleteMonitorService.archivesExport(response,searchVo);
}
} }
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre; import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -37,4 +38,11 @@ public interface EmployeeRegistrationPreMapper extends BaseMapper<EmployeeRegist ...@@ -37,4 +38,11 @@ public interface EmployeeRegistrationPreMapper extends BaseMapper<EmployeeRegist
* @return * @return
*/ */
List<EmployeeRegistrationPreExportVo> selectExportList(@Param("EmployeeRegistrationPre") EmployeeRegistrationPreSearchVo searchVo); List<EmployeeRegistrationPreExportVo> selectExportList(@Param("EmployeeRegistrationPre") EmployeeRegistrationPreSearchVo searchVo);
/**
* 入职待建档表导出列表查询
* @param searchVo 导出查询vo
* @return
*/
List<EmployeeRegistrationPreInfoExportVo> selectConfirmExportList(@Param("EmployeeRegistrationPre") EmployeeRegistrationPreSearchVo searchVo);
} }
...@@ -42,6 +42,27 @@ public interface TCompleteMonitorMapper extends BaseMapper<TCompleteMonitor> { ...@@ -42,6 +42,27 @@ public interface TCompleteMonitorMapper extends BaseMapper<TCompleteMonitor> {
*/ */
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, @Param("tCompleteMonitor") TCompleteMonitorSearchVo tCompleteMonitor); IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, @Param("tCompleteMonitor") TCompleteMonitorSearchVo tCompleteMonitor);
/**
* 档案待完善列表分页查询
* @param employeeRegistrationPre 入职待完善
* @return
*/
IPage<EmployeeRegistrationProjectListVo> getAllLackArchivesPage(Page<EmployeeRegistrationProjectListVo> page, @Param("employeeRegistrationPre") EmployeeRegistrationPreSearchVo employeeRegistrationPre);
/**
* 档案完整度监控简单分页查询
* @param employeeRegistrationPre 入职待完善
* @return
*/
long getAllLackArchivesExportCount(@Param("employeeRegistrationPre") EmployeeRegistrationPreSearchVo employeeRegistrationPre);
/**
* 档案完整度监控批量导出
* @param employeeRegistrationPre 入职待完善
* @return
*/
List<EmployeeRegistrationProjectListVo> getAllLackArchivesExportList(@Param("employeeRegistrationPre") EmployeeRegistrationPreSearchVo employeeRegistrationPre);
/** /**
* 档案完整度监控简单分页查询 * 档案完整度监控简单分页查询
......
...@@ -31,6 +31,14 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr ...@@ -31,6 +31,14 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr
*/ */
void listExport(HttpServletResponse response, EmployeeRegistrationPreSearchVo searchVo); void listExport(HttpServletResponse response, EmployeeRegistrationPreSearchVo searchVo);
/**
* 入职确认信息导出
* @param searchVo 入职确认信息导出查询vo
* @return
*/
void confirmExport(HttpServletResponse response, EmployeeRegistrationPreSearchVo searchVo);
/** /**
* 新增入职待建档信息 * 新增入职待建档信息
* @param preVo 新增入职待建档vo * @param preVo 新增入职待建档vo
......
...@@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor; import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpMainDetailVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -26,6 +24,20 @@ public interface TCompleteMonitorService extends IService<TCompleteMonitor> { ...@@ -26,6 +24,20 @@ public interface TCompleteMonitorService extends IService<TCompleteMonitor> {
*/ */
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitorSearchVo tCompleteMonitor); IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitorSearchVo tCompleteMonitor);
/**
* 档案待完善列表分页查询
* @param preSearchVo 档案完整度监控
* @return
*/
IPage<EmployeeRegistrationProjectListVo> getAllLackArchivesPage(Page<EmployeeRegistrationProjectListVo> page, EmployeeRegistrationPreSearchVo preSearchVo);
/**
* 档案待完善列表导出
* @param preSearchVo 档案待完善
* @return
*/
void archivesExport(HttpServletResponse response, EmployeeRegistrationPreSearchVo preSearchVo);
/** /**
* @Description: 详情 * @Description: 详情
* @Author: huyc * @Author: huyc
......
...@@ -10,10 +10,7 @@ import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo; ...@@ -10,10 +10,7 @@ import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre; import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService; import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainRegistListVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...@@ -58,7 +55,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -58,7 +55,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
//权限赋值 //权限赋值
initSearchVo(employeeRegistrationPre); initSearchVo(employeeRegistrationPre);
if (Common.isEmpty(employeeRegistrationPre.getStatusList()) if (Common.isEmpty(employeeRegistrationPre.getStatusList())
&& CommonConstants.ONE_STRING.equals(employeeRegistrationPre.getType())) { && !CommonConstants.THREE_STRING.equals(employeeRegistrationPre.getType())) {
employeeRegistrationPre.setStatusList(CommonConstants.processPreArchivesStatus); employeeRegistrationPre.setStatusList(CommonConstants.processPreArchivesStatus);
} }
return baseMapper.getEmployeeRegistrationPrePage(page,employeeRegistrationPre); return baseMapper.getEmployeeRegistrationPrePage(page,employeeRegistrationPre);
...@@ -77,7 +74,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -77,7 +74,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
//权限赋值 //权限赋值
initSearchVo(searchVo); initSearchVo(searchVo);
if (Common.isEmpty(searchVo.getStatusList()) if (Common.isEmpty(searchVo.getStatusList())
&& CommonConstants.ONE_STRING.equals(searchVo.getType())) { && !CommonConstants.THREE_STRING.equals(searchVo.getType())) {
searchVo.setStatusList(CommonConstants.processPreArchivesStatus); searchVo.setStatusList(CommonConstants.processPreArchivesStatus);
} }
long count = baseMapper.selectExportCount(searchVo); long count = baseMapper.selectExportCount(searchVo);
...@@ -92,7 +89,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -92,7 +89,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
// 获取所有字典对应的值 // 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE); Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
Set<String> exportFields = new HashSet<>(Arrays.asList("deptName", "deptNo", "employeeName", "empIdcard", Set<String> exportFields = new HashSet<>(Arrays.asList("deptName", "deptNo", "employeeName", "empIdcard",
"empPhone", "joinLeaveDate", "empNature", "contractType", "dataSource", "customerUsername", "expectedCollectionTime", "processStatus")); "empPhone", "joinLeaveDate", "empNature", "contractType", "dataSource", "customerUsernameNew", "expectedCollectionTime", "processStatus"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeRegistrationPreExportVo.class) ExcelWriter excelWriter = EasyExcel.write(out, EmployeeRegistrationPreExportVo.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap)) .registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
...@@ -127,6 +124,70 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -127,6 +124,70 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
} }
/**
* 入职确认信息批量导出
* @param searchVo 入职待建档表
* @return
*/
@Override
public void confirmExport(HttpServletResponse response, EmployeeRegistrationPreSearchVo searchVo){
String fileName = "入职确认信息批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeRegistrationPreInfoExportVo> list = new ArrayList<>();
//权限赋值
initSearchVo(searchVo);
if (Common.isEmpty(searchVo.getStatusList())
&& !CommonConstants.THREE_STRING.equals(searchVo.getType())) {
searchVo.setStatusList(CommonConstants.processPreArchivesStatus);
}
long count = baseMapper.selectExportCount(searchVo);
try (ServletOutputStream out= response.getOutputStream();){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelUtil<EmployeeRegistrationPreInfoExportVo> util = new ExcelUtil<>(EmployeeRegistrationPreInfoExportVo.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
Set<String> exportFields = new HashSet<>(Arrays.asList("deptName", "deptNo", "employeeName", "empIdcard",
"empPhone", "position","joinLeaveDate", "confirmUser", "confirmTime", "serverItem", "empNature",
"contractType", "fileAdress"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeRegistrationPreInfoExportVo.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(exportFields).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.selectConfirmExportList(searchVo);
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("入职确认信息表"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("入职确认信息表"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}
}
@Override @Override
public Boolean saveRegistPreInfo(EmployeeRegistrationPreVo preVo) { public Boolean saveRegistPreInfo(EmployeeRegistrationPreVo preVo) {
EmployeeRegistrationPre pre = new EmployeeRegistrationPre(); EmployeeRegistrationPre pre = new EmployeeRegistrationPre();
......
...@@ -96,6 +96,16 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -96,6 +96,16 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
return baseMapper.getTCompleteMonitorPage(page,tCompleteMonitor); return baseMapper.getTCompleteMonitorPage(page,tCompleteMonitor);
} }
/**
* 档案完整度监控简单分页查询
* @param preSearchVo 入职待完善
* @return
*/
@Override
public IPage<EmployeeRegistrationProjectListVo> getAllLackArchivesPage(Page<EmployeeRegistrationProjectListVo> page, EmployeeRegistrationPreSearchVo preSearchVo){
return baseMapper.getAllLackArchivesPage(page,preSearchVo);
}
/** /**
* 档案完整度监控批量导出 * 档案完整度监控批量导出
* @param searchVo 档案完整度监控 * @param searchVo 档案完整度监控
...@@ -161,6 +171,63 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -161,6 +171,63 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
} }
} }
/**
* 档案待完整批量导出
* @param searchVo 档案待完整
* @return
*/
@Override
public void archivesExport(HttpServletResponse response, EmployeeRegistrationPreSearchVo searchVo){
String fileName = "档案待完整列表" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeRegistrationProjectListVo> list = new ArrayList<>();
long count = baseMapper.getAllLackArchivesExportCount(searchVo);
try (ServletOutputStream out= response.getOutputStream();){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelUtil<EmployeeRegistrationProjectListVo> util = new ExcelUtil<>(EmployeeRegistrationProjectListVo.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
Set<String> exportFields = new HashSet<>(Arrays.asList("deptName", "deptNo", "employeeName", "empIdcard",
"empPhone", "joinLeaveDate", "empNature", "contractType", "customerUsernameNew", "dataSource",
"type", "processStatus"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeRegistrationProjectListVo.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(exportFields).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getAllLackArchivesExportList(searchVo);
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("档案待完整列表"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("档案待完整列表"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}
}
@Override @Override
public void createComlpeteMonitor() { public void createComlpeteMonitor() {
//先删除所有的档案监控数据 //先删除所有的档案监控数据
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<result property="empIdcard" column="emp_idcard"/> <result property="empIdcard" column="emp_idcard"/>
<result property="empPhone" column="emp_phone"/> <result property="empPhone" column="emp_phone"/>
<result property="joinLeaveDate" column="join_leave_date"/> <result property="joinLeaveDate" column="join_leave_date"/>
<result property="customerUsername" column="customer_username"/> <result property="customerUsernameNew" column="customer_username_new"/>
<result property="deptName" column="dept_name"/> <result property="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/> <result property="deptNo" column="dept_no"/>
<result property="empNature" column="emp_nature"/> <result property="empNature" column="emp_nature"/>
...@@ -51,6 +51,22 @@ ...@@ -51,6 +51,22 @@
<result property="processStatus" column="process_status"/> <result property="processStatus" column="process_status"/>
</resultMap> </resultMap>
<resultMap id="employeeRegistrationPreInfoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreInfoExportVo">
<result property="employeeName" column="employee_name"/>
<result property="empIdcard" column="emp_idcard"/>
<result property="empPhone" column="emp_phone"/>
<result property="position" column="position"/>
<result property="joinLeaveDate" column="join_leave_date"/>
<result property="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/>
<result property="empNature" column="emp_nature"/>
<result property="contractType" column="contract_type"/>
<result property="serverItem" column="server_item"/>
<result property="confirmUser" column="confirm_user"/>
<result property="confirmTime" column="confirm_time"/>
<result property="fileAdress" column="fileAdress"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.id, a.id,
a.employee_name, a.employee_name,
...@@ -102,7 +118,7 @@ ...@@ -102,7 +118,7 @@
<if test="employeeRegistrationPre.joinLeaveDate != null"> <if test="employeeRegistrationPre.joinLeaveDate != null">
AND a.join_leave_date = #{employeeRegistrationPre.joinLeaveDate} AND a.join_leave_date = #{employeeRegistrationPre.joinLeaveDate}
</if> </if>
<if test="employeeRegistrationPre.processStatus != null and employeeRegistrationPre.processStatus.trim() != ''"> <if test="employeeRegistrationPre.statusList != null and employeeRegistrationPre.statusList.trim() != ''">
AND a.process_status in AND a.process_status in
<foreach item="item" index="index" collection="employeeRegistrationPre.statusList" open="(" separator="," close=")"> <foreach item="item" index="index" collection="employeeRegistrationPre.statusList" open="(" separator="," close=")">
'${item}' '${item}'
...@@ -173,7 +189,6 @@ ...@@ -173,7 +189,6 @@
</where> </where>
</select> </select>
<select id="selectExportCount" resultType="java.lang.Long"> <select id="selectExportCount" resultType="java.lang.Long">
SELECT SELECT
count(1) count(1)
...@@ -191,7 +206,7 @@ ...@@ -191,7 +206,7 @@
a.emp_idcard, a.emp_idcard,
a.emp_phone, a.emp_phone,
a.join_leave_date, a.join_leave_date,
a.customer_username, a.customer_username_new,
a.dept_name, a.dept_name,
a.dept_no, a.dept_no,
a.emp_nature, a.emp_nature,
...@@ -209,4 +224,31 @@ ...@@ -209,4 +224,31 @@
limit #{employeeRegistrationPre.limitStart},#{employeeRegistrationPre.limitEnd} limit #{employeeRegistrationPre.limitStart},#{employeeRegistrationPre.limitEnd}
</if> </if>
</select> </select>
<!--employeeRegistrationPre导出查询-->
<select id="selectConfirmExportList" resultMap="employeeRegistrationPreInfoMap">
SELECT
a.dept_name,
a.dept_no,
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.position,
a.join_leave_date,
a.confirm_user,
a.confirm_time,
a.server_item,
a.emp_nature,
a.contract_type,
concat(a.file_province,a.file_city,a.file_town) as fileAdress
FROM employee_registration_pre a
<where>
1=1
<include refid="employeeRegistrationPre_where"/>
</where>
order by a.create_time desc
<if test="employeeRegistrationPre.limitStart != null">
limit #{employeeRegistrationPre.limitStart},#{employeeRegistrationPre.limitEnd}
</if>
</select>
</mapper> </mapper>
...@@ -24,6 +24,23 @@ ...@@ -24,6 +24,23 @@
<result property="alertUser" column="ALERT_USER"/> <result property="alertUser" column="ALERT_USER"/>
</resultMap> </resultMap>
<resultMap id="employeeRegistrationProjectMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationProjectListVo">
<result property="employeeName" column="employee_name"/>
<result property="empIdcard" column="emp_idcard"/>
<result property="empPhone" column="emp_phone"/>
<result property="joinLeaveDate" column="join_leave_date"/>
<result property="processStatus" column="process_status"/>
<result property="type" column="type"/>
<result property="customerUsernameNew" column="customer_username"/>
<result property="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/>
<result property="empNature" column="emp_nature"/>
<result property="contractType" column="contract_type"/>
<result property="dataSource" column="data_source"/>
<result property="empProjectId" column="empProjectId"/>
<result property="empInfoId" column="empInfoId"/>
</resultMap>
<resultMap id="tCompleteMonitorExport" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorVo"> <resultMap id="tCompleteMonitorExport" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorVo">
<result property="unitName" column="UNIT_NAME"/> <result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/> <result property="unitNo" column="UNIT_NO"/>
...@@ -96,6 +113,41 @@ ...@@ -96,6 +113,41 @@
</if> </if>
</if> </if>
</sql> </sql>
<sql id="employeeRegistrationPre_where">
<if test="employeeRegistrationPre != null">
<if test="employeeRegistrationPre.employeeName != null and employeeRegistrationPre.employeeName.trim() != ''">
AND a.EMP_NAME like CONCAT('%',#{employeeRegistrationPre.employeeName},'%')
</if>
<if test="employeeRegistrationPre.empIdcard != null and employeeRegistrationPre.empIdcard.trim() != ''">
AND a.EMP_IDCARD like CONCAT('%',#{employeeRegistrationPre.empIdcard},'%')
</if>
<if test="employeeRegistrationPre.deptName != null and employeeRegistrationPre.deptName.trim() != ''">
AND a.dept_name like CONCAT('%',#{employeeRegistrationPre.deptName},'%')
</if>
<if test="employeeRegistrationPre.deptNo != null and employeeRegistrationPre.deptNo.trim() != ''">
AND a.dept_no = #{employeeRegistrationPre.deptNo}
</if>
<if test="employeeRegistrationPre.dataSource != null and employeeRegistrationPre.dataSource.trim() != ''">
AND a.PROJECT_SOURCE = #{employeeRegistrationPre.dataSource}
</if>
<if test="employeeRegistration.customerUsernameNew != null and employeeRegistration.customerUsernameNew.trim() != ''">
AND c.CS_NAME = #{employeeRegistration.customerUsernameNew}
</if>
<if test="employeeRegistrationPre.authSql != null and employeeRegistrationPre.authSql.trim() != ''">
${employeeRegistrationPre.authSql}
</if>
<if test="employeeRegistrationPre.deptNoList != null and employeeRegistrationPre.deptNoList.size > 0">
AND a.dept_no in
<foreach item="idStr" index="index" collection="employeeRegistrationPre.deptNoList" open="(" separator=","
close=")">
#{idStr}
</foreach>
</if>
</if>
</sql>
<!--tCompleteMonitor简单分页查询--> <!--tCompleteMonitor简单分页查询-->
<select id="getTCompleteMonitorPage" resultMap="tCompleteMonitorMap"> <select id="getTCompleteMonitorPage" resultMap="tCompleteMonitorMap">
SELECT SELECT
...@@ -107,6 +159,76 @@ ...@@ -107,6 +159,76 @@
</where> </where>
</select> </select>
<!--tCompleteMonitor简单分页查询-->
<select id="getAllLackArchivesPage" resultMap="employeeRegistrationProjectMap">
SELECT
a.ID as empProjectId,
a.EMP_NATRUE as emp_nature,
a.EMP_NAME as employee_name,
a.EMP_IDCARD as emp_idcard,
a.DEPT_NAME as dept_name,
a.DEPT_NO as dept_no,
a.CONTRACT_TYPE as contract_type,
if(a.UNCOMPLETE_TYPE = '1','基本信息',if(a.UNCOMPLETE_TYPE = '2','合同信息','基本信息、合同信息')) as type,
'1' as process_status,
a.ENJOIN_DATE as join_leave_date,
a.PROJECT_SOURCE as data_source,
c.CS_NAME as customer_username,
b.EMP_PHONE as emp_phone,
b.id as empInfoId
FROM t_employee_project a
inner join t_employee_info b on a.EMP_ID = b.id
inner join t_settle_domain c on a.DEPT_NO = c.DEPART_NO
<where>
a.delete_flag = '0' and a.IS_COMPLETE = '1'
<include refid="employeeRegistrationPre_where"/>
</where>
</select>
<!--tCompleteMonitor简单分页查询-->
<select id="getAllLackArchivesExportCount" resultType="java.lang.Long">
SELECT
count(1)
FROM t_employee_project a
inner join t_employee_info b on a.EMP_ID = b.id
inner join t_settle_domain c on a.DEPT_NO = c.DEPART_NO
<where>
a.delete_flag = '0' and a.IS_COMPLETE = '1'
<include refid="employeeRegistrationPre_where"/>
</where>
</select>
<!--tCompleteMonitor简单分页查询-->
<select id="getAllLackArchivesExportList" resultMap="employeeRegistrationProjectMap">
SELECT
a.EMP_NATRUE as emp_nature,
a.EMP_NAME as employee_name,
a.EMP_IDCARD as emp_idcard,
a.DEPT_NAME as dept_name,
a.DEPT_NO as dept_no,
a.CONTRACT_TYPE as contract_type,
if(a.UNCOMPLETE_TYPE = '1','基本信息',if(a.UNCOMPLETE_TYPE = '2','合同信息','基本信息、合同信息')) as type,
'待完善' as process_status,
a.ENJOIN_DATE as join_leave_date,
CASE WHEN a.PROJECT_SOURCE='1' THEN "社保/公积金"
WHEN a.PROJECT_SOURCE ='2' THEN "薪酬"
WHEN a.PROJECT_SOURCE ='3' THEN "商险"
WHEN a.PROJECT_SOURCE ='4' THEN "人员档案新建"
WHEN a.PROJECT_SOURCE ='5' THEN "项目档案新建"
ELSE a.PROJECT_SOURCE END as data_source,
c.CS_NAME as customer_username,
b.EMP_PHONE as emp_phone,
FROM t_employee_project a
inner join t_employee_info b on a.EMP_ID = b.id
inner join t_settle_domain c on a.DEPT_NO = c.DEPART_NO
<where>
a.delete_flag = '0' and a.IS_COMPLETE = '1'
<include refid="employeeRegistrationPre_where"/>
</where>
</select>
<!--tCompleteMonitor简单分页查询--> <!--tCompleteMonitor简单分页查询-->
<select id="getExportCount" resultType="java.lang.Long"> <select id="getExportCount" resultType="java.lang.Long">
SELECT SELECT
......
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