Commit 0847b9f6 authored by hongguangwu's avatar hongguangwu

社保公积金查询-导出

parent d5baee3f
......@@ -340,7 +340,7 @@ public class TDispatchInfo extends BaseEntity {
* 业务细分 personnel_type_sub
*/
@ExcelAttribute(name = "业务细分", maxLength = 32)
@Schema(description = "业务细分", name = "contractName")
@Schema(description = "业务细分", name = "contractSubName")
private String contractSubName;
/**
......
......@@ -225,28 +225,28 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelProperty("公积金户" )
private String providentHouseholdName;
/**
* 缴纳地-省
* 公积金缴纳地-省
*/
@Length(max = 32, message = "缴纳地-省 不能超过32个字符" )
@ExcelAttribute(name = "缴纳地-省", maxLength = 32)
@Schema(description = "缴纳地-省" )
@ExcelProperty("缴纳地-省" )
@Length(max = 32, message = "公积金缴纳地-省 不能超过32个字符" )
@ExcelAttribute(name = "公积金缴纳地-省", maxLength = 32)
@Schema(description = "公积金缴纳地-省" )
@ExcelProperty("公积金缴纳地-省" )
private String fundProvince;
/**
* 缴纳地-市
* 公积金缴纳地-市
*/
@Length(max = 32, message = "缴纳地-市 不能超过32个字符" )
@ExcelAttribute(name = "缴纳地-市", maxLength = 32)
@Schema(description = "缴纳地-市" )
@ExcelProperty("缴纳地-市" )
@Length(max = 32, message = "公积金缴纳地-市 不能超过32个字符" )
@ExcelAttribute(name = "公积金缴纳地-市", maxLength = 32)
@Schema(description = "公积金缴纳地-市" )
@ExcelProperty("公积金缴纳地-市" )
private String fundCity;
/**
* 缴纳地-县
* 公积金缴纳地-县
*/
@Length(max = 32, message = "缴纳地-县 不能超过32个字符" )
@ExcelAttribute(name = "缴纳地-县", maxLength = 32)
@Schema(description = "缴纳地-县" )
@ExcelProperty("缴纳地-县" )
@Length(max = 32, message = "公积金缴纳地-县 不能超过32个字符" )
@ExcelAttribute(name = "公积金缴纳地-县", maxLength = 32)
@Schema(description = "公积金缴纳地-县" )
@ExcelProperty("公积金缴纳地-县" )
private String fundTown;
/**
* 社保派增状态:0待审核、1待办理、2办理成功、3部分办理失败、4办理失败
......
......@@ -21,6 +21,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* 社保公积金查询表
......@@ -31,28 +32,29 @@ import java.time.LocalDateTime;
@Data
public class TSocialFundInfoSearchVo extends TSocialFundInfo {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 多选导出或删除等操作
*/
@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;
private List<String> idList;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
......@@ -21,6 +21,8 @@ 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.social.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -57,4 +59,7 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
**/
List<TSocialFundInfo> getFundList(@Param("empIdCard") String empIdCard, @Param("settleDomainIds") List<String> settleDomainIds);
List<TSocialFundInfoExportVo> exportList(@Param("tSocialFundInfo") TSocialFundInfoSearchVo tSocialFundInfo);
}
......@@ -53,7 +53,13 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
**/
R<List<ErrorMessage>> importDiy(InputStream inputStream);
void listExport(HttpServletResponse response, TSocialFundInfoSearchVo searchVo);
/**
* @Description: 导出
* @Author: hgw
* @Date: 2022/7/26 16:45
* @return: void
**/
void listExport(HttpServletResponse response, TSocialFundInfoSearchVo searchVo);
List<TSocialFundInfo> noPageDiy(TSocialFundInfoSearchVo searchVo);
......
......@@ -40,10 +40,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundHistoryVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
......@@ -99,7 +96,7 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
public void listExport(HttpServletResponse response, TSocialFundInfoSearchVo searchVo) {
String fileName = "社保公积金批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TSocialFundInfo> list = new ArrayList<>();
List<TSocialFundInfoExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
......@@ -115,10 +112,10 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
list = export(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TSocialFundInfo> util = new ExcelUtil<>(TSocialFundInfo.class);
for (TSocialFundInfo vo : list) {
ExcelUtil<TSocialFundInfoExportVo> util = new ExcelUtil<>(TSocialFundInfoExportVo.class);
for (TSocialFundInfoExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
......@@ -162,6 +159,14 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
return baseMapper.selectList(wrapper);
}
private List<TSocialFundInfoExportVo> export(TSocialFundInfoSearchVo searchVo) {
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
searchVo.setIdList(idList);
}
return baseMapper.exportList(searchVo);
}
private Long noPageCountDiy(TSocialFundInfoSearchVo searchVo) {
LambdaQueryWrapper<TSocialFundInfo> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
......
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