Commit cd99364a authored by huyuchen's avatar huyuchen

失败原因配置

parent f5719ccd
......@@ -347,6 +347,7 @@ public interface CommonConstants {
public static final String JAR_TYPE = "jar";
int BATCH_COUNT = 100;
int BATCH_COUNT_TAX = 400;
int BATCH_COUNT1 = 2000;
String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式(常见错误:1.日期格式:yyyy-MM-dd,2.比例为整数且不含%)";
......
......@@ -393,13 +393,6 @@ public class TPaymentInfo extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位养老基数")
private BigDecimal unitPensionSet;
/**
* 单位医疗基数
*/
@ExcelAttribute(name = "单位医疗基数", isFloat = true,max = "999999999.99")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位医疗基数")
private BigDecimal unitMedicalSet;
/**
* 单位失业基数
*/
......@@ -407,6 +400,13 @@ public class TPaymentInfo extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位失业基数")
private BigDecimal unitUnemploymentSet;
/**
* 单位医疗基数
*/
@ExcelAttribute(name = "单位医疗基数", isFloat = true,max = "999999999.99")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位医疗基数")
private BigDecimal unitMedicalSet;
/**
* 工伤基数
*/
......@@ -547,13 +547,6 @@ public class TPaymentInfo extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人医疗金额")
private BigDecimal personalMedicalMoney;
/**
* 个人失业金额
*/
@ExcelAttribute(name = "个人失业金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人失业金额")
private BigDecimal personalUnemploymentMoney;
/**
* 个人大病金额
*/
......@@ -561,6 +554,13 @@ public class TPaymentInfo extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人大病金额")
private BigDecimal personalBigmailmentMoney;
/**
* 个人失业金额
*/
@ExcelAttribute(name = "个人失业金额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人失业金额")
private BigDecimal personalUnemploymentMoney;
/**
* 公积金编号
*/
......
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import com.yifu.cloud.plus.v1.yifu.social.util.BigDecimalConverter;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @ClassName TPaymentHeFeiVo
* @Description 税务社保明细
* @author huyc
* @date 2024-5-9 10:35:22
*/
@Data
public class TPaymentTaxSocialVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@Length(max = 20, message = "姓名不能超过20个字符")
@ExcelAttribute(name = "姓名", maxLength = 20,isNotEmpty = true)
@Schema(description = "姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "姓名")
private String empName;
/**
* 证件类型
*/
@Length(max = 30, message = "证件类型不能超过30个字符")
@ExcelAttribute(name = "证件类型", maxLength = 30)
@Schema(description = "证件类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "证件类型")
private String cardType;
/**
* 证件号码
*/
@Length(max = 50, message = "不能超过50个字符")
@ExcelAttribute(name = "证件号码", isNotEmpty = true, maxLength = 50,errorInfo = "证件号码字段不可为空!")
@Schema(description = "证件号码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "证件号码")
private String empIdcard;
/**
* 缴费工资
*/
@ExcelAttribute(name = "缴费工资", isFloat = true,max = "999999999.99", min= -999999999)
@Schema(description = "缴费工资")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴费工资", converter = BigDecimalConverter.class)
private BigDecimal paymentSalary;
/**
* 缴费基数
*/
@ExcelAttribute(name = "缴费基数", isFloat = true,max = "999999999.99")
@Schema(description = "缴费基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴费基数", converter = BigDecimalConverter.class)
private BigDecimal paymentSet;
/**
* 费率
*/
@ExcelAttribute(name = "费率")
@Schema(description = "费率")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "费率")
private String paymentPer;
/**
* 应缴费额
*/
@ExcelAttribute(name = "应缴费额", isFloat = true,max = "999999999.99", min= -999999999)
@Schema(description = "应缴费额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "应缴费额", converter = BigDecimalConverter.class)
private BigDecimal paymentMoney;
/**
* 人员编号
*/
@ExcelAttribute(name = "人员编号")
@Schema(description = "人员编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "人员编号")
private String empNo;
/**
* 险种
*/
@ExcelAttribute(name = "险种")
@Schema(description = "险种")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "险种")
private String riskType;
/**
* 社保缴纳地
*/
@Length(max = 50, message = "社保缴纳地不能超过50个字符")
@ExcelAttribute(name = "社保缴纳地", isNotEmpty = true, errorInfo = "社保缴纳地不可为空", maxLength = 50)
@Schema(description = "社保缴纳地")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "社保缴纳地")
private String socialPayAddr;
/**
* 社保缴纳地-省
*/
@Length(max = 32, message = "不能超过32个字符")
@ExcelAttribute(name = "社保缴纳地-省", maxLength = 32, isDataId = true, isArea = true, parentField = "")
@Schema(description = "社保缴纳地-省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "社保缴纳地-省")
private Integer socialProvince;
/**
* 社保缴纳地-市
*/
@Length(max = 32, message = "不能超过32个字符")
@ExcelAttribute(name = "社保缴纳地-市", maxLength = 32, isDataId = true, isArea = true, parentField = "socialProvince")
@Schema(description = "社保缴纳地-市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "社保缴纳地-市")
private Integer socialCity;
/**
* 社保缴纳地-县
*/
@Length(max = 32, message = "不能超过32个字符")
@ExcelAttribute(name = "社保缴纳地-县", maxLength = 32, isDataId = true, isArea = true, parentField = "socialCity")
@Schema(description = "社保缴纳地-县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "社保缴纳地-县")
private Integer socialTown;
/**
* 社保缴纳月份
*/
@ExcelAttribute(name = "社保缴纳月份", isNotEmpty = true, errorInfo = "社保缴纳月份不可为空", maxLength = 6, min = 6, isInteger = true)
@Schema(description = "社保缴纳月份")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "社保缴纳月份")
private String socialPayMonth;
/**
* 社保生成月份
*/
@Length(max = 6, message = "社保生成月份不能超过6个字符")
@ExcelAttribute(name = "社保生成月份", isNotEmpty = true, errorInfo = "社保生成月份不可为空", maxLength = 6, min = 6,isInteger = true)
@Schema(description = "社保生成月份")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "社保生成月份")
private String socialCreateMonth;
/**
* 社保户
*/
@Length(max = 32, message = "社保户不能超过32个字符")
@ExcelAttribute(name = "社保户", maxLength = 32)
@Schema(description = "社保户")
private String socialHousehold;
}
......@@ -11,7 +11,20 @@ public class PaymentConstants {
public static final String UNEMPLOYEEMENT_RISK = "失业保险";
public static final String INJURY_RISK = "工伤保险";
public static final String MEDICAL = "医疗";
public static final String BIG = "大病";
public static final String BIRTH = "生育";
public static final String EXPORT = "缴费库合并导出";
public static final String SEARCH_EXPORT = "缴费库查询合并导出";
public static final String PAYMENT_SEARCH_EXPORT = "实缴查询批量导出";
public static final String COMPANY_YL = "单位养老";
public static final String PENSION_YL = "个人养老";
public static final String COMPANY_MEDICAL = "单位医疗";
public static final String PENSION_MEDICAL = "个人医疗";
public static final String COMPANY_UNEMPLOYEEMENT = "单位失业";
public static final String PENSION_UNEMPLOYEEMENT = "个人失业";
public static final String COMPANY_INJURY_RISK = "单位工伤";
public static final String COMPANY_BIG = "单位大病救助金";
public static final String PENSION_BIG = "个人大病救助金";
public static final String COMPANY_BIRTH = "单位生育";
public static final String PENSION_BIRTH = "个人生育";
}
......@@ -86,6 +86,12 @@ public class FailReasonConfigController {
@SysLog("修改失败原因配置" )
@PutMapping
public R<Boolean> updateById(@RequestBody FailReasonConfig failReasonConfig) {
FailReasonConfig failReasonCount = failReasonConfigService.getOne(Wrappers.<FailReasonConfig>query().lambda()
.eq(FailReasonConfig::getReasonKey,failReasonConfig.getReasonKey())
.last(CommonConstants.LAST_ONE_SQL));
if(Optional.ofNullable(failReasonCount).isPresent()) {
return R.failed("已存在对应的关键字的失败原因配置!");
}
YifuUser user = SecurityUtils.getUser();
if (Common.isNotNull(user)) {
failReasonConfig.setUpdateName(user.getNickname());
......
......@@ -603,4 +603,40 @@ public class TPaymentInfoController {
public Boolean updateSocialSettleStatus(@RequestBody List<EkpSocialViewVo> viewVo) {
return tPaymentInfoService.updateSocialSettleStatus(viewVo);
}
/**
* 税务社保明细导入
*
* @author huyc
* @date 2024-5-9
**/
@SneakyThrows
@Operation(description = "税务社保明细导入")
@SysLog("税务社保明细导入")
@PostMapping("/importTaxSocialInfoList")
public R<List<ErrorDetailVO>> importTaxSocialInfoList(@RequestBody MultipartFile file) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
// 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_SOCIAL_THREE_IMPORT + CommonConstants.DOWN_LINE_STRING + user.getId();
String requestId;
try {
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
try {
if (Common.isNotNull(requestId)) {
return tPaymentInfoService.importTaxSocialInfoDiy(file.getInputStream());
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}
}
......@@ -74,6 +74,13 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
*/
R<List<ErrorDetailVO>> importSocialHeFeiDiy(InputStream inputStream, String random, String type);
/**
* 税务社保明细导入
* @param inputStream
* @return
*/
R<List<ErrorDetailVO>> importTaxSocialInfoDiy(InputStream inputStream);
/**
* 批量导入公积金
* @param inputStream
......
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