Commit e7a282da authored by hongguangwu's avatar hongguangwu

社保-批量调基

parent 92e8b945
......@@ -481,13 +481,6 @@ public class TForecastLibrary extends BaseEntity {
@Length(max = 50, message = "公积金户不能超过50个字符")
@ExcelProperty("公积金户")
private String providentHouseholdName;
/**
* 公积金编号
*/
@ExcelAttribute(name = "公积金编号", maxLength = 50)
@Length(max = 50, message = "公积金编号不能超过50个字符")
@ExcelProperty("公积金编号")
private String providentNo;
/**
* 数据同步:0未同步;1已同步
*/
......
......@@ -460,6 +460,7 @@ public class TSocialFundInfo extends BaseEntity {
private BigDecimal unitBigailmentPer;
/**
* 社保停缴日期
* 社保减少日期
*/
@ExcelAttribute(name = "社保停缴日期", isDate = true)
@Schema(description = "社保停缴日期" )
......
......@@ -42,13 +42,13 @@ public class TSocialFundHistoryVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "员工姓名", isNotEmpty = true, maxLength = 20, needExport = true, errorInfo = "员工姓名必填且不可超过20位")
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String name;
private String empName;
@Length(max = 20, message = "身份证号 不能超过20 个字符")
@ExcelAttribute(name = "身份证号", isNotEmpty = true, maxLength = 20, needExport = true, errorInfo = "身份证号必填且不可超过20位")
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String idCard;
private String empIdcard;
@ExcelAttribute(name = "缴纳类型", isNotEmpty = true, errorInfo = "缴纳类型必填", readConverterExp = "0=最低缴纳,1=自定义缴纳,2=最高缴纳")
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)")
......@@ -58,23 +58,27 @@ public class TSocialFundHistoryVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "养老基数")
@Schema(description = "养老基数")
@ExcelProperty("养老基数")
private BigDecimal unitPensionBase;
private BigDecimal unitPensionCardinal;
@ExcelAttribute(name = "医疗基数")
@Schema(description = "医疗基数")
@ExcelProperty("医疗基数")
private BigDecimal unitMedicalBase;
private BigDecimal unitMedicalCardinal;
@ExcelAttribute(name = "失业基数")
@Schema(description = "失业基数")
@ExcelProperty("失业基数")
private BigDecimal unitUnemploymentBase;
private BigDecimal unitUnemploymentCardinal;
@ExcelAttribute(name = "工伤基数")
@Schema(description = "工伤基数")
@ExcelProperty("工伤基数")
private BigDecimal unitInjuryBase;
private BigDecimal unitWorkInjuryCardinal;
@ExcelAttribute(name = "生育基数")
@Schema(description = "生育基数")
@ExcelProperty("生育基数")
private BigDecimal unitBirthBase;
private BigDecimal unitBirthCardinal;
@ExcelAttribute(name = "单位大病救助金额")
@Schema(description = "单位大病救助金额")
......
......@@ -159,7 +159,7 @@ public class TForecastLibraryController {
@SysLog("按缴纳月重新生成")
@PostMapping("/createForecastlibary")
@PreAuthorize("@pms.hasPermission('social_tforecastlibrary_create')")
public R<Boolean> createForecastlibary(@RequestParam String payMonths,
public R<String> createForecastlibary(@RequestParam String payMonths,
@RequestParam(value = "empIdCard", required = false) String empIdCard,
@RequestParam(value = "settleDomainIds", required = false) String settleDomainIds) {
if (Common.isEmpty(empIdCard) && Common.isEmpty(settleDomainIds)) {
......
......@@ -27,11 +27,9 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFundInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......
......@@ -23,6 +23,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import java.util.Map;
/**
* 基数设置表
*
......@@ -56,4 +58,13 @@ public interface SysBaseSetInfoService extends IService<SysBaseSetInfo> {
**/
R<String> updateSysBase(SysBaseSetInfo sysBaseSetInfo);
/**
* @param
* @Description: 获取社保基数配置的Map
* @Author: hgw
* @Date: 2020/10/27 16:44
* @return: java.util.Map<java.lang.String, com.yifu.cloud.v1.hrms.api.entity.SysBaseSetInfo>
**/
Map<String, SysBaseSetInfo> getSysBaseSetInfoMap(String baseType);
}
......@@ -57,16 +57,15 @@ 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<Boolean> createForecastlibary(String payMonths, String empIdCard, String settleDomainIds);
R<String> createForecastlibary(String payMonths, String empIdCard, String settleDomainIds);
/**
* @Description: 填充预估实际金额
* @param socialFundInfo
* @Description: 批量调基,同步预估库
* @Author: hgw
* @Date: 2020/10/10 16:45
* @return: com.yifu.cloud.v1.hrms.api.entity.TForecastLibrary
* @Date: 2022/7/25 17:33
* @return: void
**/
TForecastLibrary initForecastLibrary(TForecastLibrary library
, TSocialFundInfo socialInfo, TSocialFundInfo fund, Integer month, boolean isReduceFund
, boolean isReduceSocial, HashMap<String, TAgentConfig> agentConfigMap);
R<String> updateToneForecastLibary(TSocialFundInfo socialFundInfo);
}
......@@ -34,8 +34,11 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 基数设置表
......@@ -261,4 +264,31 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
}
}
}
@Override
public Map<String, SysBaseSetInfo> getSysBaseSetInfoMap(String baseType) {
// 基数配置
SysBaseSetInfo sysBaseSetInfo = new SysBaseSetInfo();
sysBaseSetInfo.setBaseType(baseType);
sysBaseSetInfo.setDeleteFlag(CommonConstants.STATUS_NORMAL);
sysBaseSetInfo.setStatus(CommonConstants.ZERO_INT);
sysBaseSetInfo.setApplyStartDate(new Date());
// 查询符合条件的基数列表
List<SysBaseSetInfo> sysBaseSetInfoList = baseMapper.getSysBaseSetInfoNoPage(sysBaseSetInfo);
// 返回的map
Map<String, SysBaseSetInfo> setInfoMap = new HashMap<>();
if (sysBaseSetInfoList != null && !sysBaseSetInfoList.isEmpty()) {
// map的键
String key;
for (SysBaseSetInfo setInfo : sysBaseSetInfoList) {
key = setInfo.getDepartId() + CommonConstants.DOWN_LINE_STRING + setInfo.getProvince()
+ CommonConstants.DOWN_LINE_STRING + setInfo.getCity();
if (setInfo.getTown() != null) {
key += CommonConstants.DOWN_LINE_STRING + setInfo.getTown();
}
setInfoMap.put(key, setInfo);
}
}
return setInfoMap;
}
}
......@@ -161,6 +161,10 @@
<if test="sysBaseSetInfo.applyStartDate != null">
AND a.APPLY_START_DATE = #{sysBaseSetInfo.applyStartDate}
</if>
<if test="sysBaseSetInfo.applyStartDate != null">
AND a.APPLY_START_DATE <![CDATA[ <= ]]> #{sysBaseSetInfo.applyStartDate}
AND (a.APPLY_END_DATE is null or a.APPLY_END_DATE <![CDATA[ >= ]]> #{sysBaseSetInfo.applyStartDate})
</if>
<if test="sysBaseSetInfo.applyEndDate != null">
AND a.APPLY_END_DATE = #{sysBaseSetInfo.applyEndDate}
</if>
......
......@@ -92,7 +92,6 @@
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
<result property="providentHousehold" column="PROVIDENT_HOUSEHOLD"/>
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="providentNo" column="PROVIDENT_NO"/>
<result property="dataPush" column="DATA_PUSH"/>
<result property="dataType" column="DATA_TYPE"/>
<result property="createBy" column="CREATE_BY"/>
......@@ -170,7 +169,6 @@
a.SOCIAL_HOUSEHOLD_NAME,
a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD_NAME,
a.PROVIDENT_NO,
a.DATA_PUSH,
a.DATA_TYPE,
a.CREATE_BY,
......@@ -391,9 +389,6 @@
<if test="tForecastLibrary.providentHouseholdName != null and tForecastLibrary.providentHouseholdName.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD_NAME = #{tForecastLibrary.providentHouseholdName}
</if>
<if test="tForecastLibrary.providentNo != null and tForecastLibrary.providentNo.trim() != ''">
AND a.PROVIDENT_NO = #{tForecastLibrary.providentNo}
</if>
<if test="tForecastLibrary.dataPush != null">
AND a.DATA_PUSH = #{tForecastLibrary.dataPush}
</if>
......
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