Commit 22ffc8e8 authored by 李灿灿's avatar 李灿灿

Merge branch 'develop' into feature-licancan

parents e62320a5 a07eea68
...@@ -80,9 +80,15 @@ public class DeptChangeCheckParam implements Serializable { ...@@ -80,9 +80,15 @@ public class DeptChangeCheckParam implements Serializable {
private String errorMessage; private String errorMessage;
/** /**
* 结算方式 * 新项目结算方式
*/ */
@Schema(description = "结算方式") @Schema(description = "结算方式")
private Integer settleType; private Integer newSettleType;
/**
* 旧项目结算方式
*/
@Schema(description = "结算方式")
private Integer oldSettleType;
} }
...@@ -2340,12 +2340,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2340,12 +2340,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map<String, List<DeptChangeCheckParam>> stringListMap = deptChangeCheck(deptChangeCheckList); Map<String, List<DeptChangeCheckParam>> stringListMap = deptChangeCheck(deptChangeCheckList);
//todo 生成EKP通知,通知ekp变更结算所属项目 //todo 生成EKP通知,通知ekp变更结算所属项目
List<DeptChangeCheckParam> successList = stringListMap.get("successList"); List<DeptChangeCheckParam> successList = stringListMap.get("successList");
if(CollectionUtils.isNotEmpty(successList)){ if(CollectionUtils.isNotEmpty(successList)){
for (DeptChangeCheckParam success : successList) { for (DeptChangeCheckParam success : successList) {
Integer newSettleType = success.getNewSettleType();
Integer oldSettleType = success.getOldSettleType();
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceDetail ::getId,success.getId()) updateWrapper.eq(TInsuranceDetail ::getId,success.getId())
.set(TInsuranceDetail :: getDeptNo,success.getNewDeptNo()) .set(TInsuranceDetail :: getDeptNo,success.getNewDeptNo())
.set(TInsuranceDetail :: getSettleType,success.getSettleType()) .set(TInsuranceDetail :: getSettleType,success.getNewSettleType())
.set(TInsuranceDetail :: getUpdateBy,user.getId()) .set(TInsuranceDetail :: getUpdateBy,user.getId())
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now()); .set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now());
update(updateWrapper); update(updateWrapper);
...@@ -2806,25 +2809,29 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2806,25 +2809,29 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
} }
//查询结算状态 String defaultSettleId = insuranceDetail.getDefaultSettleId();
LambdaQueryWrapper<TInsuranceSettle> insuranceSettleQuery = new LambdaQueryWrapper<>(); if(StringUtils.isNotEmpty(defaultSettleId)){
insuranceSettleQuery.eq(TInsuranceSettle :: getInsDetailId,insuranceDetail.getId()); //查询结算状态
TInsuranceSettle insuranceSettle = tInsuranceSettleService.getOne(insuranceSettleQuery); LambdaQueryWrapper<TInsuranceSettle> insuranceSettleQuery = new LambdaQueryWrapper<>();
//当前结算状态为结算中时,不能变更结算月 insuranceSettleQuery.eq(TInsuranceSettle :: getInsDetailId,insuranceDetail.getId());
if (CommonConstants.TWO_STRING.equals(insuranceSettle.getSettleHandleStatus())){ TInsuranceSettle insuranceSettle = tInsuranceSettleService.getOne(insuranceSettleQuery);
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_SETTLE_STATUS_TWO_ERROR); if (!Common.isEmpty(insuranceSettle)){
errorList.add(param); //当前结算状态为结算中时,不能变更结算月
continue; if (CommonConstants.TWO_STRING.equals(insuranceSettle.getSettleHandleStatus())){
} param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_SETTLE_STATUS_TWO_ERROR);
//当前结算状态为已结算时,不能变更结算月 errorList.add(param);
if (CommonConstants.THREE_STRING.equals(insuranceSettle.getSettleHandleStatus())){ continue;
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_SETTLE_STATUS_THREE_ERROR); }
errorList.add(param); //当前结算状态为已结算时,不能变更结算月
continue; if (CommonConstants.THREE_STRING.equals(insuranceSettle.getSettleHandleStatus())){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_SETTLE_STATUS_THREE_ERROR);
errorList.add(param);
continue;
}
}
} }
Integer reduceHandleStatus = insuranceDetail.getReduceHandleStatus();
//当前保单信息的为已减员时不能不能变更结算月 //当前保单信息的为已减员时不能不能变更结算月
if( CommonConstants.FOUR_INT == reduceHandleStatus ){ if( CommonConstants.FIVE_INT == insuranceDetail.getBuyHandleStatus() ){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
...@@ -2951,7 +2958,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2951,7 +2958,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
}else { }else {
param.setSettleType(Integer.parseInt(settleType)); param.setNewSettleType(Integer.parseInt(settleType));
} }
} }
} }
...@@ -2988,28 +2995,30 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2988,28 +2995,30 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
} }
Integer reduceHandleStatus = insuranceDetail.getReduceHandleStatus();
//当前保单信息的为已减员时,不能变更结算项目 //当前保单信息的为已减员时,不能变更结算项目
if( CommonConstants.FOUR_INT == reduceHandleStatus ){ if( CommonConstants.FIVE_INT == insuranceDetail.getBuyHandleStatus() ){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR); param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
} }
//查询结算状态 String defaultSettleId = insuranceDetail.getDefaultSettleId();
LambdaQueryWrapper<TInsuranceSettle> insuranceSettleQuery = new LambdaQueryWrapper<>(); if (StringUtils.isNotBlank(defaultSettleId)){
insuranceSettleQuery.eq(TInsuranceSettle :: getInsDetailId,insuranceDetail.getId()); //查询结算状态
TInsuranceSettle insuranceSettle = tInsuranceSettleService.getOne(insuranceSettleQuery); LambdaQueryWrapper<TInsuranceSettle> insuranceSettleQuery = new LambdaQueryWrapper<>();
//当前结算状态为结算中时,不能变更结算项目 insuranceSettleQuery.eq(TInsuranceSettle :: getInsDetailId,insuranceDetail.getId());
if (CommonConstants.TWO_STRING.equals(insuranceSettle.getSettleHandleStatus())){ TInsuranceSettle insuranceSettle = tInsuranceSettleService.getOne(insuranceSettleQuery);
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_SETTLE_STATUS_TWO_ERROR); //当前结算状态为结算中时,不能变更结算项目
errorList.add(param); if (CommonConstants.TWO_STRING.equals(insuranceSettle.getSettleHandleStatus())){
continue; param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_SETTLE_STATUS_TWO_ERROR);
} errorList.add(param);
//当前结算状态为已结算时,不能变更结算项目 continue;
if (CommonConstants.THREE_STRING.equals(insuranceSettle.getSettleHandleStatus())){ }
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_SETTLE_STATUS_THREE_ERROR); //当前结算状态为已结算时,不能变更结算项目
errorList.add(param); if (CommonConstants.THREE_STRING.equals(insuranceSettle.getSettleHandleStatus())){
continue; param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_SETTLE_STATUS_THREE_ERROR);
errorList.add(param);
continue;
}
} }
//判断当前数据中是否存在重复数据 //判断当前数据中是否存在重复数据
param.setId(insuranceDetail.getId()); param.setId(insuranceDetail.getId());
......
...@@ -32,6 +32,7 @@ import org.hibernate.validator.constraints.Length; ...@@ -32,6 +32,7 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* 预估费用 * 预估费用
...@@ -157,10 +158,10 @@ public class TForecastLibrary extends BaseEntity { ...@@ -157,10 +158,10 @@ public class TForecastLibrary extends BaseEntity {
@ExcelProperty("个人医疗费用") @ExcelProperty("个人医疗费用")
private BigDecimal personalMedicalFee; private BigDecimal personalMedicalFee;
/** /**
* 个人工伤费用 * 个人失业费用
*/ */
@ExcelAttribute(name = "个人工伤费用") @ExcelAttribute(name = "个人失业费用")
@ExcelProperty("个人工伤费用") @ExcelProperty("个人失业费用")
private BigDecimal personalUnemploymentFee; private BigDecimal personalUnemploymentFee;
/** /**
* 个人医疗救助金 * 个人医疗救助金
...@@ -197,70 +198,76 @@ public class TForecastLibrary extends BaseEntity { ...@@ -197,70 +198,76 @@ public class TForecastLibrary extends BaseEntity {
@ExcelProperty("公积金生成月份") @ExcelProperty("公积金生成月份")
private String providentCreateMonth; private String providentCreateMonth;
/** /**
* 单位社保金额 * 单位社保合计
*/ */
@ExcelAttribute(name = "单位社保金额") @ExcelAttribute(name = "单位社保合计")
@ExcelProperty("单位社保金额") @ExcelProperty("单位社保合计")
private BigDecimal unitSocialSum; private BigDecimal unitSocialSum;
/** /**
* 单位公积金金额 * 单位公积金合计
*/ */
@ExcelAttribute(name = "单位公积金金额") @ExcelAttribute(name = "单位公积金合计")
@ExcelProperty("单位公积金金额") @ExcelProperty("单位公积金合计")
private BigDecimal unitFundSum; private BigDecimal unitFundSum;
/** /**
* 个人社保金额 * 个人社保合计
*/ */
@ExcelAttribute(name = "个人社保金额") @ExcelAttribute(name = "个人社保合计")
@ExcelProperty("个人社保金额") @ExcelProperty("个人社保合计")
private BigDecimal personalSocialSum; private BigDecimal personalSocialSum;
/** /**
* 个人公积金金额 * 个人公积金合计
*/ */
@ExcelAttribute(name = "个人公积金金额") @ExcelAttribute(name = "个人公积金合计")
@ExcelProperty("个人公积金金额") @ExcelProperty("个人公积金合计")
private BigDecimal personalFundSum; private BigDecimal personalFundSum;
/** /**
* 缴纳地-省 * 费用合计
*/ */
@ExcelAttribute(name = "缴纳地-省", maxLength = 32) @ExcelAttribute(name = "费用合计")
@Length(max = 32, message = "缴纳地-省不能超过32个字符") @ExcelProperty("费用合计")
@ExcelProperty("缴纳地-省") private BigDecimal sumAll;
/**
* 公积金缴纳地-省
*/
@ExcelAttribute(name = "公积金缴纳地-省", maxLength = 32)
@Length(max = 32, message = "公积金缴纳地-省不能超过32个字符")
@ExcelProperty("公积金缴纳地-省")
private String fundProvince; private String fundProvince;
/** /**
* 缴纳地-市 * 缴纳地-市
*/ */
@ExcelAttribute(name = "缴纳地-市", maxLength = 32) @ExcelAttribute(name = "公积金缴纳地-市", maxLength = 32)
@Length(max = 32, message = "缴纳地-市不能超过32个字符") @Length(max = 32, message = "公积金缴纳地-市不能超过32个字符")
@ExcelProperty("缴纳地-市") @ExcelProperty("公积金缴纳地-市")
private String fundCity; private String fundCity;
/** /**
* 缴纳地-县 * 公积金缴纳地-县
*/ */
@ExcelAttribute(name = "缴纳地-县", maxLength = 32) @ExcelAttribute(name = "公积金缴纳地-县", maxLength = 32)
@Length(max = 32, message = "缴纳地-县不能超过32个字符") @Length(max = 32, message = "公积金缴纳地-县不能超过32个字符")
@ExcelProperty("缴纳地-县") @ExcelProperty("公积金缴纳地-县")
private String fundTown; private String fundTown;
/** /**
* 缴纳地-省 * 社保缴纳地-省
*/ */
@ExcelAttribute(name = "缴纳地-省", maxLength = 32) @ExcelAttribute(name = "社保缴纳地-省", maxLength = 32)
@Length(max = 32, message = "缴纳地-省不能超过32个字符") @Length(max = 32, message = "社保缴纳地-省不能超过32个字符")
@ExcelProperty("缴纳地-省") @ExcelProperty("社保缴纳地-省")
private String socialProvince; private String socialProvince;
/** /**
* 缴纳地-市 * 社保缴纳地-市
*/ */
@ExcelAttribute(name = "缴纳地-市", maxLength = 32) @ExcelAttribute(name = "社保缴纳地-市", maxLength = 32)
@Length(max = 32, message = "缴纳地-市不能超过32个字符") @Length(max = 32, message = "社保缴纳地-市不能超过32个字符")
@ExcelProperty("缴纳地-市") @ExcelProperty("社保缴纳地-市")
private String socialCity; private String socialCity;
/** /**
* 缴纳地-县 * 社保缴纳地-县
*/ */
@ExcelAttribute(name = "缴纳地-县", maxLength = 32) @ExcelAttribute(name = "社保缴纳地-县", maxLength = 32)
@Length(max = 32, message = "缴纳地-县不能超过32个字符") @Length(max = 32, message = "社保缴纳地-县不能超过32个字符")
@ExcelProperty("缴纳地-县") @ExcelProperty("社保缴纳地-县")
private String socialTown; private String socialTown;
/** /**
* 单位养老基数 * 单位养老基数
...@@ -421,11 +428,11 @@ public class TForecastLibrary extends BaseEntity { ...@@ -421,11 +428,11 @@ public class TForecastLibrary extends BaseEntity {
@ExcelProperty("项目档案id") @ExcelProperty("项目档案id")
private String projectId; private String projectId;
/** /**
* 单位名称 * 客户名称
*/ */
@ExcelAttribute(name = "单位名称", maxLength = 50) @ExcelAttribute(name = "客户名称", maxLength = 50)
@Length(max = 50, message = "单位名称不能超过50个字符") @Length(max = 50, message = "客户名称不能超过50个字符")
@ExcelProperty("单位名称") @ExcelProperty("客户名称")
private String unitName; private String unitName;
/** /**
* 项目名称 * 项目名称
...@@ -434,6 +441,13 @@ public class TForecastLibrary extends BaseEntity { ...@@ -434,6 +441,13 @@ public class TForecastLibrary extends BaseEntity {
@Length(max = 50, message = "项目名称不能超过50个字符") @Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称") @ExcelProperty("项目名称")
private String deptName; private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", maxLength = 50)
@Length(max = 50, message = "项目编码不能超过50个字符")
@ExcelProperty("项目编码")
private String deptNo;
/** /**
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理)
*/ */
...@@ -482,10 +496,10 @@ public class TForecastLibrary extends BaseEntity { ...@@ -482,10 +496,10 @@ public class TForecastLibrary extends BaseEntity {
@ExcelProperty("公积金户") @ExcelProperty("公积金户")
private String providentHouseholdName; private String providentHouseholdName;
/** /**
* 数据同步:0未同步;1已同步 * 同步状态:0未同步;1已同步
*/ */
@ExcelAttribute(name = "数据同步:0未同步;1已同步") @ExcelAttribute(name = "同步状态:0未同步;1已同步")
@ExcelProperty("数据同步:0未同步;1已同步") @ExcelProperty("同步状态:0未同步;1已同步")
private Integer dataPush; private Integer dataPush;
/** /**
* 类型:0社保;1公积金 * 类型:0社保;1公积金
...@@ -511,6 +525,9 @@ public class TForecastLibrary extends BaseEntity { ...@@ -511,6 +525,9 @@ public class TForecastLibrary extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String createTimeEnd; private String createTimeEnd;
@TableField(exist = false)
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
/** /**
* 查询数据起 * 查询数据起
**/ **/
......
/*
* 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;
}
...@@ -16,12 +16,14 @@ ...@@ -16,12 +16,14 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.social.vo; package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* 缴费库 * 缴费库
...@@ -32,28 +34,31 @@ import java.util.List; ...@@ -32,28 +34,31 @@ import java.util.List;
@Data @Data
public class TPaymentInfoSearchVo extends TPaymentInfo { public class TPaymentInfoSearchVo extends TPaymentInfo {
/** @Schema(description = "导出的表头的Set")
* 多选导出或删除等操作 private Set<String> exportFields;
*/
@Schema(description = "选中ID,id数组")
private List<String> idList;
/** /**
* 创建时间区间 [开始时间,结束时间] * 多选导出或删除等操作
*/ */
@Schema(description = "创建时间区间") @Schema(description = "选中ID,id数组")
private LocalDateTime[] createTimes; private List<String> idList;
/**
* @Author fxj /**
* 查询数据起 * 创建时间区间 [开始时间,结束时间]
**/ */
@Schema(description = "查询limit 开始") @Schema(description = "创建时间区间")
private int limitStart; private LocalDateTime[] createTimes;
/** /**
* @Author fxj * @Author fxj
* 查询数据止 * 查询数据起
**/ **/
@Schema(description = "查询limit 数据条数") @Schema(description = "查询limit 开始")
private int limitEnd; private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
} }
...@@ -95,9 +95,9 @@ public class TSocialFundHistoryVo extends RowIndex implements Serializable { ...@@ -95,9 +95,9 @@ public class TSocialFundHistoryVo extends RowIndex implements Serializable {
@ExcelProperty("单位公积金基数") @ExcelProperty("单位公积金基数")
private BigDecimal unitFundBase; private BigDecimal unitFundBase;
@ExcelAttribute(name = "单位公积金比例") @ExcelAttribute(name = "单位公积金比例(公积金单边比例)")
@Schema(description = "单位公积金比例") @Schema(description = "单位公积金比例(公积金单边比例)")
@ExcelProperty("单位公积金比例") @ExcelProperty("单位公积金比例(公积金单边比例)")
private BigDecimal unitFundProp; private BigDecimal unitFundProp;
@ExcelAttribute(name = "个人公积金基数") @ExcelAttribute(name = "个人公积金基数")
......
...@@ -6,8 +6,6 @@ public class PreDispatchConstants { ...@@ -6,8 +6,6 @@ public class PreDispatchConstants {
public static final String NO_PENSION_AREA_REDUCE = "获取缴纳地数据失败,请检查养老截止城市或公积金截止城市名称是否合规!"; public static final String NO_PENSION_AREA_REDUCE = "获取缴纳地数据失败,请检查养老截止城市或公积金截止城市名称是否合规!";
public static final String NO_PENSION_AREA= "请检查派单缴纳地名称是否合规!";
public static final String SOCIAL_START_DATE_ERROR = "社保起缴月份在可补缴月份之前,请确认后操作!"; public static final String SOCIAL_START_DATE_ERROR = "社保起缴月份在可补缴月份之前,请确认后操作!";
public static final String NO_SOCIAL_BASE_SET_INFO = "未找到有效的社保基数配置信息(户+缴纳地+起缴时间)!"; public static final String NO_SOCIAL_BASE_SET_INFO = "未找到有效的社保基数配置信息(户+缴纳地+起缴时间)!";
...@@ -27,7 +25,6 @@ public class PreDispatchConstants { ...@@ -27,7 +25,6 @@ public class PreDispatchConstants {
"工伤城市","工伤截止时间","生育城市","生育截止时间","失业城市","失业截止时间","公积金城市","公积金截止时间", "工伤城市","工伤截止时间","生育城市","生育截止时间","失业城市","失业截止时间","公积金城市","公积金截止时间",
"派单分公司","派单客服","小合同名称","合同类型"}; "派单分公司","派单客服","小合同名称","合同类型"};
public static final String HAED_ERROR = "请使用标准模板!";
public static final String POSITION = "服务"; public static final String POSITION = "服务";
public static final String CONTRACT_NAME = "代理社保"; public static final String CONTRACT_NAME = "代理社保";
public static final String DISPATCH_TYPE_ERROR = "派单类型有误,0-派增 1-派减!"; public static final String DISPATCH_TYPE_ERROR = "派单类型有误,0-派增 1-派减!";
...@@ -40,16 +37,10 @@ public class PreDispatchConstants { ...@@ -40,16 +37,10 @@ public class PreDispatchConstants {
public static final String PRESTATUS_ERROR = "‘是否派单’为是且‘预派单状态’为正常未派单才可派单!"; public static final String PRESTATUS_ERROR = "‘是否派单’为是且‘预派单状态’为正常未派单才可派单!";
public static final String CITY = "city"; public static final String CITY = "city";
public static final String TOWN = "town"; public static final String TOWN = "town";
public static final String SOCIAL_CITY = "social_city";
public static final String SOCIAL_TOWN = "social_town";
public static final String FUND_CITY = "fund_city";
public static final String FUND_TOWN = "fund_town";
public static final String YES_CH = "是"; public static final String YES_CH = "是";
public static final String NO_CH = "否"; public static final String NO_CH = "否";
public static final String DATA_CHECK = "数据校验信息:"; public static final String DATA_CHECK = "数据校验信息:";
public static final String DATA_HANDLE_RESULT = "数据导入结果:";
public static final String DATA_IMPORT_ANALYSIS_ERROR = "数据导入解析失败!"; public static final String DATA_IMPORT_ANALYSIS_ERROR = "数据导入解析失败!";
public static final String IMPORT_PREDISPATCH = "导出预派单";
public static final String NO_SOCIAL_FUND_ADDRESS_ADD = "派增:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!"; public static final String NO_SOCIAL_FUND_ADDRESS_ADD = "派增:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!";
public static final String NO_SOCIAL_FUND_ADDRESS_REDUCE = "派减:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!"; public static final String NO_SOCIAL_FUND_ADDRESS_REDUCE = "派减:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!";
public static final String TEL_NOT_EMPTY = "联系电话1不可为空!"; public static final String TEL_NOT_EMPTY = "联系电话1不可为空!";
......
...@@ -66,19 +66,6 @@ public class TForecastLibraryController { ...@@ -66,19 +66,6 @@ public class TForecastLibraryController {
return new R<>(tForecastLibraryService.getTForecastLibraryPage(page, tForecastLibrary)); 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查询预估费用 * 通过id查询预估费用
* *
...@@ -160,9 +147,9 @@ public class TForecastLibraryController { ...@@ -160,9 +147,9 @@ public class TForecastLibraryController {
@SysLog("按缴纳月重新生成") @SysLog("按缴纳月重新生成")
@PostMapping("/createForecastlibary") @PostMapping("/createForecastlibary")
@PreAuthorize("@pms.hasPermission('social_tforecastlibrary_create')") @PreAuthorize("@pms.hasPermission('social_tforecastlibrary_create')")
public R<String> createForecastlibary(@RequestParam String payMonths, public R<String> createForecastlibary(@RequestParam String payMonths
@RequestParam(value = "empIdCard", required = false) String empIdCard, , @RequestParam(value = "empIdCard", required = false) String empIdCard
@RequestParam(value = "settleDomainIds", required = false) String settleDomainIds) { , @RequestParam(value = "settleDomainIds", required = false) String settleDomainIds) {
if (Common.isEmpty(empIdCard) && Common.isEmpty(settleDomainIds)) { if (Common.isEmpty(empIdCard) && Common.isEmpty(settleDomainIds)) {
return R.failed("参数有误:身份证或项目ID不可为空!"); return R.failed("参数有误:身份证或项目ID不可为空!");
} }
......
...@@ -94,7 +94,6 @@ public class TPreDispatchInfoController { ...@@ -94,7 +94,6 @@ public class TPreDispatchInfoController {
*/ */
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('social_tpredispatchinfo_get')") @Operation(summary = "通过id查询", description = "通过id查询:hasPermission('social_tpredispatchinfo_get')")
@GetMapping("/{id}" ) @GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_get')" )
public R<TPreDispatchInfo> getById(@PathVariable("id" ) String id) { public R<TPreDispatchInfo> getById(@PathVariable("id" ) String id) {
return R.ok(tPreDispatchInfoService.getById(id)); return R.ok(tPreDispatchInfoService.getById(id));
} }
......
...@@ -21,9 +21,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -21,9 +21,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.social.entity.TForecastLibrary; 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.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 预估费用 * 预估费用
* *
...@@ -39,4 +42,13 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> { ...@@ -39,4 +42,13 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
* @return * @return
*/ */
IPage<TForecastLibrary> getTForecastLibraryPage(Page<TForecastLibrary> page, @Param("tForecastLibrary") TForecastLibrary tForecastLibrary); 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);
} }
...@@ -26,7 +26,6 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo; ...@@ -26,7 +26,6 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*; import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import io.seata.spring.annotation.GlobalTransactional; import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.web.bind.annotation.RequestBody;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.io.InputStream;
...@@ -58,6 +57,9 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> { ...@@ -58,6 +57,9 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream); R<List<ErrorMessage>> importReduceDiy(InputStream inputStream);
@GlobalTransactional
void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList);
R<Boolean> removeByIdDiy(String id); R<Boolean> removeByIdDiy(String id);
DispatchDetailVo getSocialAndFundInfoById(String id); DispatchDetailVo getSocialAndFundInfoById(String id);
......
...@@ -45,8 +45,6 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> { ...@@ -45,8 +45,6 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
void listExport(HttpServletResponse response, TForecastLibrary searchVo); void listExport(HttpServletResponse response, TForecastLibrary searchVo);
List<TForecastLibrary> noPageDiy(TForecastLibrary searchVo);
/** /**
* @param payMonths 缴纳月 * @param payMonths 缴纳月
* @param empIdCard 身份证 * @param empIdCard 身份证
......
...@@ -1477,7 +1477,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1477,7 +1477,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return R.ok(errorMessageList); return R.ok(errorMessageList);
} }
private void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList) { @GlobalTransactional
@Override
public void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList) {
if (!Common.isNotNull(excelVOList)){ if (!Common.isNotNull(excelVOList)){
return; return;
} }
......
...@@ -26,7 +26,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -26,7 +26,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants; import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig; import com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig;
...@@ -38,6 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.TForecastLibraryMapper; ...@@ -38,6 +37,7 @@ 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.mapper.TSocialFundInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService; 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.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -88,7 +88,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -88,7 +88,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
public void listExport(HttpServletResponse response, TForecastLibrary searchVo) { public void listExport(HttpServletResponse response, TForecastLibrary searchVo) {
String fileName = "预估费用批量导出" + DateUtil.getThisTime() + ".xlsx"; String fileName = "预估费用批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<TForecastLibrary> list = new ArrayList<>(); List<TForecastLibraryExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo); long count = noPageCountDiy(searchVo);
ServletOutputStream out = null; ServletOutputStream out = null;
try { try {
...@@ -98,17 +98,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -98,17 +98,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("预估费用").doWrite(list) //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; int index = 0;
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) { for (int i = 0; i <= count; ) {
// 获取实际记录 // 获取实际记录
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo); list = exportLibrary(searchVo);
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
ExcelUtil<TForecastLibrary> util = new ExcelUtil<>(TForecastLibrary.class); ExcelUtil<TForecastLibraryExportVo> util = new ExcelUtil<>(TForecastLibraryExportVo.class);
for (TForecastLibrary vo : list) { for (TForecastLibraryExportVo vo : list) {
util.convertEntity(vo, null, null, null); util.convertEntity(vo, null, null, null);
} }
} }
...@@ -144,17 +144,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -144,17 +144,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
} }
@Override private List<TForecastLibraryExportVo> exportLibrary(TForecastLibrary searchVo) {
public List<TForecastLibrary> noPageDiy(TForecastLibrary searchVo) { return baseMapper.exportLibrary(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 Long noPageCountDiy(TForecastLibrary searchVo) { private Long noPageCountDiy(TForecastLibrary searchVo) {
...@@ -489,6 +480,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -489,6 +480,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
lib.setSocialId(tSocialInfo.getId()); lib.setSocialId(tSocialInfo.getId());
lib.setUnitId(tSocialInfo.getUnitId()); lib.setUnitId(tSocialInfo.getUnitId());
lib.setSettleDomainId(tSocialInfo.getSettleDomain()); lib.setSettleDomainId(tSocialInfo.getSettleDomain());
lib.setUnitName(tSocialInfo.getUnitName());
lib.setDeptName(tSocialInfo.getSettleDomainName());
lib.setDeptNo(tSocialInfo.getSettleDomainCode());
//判断是否允许补缴 是否可补缴 0:是 //判断是否允许补缴 是否可补缴 0:是
Integer monthT = this.getOverpayMonth(tSocialInfo); Integer monthT = this.getOverpayMonth(tSocialInfo);
...@@ -639,6 +633,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -639,6 +633,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
library.setFundCity(null); library.setFundCity(null);
library.setFundTown(null); library.setFundTown(null);
} }
library.setSumAll(BigDecimalUtils.safeAdd(library.getUnitSocialSum(), library.getPersonalSocialSum(), library.getUnitFundSum(), library.getPersonalFundSum()));
return library; return library;
} }
...@@ -1135,9 +1130,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1135,9 +1130,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialFund.setPersonalProvidentCardinal(socialSet.getUpperLimit()); socialFund.setPersonalProvidentCardinal(socialSet.getUpperLimit());
} }
//单边小数点处理逻辑 //单边小数点处理逻辑
if (Common.isNotNull(socialSet.getFundPayPoint())){ if (Common.isNotNull(socialSet.getFundPayPoint())) {
socialFund.setUnitFundSum(Common.formatMoneyForFund(BigDecimalUtils.safeMultiply(socialFund.getUnitProvidengCardinal(), socialFund.getUnitProvidentPer(),BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())),Integer.valueOf(socialFund.getFundPayPoint()))); socialFund.setUnitFundSum(Common.formatMoneyForFund(BigDecimalUtils.safeMultiply(socialFund.getUnitProvidengCardinal(), socialFund.getUnitProvidentPer(), BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())), Integer.valueOf(socialFund.getFundPayPoint())));
socialFund.setPersonalFundSum(Common.formatMoneyForFund(BigDecimalUtils.safeMultiply(socialFund.getPersonalProvidentCardinal(), socialFund.getPersonalProvidentPer(),BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())),Integer.valueOf(socialFund.getFundPayPoint()))); socialFund.setPersonalFundSum(Common.formatMoneyForFund(BigDecimalUtils.safeMultiply(socialFund.getPersonalProvidentCardinal(), socialFund.getPersonalProvidentPer(), BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())), Integer.valueOf(socialFund.getFundPayPoint())));
} }
} }
} }
...@@ -1257,6 +1252,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1257,6 +1252,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
lib.setProvidentId(providentFund.getId()); lib.setProvidentId(providentFund.getId());
lib.setUnitId(providentFund.getUnitIdFund()); lib.setUnitId(providentFund.getUnitIdFund());
lib.setSettleDomainId(providentFund.getSettleDomainFund()); lib.setSettleDomainId(providentFund.getSettleDomainFund());
lib.setUnitName(providentFund.getUnitName());
lib.setDeptName(providentFund.getSettleDomainName());
lib.setDeptNo(providentFund.getSettleDomainCode());
//判断是否允许补缴 是否可补缴 0:是 //判断是否允许补缴 是否可补缴 0:是
Integer monthT = null; Integer monthT = null;
......
...@@ -138,7 +138,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -138,7 +138,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TPaymentInfo.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, TPaymentInfo.class).includeColumnFiledNames(searchVo.getExportFields()).build();;
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) { for (int i = 0; i <= count; ) {
......
...@@ -115,4 +115,16 @@ public class ServiceUtil { ...@@ -115,4 +115,16 @@ public class ServiceUtil {
} }
return str; return str;
} }
public static String replaceSeparator(String string,String str1, String... strn){
if (null != str1) {
string = string.replace(str1,CommonConstants.EMPTY_STRING);
}
if (null != strn) {
for (String str : strn) {
string = string.replace(str,CommonConstants.EMPTY_STRING);
}
}
return string;
}
} }
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<result property="unitFundSum" column="UNIT_FUND_SUM"/> <result property="unitFundSum" column="UNIT_FUND_SUM"/>
<result property="personalSocialSum" column="PERSONAL_SOCIAL_SUM"/> <result property="personalSocialSum" column="PERSONAL_SOCIAL_SUM"/>
<result property="personalFundSum" column="PERSONAL_FUND_SUM"/> <result property="personalFundSum" column="PERSONAL_FUND_SUM"/>
<result property="sumAll" column="SUM_ALL"/>
<result property="fundProvince" column="FUND_PROVINCE"/> <result property="fundProvince" column="FUND_PROVINCE"/>
<result property="fundCity" column="FUND_CITY"/> <result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/> <result property="fundTown" column="FUND_TOWN"/>
...@@ -85,6 +86,7 @@ ...@@ -85,6 +86,7 @@
<result property="projectId" column="PROJECT_ID"/> <result property="projectId" column="PROJECT_ID"/>
<result property="unitName" column="UNIT_NAME"/> <result property="unitName" column="UNIT_NAME"/>
<result property="deptName" column="DEPT_NAME"/> <result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="empNatrue" column="EMP_NATRUE"/> <result property="empNatrue" column="EMP_NATRUE"/>
<result property="unitInterestFee" column="UNIT_INTEREST_FEE"/> <result property="unitInterestFee" column="UNIT_INTEREST_FEE"/>
<result property="personalInterestFee" column="PERSONAL_INTEREST_FEE"/> <result property="personalInterestFee" column="PERSONAL_INTEREST_FEE"/>
...@@ -101,6 +103,69 @@ ...@@ -101,6 +103,69 @@
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
</resultMap> </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"> <sql id="Base_Column_List">
a.ID, a.ID,
a.EMP_ID, a.EMP_ID,
...@@ -129,6 +194,7 @@ ...@@ -129,6 +194,7 @@
a.UNIT_FUND_SUM, a.UNIT_FUND_SUM,
a.PERSONAL_SOCIAL_SUM, a.PERSONAL_SOCIAL_SUM,
a.PERSONAL_FUND_SUM, a.PERSONAL_FUND_SUM,
a.SUM_ALL,
a.FUND_PROVINCE, a.FUND_PROVINCE,
a.FUND_CITY, a.FUND_CITY,
a.FUND_TOWN, a.FUND_TOWN,
...@@ -163,6 +229,7 @@ ...@@ -163,6 +229,7 @@
a.PROJECT_ID, a.PROJECT_ID,
a.UNIT_NAME, a.UNIT_NAME,
a.DEPT_NAME, a.DEPT_NAME,
a.DEPT_NO,
a.EMP_NATRUE, a.EMP_NATRUE,
a.UNIT_INTEREST_FEE, a.UNIT_INTEREST_FEE,
a.PERSONAL_INTEREST_FEE, a.PERSONAL_INTEREST_FEE,
...@@ -370,6 +437,9 @@ ...@@ -370,6 +437,9 @@
<if test="tForecastLibrary.deptName != null and tForecastLibrary.deptName.trim() != ''"> <if test="tForecastLibrary.deptName != null and tForecastLibrary.deptName.trim() != ''">
AND a.DEPT_NAME = #{tForecastLibrary.deptName} AND a.DEPT_NAME = #{tForecastLibrary.deptName}
</if> </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() != ''"> <if test="tForecastLibrary.empNatrue != null and tForecastLibrary.empNatrue.trim() != ''">
AND a.EMP_NATRUE = #{tForecastLibrary.empNatrue} AND a.EMP_NATRUE = #{tForecastLibrary.empNatrue}
</if> </if>
...@@ -432,5 +502,80 @@ ...@@ -432,5 +502,80 @@
1=1 1=1
<include refid="tForecastLibrary_where"/> <include refid="tForecastLibrary_where"/>
</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> </select>
</mapper> </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