Commit 8308e877 authored by hongguangwu's avatar hongguangwu

调基记录+预估导出

parent ab778b93
......@@ -32,6 +32,7 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.List;
import java.util.Set;
/**
* 预估费用
......@@ -157,10 +158,10 @@ public class TForecastLibrary extends BaseEntity {
@ExcelProperty("个人医疗费用")
private BigDecimal personalMedicalFee;
/**
* 个人工伤费用
* 个人失业费用
*/
@ExcelAttribute(name = "个人工伤费用")
@ExcelProperty("个人工伤费用")
@ExcelAttribute(name = "个人失业费用")
@ExcelProperty("个人失业费用")
private BigDecimal personalUnemploymentFee;
/**
* 个人医疗救助金
......@@ -197,70 +198,76 @@ public class TForecastLibrary extends BaseEntity {
@ExcelProperty("公积金生成月份")
private String providentCreateMonth;
/**
* 单位社保金额
* 单位社保合计
*/
@ExcelAttribute(name = "单位社保金额")
@ExcelProperty("单位社保金额")
@ExcelAttribute(name = "单位社保合计")
@ExcelProperty("单位社保合计")
private BigDecimal unitSocialSum;
/**
* 单位公积金金额
* 单位公积金合计
*/
@ExcelAttribute(name = "单位公积金金额")
@ExcelProperty("单位公积金金额")
@ExcelAttribute(name = "单位公积金合计")
@ExcelProperty("单位公积金合计")
private BigDecimal unitFundSum;
/**
* 个人社保金额
* 个人社保合计
*/
@ExcelAttribute(name = "个人社保金额")
@ExcelProperty("个人社保金额")
@ExcelAttribute(name = "个人社保合计")
@ExcelProperty("个人社保合计")
private BigDecimal personalSocialSum;
/**
* 个人公积金金额
* 个人公积金合计
*/
@ExcelAttribute(name = "个人公积金金额")
@ExcelProperty("个人公积金金额")
@ExcelAttribute(name = "个人公积金合计")
@ExcelProperty("个人公积金合计")
private BigDecimal personalFundSum;
/**
* 缴纳地-省
* 费用合计
*/
@ExcelAttribute(name = "缴纳地-省", maxLength = 32)
@Length(max = 32, message = "缴纳地-省不能超过32个字符")
@ExcelProperty("缴纳地-省")
@ExcelAttribute(name = "费用合计")
@ExcelProperty("费用合计")
private BigDecimal sumAll;
/**
* 公积金缴纳地-省
*/
@ExcelAttribute(name = "公积金缴纳地-省", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-省不能超过32个字符")
@ExcelProperty("公积金缴纳地-省")
private String fundProvince;
/**
* 缴纳地-市
*/
@ExcelAttribute(name = "缴纳地-市", maxLength = 32)
@Length(max = 32, message = "缴纳地-市不能超过32个字符")
@ExcelProperty("缴纳地-市")
@ExcelAttribute(name = "公积金缴纳地-市", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-市不能超过32个字符")
@ExcelProperty("公积金缴纳地-市")
private String fundCity;
/**
* 缴纳地-县
* 公积金缴纳地-县
*/
@ExcelAttribute(name = "缴纳地-县", maxLength = 32)
@Length(max = 32, message = "缴纳地-县不能超过32个字符")
@ExcelProperty("缴纳地-县")
@ExcelAttribute(name = "公积金缴纳地-县", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-县不能超过32个字符")
@ExcelProperty("公积金缴纳地-县")
private String fundTown;
/**
* 缴纳地-省
* 社保缴纳地-省
*/
@ExcelAttribute(name = "缴纳地-省", maxLength = 32)
@Length(max = 32, message = "缴纳地-省不能超过32个字符")
@ExcelProperty("缴纳地-省")
@ExcelAttribute(name = "社保缴纳地-省", maxLength = 32)
@Length(max = 32, message = "社保缴纳地-省不能超过32个字符")
@ExcelProperty("社保缴纳地-省")
private String socialProvince;
/**
* 缴纳地-市
* 社保缴纳地-市
*/
@ExcelAttribute(name = "缴纳地-市", maxLength = 32)
@Length(max = 32, message = "缴纳地-市不能超过32个字符")
@ExcelProperty("缴纳地-市")
@ExcelAttribute(name = "社保缴纳地-市", maxLength = 32)
@Length(max = 32, message = "社保缴纳地-市不能超过32个字符")
@ExcelProperty("社保缴纳地-市")
private String socialCity;
/**
* 缴纳地-县
* 社保缴纳地-县
*/
@ExcelAttribute(name = "缴纳地-县", maxLength = 32)
@Length(max = 32, message = "缴纳地-县不能超过32个字符")
@ExcelProperty("缴纳地-县")
@ExcelAttribute(name = "社保缴纳地-县", maxLength = 32)
@Length(max = 32, message = "社保缴纳地-县不能超过32个字符")
@ExcelProperty("社保缴纳地-县")
private String socialTown;
/**
* 单位养老基数
......@@ -421,11 +428,11 @@ public class TForecastLibrary extends BaseEntity {
@ExcelProperty("项目档案id")
private String projectId;
/**
* 单位名称
* 客户名称
*/
@ExcelAttribute(name = "单位名称", maxLength = 50)
@Length(max = 50, message = "单位名称不能超过50个字符")
@ExcelProperty("单位名称")
@ExcelAttribute(name = "客户名称", maxLength = 50)
@Length(max = 50, message = "客户名称不能超过50个字符")
@ExcelProperty("客户名称")
private String unitName;
/**
* 项目名称
......@@ -434,6 +441,13 @@ public class TForecastLibrary extends BaseEntity {
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", maxLength = 50)
@Length(max = 50, message = "项目编码不能超过50个字符")
@ExcelProperty("项目编码")
private String deptNo;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
......@@ -482,10 +496,10 @@ public class TForecastLibrary extends BaseEntity {
@ExcelProperty("公积金户")
private String providentHouseholdName;
/**
* 数据同步:0未同步;1已同步
* 同步状态:0未同步;1已同步
*/
@ExcelAttribute(name = "数据同步:0未同步;1已同步")
@ExcelProperty("数据同步:0未同步;1已同步")
@ExcelAttribute(name = "同步状态:0未同步;1已同步")
@ExcelProperty("同步状态:0未同步;1已同步")
private Integer dataPush;
/**
* 类型:0社保;1公积金
......@@ -499,6 +513,12 @@ public class TForecastLibrary extends BaseEntity {
@ExcelAttribute(name = "数据类型:预估/差额")
@ExcelProperty("数据类型:预估/差额")
private String diffType;
/**
* 是否结算:0否/1是
*/
@ExcelAttribute(name = "是否结算")
@ExcelProperty("是否结算")
private String isSettle;
@TableField(exist = false)
private List<String> idList;
......@@ -511,6 +531,9 @@ public class TForecastLibrary extends BaseEntity {
@TableField(exist = false)
private String createTimeEnd;
@TableField(exist = false)
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
/**
* 查询数据起
**/
......
......@@ -270,11 +270,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty("个人公积金基数" )
private BigDecimal personalFundBase;
/**
* 单位公积金比例
* 单位公积金比例(公积金单边比例)
*/
@ExcelAttribute(name = "单位公积金比例" )
@Schema(description = "单位公积金比例" )
@ExcelProperty("单位公积金比例" )
@ExcelAttribute(name = "单位公积金比例(公积金单边比例)" )
@Schema(description = "单位公积金比例(公积金单边比例)" )
@ExcelProperty("单位公积金比例(公积金单边比例)" )
private BigDecimal unitFundProp;
/**
* 个人公积金比例
......
/*
* 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.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 预估费用导出Vo
*
* @author hgw
* @date 2022-7-28 15:20:24
*/
@Data
@Schema(description = "预估费用导出Vo")
public class TForecastLibraryExportVo {
@ExcelProperty("主键")
private String id;
@ExcelAttribute(name = "员工编码", maxLength = 32)
@ExcelProperty("员工编码")
private String empNo;
@ExcelAttribute(name = "员工姓名", maxLength = 32)
@ExcelProperty("员工姓名")
private String empName;
@ExcelAttribute(name = "身份证号", maxLength = 20)
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelAttribute(name = "客户名称", maxLength = 50)
@ExcelProperty("客户名称")
private String unitName;
@ExcelAttribute(name = "项目名称", maxLength = 50)
@ExcelProperty("项目名称")
private String deptName;
@ExcelAttribute(name = "项目编码", maxLength = 50)
@ExcelProperty("项目编码")
private String deptNo;
@ExcelAttribute(name = "单位养老费用")
@ExcelProperty("单位养老费用")
private BigDecimal unitPensionFee;
@ExcelAttribute(name = "单位医疗费用")
@ExcelProperty("单位医疗费用")
private BigDecimal unitMedicalFee;
@ExcelAttribute(name = "单位失业费用")
@ExcelProperty("单位失业费用")
private BigDecimal unitUnemploymentFee;
@ExcelAttribute(name = "单位工伤费用")
@ExcelProperty("单位工伤费用")
private BigDecimal unitWorkInjuryFee;
@ExcelAttribute(name = "单位生育费用")
@ExcelProperty("单位生育费用")
private BigDecimal unitBirthFee;
@ExcelAttribute(name = "单位大病救助")
@ExcelProperty("单位大病救助")
private BigDecimal unitBitailmentFee;
@ExcelAttribute(name = "个人养老费用")
@ExcelProperty("个人养老费用")
private BigDecimal personalPensionFee;
@ExcelAttribute(name = "个人医疗费用")
@ExcelProperty("个人医疗费用")
private BigDecimal personalMedicalFee;
@ExcelAttribute(name = "个人失业费用")
@ExcelProperty("个人失业费用")
private BigDecimal personalUnemploymentFee;
@ExcelAttribute(name = "个人大病费用")
@ExcelProperty("个人大病费用")
private BigDecimal personalBigailmentFee;
@ExcelAttribute(name = "社保缴纳月份", maxLength = 6)
@ExcelProperty("社保缴纳月份")
private String socialPayMonth;
@ExcelAttribute(name = "社保生成月份", maxLength = 6)
@ExcelProperty("社保生成月份")
private String socialCreateMonth;
@ExcelAttribute(name = "公积金缴纳月份", maxLength = 6)
@ExcelProperty("公积金缴纳月份")
private String providentPayMonth;
@ExcelAttribute(name = "公积金生成月份", maxLength = 6)
@ExcelProperty("公积金生成月份")
private String providentCreateMonth;
@ExcelAttribute(name = "单位社保合计")
@ExcelProperty("单位社保合计")
private BigDecimal unitSocialSum;
@ExcelAttribute(name = "单位公积金合计")
@ExcelProperty("单位公积金合计")
private BigDecimal unitFundSum;
@ExcelAttribute(name = "个人社保合计")
@ExcelProperty("个人社保合计")
private BigDecimal personalSocialSum;
@ExcelAttribute(name = "个人公积金合计")
@ExcelProperty("个人公积金合计")
private BigDecimal personalFundSum;
@ExcelAttribute(name = "费用合计")
@ExcelProperty("费用合计")
private BigDecimal sumAll;
@ExcelAttribute(name = "公积金缴纳地-省", isArea = true)
@ExcelProperty("公积金缴纳地-省")
private String fundProvince;
@ExcelAttribute(name = "公积金缴纳地-市", isArea = true, parentField = "fundProvince")
@ExcelProperty("公积金缴纳地-市")
private String fundCity;
@ExcelAttribute(name = "公积金缴纳地-县", isArea = true, parentField = "fundCity")
@ExcelProperty("公积金缴纳地-县")
private String fundTown;
@ExcelAttribute(name = "社保缴纳地-省", isArea = true)
@ExcelProperty("社保缴纳地-省")
private String socialProvince;
@ExcelAttribute(name = "社保缴纳地-市", isArea = true, parentField = "socialProvince")
@ExcelProperty("社保缴纳地-市")
private String socialCity;
@ExcelAttribute(name = "社保缴纳地-县", isArea = true, parentField = "socialCity")
@ExcelProperty("社保缴纳地-县")
private String socialTown;
@ExcelAttribute(name = "单位养老基数")
@ExcelProperty("单位养老基数")
private BigDecimal unitPensionBase;
@ExcelAttribute(name = "单位医疗基数")
@ExcelProperty("单位医疗基数")
private BigDecimal unitMedicalBase;
@ExcelAttribute(name = "单位失业基数")
@ExcelProperty("单位失业基数")
private BigDecimal unitUnemploymentBase;
@ExcelAttribute(name = "单位工伤基数")
@ExcelProperty("单位工伤基数")
private BigDecimal unitInjuryBase;
@ExcelAttribute(name = "单位生育基数")
@ExcelProperty("单位生育基数")
private BigDecimal unitBirthBase;
@ExcelAttribute(name = "个人养老基数")
@ExcelProperty("个人养老基数")
private BigDecimal personalPensionBase;
@ExcelAttribute(name = "个人医疗基数")
@ExcelProperty("个人医疗基数")
private BigDecimal personalMedicalBase;
@ExcelAttribute(name = "个人失业基数")
@ExcelProperty("个人失业基数")
private BigDecimal personalUnemploymentBase;
@ExcelAttribute(name = "个人大病基数")
@ExcelProperty("个人大病基数")
private BigDecimal personalBigailmentBase;
@ExcelAttribute(name = "单位大病基数")
@ExcelProperty("单位大病基数")
private BigDecimal unitBigailmentBase;
@ExcelAttribute(name = "单位养老比例")
@ExcelProperty("单位养老比例")
private BigDecimal unitPersionPro;
@ExcelAttribute(name = "单位医疗比例")
@ExcelProperty("单位医疗比例")
private BigDecimal unitMedicalPro;
@ExcelAttribute(name = "单位失业比例")
@ExcelProperty("单位失业比例")
private BigDecimal unitUnemploymentPro;
@ExcelAttribute(name = "单位工伤比例")
@ExcelProperty("单位工伤比例")
private BigDecimal unitInjuryPro;
@ExcelAttribute(name = "单位生育比例")
@ExcelProperty("单位生育比例")
private BigDecimal unitBirthPro;
@ExcelAttribute(name = "个人养老比例")
@ExcelProperty("个人养老比例")
private BigDecimal personalPersionPro;
@ExcelAttribute(name = "个人医疗比例")
@ExcelProperty("个人医疗比例")
private BigDecimal personalMedicalPro;
@ExcelAttribute(name = "个人失业比例")
@ExcelProperty("个人失业比例")
private BigDecimal personalUnemploymentPro;
@ExcelAttribute(name = "个人大病比例")
@ExcelProperty("个人大病比例")
private BigDecimal personalBigailmentPro;
@ExcelAttribute(name = "单位大病比例")
@ExcelProperty("单位大病比例")
private BigDecimal unitBigailmentPro;
@ExcelAttribute(name = "单位公积金基数")
@ExcelProperty("单位公积金基数")
private BigDecimal unitFundBase;
@ExcelAttribute(name = "个人公积金基数")
@ExcelProperty("个人公积金基数")
private BigDecimal personalFundBase;
@ExcelAttribute(name = "单位公积金比例")
@ExcelProperty("单位公积金比例")
private BigDecimal unitFundProp;
@ExcelAttribute(name = "个人公积金比例")
@ExcelProperty("个人公积金比例")
private BigDecimal personalFundProp;
@ExcelAttribute(name = "同步状态", readConverterExp = "0=未同步,1=已同步")
@ExcelProperty("同步状态:0未同步;1已同步")
private String dataPush;
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
@ExcelProperty("数据生成时间")
private LocalDateTime createTime;
@ExcelAttribute(name = "数据类型")
@ExcelProperty("数据类型")
private String diffType;
@ExcelAttribute(name = "类型", readConverterExp = "0=社保,1=公积金")
@ExcelProperty("类型")
private Integer dataType;
}
......@@ -66,19 +66,6 @@ public class TForecastLibraryController {
return new R<>(tForecastLibraryService.getTForecastLibraryPage(page, tForecastLibrary));
}
/**
* 不分页查询
*
* @param tForecastLibrary 预估费用
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage")
//@PreAuthorize("@pms.hasPermission('social_tforecastlibrary_get')" )
public R<List<TForecastLibrary>> getTForecastLibraryNoPage(@RequestBody TForecastLibrary tForecastLibrary) {
return R.ok(tForecastLibraryService.noPageDiy(tForecastLibrary));
}
/**
* 通过id查询预估费用
*
......@@ -160,13 +147,14 @@ public class TForecastLibraryController {
@SysLog("按缴纳月重新生成")
@PostMapping("/createForecastlibary")
@PreAuthorize("@pms.hasPermission('social_tforecastlibrary_create')")
public R<String> createForecastlibary(@RequestParam String payMonths,
@RequestParam(value = "empIdCard", required = false) String empIdCard,
@RequestParam(value = "settleDomainIds", required = false) String settleDomainIds) {
public R<String> createForecastlibary(@RequestParam String payMonths
, @RequestParam(value = "empIdCard", required = false) String empIdCard
, @RequestParam(value = "settleDomainIds", required = false) String settleDomainIds
,@RequestParam String isSettle) {
if (Common.isEmpty(empIdCard) && Common.isEmpty(settleDomainIds)) {
return R.failed("参数有误:身份证或项目ID不可为空!");
}
return tForecastLibraryService.createForecastlibary(payMonths, empIdCard, settleDomainIds);
return tForecastLibraryService.createForecastlibary(payMonths, empIdCard, settleDomainIds, isSettle);
}
/**
......
......@@ -21,9 +21,12 @@ 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.TForecastLibrary;
import com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 预估费用
*
......@@ -39,4 +42,13 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
* @return
*/
IPage<TForecastLibrary> getTForecastLibraryPage(Page<TForecastLibrary> page, @Param("tForecastLibrary") TForecastLibrary tForecastLibrary);
/**
* @Description: 导出
* @Author: hgw
* @Date: 2022/7/28 14:52
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryVo>
**/
List<TForecastLibraryExportVo> exportLibrary(@Param("tForecastLibrary") TForecastLibrary tForecastLibrary);
}
......@@ -45,8 +45,6 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
void listExport(HttpServletResponse response, TForecastLibrary searchVo);
List<TForecastLibrary> noPageDiy(TForecastLibrary searchVo);
/**
* @param payMonths 缴纳月
* @param empIdCard 身份证
......@@ -56,7 +54,7 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
* @Date: 2022/7/18 17:11
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
R<String> createForecastlibary(String payMonths, String empIdCard, String settleDomainIds);
R<String> createForecastlibary(String payMonths, String empIdCard, String settleDomainIds, String isSettle);
/**
* @param socialFundInfo
......
......@@ -38,6 +38,8 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.TForecastLibraryMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
......@@ -88,7 +90,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
public void listExport(HttpServletResponse response, TForecastLibrary searchVo) {
String fileName = "预估费用批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TForecastLibrary> list = new ArrayList<>();
List<TForecastLibraryExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
......@@ -98,17 +100,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("预估费用").doWrite(list)
ExcelWriter excelWriter = EasyExcel.write(out, TForecastLibrary.class).build();
ExcelWriter excelWriter = EasyExcel.write(out, TForecastLibraryExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
list = exportLibrary(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TForecastLibrary> util = new ExcelUtil<>(TForecastLibrary.class);
for (TForecastLibrary vo : list) {
ExcelUtil<TForecastLibraryExportVo> util = new ExcelUtil<>(TForecastLibraryExportVo.class);
for (TForecastLibraryExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
......@@ -144,17 +146,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
@Override
public List<TForecastLibrary> noPageDiy(TForecastLibrary searchVo) {
LambdaQueryWrapper<TForecastLibrary> wrapper = buildQueryWrapper(searchVo);
if (Common.isNotNull(searchVo.getIdList())) {
wrapper.in(TForecastLibrary::getId, searchVo.getIdList());
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper);
private List<TForecastLibraryExportVo> exportLibrary(TForecastLibrary searchVo) {
return baseMapper.exportLibrary(searchVo);
}
private Long noPageCountDiy(TForecastLibrary searchVo) {
......@@ -189,7 +182,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Override
public R<String> createForecastlibary(String payMonths, String empIdCard, String settleDomainIds) {
public R<String> createForecastlibary(String payMonths, String empIdCard, String settleDomainIds, String isSettle) {
//定义未推送的按条件查询得到的预估数据
List<TForecastLibrary> librarySocialList = null;
//定义已推送的按条件查询得到的预估数据
......@@ -294,6 +287,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (Common.isEmpty(library.getSocialId()) && Common.isEmpty(library.getProvidentId())) {
continue;
}
library.setIsSettle(isSettle);
if (Common.isNotNull(library.getId())) {
baseMapper.updateById(library);
} else {
......@@ -489,6 +483,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
lib.setSocialId(tSocialInfo.getId());
lib.setUnitId(tSocialInfo.getUnitId());
lib.setSettleDomainId(tSocialInfo.getSettleDomain());
lib.setUnitName(tSocialInfo.getUnitName());
lib.setDeptName(tSocialInfo.getSettleDomainName());
lib.setDeptNo(tSocialInfo.getSettleDomainCode());
//判断是否允许补缴 是否可补缴 0:是
Integer monthT = this.getOverpayMonth(tSocialInfo);
......@@ -639,6 +636,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
library.setFundCity(null);
library.setFundTown(null);
}
library.setSumAll(BigDecimalUtils.safeAdd(library.getUnitSocialSum(), library.getPersonalSocialSum(), library.getUnitFundSum(), library.getPersonalFundSum()));
return library;
}
......@@ -1257,6 +1255,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
lib.setProvidentId(providentFund.getId());
lib.setUnitId(providentFund.getUnitIdFund());
lib.setSettleDomainId(providentFund.getSettleDomainFund());
lib.setUnitName(providentFund.getUnitName());
lib.setDeptName(providentFund.getSettleDomainName());
lib.setDeptNo(providentFund.getSettleDomainCode());
//判断是否允许补缴 是否可补缴 0:是
Integer monthT = null;
......
......@@ -51,6 +51,7 @@
<result property="unitFundSum" column="UNIT_FUND_SUM"/>
<result property="personalSocialSum" column="PERSONAL_SOCIAL_SUM"/>
<result property="personalFundSum" column="PERSONAL_FUND_SUM"/>
<result property="sumAll" column="SUM_ALL"/>
<result property="fundProvince" column="FUND_PROVINCE"/>
<result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/>
......@@ -85,6 +86,7 @@
<result property="projectId" column="PROJECT_ID"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="empNatrue" column="EMP_NATRUE"/>
<result property="unitInterestFee" column="UNIT_INTEREST_FEE"/>
<result property="personalInterestFee" column="PERSONAL_INTEREST_FEE"/>
......@@ -95,12 +97,76 @@
<result property="dataPush" column="DATA_PUSH"/>
<result property="dataType" column="DATA_TYPE"/>
<result property="diffType" column="DIFF_TYPE"/>
<result property="isSettle" column="IS_SETTLE"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<!-- 导出 -->
<resultMap id="exportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo">
<id property="id" column="ID"/>
<result property="empNo" column="EMP_NO"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="unitPensionFee" column="UNIT_PENSION_FEE"/>
<result property="unitMedicalFee" column="UNIT_MEDICAL_FEE"/>
<result property="unitUnemploymentFee" column="UNIT_UNEMPLOYMENT_FEE"/>
<result property="unitWorkInjuryFee" column="UNIT_WORK_INJURY_FEE"/>
<result property="unitBirthFee" column="UNIT_BIRTH_FEE"/>
<result property="personalPensionFee" column="PERSONAL_PENSION_FEE"/>
<result property="personalMedicalFee" column="PERSONAL_MEDICAL_FEE"/>
<result property="personalUnemploymentFee" column="PERSONAL_UNEMPLOYMENT_FEE"/>
<result property="personalBigailmentFee" column="PERSONAL_BIGAILMENT_FEE"/>
<result property="unitBitailmentFee" column="UNIT_BITAILMENT_FEE"/>
<result property="socialPayMonth" column="SOCIAL_PAY_MONTH"/>
<result property="socialCreateMonth" column="SOCIAL_CREATE_MONTH"/>
<result property="providentPayMonth" column="PROVIDENT_PAY_MONTH"/>
<result property="providentCreateMonth" column="PROVIDENT_CREATE_MONTH"/>
<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
<result property="unitFundSum" column="UNIT_FUND_SUM"/>
<result property="personalSocialSum" column="PERSONAL_SOCIAL_SUM"/>
<result property="personalFundSum" column="PERSONAL_FUND_SUM"/>
<result property="sumAll" column="SUM_ALL"/>
<result property="fundProvince" column="FUND_PROVINCE"/>
<result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/>
<result property="socialProvince" column="SOCIAL_PROVINCE"/>
<result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialTown" column="SOCIAL_TOWN"/>
<result property="unitPensionBase" column="UNIT_PENSION_BASE"/>
<result property="unitMedicalBase" column="UNIT_MEDICAL_BASE"/>
<result property="unitUnemploymentBase" column="UNIT_UNEMPLOYMENT_BASE"/>
<result property="unitInjuryBase" column="UNIT_INJURY_BASE"/>
<result property="unitBirthBase" column="UNIT_BIRTH_BASE"/>
<result property="personalPensionBase" column="PERSONAL_PENSION_BASE"/>
<result property="personalMedicalBase" column="PERSONAL_MEDICAL_BASE"/>
<result property="personalUnemploymentBase" column="PERSONAL_UNEMPLOYMENT_BASE"/>
<result property="personalBigailmentBase" column="PERSONAL_BIGAILMENT_BASE"/>
<result property="unitBigailmentBase" column="UNIT_BIGAILMENT_BASE"/>
<result property="unitPersionPro" column="UNIT_PERSION_PRO"/>
<result property="unitMedicalPro" column="UNIT_MEDICAL_PRO"/>
<result property="unitUnemploymentPro" column="UNIT_UNEMPLOYMENT_PRO"/>
<result property="unitInjuryPro" column="UNIT_INJURY_PRO"/>
<result property="unitBirthPro" column="UNIT_BIRTH_PRO"/>
<result property="personalPersionPro" column="PERSONAL_PERSION_PRO"/>
<result property="personalMedicalPro" column="PERSONAL_MEDICAL_PRO"/>
<result property="personalUnemploymentPro" column="PERSONAL_UNEMPLOYMENT_PRO"/>
<result property="personalBigailmentPro" column="PERSONAL_BIGAILMENT_PRO"/>
<result property="unitBigailmentPro" column="UNIT_BIGAILMENT_PRO"/>
<result property="unitFundBase" column="UNIT_FUND_BASE"/>
<result property="personalFundBase" column="PERSONAL_FUND_BASE"/>
<result property="unitFundProp" column="UNIT_FUND_PROP"/>
<result property="personalFundProp" column="PERSONAL_FUND_PROP"/>
<result property="dataPush" column="DATA_PUSH"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="diffType" column="DIFF_TYPE"/>
<result property="dataType" column="DATA_TYPE"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.EMP_ID,
......@@ -129,6 +195,7 @@
a.UNIT_FUND_SUM,
a.PERSONAL_SOCIAL_SUM,
a.PERSONAL_FUND_SUM,
a.SUM_ALL,
a.FUND_PROVINCE,
a.FUND_CITY,
a.FUND_TOWN,
......@@ -163,6 +230,7 @@
a.PROJECT_ID,
a.UNIT_NAME,
a.DEPT_NAME,
a.DEPT_NO,
a.EMP_NATRUE,
a.UNIT_INTEREST_FEE,
a.PERSONAL_INTEREST_FEE,
......@@ -173,6 +241,7 @@
a.DATA_PUSH,
a.DATA_TYPE,
a.DIFF_TYPE,
a.IS_SETTLE,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
......@@ -370,6 +439,9 @@
<if test="tForecastLibrary.deptName != null and tForecastLibrary.deptName.trim() != ''">
AND a.DEPT_NAME = #{tForecastLibrary.deptName}
</if>
<if test="tForecastLibrary.deptNo != null and tForecastLibrary.deptNo.trim() != ''">
AND a.DEPT_NO = #{tForecastLibrary.deptNo}
</if>
<if test="tForecastLibrary.empNatrue != null and tForecastLibrary.empNatrue.trim() != ''">
AND a.EMP_NATRUE = #{tForecastLibrary.empNatrue}
</if>
......@@ -400,6 +472,9 @@
<if test="tForecastLibrary.diffType != null and tForecastLibrary.diffType.trim() != ''">
AND a.DIFF_TYPE = #{tForecastLibrary.diffType}
</if>
<if test="tForecastLibrary.isSettle != null and tForecastLibrary.isSettle.trim() != ''">
AND a.IS_SETTLE = #{tForecastLibrary.isSettle}
</if>
<if test="tForecastLibrary.createBy != null and tForecastLibrary.createBy.trim() != ''">
AND a.CREATE_BY = #{tForecastLibrary.createBy}
</if>
......@@ -432,5 +507,80 @@
1=1
<include refid="tForecastLibrary_where"/>
</where>
order by a.CREATE_TIME desc
</select>
<!-- 导出 -->
<select id="exportLibrary" resultMap="exportMap">
select
a.ID,
a.EMP_NO,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
a.DEPT_NAME,
a.DEPT_NO,
a.UNIT_PENSION_FEE,
a.UNIT_MEDICAL_FEE,
a.UNIT_UNEMPLOYMENT_FEE,
a.UNIT_WORK_INJURY_FEE,
a.UNIT_BIRTH_FEE,
a.UNIT_BITAILMENT_FEE,
a.PERSONAL_PENSION_FEE,
a.PERSONAL_MEDICAL_FEE,
a.PERSONAL_UNEMPLOYMENT_FEE,
a.PERSONAL_BIGAILMENT_FEE,
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
a.PROVIDENT_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH,
a.UNIT_SOCIAL_SUM,
a.UNIT_FUND_SUM,
a.PERSONAL_SOCIAL_SUM,
a.PERSONAL_FUND_SUM,
a.SUM_ALL,
a.FUND_PROVINCE,
a.FUND_CITY,
a.FUND_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a.UNIT_PENSION_BASE,
a.UNIT_MEDICAL_BASE,
a.UNIT_UNEMPLOYMENT_BASE,
a.UNIT_INJURY_BASE,
a.UNIT_BIRTH_BASE,
a.PERSONAL_PENSION_BASE,
a.PERSONAL_MEDICAL_BASE,
a.PERSONAL_UNEMPLOYMENT_BASE,
a.PERSONAL_BIGAILMENT_BASE,
a.UNIT_BIGAILMENT_BASE,
a.UNIT_PERSION_PRO,
a.UNIT_MEDICAL_PRO,
a.UNIT_UNEMPLOYMENT_PRO,
a.UNIT_INJURY_PRO,
a.UNIT_BIRTH_PRO,
a.PERSONAL_PERSION_PRO,
a.PERSONAL_MEDICAL_PRO,
a.PERSONAL_UNEMPLOYMENT_PRO,
a.PERSONAL_BIGAILMENT_PRO,
a.UNIT_BIGAILMENT_PRO,
a.UNIT_FUND_BASE,
a.PERSONAL_FUND_BASE,
a.UNIT_FUND_PROP,
a.PERSONAL_FUND_PROP,
a.DATA_PUSH,
a.CREATE_TIME,
a.DIFF_TYPE,
a.DATA_TYPE
from t_forecast_library a
<where>
1=1
<include refid="tForecastLibrary_where"/>
</where>
order by a.CREATE_TIME desc
<if test="tForecastLibrary.limitStart != null">
limit #{tForecastLibrary.limitStart},#{tForecastLibrary.limitEnd}
</if>
</select>
</mapper>
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