Commit bdd2b633 authored by fangxinjiang's avatar fangxinjiang

合同审核导出及 其他导出优化

parent 235ca7f3
......@@ -478,4 +478,21 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "归档列表查询标志,1:是归档,去除作废、终止两种")
private Integer isFilePage;
@ExcelAttribute(name = "派单类型",readConverterExp = "0=派增,1=派减")
@Schema(description = "派单类型")
private String type;
/**
* 离职日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@ExcelAttribute(name = "离职日期")
@Schema(description = "离职日期", name = "contractEnd")
private String leaveDate;
/**
* 减少原因
*/
@ExcelAttribute(name = "减少原因", maxLength = 32, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "减少原因", name = "workingHours")
private String reduceReason;
}
......@@ -19,6 +19,7 @@ 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.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -45,188 +46,125 @@ public class EmployeeContractExportAuditVO implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "申请编号")
@ExcelAttribute(name = "派单类型",readConverterExp = "0=派增,1=派减")
@Schema(description = "派单类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请编号")
private String applyNo;
@ExcelProperty("审核类型")
private String type;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工编码")
@Length(max = 32, message = "员工编码不能超过32个字符")
@ExcelAttribute(name = "员工编码", isNotEmpty = true, errorInfo = "员工编码不能为空", maxLength = 32)
@Schema(description = "员工编码", name = "empNo")
private String empNo;
@ExcelProperty("创建时间")
private String createTime;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工姓名")
@Length(max = 32, message = "员工姓名不能超过32个字符")
@ExcelAttribute(name = "员工姓名", maxLength = 32, needExport = true)
@ExcelAttribute(name = "员工姓名", maxLength = 32)
@Schema(description = "员工姓名", name = "empName")
private String empName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
@Length(max = 32, message = "身份证号不能超过32个字符")
@ExcelAttribute(name = "身份证号", maxLength = 32, isIdCard = true, needExport = true)
@ExcelAttribute(name = "身份证号", maxLength = 32)
@Schema(description = "身份证号", name = "empIdcard")
private String empIdcard;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同起始日期")
@NotBlank(message = "合同起始日期不能为空")
@ExcelAttribute(name = "合同起始日期", isNotEmpty = true, errorInfo = "合同起始日期不能为空")
@Schema(description = "合同起始日期", name = "contractStart")
private String contractStart;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同截止日期")
@ExcelAttribute(name = "合同截止日期", needExport = true)
@Schema(description = "合同截止日期", name = "contractEnd")
private String contractEnd;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("档案-省")
@ExcelAttribute(name = "档案-省", maxLength = 32, isArea = true)
@Schema(description = "档案-省", name = "fileProvince")
private String fileProvince;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("档案-市")
@ExcelAttribute(name = "档案-市", maxLength = 32, isArea = true, parentField = "fileProvince")
@Schema(description = "档案-市", name = "fileCity")
private String fileCity;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("档案-县")
@ExcelAttribute(name = "档案-县", maxLength = 32, isArea = true, parentField = "fileCity")
@Schema(description = "档案-县", name = "fileTown")
private String fileTown;
@ExcelProperty("客户名称")
@ExcelAttribute(name = "客户名称", maxLength = 128)
@Schema(description = "客户名称", name = "subjectDepart")
private String subjectUnit;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目名称")
@Length(max = 128, message = "项目名称不能超过128个字符")
@ExcelAttribute(name = "项目名称", maxLength = 128)
@Schema(description = "项目名称", name = "subjectDepart")
private String subjectDepart;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码")
@Schema(description = "项目编码")
private String deptNo;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型")
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型(字典值,0外包1派遣2代理3内部员工)")
private String empNatrue;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同类型")
@NotBlank(message = "合同类型不能为空")
@Length(max = 32, message = "合同类型不能超过32个字符")
@ExcelAttribute(name = "合同类型", isNotEmpty = true, errorInfo = "合同类型不能为空", maxLength = 32, needExport = true)
@Schema(description = "合同类型", name = "contractName")
private String contractName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("业务细分")
@NotBlank(message = "业务细分不能为空")
@Length(max = 32, message = "业务细分不能超过32个字符")
@ExcelAttribute(name = "业务细分", maxLength = 32, needExport = true)
@Schema(description = "业务细分", name = "contractName")
private String contractSubName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("签订类型")
@NotBlank(message = "签订类型不能为空")
@Length(max = 1, message = "签订类型不能超过1个字符")
@ExcelAttribute(name = "签订类型", isNotEmpty = true, errorInfo = "签订类型不能为空", maxLength = 100, isDataId = true, dataType = ExcelAttributeConstants.EMPLOYEE_SITUATION_TYPE)
@ExcelAttribute(name = "签订类型", isDataId = true, dataType = ExcelAttributeConstants.EMPLOYEE_SITUATION_TYPE)
@Schema(description = "签订类型", name = "situation")
private String situation;
/**
* 签订期限employee_contract_type
* 0 已完成一定工作任务为期限
* 1 固定期限
* 2 无固定期限
* 原因说明-- 委托备注
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("签订期限")
@NotBlank(message = "签订期限不能为空")
@Length(max = 32, message = "签订期限不能超过32个字符")
@ExcelAttribute(name = "签订期限", isNotEmpty = true, errorInfo = "签订期限不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.EMPLOYEE_CONTRACT_TYPE, needExport = true)
@Schema(description = "签订期限", name = "contractType")
private String contractType;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同甲方")
@ExcelAttribute(name = "合同甲方")
@Schema(description = "合同甲方")
@Size(max = 50, message = "合同甲方不可超过50位")
private String contractParty;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户名称")
@Length(max = 128, message = "客户名称不能超过128个字符")
@ExcelAttribute(name = "客户名称", maxLength = 128)
@Schema(description = "客户名称", name = "subjectUnit")
private String subjectUnit;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核状态")
@ExcelAttribute(name = "审核状态", readConverterExp = "0=待提交,1=待审核,2=审核通过,3=审核不通过")
@Schema(description = "审核状态")
private String auditStatus;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同状态")
@ExcelAttribute(name = "合同状态", readConverterExp = "0=可用,1=不可用")
@Schema(description = "合同状态", name = "inUse")
private String inUse;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("附件状态")
@ExcelAttribute(name = "附件状态")
@Schema(description = "附件状态", name = "isFile")
private String files;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("归档状态")
@ExcelAttribute(name = "归档状态", readConverterExp = "0=已归档,1=未归档")
@Schema(description = "归档状态", name = "isFile")
private String isFile;
@ExcelAttribute(name = "原因说明", maxLength = 200, needExport = true)
@Schema(description = "原因说明", name = "reason")
@ExcelProperty("原因说明")
private String reason;
/**
* 创建者-姓名
*/
@Schema(description = "创建人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建人")
private String createName;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建时间")
private String createTime;
@ExcelProperty("合同起始日期")
@ExcelAttribute(name = "合同起始日期", isNotEmpty = true, errorInfo = "合同起始日期不能为空")
@Schema(description = "合同起始日期", name = "contractStart")
private String contractStart;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("累计签订次数")
private String createNum;
@ExcelProperty("合同截止时间")
@ExcelAttribute(name = "合同截止时间", needExport = true)
@Schema(description = "合同截止时间", name = "contractEnd")
private String contractEnd;
/**
* 签订期限employee_contract_type
* 0 已完成一定工作任务为期限
* 1 固定期限
* 2 无固定期限
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("首签日期")
private String startDate;
@ExcelProperty("签订期限")
@ExcelAttribute(name = "签订期限", isNotEmpty = true, isDataId = true, dataType = ExcelAttributeConstants.EMPLOYEE_CONTRACT_TYPE, needExport = true)
@Schema(description = "签订期限", name = "contractType")
private String contractType;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("最晚到期日期")
private String endDate;
/**
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/
@ExcelAttribute(name = "工时制", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.WORKING_HOURS)
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours")
@ExcelProperty("工时制")
private String workingHours;
/**
* 离职日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("历次记录")
private String history;
@TableField(exist = false)
@Schema(description = "选中的idList")
private List<String> idList;
@TableField(exist = false)
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
@ExcelProperty("离职日期")
@ExcelAttribute(name = "离职日期")
@Schema(description = "离职日期", name = "contractEnd")
private String leaveDate;
/**
* 减少原因
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "减少原因", maxLength = 32, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "减少原因", name = "workingHours")
@ExcelProperty("减少原因")
private String reduceReason;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractAreaRes;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 合同查询
*
* @author fxj
* @date 2022-11-01 10:30:12
*/
@Data
public class TEmployeeContractSearchVo extends TEmployeeContractInfo {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
......@@ -331,18 +332,23 @@ public class TEmployeeContractInfoController {
}
/**
* 批量导出合同审核
*
* @Author hgw
* @Date 2022-6-24 09:36:06
* @Author fxj
* @Description 批量导出合同审核
* @Date 15:22 2022/11/4
* @Param
* @return
**/
@Operation(summary = "批量导出合同审核(记得传参mId)employee_export_contract", description = "批量导出合同审核 hasPermission('employee_export_contract_audit')")
@SysLog("批量导出合同审核")
@PostMapping("/exportAuditContractInfo")
@PreAuthorize("@pms.hasPermission('employee_export_contract_audit')")
public void exportAuditContractInfo(@RequestBody(required = false) TEmployeeContractInfo contractInfo, HttpServletResponse response) {
public void exportAuditContractInfo(@RequestBody(required = false) TEmployeeContractSearchVo contractInfo, HttpServletResponse response) {
if (Common.isEmpty(contractInfo)){
contractInfo = new TEmployeeContractSearchVo();
}
contractInfo.setAuditStatus(CommonConstants.ONE_INT);
this.setAuth(contractInfo);
tEmployeeContractInfoService.exportAuditContractInfo(contractInfo, response);
}
}
......@@ -21,7 +21,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportAuditVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -81,4 +84,7 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
**/
String getContractByApplyNo(@Param("applyNo") String applyNo);
List<EmployeeContractExportAuditVO> noPageDiy(@Param("tEmployeeContractInfo")TEmployeeContractSearchVo searchVo);
int noPageCountDiy(@Param("tEmployeeContractInfo")TEmployeeContractSearchVo searchVo);
}
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -173,5 +174,5 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract
* @Param
* @return
**/
void exportAuditContractInfo(TEmployeeContractInfo contractInfo, HttpServletResponse response);
void exportAuditContractInfo(TEmployeeContractSearchVo contractInfo, HttpServletResponse response);
}
......@@ -219,19 +219,21 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
ExcelWriter excelWriter = EasyExcel.write(out, TEmpBadRecord.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TEmpBadRecord> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TEmpBadRecord> util = new ExcelUtil<>(TEmpBadRecord.class);
util = new ExcelUtil<>(TEmpBadRecord.class);
for (TEmpBadRecord vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("不良记录"+index).build();
writeSheet = EasyExcel.writerSheet("不良记录"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -117,19 +117,21 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
ExcelWriter excelWriter = EasyExcel.write(out, TEmpBadRecord.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TEmpContractAlert> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = listDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TEmpContractAlert> util = new ExcelUtil<>(TEmpContractAlert.class);
util = new ExcelUtil<>(TEmpContractAlert.class);
for (TEmpContractAlert vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet(ArchivesConstants.EMP_BAD_RECORD+index).build();
writeSheet = EasyExcel.writerSheet(ArchivesConstants.EMP_BAD_RECORD+index).build();
excelWriter.write(list,writeSheet);
index++;
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
......
......@@ -95,19 +95,21 @@ public class TEmployeeContractAreaResServiceImpl extends ServiceImpl<TEmployeeCo
ExcelWriter excelWriter = EasyExcel.write(out, TEmpContractAreaExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TEmpContractAreaExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo,null, Common.getList(searchVo.getIds()),null);
if (Common.isNotNull(list)) {
ExcelUtil<TEmpContractAreaExportVo> util = new ExcelUtil<>(TEmpContractAreaExportVo.class);
util = new ExcelUtil<>(TEmpContractAreaExportVo.class);
for (TEmpContractAreaExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("合同审核权限配置表" + index).build();
writeSheet = EasyExcel.writerSheet("合同审核权限配置表" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......
......@@ -17,11 +17,14 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -32,10 +35,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
......@@ -55,6 +55,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.time.LocalDateTime;
......@@ -984,8 +985,77 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
@Override
public void exportAuditContractInfo(TEmployeeContractInfo contractInfo, HttpServletResponse response) {
public void exportAuditContractInfo(TEmployeeContractSearchVo searchVo, HttpServletResponse response) {
String fileName = "合同审核批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<EmployeeContractExportAuditVO> list = new ArrayList<>();
//获取要导出的列表
searchVo.setAuditStatus(CommonConstants.ONE_INT);
searchVo.setIdList(Common.getList(searchVo.getIds()));
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeContractExportAuditVO.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeContractExportAuditVO.class.getDeclaredFields();
WriteSheet writeSheet;
ExcelUtil<EmployeeContractExportAuditVO> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
util = new ExcelUtil<>(EmployeeContractExportAuditVO.class);
for (EmployeeContractExportAuditVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}
if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet("合同审核批量导出"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("合同审核批量导出"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
out.flush();
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
private List<EmployeeContractExportAuditVO> noPageDiy(TEmployeeContractSearchVo searchVo) {
return baseMapper.noPageDiy(searchVo);
}
private int noPageCountDiy(TEmployeeContractSearchVo searchVo) {
return baseMapper.noPageCountDiy(searchVo);
}
}
......@@ -2011,19 +2011,21 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
int index = 0;
if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeExportVO.class.getDeclaredFields();
WriteSheet writeSheet;
ExcelUtil<EmployeeExportVO> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class);
util = new ExcelUtil<>(EmployeeExportVO.class);
for (EmployeeExportVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("人员档案批量导出"+index).build();
writeSheet = EasyExcel.writerSheet("人员档案批量导出"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -1195,19 +1195,21 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
int index = 0;
if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeProjectExportVO.class.getDeclaredFields();
WriteSheet writeSheet;
ExcelUtil<EmployeeProjectExportVO> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<EmployeeProjectExportVO> util = new ExcelUtil<>(EmployeeProjectExportVO.class);
util = new ExcelUtil<>(EmployeeProjectExportVO.class);
for (EmployeeProjectExportVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("项目档案批量导出"+index).build();
writeSheet = EasyExcel.writerSheet("项目档案批量导出"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -80,8 +80,31 @@
<result property="reason" column="REASON"/>
<result property="auditTimeLast" column="AUDIT_TIME_LAST"/>
<result property="type" column="TYPE"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
</resultMap>
<!-- 合同审核导出 -->
<resultMap id="empContractExportAuditMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportAuditVO">
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="contractName" column="CONTRACT_NAME"/>
<result property="contractType" column="CONTRACT_TYPE"/>
<result property="contractEnd" column="CONTRACT_END"/>
<result property="subjectDepart" column="SUBJECT_DEPART"/>
<result property="subjectUnit" column="SUBJECT_UNIT"/>
<result property="situation" column="SITUATION"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="reason" column="REASON"/>
<result property="type" column="TYPE"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
</resultMap>
<!-- 合同导出 -->
<resultMap id="tEmployeeContrctInfoExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO">
<result property="applyNo" column="APPLY_NO"/>
......@@ -171,7 +194,10 @@
a.CONTRACT_PARTY,
a.CONTRACT_SUB_NAME,
a.REASON,
a.AUDIT_TIME_LAST
a.AUDIT_TIME_LAST,
a.TYPE,
a.LEAVE_DATE,
a.REDUCE_REASON
</sql>
......@@ -478,4 +504,53 @@
SELECT e.id FROM t_employee_contract_info e where e.APPLY_NO = #{applyNo}
</select>
<!--tEmployeeContractInfo简单分页查询审核导出fxj-2022-11-04-->
<select id="noPageDiy" resultMap="empContractExportAuditMap">
SELECT
a.EMP_NAME,
a.EMP_IDCARD,
a.CONTRACT_NAME,
a.CONTRACT_TYPE,
a.CONTRACT_START,
a.CONTRACT_END,
a.SUBJECT_DEPART,
a.SUBJECT_UNIT,
a.SITUATION,
a.WORKING_HOURS,
a.CREATE_NAME,
a.CREATE_TIME,
a.CONTRACT_SUB_NAME,
a.REASON,
a.TYPE,
a.LEAVE_DATE,
a.REDUCE_REASON
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
</if>
</where>
order by a.CREATE_TIME desc
<if test="tEmployeeContractInfo != null">
<if test="tEmployeeContractInfo.limitStart != null">
limit #{tEmployeeContractInfo.limitStart},#{tEmployeeContractInfo.limitEnd}
</if>
</if>
</select>
<!--tEmployeeContractInfo简单分页查询审核导出fxj-2022-11-04-->
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
</if>
</where>
</select>
</mapper>
......@@ -94,19 +94,21 @@ public class TInsuranceAreaResServiceImpl extends ServiceImpl<TInsuranceAreaResM
ExcelWriter excelWriter = EasyExcel.write(out, TInsuranceAreaExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TInsuranceAreaExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo,null,Common.getList(searchVo.getIds()),null);
if (Common.isNotNull(list)){
ExcelUtil<TInsuranceAreaExportVo> util = new ExcelUtil<>(TInsuranceAreaExportVo.class);
util = new ExcelUtil<>(TInsuranceAreaExportVo.class);
for (TInsuranceAreaExportVo vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("商险办理权限配置表"+index).build();
writeSheet = EasyExcel.writerSheet("商险办理权限配置表"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -140,19 +140,21 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
ExcelWriter excelWriter = EasyExcel.write(out, SysMessageSalaryExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<SysMessageSalaryExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo,settleDomainIds,ids,sql);
if (Common.isNotNull(list)){
ExcelUtil<SysMessageSalaryExportVo> util = new ExcelUtil<>(SysMessageSalaryExportVo.class);
util = new ExcelUtil<>(SysMessageSalaryExportVo.class);
for (SysMessageSalaryExportVo vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("消息提醒"+index).build();
writeSheet = EasyExcel.writerSheet("消息提醒"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -198,19 +198,21 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
ExcelWriter excelWriter = EasyExcel.write(out, THaveSalaryNoSocialExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<THaveSalaryNoSocialExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo,settleDomainIds,ids,sql);
if (Common.isNotNull(list)){
ExcelUtil<THaveSalaryNoSocialExportVo> util = new ExcelUtil<>(THaveSalaryNoSocialExportVo.class);
util = new ExcelUtil<>(THaveSalaryNoSocialExportVo.class);
for (THaveSalaryNoSocialExportVo vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("消息提醒"+index).build();
writeSheet = EasyExcel.writerSheet("消息提醒"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -89,13 +89,15 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
ExcelWriter excelWriter = EasyExcel.write(out, TSalaryAccount.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TSalaryAccount> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TSalaryAccount> util = new ExcelUtil<>(TSalaryAccount.class);
util = new ExcelUtil<>(TSalaryAccount.class);
for (TSalaryAccount vo : list) {
if (CommonConstants.THREE_STRING.equals(vo.getFormType())){
vo.setRelaySalary(vo.getRelaySalaryUnit());
......@@ -105,7 +107,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("工资报账主表(工资条)" + index).build();
writeSheet = EasyExcel.writerSheet("工资报账主表(工资条)" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......
......@@ -110,19 +110,21 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
ExcelWriter excelWriter = EasyExcel.write(out, TSalaryEmployeeExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TSalaryEmployeeExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TSalaryEmployeeExportVo> util = new ExcelUtil<>(TSalaryEmployeeExportVo.class);
util = new ExcelUtil<>(TSalaryEmployeeExportVo.class);
for (TSalaryEmployeeExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("薪酬人员表" + index).build();
writeSheet = EasyExcel.writerSheet("薪酬人员表" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......
......@@ -112,19 +112,21 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsBonus.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TStatisticsBonus> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TStatisticsBonus> util = new ExcelUtil<>(TStatisticsBonus.class);
util = new ExcelUtil<>(TStatisticsBonus.class);
for (TStatisticsBonus vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("全年一次性奖金申报表"+index).build();
writeSheet = EasyExcel.writerSheet("全年一次性奖金申报表"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -84,19 +84,21 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsCurrentReport.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TStatisticsCurrentReport> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TStatisticsCurrentReport> util = new ExcelUtil<>(TStatisticsCurrentReport.class);
util = new ExcelUtil<>(TStatisticsCurrentReport.class);
for (TStatisticsCurrentReport vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("本期申报" + index).build();
writeSheet = EasyExcel.writerSheet("本期申报" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......
......@@ -90,19 +90,21 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsDeclarer.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TStatisticsDeclarer> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TStatisticsDeclarer> util = new ExcelUtil<>(TStatisticsDeclarer.class);
util = new ExcelUtil<>(TStatisticsDeclarer.class);
for (TStatisticsDeclarer vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("申报对象表"+index).build();
writeSheet = EasyExcel.writerSheet("申报对象表"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -97,19 +97,21 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsLabor.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TStatisticsLabor> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TStatisticsLabor> util = new ExcelUtil<>(TStatisticsLabor.class);
util = new ExcelUtil<>(TStatisticsLabor.class);
for (TStatisticsLabor vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("本期劳务费申报表" + index).build();
writeSheet = EasyExcel.writerSheet("本期劳务费申报表" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......
......@@ -93,19 +93,21 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsRemuneration.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TStatisticsRemuneration> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TStatisticsRemuneration> util = new ExcelUtil<>(TStatisticsRemuneration.class);
util = new ExcelUtil<>(TStatisticsRemuneration.class);
for (TStatisticsRemuneration vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("本期稿酬申报表" + index).build();
writeSheet = EasyExcel.writerSheet("本期稿酬申报表" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......
......@@ -99,19 +99,21 @@ public class TStatisticsTaxSalaryServiceImpl extends ServiceImpl<TStatisticsTaxS
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsTaxSalary.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TStatisticsTaxSalary> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TStatisticsTaxSalary> util = new ExcelUtil<>(TStatisticsTaxSalary.class);
util = new ExcelUtil<>(TStatisticsTaxSalary.class);
for (TStatisticsTaxSalary vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("统计-工资薪金" + index).build();
writeSheet = EasyExcel.writerSheet("统计-工资薪金" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......
......@@ -87,19 +87,21 @@ public class TAuditInfoServiceImpl extends ServiceImpl<TAuditInfoMapper, TAuditI
ExcelWriter excelWriter = EasyExcel.write(out, TAuditInfo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TAuditInfo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TAuditInfo> util = new ExcelUtil<>(TAuditInfo.class);
util = new ExcelUtil<>(TAuditInfo.class);
for (TAuditInfo vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("审核信息表(社保、公积金、预估结算单、社保核准表、公积金核准表 、基数变更 审核记录"+index).build();
writeSheet = EasyExcel.writerSheet("审核信息表(社保、公积金、预估结算单、社保核准表、公积金核准表 、基数变更 审核记录"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -88,19 +88,21 @@ public class TDispatchDayConfServiceImpl extends ServiceImpl<TDispatchDayConfMap
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchDayConf.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TDispatchDayConf> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TDispatchDayConf> util = new ExcelUtil<>(TDispatchDayConf.class);
util = new ExcelUtil<>(TDispatchDayConf.class);
for (TDispatchDayConf vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("各个地市派单日期"+index).build();
writeSheet = EasyExcel.writerSheet("各个地市派单日期"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -150,19 +150,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchInfoExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TDispatchInfoExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = exportDispatch(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TDispatchInfoExportVo> util = new ExcelUtil<>(TDispatchInfoExportVo.class);
util = new ExcelUtil<>(TDispatchInfoExportVo.class);
for (TDispatchInfoExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("派单" + index).build();
writeSheet = EasyExcel.writerSheet("派单" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......@@ -209,19 +211,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchAuditExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TDispatchAuditExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = exportAuditDispatch(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TDispatchAuditExportVo> util = new ExcelUtil<>(TDispatchAuditExportVo.class);
util = new ExcelUtil<>(TDispatchAuditExportVo.class);
for (TDispatchAuditExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("派单审核" + index).build();
writeSheet = EasyExcel.writerSheet("派单审核" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......@@ -3958,19 +3962,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ExcelWriter excelWriter = EasyExcel.write(out, SocialHandleExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<SocialHandleExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = getRecordRosterList(searchVo,idStr);
if (Common.isNotNull(list)){
ExcelUtil<SocialHandleExportVo> util = new ExcelUtil<>(SocialHandleExportVo.class);
util = new ExcelUtil<>(SocialHandleExportVo.class);
for (SocialHandleExportVo vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet(DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT+index).build();
writeSheet = EasyExcel.writerSheet(DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT+index).build();
excelWriter.write(list,writeSheet);
index++;
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
......@@ -4070,19 +4076,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ExcelWriter excelWriter = EasyExcel.write(out, FundHandleExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<FundHandleExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = getFundRecordList(searchVo,idStr);
if (Common.isNotNull(list)){
ExcelUtil<FundHandleExportVo> util = new ExcelUtil<>(FundHandleExportVo.class);
util = new ExcelUtil<>(FundHandleExportVo.class);
for (FundHandleExportVo vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("公积金变更清册"+index).build();
writeSheet = EasyExcel.writerSheet("公积金变更清册"+index).build();
excelWriter.write(list,writeSheet);
index++;
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
......
......@@ -162,19 +162,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ExcelWriter excelWriter = EasyExcel.write(out, TPaymentInfo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TPaymentInfo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTPaymentInfoNoPage(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TPaymentInfo> util = new ExcelUtil<>(TPaymentInfo.class);
util = new ExcelUtil<>(TPaymentInfo.class);
for (TPaymentInfo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("缴费库" + index).build();
writeSheet = EasyExcel.writerSheet("缴费库" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......@@ -227,19 +229,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ExcelWriter excelWriter = EasyExcel.write(out, TPaymentInfoExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TPaymentInfoExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTPaymentInfoSumNoPage(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TPaymentInfoExportVo> util = new ExcelUtil<>(TPaymentInfoExportVo.class);
util = new ExcelUtil<>(TPaymentInfoExportVo.class);
for (TPaymentInfoExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("缴费库合并导出" + index).build();
writeSheet = EasyExcel.writerSheet("缴费库合并导出" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......
......@@ -88,19 +88,21 @@ public class TProvidentFundServiceImpl extends ServiceImpl<TProvidentFundMapper,
ExcelWriter excelWriter = EasyExcel.write(out, TProvidentFund.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TProvidentFund> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TProvidentFund> util = new ExcelUtil<>(TProvidentFund.class);
util = new ExcelUtil<>(TProvidentFund.class);
for (TProvidentFund vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("公积金信息"+index).build();
writeSheet = EasyExcel.writerSheet("公积金信息"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -88,19 +88,21 @@ public class TSocialFundHistoryServiceImpl extends ServiceImpl<TSocialFundHistor
ExcelWriter excelWriter = EasyExcel.write(out, TSocialFundHistory.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TSocialFundHistory> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TSocialFundHistory> util = new ExcelUtil<>(TSocialFundHistory.class);
util = new ExcelUtil<>(TSocialFundHistory.class);
for (TSocialFundHistory vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("社保公积金调基历史记录表"+index).build();
writeSheet = EasyExcel.writerSheet("社保公积金调基历史记录表"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
......@@ -112,19 +112,21 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
ExcelWriter excelWriter = EasyExcel.write(out, TSocialFundInfoExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TSocialFundInfoExportVo> util;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = export(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TSocialFundInfoExportVo> util = new ExcelUtil<>(TSocialFundInfoExportVo.class);
util = new ExcelUtil<>(TSocialFundInfoExportVo.class);
for (TSocialFundInfoExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (list != null) {
WriteSheet writeSheet = EasyExcel.writerSheet("社保公积金查询表" + index).build();
writeSheet = EasyExcel.writerSheet("社保公积金查询表" + index).build();
excelWriter.write(list, writeSheet);
index++;
list.clear();
......
......@@ -87,19 +87,21 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
ExcelWriter excelWriter = EasyExcel.write(out, TSocialInfo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TSocialInfo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TSocialInfo> util = new ExcelUtil<>(TSocialInfo.class);
util = new ExcelUtil<>(TSocialInfo.class);
for (TSocialInfo vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("社保明细表"+index).build();
writeSheet = EasyExcel.writerSheet("社保明细表"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......
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