Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
878e5763
Commit
878e5763
authored
Nov 06, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社保公积金基数批量导入导出-fxj
parent
15e94e31
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
2435 additions
and
10 deletions
+2435
-10
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+4
-0
ExcelAttributeConstants.java
...v1/yifu/common/core/constant/ExcelAttributeConstants.java
+9
-0
Common.java
.../com/yifu/cloud/plus/v1/yifu/common/core/util/Common.java
+44
-0
DateUtil.java
...om/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
+46
-0
SysBaseSetFundExportVo.java
.../cloud/plus/v1/yifu/social/vo/SysBaseSetFundExportVo.java
+164
-0
SysBaseSetFundInsertVo.java
.../cloud/plus/v1/yifu/social/vo/SysBaseSetFundInsertVo.java
+157
-0
SysBaseSetInfoSearchVo.java
.../cloud/plus/v1/yifu/social/vo/SysBaseSetInfoSearchVo.java
+58
-0
SysBaseSetSocialExportVo.java
...loud/plus/v1/yifu/social/vo/SysBaseSetSocialExportVo.java
+412
-0
SysBaseSetSocialInsertVo.java
...loud/plus/v1/yifu/social/vo/SysBaseSetSocialInsertVo.java
+383
-0
SysBaseSetInfoController.java
...s/v1/yifu/social/controller/SysBaseSetInfoController.java
+54
-0
SysBaseSetInfoMapper.java
...loud/plus/v1/yifu/social/mapper/SysBaseSetInfoMapper.java
+6
-0
SysHouseHoldInfoMapper.java
...ud/plus/v1/yifu/social/mapper/SysHouseHoldInfoMapper.java
+1
-0
SysBaseSetInfoService.java
...ud/plus/v1/yifu/social/service/SysBaseSetInfoService.java
+15
-0
SysBaseSetInfoServiceImpl.java
...1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
+964
-10
SysBaseSetInfoMapper.xml
...al-biz/src/main/resources/mapper/SysBaseSetInfoMapper.xml
+106
-0
SysHouseHoldInfoMapper.xml
...-biz/src/main/resources/mapper/SysHouseHoldInfoMapper.xml
+12
-0
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
878e5763
...
@@ -266,6 +266,10 @@ public interface CommonConstants {
...
@@ -266,6 +266,10 @@ public interface CommonConstants {
char
DOWN_LINE_CHAR
=
'_'
;
char
DOWN_LINE_CHAR
=
'_'
;
// 冒号 :
// 冒号 :
String
COLON_STRING
=
":"
;
String
COLON_STRING
=
":"
;
// 分号 ;
String
SEMICOLON_STRING
=
";"
;
// - 横 分割线 中
// - 横 分割线 中
String
CENTER_SPLIT_LINE_STRING
=
"-"
;
String
CENTER_SPLIT_LINE_STRING
=
"-"
;
// 斜杠
// 斜杠
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/ExcelAttributeConstants.java
View file @
878e5763
...
@@ -217,4 +217,13 @@ public class ExcelAttributeConstants {
...
@@ -217,4 +217,13 @@ public class ExcelAttributeConstants {
public
static
final
String
GZ_PROBATION
=
"gz_probation"
;
public
static
final
String
GZ_PROBATION
=
"gz_probation"
;
// 瓜子的星座
// 瓜子的星座
public
static
final
String
GZ_CONSTEL
=
"gz_constel"
;
public
static
final
String
GZ_CONSTEL
=
"gz_constel"
;
// 社保缴纳月份
public
static
final
String
SOCIAL_MONTH_TYPE
=
"social_month_type"
;
// 社保可补交月份
public
static
final
String
SOCIAL_OVERPAY_MOTH
=
"social_overpay_month"
;
// 公积金单边小数点
public
static
final
String
FUND_POINT_TYPE
=
"fund_point_type"
;
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/Common.java
View file @
878e5763
...
@@ -766,4 +766,48 @@ public class Common {
...
@@ -766,4 +766,48 @@ public class Common {
}
}
return
R
.
ok
(
errorMessageList
);
return
R
.
ok
(
errorMessageList
);
}
}
/**
* 创建一个包含指定元素的Set集合
*
* @param elements 要包含在Set中的元素
* @param <T> 元素类型
* @return 包含指定元素的Set集合
*/
public
static
<
T
>
Set
<
T
>
getSet
(
T
...
elements
)
{
Set
<
T
>
set
=
new
HashSet
<>();
if
(
elements
!=
null
)
{
Collections
.
addAll
(
set
,
elements
);
}
return
set
;
}
/**
* 校验字符串是否符合格式 10,10;12,13
* @param str 待校验的字符串
* @return 符合格式返回true,否则返回false
*/
public
static
boolean
validateFormat
(
String
str
)
{
// 如果字符串为空或null,则不符合格式
if
(
str
==
null
||
str
.
isEmpty
())
{
return
false
;
}
// 使用正则表达式匹配格式
// 格式要求: 数字,数字;数字,数字;...
// 其中数字为一个或多个数字字符
return
str
.
matches
(
"\\d+,\\d+(;\\d+,\\d+)*"
);
}
/**
* 校验字符串是否符合格式 2025-11
* @param str 待校验的字符串
* @return 符合格式返回true,否则返回false
*/
public
static
boolean
validateFormatYearMonth
(
String
str
)
{
// 如果字符串为空或null,则不符合格式
if
(
str
==
null
||
str
.
isEmpty
())
{
return
false
;
}
return
str
.
matches
(
"\\d{4}-\\d{2}"
);
}
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
View file @
878e5763
...
@@ -1201,6 +1201,52 @@ public class DateUtil {
...
@@ -1201,6 +1201,52 @@ public class DateUtil {
return
str
;
return
str
;
}
}
/**
* 获取指定月份
* @Author fxj
* @Date 2019-10-16
* @param yearMonth 格式 :LocalDateTime
* @param i
* @return
* @Description (获取指定日期后指定 ( i)个月的时间YYYYMM)
**/
public
static
String
getYearAndMonth
(
Date
yearMonth
,
int
i
){
String
str
=
""
;
if
(
yearMonth
!=
null
)
{
Calendar
c1
=
Calendar
.
getInstance
();
c1
.
setTime
(
yearMonth
);
c1
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
c1
.
set
(
Calendar
.
MONTH
,
c1
.
get
(
Calendar
.
MONTH
)
+
i
);
int
year
=
c1
.
get
(
Calendar
.
YEAR
);
int
month
=
c1
.
get
(
Calendar
.
MONTH
)
+
1
;
// Calendar month is 0-based, convert to 1-based
str
=
year
+
(
month
<
10
?
"0"
+
month
:
Integer
.
toString
(
month
));
}
return
str
;
}
/**
* 获取指定月份
* @Author fxj
* @Date 2019-10-16
* @param yearMonth 格式 :LocalDateTime
* @param i
* @return
* @Description (获取指定日期后指定 ( i)个月的时间YYYYMM)
**/
public
static
String
getYearAndMonth
(
Date
yearMonth
,
int
i
,
String
split
){
String
str
=
""
;
if
(
yearMonth
!=
null
)
{
Calendar
c1
=
Calendar
.
getInstance
();
c1
.
setTime
(
yearMonth
);
c1
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
c1
.
set
(
Calendar
.
MONTH
,
c1
.
get
(
Calendar
.
MONTH
)
+
i
);
int
year
=
c1
.
get
(
Calendar
.
YEAR
);
int
month
=
c1
.
get
(
Calendar
.
MONTH
)
+
1
;
// Calendar month is 0-based, convert to 1-based
str
=
year
+
split
+
(
month
<
10
?
"0"
+
month
:
Integer
.
toString
(
month
));
}
return
str
;
}
/**
/**
* @param i 加减年份
* @param i 加减年份
* @Description: 获取当前年月,对年月加减(yyyyMM)
* @Description: 获取当前年月,对年月加减(yyyyMM)
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SysBaseSetFundExportVo.java
0 → 100644
View file @
878e5763
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.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
/**
* @Author fxj
* @Date 2025/10/11
* @Description
* @Version 1.0
*/
@Data
public
class
SysBaseSetFundExportVo
implements
Serializable
{
/**
* 公积金户
*/
@ExcelAttribute
(
name
=
"公积金户"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"公积金户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"公积金户"
)
private
String
departName
;
/**
* 公积金类型 0.市直 1. 省直
*/
@ExcelAttribute
(
name
=
"公积金类型"
,
isNotEmpty
=
true
,
readConverterExp
=
"0=市直,1=省直"
)
@Schema
(
description
=
"公积金类型 0.市直 1. 省直"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"公积金类型"
)
private
String
fundPayType
;
/**
* 公积金缴纳地:安徽省-合肥市-肥东县
*/
@ExcelAttribute
(
name
=
"公积金缴纳地"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"公积金缴纳地"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"公积金缴纳地"
)
private
String
provinceStr
;
/**
* 0.在用1.终止2过期
*/
@ExcelAttribute
(
name
=
"状态"
,
readConverterExp
=
"0=在用,1=终止,2=过期"
)
@Schema
(
description
=
"状态"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"状态"
)
private
String
status
;
/**
* 适用周期
*/
@ExcelAttribute
(
name
=
"适用周期"
)
@Schema
(
description
=
"适用周期"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"适用周期"
)
private
String
applyStartDate
;
/**
* 执行月份
*/
@ExcelAttribute
(
name
=
"执行月份"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"执行月份"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"执行月份"
)
private
String
doMonth
;
/**
* 基数下限
*/
@ExcelAttribute
(
name
=
"基数下限"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"基数下限"
)
private
BigDecimal
lowerLimit
;
/**
* 基数上限
*/
@ExcelAttribute
(
name
=
"基数上限"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"基数上限"
)
private
BigDecimal
upperLimit
;
/**
* 单边小数点:1:四舍五入取整 2:元以下舍去 3:见角进元 4:保留两位小数 5:保留一位小数 6:见分进元
*/
@ExcelAttribute
(
name
=
"单边小数点"
,
isNotEmpty
=
true
,
readConverterExp
=
"1=四舍五入取整,2=元以下舍去,3=见角进元,4=保留两位小数,5=保留一位小数,6=见分进元"
)
@Schema
(
description
=
"单边小数点"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单边小数点"
)
private
String
fundPayPoint
;
/**
* 单位公积金比例,个人公积金比例:10,10;12,13
*/
@ExcelAttribute
(
name
=
"单位公积金比例,个人公积金比例"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"单位公积金比例,个人公积金比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位公积金比例,个人公积金比例"
)
private
String
housingFundPro
;
/**
* 是否可以补缴: 0:是,1:否
*/
@ExcelAttribute
(
name
=
"是否可补缴"
,
isNotEmpty
=
true
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"是否可补缴: 0:是,1:否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否可补缴"
)
private
String
canOverpay
;
/**
* 最大补缴期限:1:一月、2:二月 ...... 12:十二月
*/
@ExcelAttribute
(
name
=
"最大补缴期限"
,
readConverterExp
=
"1=一个月,2=二个月,3=三个月,4=四个月,5=五个月,6=六个月,7=七个月,8=八个月,9=九个月,10=十个月,11=十一个月,12=十二个月"
)
@Schema
(
description
=
"最大补缴期限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"最大补缴期限"
)
private
String
overpayNumber
;
/**
* 是否含起缴当月: 0:是,1:否
*/
@ExcelAttribute
(
name
=
"是否含起缴当月"
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"是否含起缴当月: 0:是,1:否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否含起缴当月"
)
private
String
haveThisMonth
;
/**
* 补缴基数:0:最新基数、1:当期基数
*/
@ExcelAttribute
(
name
=
"补缴基数"
,
readConverterExp
=
"0=最新基数,1=当期基数"
)
@Schema
(
description
=
"补缴基数"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"补缴基数"
)
private
String
insuranceIsLatestCardinality
;
/**
* 补缴政策
*/
@ExcelAttribute
(
name
=
"补缴政策"
)
@Schema
(
description
=
"补缴政策"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"补缴政策"
)
private
String
payPolicy
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SysBaseSetFundInsertVo.java
0 → 100644
View file @
878e5763
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.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
/**
* @Author fxj
* @Date 2025/11/14
* @Description
* @Version 1.0
*/
@Data
public
class
SysBaseSetFundInsertVo
extends
RowIndex
implements
Serializable
{
/**
* 公积金户
*/
@ExcelAttribute
(
name
=
"公积金户"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"公积金户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"公积金户"
)
private
String
departName
;
/**
* 公积金缴纳地:安徽省-合肥市-肥东县
*/
@ExcelAttribute
(
name
=
"公积金缴纳地"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"公积金缴纳地"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"公积金缴纳地"
)
private
String
provinceStr
;
/**
* 公积金类型 0.市直 1. 省直
*/
@ExcelAttribute
(
name
=
"公积金类型"
,
isNotEmpty
=
true
,
readConverterExp
=
"0=市直,1=省直"
)
@Schema
(
description
=
"公积金类型 0.市直 1. 省直"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"公积金类型"
)
private
String
fundPayType
;
/**
* 适用起始月份
*/
@ExcelAttribute
(
name
=
"适用起始月份"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"适用起始月份"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"适用起始月份"
)
private
String
applyStartDate
;
/**
* 执行月份
*/
@ExcelAttribute
(
name
=
"执行月份"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"执行月份"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"执行月份"
)
private
String
doMonth
;
/**
* 基数上限
*/
@ExcelAttribute
(
name
=
"基数上限"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"基数上限"
)
private
BigDecimal
upperLimit
;
/**
* 基数下限
*/
@ExcelAttribute
(
name
=
"基数下限"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"基数下限"
)
private
BigDecimal
lowerLimit
;
/**
* 单边小数点:1:四舍五入取整 2:元以下舍去 3:见角进元 4:保留两位小数 5:保留一位小数 6:见分进元
*/
@ExcelAttribute
(
name
=
"单边小数点"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
FUND_POINT_TYPE
,
isNotEmpty
=
true
,
readConverterExp
=
"1=四舍五入取整,2=元以下舍去,3=见角进元,4=保留两位小数,5=保留一位小数,6=见分进元"
)
@Schema
(
description
=
"单边小数点"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单边小数点"
)
private
String
fundPayPoint
;
/**
* 单位公积金比例,个人公积金比例:10,10;12,13
*/
@ExcelAttribute
(
name
=
"单位公积金比例,个人公积金比例"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"单位公积金比例,个人公积金比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位公积金比例,个人公积金比例"
)
private
String
housingFundPro
;
/**
* 是否可以补缴: 0:是,1:否
*/
@ExcelAttribute
(
name
=
"是否可补缴"
,
isNotEmpty
=
true
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"是否可补缴: 0:是,1:否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否可补缴"
)
private
String
canOverpay
;
/**
* 最大补缴期限:1:一月、2:二月 ...... 12:十二月
*/
@ExcelAttribute
(
name
=
"最大补缴期限"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
SOCIAL_OVERPAY_MOTH
,
readConverterExp
=
"1=一个月,2=二个月,3=三个月,4=四个月,5=五个月,6=六个月,7=七个月,8=八个月,9=九个月,10=十个月,11=十一个月,12=十二个月"
)
@Schema
(
description
=
"最大补缴期限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"最大补缴期限"
)
private
String
overpayNumber
;
/**
* 是否含起缴当月: 0:是,1:否
*/
@ExcelAttribute
(
name
=
"是否含起缴当月"
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"是否含起缴当月: 0:是,1:否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否含起缴当月"
)
private
String
haveThisMonth
;
/**
* 补缴基数:0:最新基数、1:当期基数
*/
@ExcelAttribute
(
name
=
"补缴基数"
,
readConverterExp
=
"0=最新基数,1=当期基数"
)
@Schema
(
description
=
"补缴基数"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"补缴基数"
)
private
String
insuranceIsLatestCardinality
;
/**
* 补缴政策
*/
@ExcelAttribute
(
name
=
"补缴政策"
)
@Schema
(
description
=
"补缴政策"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"补缴政策"
)
private
String
payPolicy
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SysBaseSetInfoSearchVo.java
0 → 100644
View file @
878e5763
/*
* 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
io.swagger.v3.oas.annotations.media.Schema
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* 基数设置表
*
* @author fxj
* @date 2025-11-04 14:50:51
*/
@Data
public
class
SysBaseSetInfoSearchVo
extends
SysBaseSetInfo
{
/**
* 多选导出或删除等操作
*/
@Schema
(
description
=
"选中ID,多个逗号分割"
)
private
String
ids
;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
/**
* @Author fxj
* 查询数据起
**/
@Schema
(
description
=
"查询limit 开始"
)
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SysBaseSetSocialExportVo.java
0 → 100644
View file @
878e5763
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.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
/**
* @Author fxj
* @Date 2025/10/11
* @Description
* @Version 1.0
*/
@Data
public
class
SysBaseSetSocialExportVo
implements
Serializable
{
/**
* 社保户
*/
@ExcelAttribute
(
name
=
"社保户"
)
@Schema
(
description
=
"社保户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保户"
)
private
String
departName
;
/**
* 社保缴纳地
*/
@ExcelAttribute
(
name
=
"社保缴纳地"
)
@Schema
(
description
=
"社保缴纳地"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保缴纳地"
)
private
String
province
;
/**
* 0.在用1.终止2过期
*/
@ExcelAttribute
(
name
=
"状态"
,
readConverterExp
=
"0=在用,1=终止,2=过期"
)
@Schema
(
description
=
"状态"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"状态"
)
private
String
status
;
/**
* 适用周期
*/
@ExcelAttribute
(
name
=
"适用周期"
)
@Schema
(
description
=
"适用周期"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"适用周期"
)
private
String
applyStartDate
;
/**
* 执行月份
*/
@ExcelAttribute
(
name
=
"执行月份"
)
@Schema
(
description
=
"执行月份"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"执行月份"
)
private
String
doMonth
;
/**
* 是否同一基数上下限: 0是;1否
*/
@ExcelAttribute
(
name
=
"是否同一基数上下限"
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"是否同一基数上下限: 0是;1否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否同一基数上下限"
)
private
String
isSameBase
;
/**
* 养老基数下限
*/
@ExcelAttribute
(
name
=
"养老基数下限"
)
@Schema
(
description
=
"养老基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"养老基数下限"
)
private
BigDecimal
lowerPersion
;
/**
* 养老基数上限
*/
@ExcelAttribute
(
name
=
"养老基数上限"
)
@Schema
(
description
=
"养老基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"养老基数上限"
)
private
BigDecimal
upPersion
;
/**
* 工伤基数下限
*/
@ExcelAttribute
(
name
=
"工伤基数下限"
)
@Schema
(
description
=
"工伤基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"工伤基数下限"
)
private
BigDecimal
lowerInjury
;
/**
* 工伤基数上限
*/
@ExcelAttribute
(
name
=
"工伤基数上限"
)
@Schema
(
description
=
"工伤基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"工伤基数上限"
)
private
BigDecimal
upInjury
;
/**
* 医疗基数下限
*/
@ExcelAttribute
(
name
=
"医疗基数下限"
)
@Schema
(
description
=
"医疗基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医疗基数下限"
)
private
BigDecimal
lowerMedical
;
/**
* 医疗基数上限
*/
@ExcelAttribute
(
name
=
"医疗基数上限"
)
@Schema
(
description
=
"医疗基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医疗基数上限"
)
private
BigDecimal
upMedical
;
/**
* 生育基数下限
*/
@ExcelAttribute
(
name
=
"生育基数下限"
)
@Schema
(
description
=
"生育基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"生育基数下限"
)
private
BigDecimal
lowerBirth
;
/**
* 生育基数上限
*/
@ExcelAttribute
(
name
=
"生育基数上限"
)
@Schema
(
description
=
"生育基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"生育基数上限"
)
private
BigDecimal
upBirth
;
/**
* 失业基数下限
*/
@ExcelAttribute
(
name
=
"失业基数下限"
)
@Schema
(
description
=
"失业基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"失业基数下限"
)
private
BigDecimal
lowerUnemployment
;
/**
* 失业基数上限
*/
@ExcelAttribute
(
name
=
"失业基数上限"
)
@Schema
(
description
=
"失业基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"失业基数上限"
)
private
BigDecimal
upUnemployment
;
/**
* 大病基数下限
*/
@ExcelAttribute
(
name
=
"大病基数下限"
)
@Schema
(
description
=
"大病基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"大病基数下限"
)
private
BigDecimal
lowerBig
;
/**
* 大病基数上限
*/
@ExcelAttribute
(
name
=
"大病基数上限"
,
isDouble
=
true
)
@Schema
(
description
=
"大病基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"大病基数上限"
)
private
BigDecimal
upBig
;
/**
* 是否大病: 0收取;1不收取
*/
@ExcelAttribute
(
name
=
"大病是否收费"
,
readConverterExp
=
"0=收取,1=不收取"
)
@Schema
(
description
=
"大病是否收费: 0收取;1不收取"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"大病是否收费"
)
private
String
isIllness
;
/**
* 大病缴纳周期:收取方式 0.按年 1.按月
*/
@ExcelAttribute
(
name
=
"大病缴纳周期"
,
readConverterExp
=
"0=按年,1=按月"
)
@Schema
(
description
=
"大病缴纳周期:收取方式 0.按年 1.按月"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"大病缴纳周期"
)
private
String
collectType
;
/**
* 收费模式: 0=立即收费,1=次年起收
*/
@ExcelAttribute
(
name
=
"收费模式"
,
readConverterExp
=
"0=立即收费,1=次年起收"
)
@Schema
(
description
=
"收费模式: 0=立即收费,1=次年起收"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"收费模式"
)
private
String
isChargePersonal
;
/**
* 缴纳月份:周期为年--收取月份 1到12月份
*/
@ExcelAttribute
(
name
=
"缴纳月份"
,
readConverterExp
=
"1=一月,2=二月,3=三月,4=四月,5=五月,6=六月,7=七月,8=八月,9=九月,10=十月,11=十一月,12=十二月"
)
@Schema
(
description
=
"缴纳月份:周期为年--收取月份 1到12月份"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"缴纳月份"
)
private
String
collectMoth
;
/**
* 缴纳方式:周期为月--取值方式 0.按定值1按比例
*/
@ExcelAttribute
(
name
=
"缴纳方式"
,
readConverterExp
=
"0=按定值,1=按比例"
)
@Schema
(
description
=
"缴纳方式"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"缴纳方式"
)
private
String
valueType
;
/**
* 单位大病金额(元/人)--按定值
*/
@ExcelAttribute
(
name
=
"单位大病金额"
)
@Schema
(
description
=
"单位大病金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位大病金额"
)
private
BigDecimal
chargeCompany
;
/**
* 个人大病金额(元/人)--按定值
*/
@ExcelAttribute
(
name
=
"个人大病金额"
)
@Schema
(
description
=
"个人大病金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人大病金额"
)
private
BigDecimal
chargePersonal
;
/**
* 单位医疗缴纳比例
*/
@ExcelAttribute
(
name
=
"单位医疗比例"
)
@Schema
(
description
=
"单位医疗比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位医疗比例"
)
private
BigDecimal
unitMedicalPro
;
/**
* 个人医疗比例
*/
@ExcelAttribute
(
name
=
"个人医疗比例"
)
@Schema
(
description
=
"个人医疗比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人医疗比例"
)
private
BigDecimal
personalMedicalPro
;
/**
* 单位生育缴纳比例
*/
@ExcelAttribute
(
name
=
"单位生育比例"
)
@Schema
(
description
=
"单位生育比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位生育比例"
)
private
BigDecimal
unitBirthPro
;
/**
* 单位养老缴纳比例
*/
@ExcelAttribute
(
name
=
"单位养老比例"
)
@Schema
(
description
=
"单位养老比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位养老比例"
)
private
BigDecimal
unitPersionPro
;
/**
* 个人养老比例
*/
@ExcelAttribute
(
name
=
"个人养老比例"
)
@Schema
(
description
=
"个人养老比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人养老比例"
)
private
BigDecimal
personalPersionPro
;
/**
* 单位工伤缴纳比例
*/
@ExcelAttribute
(
name
=
"单位工伤比例"
)
@Schema
(
description
=
"单位工伤比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位工伤比例"
)
private
BigDecimal
unitInjuryPro
;
/**
* 单位失业缴纳比例
*/
@ExcelAttribute
(
name
=
"单位失业比例"
)
@Schema
(
description
=
"单位失业比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位失业比例"
)
private
BigDecimal
unitUnemploymentPro
;
/**
* 个人失业比例
*/
@ExcelAttribute
(
name
=
"个人失业比例"
)
@Schema
(
description
=
"个人失业比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人失业比例"
)
private
BigDecimal
personalUnemploymentPro
;
/**
* 单位大病比例
*/
@ExcelAttribute
(
name
=
"单位大病比例"
)
@Schema
(
description
=
"单位大病比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位大病比例"
)
private
BigDecimal
payCompanyPro
;
/**
* 个人大病比例
*/
@ExcelAttribute
(
name
=
"个人大病比例"
)
@Schema
(
description
=
"个人大病比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人大病比例"
)
private
BigDecimal
payPersonalPro
;
/**
* 是否可以补缴: 0:是,1:否
*/
@ExcelAttribute
(
name
=
"是否可以补缴"
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"是否可以补缴: 0:是,1:否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否可以补缴"
)
private
String
canOverpay
;
/**
* 单位比例合计
*/
@ExcelAttribute
(
name
=
"单位比例合计"
)
@Schema
(
description
=
"单位比例合计"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位比例合计"
)
private
BigDecimal
unitProSum
;
/**
* 个人比例合计
*/
@ExcelAttribute
(
name
=
"个人比例合计"
)
@Schema
(
description
=
"个人比例合计"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人比例合计"
)
private
BigDecimal
personalProSum
;
/**
* 补缴险种-整合字段
*/
@ExcelAttribute
(
name
=
"补缴险种"
)
@Schema
(
description
=
"补缴险种"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"补缴险种"
)
private
String
insurancePension
;
/**
* 最大补缴期限
*/
@ExcelAttribute
(
name
=
"最大补缴期限"
,
readConverterExp
=
"1=一个月,2=二个月,3=三个月,4=四个月,5=五个月,6=六个月,7=七个月,8=八个月,9=九个月,10=十个月,11=十一个月,12=十二个月"
)
@Schema
(
description
=
"最大补缴期限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"最大补缴期限"
)
private
String
overpayNumber
;
/**
* 是否含起缴当月: 0:是,1:否
*/
@ExcelAttribute
(
name
=
"是否含起缴当月"
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"是否含起缴当月: 0:是,1:否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否含起缴当月"
)
private
String
haveThisMonth
;
/**
* 补缴险种-补缴是否采用最新基数0是1否
*/
@ExcelAttribute
(
name
=
"补缴基数"
,
readConverterExp
=
"0=最新基数,1=当期基数"
)
@Schema
(
description
=
"补缴基数"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"补缴基数"
)
private
String
insuranceIsLatestCardinality
;
/**
* 补缴政策(社保或公积金)
*/
@ExcelAttribute
(
name
=
"补缴政策"
)
@Schema
(
description
=
"补缴政策"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"补缴政策"
)
private
String
payPolicy
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SysBaseSetSocialInsertVo.java
0 → 100644
View file @
878e5763
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.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @Author fxj
* @Date 2025/11/04
* @Description
* @Version 1.0
*/
@Data
public
class
SysBaseSetSocialInsertVo
extends
RowIndex
implements
Serializable
{
/**
* 社保户
*/
@ExcelAttribute
(
name
=
"社保户"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"社保户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保户"
)
private
String
departName
;
/**
* 社保缴纳地
*/
@ExcelAttribute
(
name
=
"社保缴纳地"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"社保缴纳地"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保缴纳地"
)
private
String
provinceStr
;
/**
* 适用起始月份
*/
@ExcelAttribute
(
name
=
"适用起始月份"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"适用起始月份"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"适用起始月份"
)
private
String
applyStartDate
;
/**
* 执行月份
*/
@ExcelAttribute
(
name
=
"执行月份"
,
isNotEmpty
=
true
)
@Schema
(
description
=
"执行月份"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"执行月份"
)
private
String
doMonth
;
/**
* 是否同一基数上下限: 0是;1否
*/
@ExcelAttribute
(
name
=
"是否同一基数上下限"
,
isNotEmpty
=
true
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"是否同一基数上下限: 0是;1否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否同一基数上下限"
)
private
String
isSameBase
;
/**
* 养老基数上限
*/
@ExcelAttribute
(
name
=
"养老基数上限"
,
isNotEmpty
=
true
,
isDouble
=
true
)
@Schema
(
description
=
"养老基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"养老基数上限"
)
private
BigDecimal
upPersion
;
/**
* 养老基数下限
*/
@ExcelAttribute
(
name
=
"养老基数下限"
,
isNotEmpty
=
true
,
isDouble
=
true
)
@Schema
(
description
=
"养老基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"养老基数下限"
)
private
BigDecimal
lowerPersion
;
/**
* 工伤基数上限
*/
@ExcelAttribute
(
name
=
"工伤基数上限"
,
isDouble
=
true
)
@Schema
(
description
=
"工伤基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"工伤基数上限"
)
private
BigDecimal
upInjury
;
/**
* 工伤基数下限
*/
@ExcelAttribute
(
name
=
"工伤基数下限"
,
isDouble
=
true
)
@Schema
(
description
=
"工伤基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"工伤基数下限"
)
private
BigDecimal
lowerInjury
;
/**
* 医疗基数上限
*/
@ExcelAttribute
(
name
=
"医疗基数上限"
,
isDouble
=
true
)
@Schema
(
description
=
"医疗基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医疗基数上限"
)
private
BigDecimal
upMedical
;
/**
* 医疗基数下限
*/
@ExcelAttribute
(
name
=
"医疗基数下限"
,
isDouble
=
true
)
@Schema
(
description
=
"医疗基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医疗基数下限"
)
private
BigDecimal
lowerMedical
;
/**
* 生育基数上限
*/
@ExcelAttribute
(
name
=
"生育基数上限"
,
isDouble
=
true
)
@Schema
(
description
=
"生育基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"生育基数上限"
)
private
BigDecimal
upBirth
;
/**
* 生育基数下限
*/
@ExcelAttribute
(
name
=
"生育基数下限"
,
isDouble
=
true
)
@Schema
(
description
=
"生育基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"生育基数下限"
)
private
BigDecimal
lowerBirth
;
/**
* 失业基数上限
*/
@ExcelAttribute
(
name
=
"失业基数上限"
,
isDouble
=
true
)
@Schema
(
description
=
"失业基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"失业基数上限"
)
private
BigDecimal
upUnemployment
;
/**
* 失业基数下限
*/
@ExcelAttribute
(
name
=
"失业基数下限"
,
isDouble
=
true
)
@Schema
(
description
=
"失业基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"失业基数下限"
)
private
BigDecimal
lowerUnemployment
;
/**
* 大病基数上限
*/
@ExcelAttribute
(
name
=
"大病基数上限"
,
isDouble
=
true
)
@Schema
(
description
=
"大病基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"大病基数上限"
)
private
BigDecimal
upBig
;
/**
* 大病基数下限
*/
@ExcelAttribute
(
name
=
"大病基数下限"
,
isDouble
=
true
)
@Schema
(
description
=
"大病基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"大病基数下限"
)
private
BigDecimal
lowerBig
;
/**
* 大病是否收费: 0收取;1不收取
*/
@ExcelAttribute
(
name
=
"大病是否收费"
,
isNotEmpty
=
true
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"大病是否收费: 0是;1否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"大病是否收费"
)
private
String
isIllness
;
/**
* 大病缴纳周期:收取方式 0.按年 1.按月
*/
@ExcelAttribute
(
name
=
"大病缴纳周期"
,
readConverterExp
=
"0=按年,1=按月"
)
@Schema
(
description
=
"大病缴纳周期:收取方式 0.按年 1.按月"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"大病缴纳周期"
)
private
String
collectType
;
/**
* 收费模式: 0.立即收费 1.次年起收
*/
@ExcelAttribute
(
name
=
"收费模式"
,
readConverterExp
=
"0=立即收费,1=次年起收"
)
@Schema
(
description
=
"收费模式: 0.立即收费 1.次年起收"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"收费模式"
)
private
String
collectTypeSub
;
/**
* 缴纳月份:周期为年--收取月份 1到12月份
*/
@ExcelAttribute
(
name
=
"缴纳月份"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
SOCIAL_MONTH_TYPE
,
readConverterExp
=
"1=一月,2=二月,3=三月,4=四月,5=五月,6=六月,7=七月,8=八月,9=九月,10=十月,11=十一月,12=十二月"
)
@Schema
(
description
=
"缴纳月份:周期为年--收取月份 1到12月份"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"缴纳月份"
)
private
String
collectMoth
;
/**
* 缴纳方式:周期为月--取值方式 0.按定值1按比例
*/
@ExcelAttribute
(
name
=
"缴纳方式"
,
readConverterExp
=
"0=按定值,1=按比例"
)
@Schema
(
description
=
"缴纳方式:周期为月--取值方式 0.按定值1比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"缴纳方式"
)
private
String
valueType
;
/**
* 单位大病金额
*/
@ExcelAttribute
(
name
=
"单位大病金额"
,
isDouble
=
true
)
@Schema
(
description
=
"单位大病金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位大病金额"
)
private
BigDecimal
chargeCompany
;
/**
* 个人大病金额
*/
@ExcelAttribute
(
name
=
"个人大病金额"
,
isDouble
=
true
)
@Schema
(
description
=
"个人大病金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人大病金额"
)
private
BigDecimal
chargePersonal
;
/**
* 单位医疗缴纳比例
*/
@ExcelAttribute
(
name
=
"单位医疗比例"
,
isNotEmpty
=
true
,
isDouble
=
true
)
@Schema
(
description
=
"单位医疗比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位医疗比例"
)
private
BigDecimal
unitMedicalPro
;
/**
* 个人医疗比例
*/
@ExcelAttribute
(
name
=
"个人医疗比例"
,
isNotEmpty
=
true
,
isDouble
=
true
)
@Schema
(
description
=
"个人医疗比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人医疗比例"
)
private
BigDecimal
personalMedicalPro
;
/**
* 单位生育缴纳比例
*/
@ExcelAttribute
(
name
=
"单位生育比例"
,
isNotEmpty
=
true
,
isDouble
=
true
)
@Schema
(
description
=
"单位生育比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位生育比例"
)
private
BigDecimal
unitBirthPro
;
/**
* 单位养老缴纳比例
*/
@ExcelAttribute
(
name
=
"单位养老比例"
,
isNotEmpty
=
true
,
isDouble
=
true
)
@Schema
(
description
=
"单位养老比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位养老比例"
)
private
BigDecimal
unitPersionPro
;
/**
* 个人养老比例
*/
@ExcelAttribute
(
name
=
"个人养老比例"
,
isNotEmpty
=
true
,
isDouble
=
true
)
@Schema
(
description
=
"个人养老比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人养老比例"
)
private
BigDecimal
personalPersionPro
;
/**
* 单位工伤缴纳比例
*/
@ExcelAttribute
(
name
=
"单位工伤比例"
,
isNotEmpty
=
true
,
isDouble
=
true
)
@Schema
(
description
=
"单位工伤比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位工伤比例"
)
private
BigDecimal
unitInjuryPro
;
/**
* 单位失业缴纳比例
*/
@ExcelAttribute
(
name
=
"单位失业比例"
,
isNotEmpty
=
true
,
isDouble
=
true
)
@Schema
(
description
=
"单位失业比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位失业比例"
)
private
BigDecimal
unitUnemploymentPro
;
/**
* 个人失业比例
*/
@ExcelAttribute
(
name
=
"个人失业比例"
,
isNotEmpty
=
true
,
isDouble
=
true
)
@Schema
(
description
=
"个人失业比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人失业比例"
)
private
BigDecimal
personalUnemploymentPro
;
/**
* 单位大病比例
*/
@ExcelAttribute
(
name
=
"单位大病比例"
,
isDouble
=
true
)
@Schema
(
description
=
"单位大病比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位大病比例"
)
private
BigDecimal
payCompanyPro
;
/**
* 个人大病比例
*/
@ExcelAttribute
(
name
=
"个人大病比例"
,
isDouble
=
true
)
@Schema
(
description
=
"个人大病比例"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人大病比例"
)
private
BigDecimal
payPersonalPro
;
/**
* 是否可补缴: 0:是,1:否
*/
@ExcelAttribute
(
name
=
"是否可补缴"
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"是否可补缴: 0:是,1:否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否可补缴"
)
private
String
canOverpay
;
/**
* 补缴险种 0是1否 养老、医疗、失业、工伤、生育、大病
*/
@ExcelAttribute
(
name
=
"补缴险种"
)
@Schema
(
description
=
"补缴险种"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"补缴险种"
)
private
String
insurancePension
;
/**
* 最大补缴期限 1:一月、2:二月 ...... 12:十二月
*/
@ExcelAttribute
(
name
=
"最大补缴期限"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
SOCIAL_OVERPAY_MOTH
,
readConverterExp
=
"1=一个月,2=二个月,3=三个月,4=四个月,5=五个月,6=六个月,7=七个月,8=八个月,9=九个月,10=十个月,11=十一个月,12=十二个月"
)
@Schema
(
description
=
"最大补缴期限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"最大补缴期限"
)
private
String
overpayNumber
;
/**
* 是否含起缴当月: 0:是,1:否
*/
@ExcelAttribute
(
name
=
"是否含起缴当月"
,
readConverterExp
=
"0=是,1=否"
)
@Schema
(
description
=
"是否含起缴当月: 0:是,1:否"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否含起缴当月"
)
private
String
haveThisMonth
;
/**
* 补缴基数:0最新基数1当期基数
*/
@ExcelAttribute
(
name
=
"补缴基数"
,
readConverterExp
=
"0=最新基数,1=当期基数"
)
@Schema
(
description
=
"补缴基数"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"补缴基数"
)
private
String
insuranceIsLatestCardinality
;
/**
* 补缴政策
*/
@ExcelAttribute
(
name
=
"补缴政策"
)
@Schema
(
description
=
"补缴政策"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"补缴政策"
)
private
String
payPolicy
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/SysBaseSetInfoController.java
View file @
878e5763
...
@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.bean.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.bean.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
...
@@ -30,13 +31,17 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
...
@@ -30,13 +31,17 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion
;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysBaseSetInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysBaseSetInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysPayProportionService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysPayProportionService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetInfoVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.List
;
...
@@ -194,4 +199,53 @@ public class SysBaseSetInfoController {
...
@@ -194,4 +199,53 @@ public class SysBaseSetInfoController {
BeanCopyUtils
.
copyProperties
(
baseSetInfo
,
sysBaseSetInfoVo
);
BeanCopyUtils
.
copyProperties
(
baseSetInfo
,
sysBaseSetInfoVo
);
return
sysBaseSetInfoVo
;
return
sysBaseSetInfoVo
;
}
}
/**
* 基数设置表 批量导入社保基数
*
* @author fxj
* @Date 2025-11-04 14:50:51
**/
@SneakyThrows
@Operation
(
description
=
"批量新增社保基数设置表"
)
@SysLog
(
"批量新增社保基数设置表"
)
@PostMapping
(
"/importListAddSocial"
)
public
R
<
List
<
ErrorMessage
>>
importListAddSocial
(
@RequestBody
MultipartFile
file
){
return
sysBaseSetInfoService
.
importSocialDiy
(
file
.
getInputStream
());
}
/**
* 基数设置表 批量导出社保基数
* @author fxj
* @Date 2025-11-04 14:50:51
**/
@Operation
(
description
=
"导出社保基数设置表"
)
@PostMapping
(
"/exportSocial"
)
public
void
exportSocial
(
HttpServletResponse
response
,
@RequestBody
SysBaseSetInfo
searchVo
)
{
sysBaseSetInfoService
.
listSocialExport
(
response
,
searchVo
);
}
/**
* 基数设置表 批量导入公积金基数
*
* @author fxj
* @Date 2025-11-04 14:50:51
**/
@SneakyThrows
@Operation
(
description
=
"批量新增公积金基数设置表"
)
@SysLog
(
"批量新增公积金基数设置表"
)
@PostMapping
(
"/importListAddFund"
)
public
R
<
List
<
ErrorMessage
>>
importListAddFund
(
@RequestBody
MultipartFile
file
){
return
sysBaseSetInfoService
.
importFundDiy
(
file
.
getInputStream
());
}
/**
* 基数设置表 批量导出公积金基数
* @author fxj
* @Date 2025-11-04 14:50:51
**/
@Operation
(
description
=
"导出公积金基数设置表"
)
@PostMapping
(
"/exportFund"
)
public
void
exportFund
(
HttpServletResponse
response
,
@RequestBody
SysBaseSetInfo
searchVo
)
{
sysBaseSetInfoService
.
listFundExport
(
response
,
searchVo
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/SysBaseSetInfoMapper.java
View file @
878e5763
...
@@ -21,6 +21,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -21,6 +21,8 @@ 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.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetFundExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetSocialExportVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -42,6 +44,10 @@ public interface SysBaseSetInfoMapper extends BaseMapper<SysBaseSetInfo> {
...
@@ -42,6 +44,10 @@ public interface SysBaseSetInfoMapper extends BaseMapper<SysBaseSetInfo> {
*/
*/
IPage
<
SysBaseSetInfo
>
getSysBaseSetInfoPage
(
Page
<
SysBaseSetInfo
>
page
,
@Param
(
"sysBaseSetInfo"
)
SysBaseSetInfo
sysBaseSetInfo
);
IPage
<
SysBaseSetInfo
>
getSysBaseSetInfoPage
(
Page
<
SysBaseSetInfo
>
page
,
@Param
(
"sysBaseSetInfo"
)
SysBaseSetInfo
sysBaseSetInfo
);
List
<
SysBaseSetSocialExportVo
>
noPageSocialDiy
(
@Param
(
"sysBaseSetInfo"
)
SysBaseSetInfo
sysBaseSetInfo
);
List
<
SysBaseSetFundExportVo
>
noPageFundDiy
(
@Param
(
"sysBaseSetInfo"
)
SysBaseSetInfo
sysBaseSetInfo
);
List
<
SysBaseSetInfo
>
getAllByEntity
(
@Param
(
"sysBaseSetInfo"
)
SysBaseSetInfo
sysBaseSetInfo
);
List
<
SysBaseSetInfo
>
getAllByEntity
(
@Param
(
"sysBaseSetInfo"
)
SysBaseSetInfo
sysBaseSetInfo
);
/**
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/SysHouseHoldInfoMapper.java
View file @
878e5763
...
@@ -80,4 +80,5 @@ public interface SysHouseHoldInfoMapper extends BaseMapper<SysHouseHoldInfo> {
...
@@ -80,4 +80,5 @@ public interface SysHouseHoldInfoMapper extends BaseMapper<SysHouseHoldInfo> {
**/
**/
List
<
SysHouseHoldInfo
>
getHouseInfoAutoDoc
();
List
<
SysHouseHoldInfo
>
getHouseInfoAutoDoc
();
List
<
SysHouseHoldInfo
>
getSysHouseHoldNoPage
(
@Param
(
"sysHouseHoldInfo"
)
SysHouseHoldInfo
enity
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/SysBaseSetInfoService.java
View file @
878e5763
...
@@ -20,9 +20,14 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
...
@@ -20,9 +20,14 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
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.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
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.vo.SysBaseSetInfoSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -68,4 +73,14 @@ public interface SysBaseSetInfoService extends IService<SysBaseSetInfo> {
...
@@ -68,4 +73,14 @@ public interface SysBaseSetInfoService extends IService<SysBaseSetInfo> {
Map
<
String
,
SysBaseSetInfo
>
getSysBaseSetInfoMap
(
String
baseType
);
Map
<
String
,
SysBaseSetInfo
>
getSysBaseSetInfoMap
(
String
baseType
);
R
<
Boolean
>
updateByIdAsso
(
String
id
,
int
status
);
R
<
Boolean
>
updateByIdAsso
(
String
id
,
int
status
);
R
<
List
<
ErrorMessage
>>
importSocialDiy
(
InputStream
inputStream
);
void
listSocialExport
(
HttpServletResponse
response
,
SysBaseSetInfo
searchVo
);
R
<
List
<
ErrorMessage
>>
importFundDiy
(
InputStream
inputStream
);
void
listFundExport
(
HttpServletResponse
response
,
SysBaseSetInfo
searchVo
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
View file @
878e5763
...
@@ -16,15 +16,27 @@
...
@@ -16,15 +16,27 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.admin.api.entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
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.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
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.SysHouseHoldInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo
;
...
@@ -35,13 +47,20 @@ import com.yifu.cloud.plus.v1.yifu.social.service.SysBaseSetInfoService;
...
@@ -35,13 +47,20 @@ import com.yifu.cloud.plus.v1.yifu.social.service.SysBaseSetInfoService;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysPayProportionService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysPayProportionService
;
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.service.TSocialLogService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
javax.servlet.ServletOutputStream
;
import
java.util.HashMap
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.io.IOException
;
import
java.util.Map
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.*
;
/**
/**
* 基数设置表
* 基数设置表
...
@@ -49,6 +68,7 @@ import java.util.Map;
...
@@ -49,6 +68,7 @@ import java.util.Map;
* @author hgw
* @author hgw
* @date 2022-07-11 18:21:23
* @date 2022-07-11 18:21:23
*/
*/
@Log4j2
@RequiredArgsConstructor
@RequiredArgsConstructor
@Service
@Service
public
class
SysBaseSetInfoServiceImpl
extends
ServiceImpl
<
SysBaseSetInfoMapper
,
SysBaseSetInfo
>
implements
SysBaseSetInfoService
{
public
class
SysBaseSetInfoServiceImpl
extends
ServiceImpl
<
SysBaseSetInfoMapper
,
SysBaseSetInfo
>
implements
SysBaseSetInfoService
{
...
@@ -58,6 +78,9 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
...
@@ -58,6 +78,9 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
private
final
SysPayProportionService
sysPayProportionService
;
private
final
SysPayProportionService
sysPayProportionService
;
private
final
SysHouseHoldInfoMapper
sysHouseHoldInfoMapper
;
private
final
SysHouseHoldInfoMapper
sysHouseHoldInfoMapper
;
@Autowired
private
UpmsDaprUtils
upmsDaprUtils
;
/**
/**
* 基数设置表简单分页查询
* 基数设置表简单分页查询
*
*
...
@@ -243,17 +266,50 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
...
@@ -243,17 +266,50 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
// map的键
// map的键
String
key
;
String
key
;
for
(
SysBaseSetInfo
setInfo
:
sysBaseSetInfoList
)
{
for
(
SysBaseSetInfo
setInfo
:
sysBaseSetInfoList
)
{
key
=
setInfo
.
getDepartId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
setInfo
.
getProvince
()
/*
key = setInfo.getDepartId() + CommonConstants.DOWN_LINE_STRING + setInfo.getProvince()
+ CommonConstants.DOWN_LINE_STRING + setInfo.getCity();
+ CommonConstants.DOWN_LINE_STRING + setInfo.getCity();
if (setInfo.getTown() != null) {
if (setInfo.getTown() != null) {
key += CommonConstants.DOWN_LINE_STRING + setInfo.getTown();
key += CommonConstants.DOWN_LINE_STRING + setInfo.getTown();
}
}
*/
setInfoMap
.
put
(
key
,
setInfo
);
setInfoMap
.
put
(
setInfo
.
getDepartName
()
,
setInfo
);
}
}
}
}
return
setInfoMap
;
return
setInfoMap
;
}
}
/**
* @Author fxj
* @Description 获取社保或公积金的户信息
* @Date 17:37 2025/11/4
* @Param
* @return
**/
private
Map
<
String
,
SysHouseHoldInfo
>
getHouseHoldMap
(
String
baseType
)
{
// 基数配置
SysHouseHoldInfo
enity
=
new
SysHouseHoldInfo
();
enity
.
setType
(
baseType
);
enity
.
setDelFlag
(
CommonConstants
.
STATUS_NORMAL
);
// 查询符合条件的基数列表
List
<
SysHouseHoldInfo
>
list
=
sysHouseHoldInfoMapper
.
getSysHouseHoldNoPage
(
enity
);
// 返回的map
Map
<
String
,
SysHouseHoldInfo
>
holdMap
=
new
HashMap
<>();
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
// map的键
String
key
;
for
(
SysHouseHoldInfo
vo
:
list
)
{
/*key = vo.getName() + CommonConstants.DOWN_LINE_STRING + vo.getProvince();
if (vo.getCity() != null){
key += CommonConstants.DOWN_LINE_STRING + vo.getCity();
}
if (vo.getTown() != null) {
key += CommonConstants.DOWN_LINE_STRING + vo.getTown();
}*/
holdMap
.
put
(
vo
.
getName
(),
vo
);
}
}
return
holdMap
;
}
@Override
@Override
public
R
<
Boolean
>
updateByIdAsso
(
String
id
,
int
status
)
{
public
R
<
Boolean
>
updateByIdAsso
(
String
id
,
int
status
)
{
SysBaseSetInfo
baseSetInfo
=
baseMapper
.
selectById
(
id
);
SysBaseSetInfo
baseSetInfo
=
baseMapper
.
selectById
(
id
);
...
@@ -274,4 +330,902 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
...
@@ -274,4 +330,902 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
);
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
);
}
}
}
}
/**
* 基数设置表批量导出社保基数
* @param searchVo 基数设置表
* @return
*/
@Override
public
void
listSocialExport
(
HttpServletResponse
response
,
SysBaseSetInfo
searchVo
){
String
fileName
=
"基数设置表批量导出社保基数"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
SysBaseSetSocialExportVo
>
list
=
baseMapper
.
noPageSocialDiy
(
searchVo
);;
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
SysBaseSetSocialExportVo
.
class
).
build
();
int
index
=
0
;
if
(
null
!=
list
&&
list
.
size
()
>
CommonConstants
.
ZERO_INT
){
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
SysBaseSetSocialExportVo
>
util
=
new
ExcelUtil
<>(
SysBaseSetSocialExportVo
.
class
);
for
(
SysBaseSetSocialExportVo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"基数设置表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"基数设置表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
/**
* 基数设置表批量导出社保基数
* @param searchVo 基数设置表
* @return
*/
@Override
public
void
listFundExport
(
HttpServletResponse
response
,
SysBaseSetInfo
searchVo
){
String
fileName
=
"基数设置表批量导出公积金基数"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
SysBaseSetFundExportVo
>
list
=
baseMapper
.
noPageFundDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
SysBaseSetFundExportVo
.
class
).
build
();
int
index
=
0
;
if
(
null
!=
list
&&
list
.
size
()
>
CommonConstants
.
ZERO_INT
){
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
SysBaseSetFundExportVo
>
util
=
new
ExcelUtil
<>(
SysBaseSetFundExportVo
.
class
);
for
(
SysBaseSetFundExportVo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"基数设置表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"基数设置表"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
public
List
<
SysBaseSetInfo
>
noPageDiy
(
SysBaseSetInfoSearchVo
searchVo
)
{
LambdaQueryWrapper
<
SysBaseSetInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
SysBaseSetInfo:
:
getId
,
idList
);
}
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
(
SysBaseSetInfoSearchVo
searchVo
)
{
LambdaQueryWrapper
<
SysBaseSetInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
SysBaseSetInfo:
:
getId
,
idList
);
}
return
baseMapper
.
selectCount
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
SysBaseSetInfoSearchVo
entity
){
LambdaQueryWrapper
<
SysBaseSetInfo
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
SysBaseSetInfo:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
SysBaseSetInfo:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
())){
wrapper
.
eq
(
SysBaseSetInfo:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
}
@Override
public
R
<
List
<
ErrorMessage
>>
importFundDiy
(
InputStream
inputStream
)
{
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
SysBaseSetFundInsertVo
>
util1
=
new
ExcelUtil
<>(
SysBaseSetFundInsertVo
.
class
);;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
EasyExcel
.
read
(
inputStream
,
SysBaseSetFundInsertVo
.
class
,
new
ReadListener
<
SysBaseSetFundInsertVo
>()
{
/**
* 单次缓存的数据量
*/
public
static
final
int
BATCH_COUNT
=
CommonConstants
.
BATCH_COUNT
;
/**
*临时存储
*/
private
List
<
SysBaseSetFundInsertVo
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
@Override
public
void
invoke
(
SysBaseSetFundInsertVo
data
,
AnalysisContext
context
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
)){
errorMessageList
.
add
(
errorMessage
);
}
else
{
cachedDataList
.
add
(
data
);
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
saveData
();
// 存储完成清理 list
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
}
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
}
/**
* 加上存储数据库
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importSysBaseSetFund
(
cachedDataList
,
errorMessageList
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
){
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
return
R
.
ok
(
errorMessageList
);
}
@Override
public
R
<
List
<
ErrorMessage
>>
importSocialDiy
(
InputStream
inputStream
)
{
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
SysBaseSetSocialInsertVo
>
util1
=
new
ExcelUtil
<>(
SysBaseSetSocialInsertVo
.
class
);;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try
{
EasyExcel
.
read
(
inputStream
,
SysBaseSetSocialInsertVo
.
class
,
new
ReadListener
<
SysBaseSetSocialInsertVo
>()
{
/**
* 单次缓存的数据量
*/
public
static
final
int
BATCH_COUNT
=
CommonConstants
.
BATCH_COUNT
;
/**
*临时存储
*/
private
List
<
SysBaseSetSocialInsertVo
>
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
@Override
public
void
invoke
(
SysBaseSetSocialInsertVo
data
,
AnalysisContext
context
)
{
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
)){
errorMessageList
.
add
(
errorMessage
);
}
else
{
cachedDataList
.
add
(
data
);
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
saveData
();
// 存储完成清理 list
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
}
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
saveData
();
}
/**
* 加上存储数据库
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
importSysBaseSetSocial
(
cachedDataList
,
errorMessageList
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
}
catch
(
Exception
e
){
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
return
R
.
ok
(
errorMessageList
);
}
private
void
importSysBaseSetSocial
(
List
<
SysBaseSetSocialInsertVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 区域数据初始化
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
areaMap2
=
new
HashMap
<>();
R
<
AreaVo
>
areaListR
=
upmsDaprUtils
.
getAreaListR
();
if
(
Common
.
isNotNull
(
areaListR
))
{
AreaVo
areaList
=
areaListR
.
getData
();
if
(
null
!=
areaList
&&
!
areaList
.
getSysAreaList
().
isEmpty
())
{
for
(
SysArea
area
:
areaList
.
getSysAreaList
())
{
areaMap
.
put
(
Integer
.
toString
(
area
.
getId
()),
area
.
getAreaName
());
areaMap2
.
put
(
area
.
getAreaName
()
+
CommonConstants
.
DOWN_LINE_STRING
+
(
null
==
area
.
getParentId
()
?
"null"
:
(
0
==
area
.
getParentId
()
?
"null"
:
Integer
.
toString
(
area
.
getParentId
()))),
area
.
getId
());
}
}
}
// 个性化校验逻辑
ErrorMessage
errorMsg
;
//获取已有数据有效使用周期含当前时间的数据
Map
<
String
,
SysBaseSetInfo
>
socialSetInfoMap
=
this
.
getSysBaseSetInfoMap
(
CommonConstants
.
ZERO_STRING
);
//获取已有数据有效状态的户配置
Map
<
String
,
SysHouseHoldInfo
>
holdMap
=
this
.
getHouseHoldMap
(
CommonConstants
.
ZERO_STRING
);
// 执行数据插入操作 组装
SysBaseSetInfo
temp
=
null
;
//社保缴纳地
String
[]
areaArray
=
null
;
//社保插入数据
SysBaseSetSocialInsertVo
excel
=
null
;
SysBaseSetInfo
infoVo
=
null
;
//起始月月份
Date
dateFormat
=
null
;
//执行月月份
Date
dateUse
=
null
;
SysHouseHoldInfo
hold
=
null
;
//补缴险种
String
insurancePension
=
null
;
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
infoVo
=
new
SysBaseSetInfo
();
excel
=
excelVOList
.
get
(
i
);
hold
=
holdMap
.
get
(
excel
.
getDepartName
());
if
(
Common
.
isEmpty
(
hold
)){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"社保户”"
+
excel
.
getDepartName
()+
"“在户配置中未找到,请先到“社保公积金-配置中心-户配置”中确认是否存在该户"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setDepartName
(
excel
.
getDepartName
());
//社保缴纳地解析
areaArray
=
excel
.
getProvinceStr
().
split
(
CommonConstants
.
CENTER_SPLIT_LINE_STRING
);
infoVo
=
initAddress
(
areaArray
,
areaMap2
,
infoVo
);
//比较hold对象中的省市县 与 infoVo对象中的省市县 是否一致,考虑为空的情况,不一致提示
if
(!
Objects
.
equals
(
hold
.
getTown
(),
null
==
infoVo
.
getTown
()?
null
:
infoVo
.
getTown
().
toString
())
||
!
Objects
.
equals
(
hold
.
getCity
(),
null
==
infoVo
.
getCity
()?
null
:
infoVo
.
getCity
().
toString
())
||
!
Objects
.
equals
(
hold
.
getProvince
(),
null
==
infoVo
.
getProvince
()?
null
:
infoVo
.
getProvince
().
toString
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"社保户”"
+
excel
.
getDepartName
()+
"“的社保缴纳地与户配置中该户的社保缴纳地不一致,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//校验适用其实月份及执行月月份 是否符合规则 2025-10
if
(!
Common
.
validateFormatYearMonth
(
excel
.
getApplyStartDate
())
||
!
Common
.
validateFormatYearMonth
(
excel
.
getDoMonth
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"适用起始月份或执行月月份格式错误,请修改后重新提交。"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//适用起始月份
dateFormat
=
DateUtil
.
stringToDate2
(
excel
.
getApplyStartDate
()+
"-01"
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
);
if
(
null
!=
dateFormat
){
infoVo
.
setApplyStartDate
(
dateFormat
);
}
else
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"适用起始月份格式错误,请修改后重新提交。"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
if
(!
Objects
.
equals
(
DateUtil
.
getYearAndMonth
(
dateFormat
,
0
),
DateUtil
.
getYearAndMonth
(
LocalDateTime
.
now
(),
0
))
&&
!
Objects
.
equals
(
DateUtil
.
getYearAndMonth
(
dateFormat
,
0
)
,
DateUtil
.
getYearAndMonth
(
LocalDateTime
.
now
(),
1
)))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"适用起始月份只可填写“"
+
DateUtil
.
getYearAndMonth
(
new
Date
(),
0
,
CommonConstants
.
CENTER_SPLIT_LINE_STRING
)
+
"”或“"
+
DateUtil
.
getYearAndMonth
(
new
Date
(),
1
,
CommonConstants
.
CENTER_SPLIT_LINE_STRING
)
+
"”,请修改后重新提交。"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
temp
=
socialSetInfoMap
.
get
(
excel
.
getDepartName
());
// 如果已经存在使用周期内,然后判断新增的起始月份是否大于已有的起始月份,然后已有的截止月赋值为新的起始月的上月月底最后一天
if
(
Common
.
isNotNull
(
temp
)){
if
(
temp
.
getApplyStartDate
().
getTime
()
>=
dateFormat
.
getTime
()){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"请检查数据,使用起始月份不能小于已存在的使用起始月份"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
temp
.
setApplyEndDate
(
DateUtil
.
addDayByDate
(
dateFormat
,-
1
));
}
//执行月份校验
dateUse
=
DateUtil
.
stringToDate2
(
excel
.
getDoMonth
()+
"-01"
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
);
if
(
null
!=
dateUse
){
infoVo
.
setDoMonth
(
DateUtil
.
getYearAndMonth
(
dateFormat
,
0
));
}
else
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"执行月份格式错误,请修改后重新提交。"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//执行月份不能大于使用起始月份
if
(
dateUse
.
after
(
dateFormat
)){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"执行月份只能填写“"
+
DateUtil
.
getYearAndMonth
(
dateFormat
,
0
,
CommonConstants
.
CENTER_SPLIT_LINE_STRING
)
+
"”及之前的月份,请修改后重新提交。"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//是否同一基数上下限
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getIsSameBase
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getIsSameBase
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"是否同一基数上下限只可填写“是”或“否”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setIsSameBase
(
excel
.
getIsSameBase
());
//是否同一基数为是时,赋值工伤、医疗、生育、失业、大病对应单位及个人基数上下限
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getIsSameBase
())){
infoVo
.
setUpPersion
(
excel
.
getUpPersion
());
infoVo
.
setLowerPersion
(
excel
.
getLowerPersion
());
infoVo
.
setUpInjury
(
excel
.
getUpPersion
());
infoVo
.
setLowerInjury
(
excel
.
getLowerPersion
());
infoVo
.
setUpMedical
(
excel
.
getUpPersion
());
infoVo
.
setLowerMedical
(
excel
.
getLowerPersion
());
infoVo
.
setUpBirth
(
excel
.
getUpPersion
());
infoVo
.
setLowerBirth
(
excel
.
getLowerPersion
());
infoVo
.
setUpUnemployment
(
excel
.
getUpPersion
());
infoVo
.
setLowerUnemployment
(
excel
.
getLowerPersion
());
infoVo
.
setUpperLimit
(
excel
.
getUpPersion
());
infoVo
.
setLowerLimit
(
excel
.
getLowerPersion
());
//如果不是按比例后面要清空
excel
.
setUpBig
(
excel
.
getUpPersion
());
excel
.
setLowerBig
(
excel
.
getLowerPersion
());
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getIsSameBase
())){
//工伤、医疗、生育、失业 必填
if
(
Common
.
isEmpty
(
excel
.
getUpInjury
())
||
Common
.
isEmpty
(
excel
.
getLowerInjury
())
||
Common
.
isEmpty
(
excel
.
getUpMedical
())
||
Common
.
isEmpty
(
excel
.
getLowerMedical
())
||
Common
.
isEmpty
(
excel
.
getUpBirth
())
||
Common
.
isEmpty
(
excel
.
getLowerBirth
())
||
Common
.
isEmpty
(
excel
.
getUpUnemployment
())
||
Common
.
isEmpty
(
excel
.
getLowerUnemployment
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"是否同一基数上下限为否时,工伤、失业、医疗、生育上下限必填"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setUpPersion
(
excel
.
getUpPersion
());
infoVo
.
setLowerPersion
(
excel
.
getLowerPersion
());
infoVo
.
setUpInjury
(
excel
.
getUpInjury
());
infoVo
.
setLowerInjury
(
excel
.
getLowerInjury
());
infoVo
.
setUpMedical
(
excel
.
getUpMedical
());
infoVo
.
setLowerMedical
(
excel
.
getLowerMedical
());
infoVo
.
setUpBirth
(
excel
.
getUpBirth
());
infoVo
.
setLowerBirth
(
excel
.
getLowerBirth
());
infoVo
.
setUpUnemployment
(
excel
.
getUpUnemployment
());
infoVo
.
setLowerUnemployment
(
excel
.
getLowerUnemployment
());
excel
.
setUpBig
(
excel
.
getUpBig
());
excel
.
setLowerBig
(
excel
.
getLowerBig
());
}
//大病是否收取
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getIsIllness
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getIsIllness
())){
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getIsIllness
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"大病是否收取只可填写“是”或“否”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
}
infoVo
.
setIsIllness
(
excel
.
getIsIllness
());
//大病是否收费为是
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getIsIllness
())){
infoVo
.
setIsIllness
(
excel
.
getIsIllness
());
//大病缴纳周期必填且只可是按年或按月
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getCollectType
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getCollectType
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"大病是否收取为是时,大病缴纳周期必填且只可填写“按年”或“按月”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setCollectType
(
excel
.
getCollectType
());
//大病缴纳周期按年
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getCollectType
())){
//大病缴纳周期按年 收费模式必填且只可填写“立即收费”或“次年起手”
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getCollectTypeSub
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getCollectTypeSub
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"大病是否收取为是时,大病缴纳周期按年时,收费模式必填且只可填写“立即收费”或“次年起收”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setIsChargePersonal
(
excel
.
getCollectTypeSub
());
//大病缴纳周期为“按年”的,该字段必填,只可以填写一月~十二月中的任意一月
if
(!
Common
.
getSet
(
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
,
CommonConstants
.
THREE_STRING
,
CommonConstants
.
FOUR_STRING
,
CommonConstants
.
FIVE_STRING
,
CommonConstants
.
SIX_STRING
,
CommonConstants
.
SEVEN_STRING
,
CommonConstants
.
EIGHT_STRING
,
CommonConstants
.
NINE_STRING
,
CommonConstants
.
TEN_STRING
,
CommonConstants
.
ELEVEN_STRING
,
CommonConstants
.
TWELVE_STRING
)
.
contains
(
excel
.
getCollectMoth
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"大病是否收取为是时,大病缴纳周期为“按年”的,缴纳月份字段必填,只可以填写一月~十二月中的任意一月,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setCollectMoth
(
Integer
.
parseInt
(
excel
.
getCollectMoth
()));
}
//大病缴纳周期按月
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getCollectType
())){
if
(!
Common
.
getSet
(
CommonConstants
.
ZERO_STRING
,
CommonConstants
.
ONE_STRING
).
contains
(
excel
.
getValueType
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"大病是否收取为是时,大病缴纳周期为“按月”的,缴纳方式字段必填,只可填写“按定值”或“按比例”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setValueType
(
excel
.
getValueType
());
//大病是否收取为是 大病缴纳周期为按月缴纳方式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getValueType
())){
//大病缴纳周期为按月缴纳方式为按比例需要填写金额 无值提示
if
(
null
==
excel
.
getUpBig
()
||
null
==
excel
.
getLowerBig
()
||
excel
.
getLowerBig
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
excel
.
getUpBig
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"大病是否收取为是时,大病缴纳周期为“按月”的,单位或个人大病基数上下限字段必填,仅填写正确基数即可,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setUpBig
(
excel
.
getUpPersion
());
infoVo
.
setLowerBig
(
excel
.
getLowerPersion
());
//大病缴纳周期为按月缴纳方式为按比例需要填写比例无值提示
if
(
null
==
excel
.
getPayCompanyPro
()
||
null
==
excel
.
getPayPersonalPro
()
||
excel
.
getPayPersonalPro
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
excel
.
getPayPersonalPro
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"大病是否收取为是时,大病缴纳周期为“按月”的,单位或个人大病比例字段必填,仅填写正确比例即可,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setPayCompanyPro
(
excel
.
getPayCompanyPro
());
infoVo
.
setPayPersonalPro
(
excel
.
getPayPersonalPro
());
}
}
//大病缴纳周期为“按年”的,或大病缴纳周期为“按月”,缴纳方式为“按定值”的,该字段必填,仅填写金额即可
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getCollectType
())
||
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getCollectType
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getValueType
()))){
if
(
null
==
excel
.
getChargeCompany
()
||
null
==
excel
.
getChargePersonal
()
||
excel
.
getChargePersonal
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
excel
.
getChargeCompany
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"大病是否收取为是时,大病缴纳周期为“按年”或大病缴纳周期为“按月”且缴纳方式为“按定值”时,单位或个人大病金额字段必填,仅填写正确金额即可,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setPayCompany
(
excel
.
getChargeCompany
());
infoVo
.
setPayPersonal
(
excel
.
getChargePersonal
());
}
}
//是否可补缴 只可以填写是或否,必填
if
(!
Common
.
getSet
(
CommonConstants
.
ZERO_STRING
,
CommonConstants
.
ONE_STRING
).
contains
(
excel
.
getCanOverpay
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"是否可补缴必填,只可填写“是”或“否”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setCanOverpay
(
excel
.
getCanOverpay
());
//是否可补缴为是时补缴险种必填
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getCanOverpay
()))
{
if
(!
Common
.
isNotNull
(
excel
.
getInsurancePension
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"是否可补缴为是时补缴险种必填,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
insurancePension
=
excel
.
getInsurancePension
();
// 可补交险种:养老、医疗、失业、工伤、生育、大病
if
(
insurancePension
.
indexOf
(
"养老"
)
>=
0
)
{
infoVo
.
setInsurancePension
(
CommonConstants
.
ZERO_STRING
);
}
if
(
insurancePension
.
indexOf
(
"医疗"
)
>=
0
)
{
infoVo
.
setInsuranceMedical
(
CommonConstants
.
ZERO_STRING
);
}
if
(
insurancePension
.
indexOf
(
"失业"
)
>=
0
)
{
infoVo
.
setInsuranceUnemployment
(
CommonConstants
.
ZERO_STRING
);
}
if
(
insurancePension
.
indexOf
(
"工伤"
)
>=
0
)
{
infoVo
.
setInsuranceInjury
(
CommonConstants
.
ZERO_STRING
);
}
if
(
insurancePension
.
indexOf
(
"生育"
)
>=
0
)
{
infoVo
.
setInsuranceBirth
(
CommonConstants
.
ZERO_STRING
);
}
if
(
insurancePension
.
indexOf
(
"大病"
)
>=
0
)
{
infoVo
.
setInsuranceBigailment
(
CommonConstants
.
ZERO_STRING
);
}
insurancePension
=
insurancePension
.
replace
(
"养老"
,
""
)
.
replace
(
"医疗"
,
""
)
.
replace
(
"失业"
,
""
)
.
replace
(
"工伤"
,
""
)
.
replace
(
"生育"
,
""
)
.
replace
(
"大病"
,
""
)
.
replace
(
" "
,
""
)
.
replace
(
","
,
""
);
if
(
insurancePension
.
length
()
>
0
)
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"补缴险种填写错误,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//最大补缴期限 若是否可补缴为“是”,必填,只可填写一个月~十二个月中的任意一个月
if
(!
Common
.
getSet
(
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
,
CommonConstants
.
THREE_STRING
,
CommonConstants
.
FOUR_STRING
,
CommonConstants
.
FIVE_STRING
,
CommonConstants
.
SIX_STRING
,
CommonConstants
.
SEVEN_STRING
,
CommonConstants
.
EIGHT_STRING
,
CommonConstants
.
NINE_STRING
,
CommonConstants
.
TEN_STRING
,
CommonConstants
.
ELEVEN_STRING
,
CommonConstants
.
TWELVE_STRING
)
.
contains
(
excel
.
getOverpayNumber
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"最大补缴期限必填,只可填写“一个月”~“十二个月”中的任意一个月,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setOverpayNumber
(
Integer
.
parseInt
(
excel
.
getOverpayNumber
()));
//是否含起缴当月 必填
if
(!
Common
.
getSet
(
CommonConstants
.
ZERO_STRING
,
CommonConstants
.
ONE_STRING
).
contains
(
excel
.
getHaveThisMonth
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"是否含起缴当月必填,只可填写“是”或“否”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setHaveThisMonth
(
excel
.
getHaveThisMonth
());
// 补缴基数 若是否可补缴为“是”,必填,只可填写“最新基数”或“当期基数”
if
(!
Common
.
getSet
(
CommonConstants
.
ZERO_STRING
,
CommonConstants
.
ONE_STRING
).
contains
(
excel
.
getInsuranceIsLatestCardinality
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"补缴基数必填,只可填写“最新基数”或“当期基数”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setInsuranceIsLatestCardinality
(
excel
.
getInsuranceIsLatestCardinality
());
// 补缴政策 必填
if
(
Common
.
isEmpty
(
excel
.
getPayPolicy
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"补缴政策必填,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setPayPolicy
(
excel
.
getPayPolicy
());
}
infoVo
.
setUnitPersionPro
(
excel
.
getUnitPersionPro
());
infoVo
.
setUnitInjuryPro
(
excel
.
getUnitInjuryPro
());
infoVo
.
setUnitMedicalPro
(
excel
.
getUnitMedicalPro
());
infoVo
.
setUnitBirthPro
(
excel
.
getUnitBirthPro
());
infoVo
.
setUnitUnemploymentPro
(
excel
.
getUnitUnemploymentPro
());
infoVo
.
setPayCompanyPro
(
excel
.
getPayCompanyPro
());
infoVo
.
setPersonalUnemploymentPro
(
excel
.
getPersonalUnemploymentPro
());
infoVo
.
setPersonalMedicalPro
(
excel
.
getPersonalMedicalPro
());
infoVo
.
setPersonalPersionPro
(
excel
.
getPersonalPersionPro
());
infoVo
.
setPayPersonalPro
(
excel
.
getPayPersonalPro
());
//单位及个人比例合计
infoVo
.
setUnitProSum
(
BigDecimalUtils
.
safeAdd
(
infoVo
.
getUnitInjuryPro
(),
infoVo
.
getUnitMedicalPro
(),
infoVo
.
getUnitBirthPro
(),
infoVo
.
getUnitUnemploymentPro
(),
infoVo
.
getUnitPersionPro
()));
infoVo
.
setPersonalProSum
(
BigDecimalUtils
.
safeAdd
(
infoVo
.
getPersonalPersionPro
(),
infoVo
.
getPersonalUnemploymentPro
(),
infoVo
.
getPersonalMedicalPro
()));
//只有大病是否收费为是 且 缴纳方式为按比例才计算合计比例
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getIsIllness
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getValueType
())){
infoVo
.
setUnitProSum
(
BigDecimalUtils
.
safeAdd
(
infoVo
.
getUnitProSum
(),
infoVo
.
getPayCompanyPro
()));
infoVo
.
setPersonalProSum
(
BigDecimalUtils
.
safeAdd
(
infoVo
.
getPersonalProSum
(),
infoVo
.
getPayPersonalPro
()));
}
infoVo
.
setStatus
(
CommonConstants
.
ZERO_INT
);
infoVo
.
setBaseType
(
CommonConstants
.
ZERO_STRING
);
// 插入并更新历史数据
try
{
insertSocialExcel
(
infoVo
,
socialSetInfoMap
,
temp
);
}
catch
(
Exception
e
){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"数据保存失败,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
/**
* 插入excel bad record
*/
private
void
insertSocialExcel
(
SysBaseSetInfo
insert
,
Map
<
String
,
SysBaseSetInfo
>
socialSetInfoMap
,
SysBaseSetInfo
old
)
{
if
(
null
!=
old
&&
null
!=
old
.
getId
()){
this
.
updateById
(
old
);
}
this
.
save
(
insert
);
socialSetInfoMap
.
put
(
insert
.
getDepartName
(),
insert
);
}
private
void
importSysBaseSetFund
(
List
<
SysBaseSetFundInsertVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 区域数据初始化
HashMap
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
areaMap2
=
new
HashMap
<>();
R
<
AreaVo
>
areaListR
=
upmsDaprUtils
.
getAreaListR
();
if
(
Common
.
isNotNull
(
areaListR
))
{
AreaVo
areaList
=
areaListR
.
getData
();
if
(
null
!=
areaList
&&
!
areaList
.
getSysAreaList
().
isEmpty
())
{
for
(
SysArea
area
:
areaList
.
getSysAreaList
())
{
areaMap
.
put
(
Integer
.
toString
(
area
.
getId
()),
area
.
getAreaName
());
areaMap2
.
put
(
area
.
getAreaName
()
+
CommonConstants
.
DOWN_LINE_STRING
+
(
null
==
area
.
getParentId
()
?
"null"
:
(
0
==
area
.
getParentId
()
?
"null"
:
Integer
.
toString
(
area
.
getParentId
()))),
area
.
getId
());
}
}
}
// 个性化校验逻辑
ErrorMessage
errorMsg
;
//获取已有数据有效使用周期含当前时间的数据
Map
<
String
,
SysBaseSetInfo
>
fundSetInfoMap
=
this
.
getSysBaseSetInfoMap
(
CommonConstants
.
ONE_STRING
);
//获取已有数据有效状态的户配置
Map
<
String
,
SysHouseHoldInfo
>
holdMap
=
this
.
getHouseHoldMap
(
CommonConstants
.
ONE_STRING
);
// 执行数据插入操作 组装
SysBaseSetInfo
temp
=
null
;
//社保缴纳地
String
[]
areaArray
=
null
;
//社保插入数据
SysBaseSetFundInsertVo
excel
=
null
;
SysBaseSetInfo
infoVo
=
null
;
//起始月月份
Date
dateFormat
=
null
;
//执行月月份
Date
dateUse
=
null
;
SysHouseHoldInfo
hold
=
null
;
//公积金比例
List
<
SysPayProportion
>
fundProList
;
SysPayProportion
fundPro
=
null
;
String
[]
split
=
null
;
String
[]
splitSub
=
null
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
excel
=
excelVOList
.
get
(
i
);
infoVo
=
new
SysBaseSetInfo
();
hold
=
holdMap
.
get
(
excel
.
getDepartName
());
if
(
Common
.
isEmpty
(
hold
)){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"公积金户”"
+
excel
.
getDepartName
()+
"“在户配置中未找到,请先到“社保公积金-配置中心-户配置”中确认是否存在该户"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setDepartName
(
excel
.
getDepartName
());
//公积金类型
if
(!
Common
.
getSet
(
CommonConstants
.
ZERO_STRING
,
CommonConstants
.
ONE_STRING
).
contains
(
excel
.
getFundPayType
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"公积金类型必填,只可填写“省直”或“市直”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//缴纳地解析
areaArray
=
excel
.
getProvinceStr
().
split
(
CommonConstants
.
CENTER_SPLIT_LINE_STRING
);
infoVo
=
initAddress
(
areaArray
,
areaMap2
,
infoVo
);
//比较hold对象中的省市县 与 infoVo对象中的省市县 是否一致,考虑为空的情况,不一致提示
if
(!
Objects
.
equals
(
hold
.
getTown
(),
null
==
infoVo
.
getTown
()?
null
:
infoVo
.
getTown
().
toString
())
||
!
Objects
.
equals
(
hold
.
getCity
(),
null
==
infoVo
.
getCity
()?
null
:
infoVo
.
getCity
().
toString
())
||
!
Objects
.
equals
(
hold
.
getProvince
(),
null
==
infoVo
.
getProvince
()?
null
:
infoVo
.
getProvince
().
toString
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"公积金户”"
+
excel
.
getDepartName
()+
"“的社保缴纳地与户配置中该户的社保缴纳地不一致,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//校验适用其实月份及执行月月份 是否符合规则 2025-10
if
(!
Common
.
validateFormatYearMonth
(
excel
.
getApplyStartDate
())
||
!
Common
.
validateFormatYearMonth
(
excel
.
getDoMonth
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"适用起始月份或执行月月份格式错误,请修改后重新提交。"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//适用起始月份
dateFormat
=
DateUtil
.
stringToDate2
(
excel
.
getApplyStartDate
()+
"-01"
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
);
if
(
null
!=
dateFormat
){
infoVo
.
setApplyStartDate
(
dateFormat
);
}
else
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"适用起始月份格式错误,请修改后重新提交。"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
if
(!
Objects
.
equals
(
DateUtil
.
getYearAndMonth
(
dateFormat
,
0
),
DateUtil
.
getYearAndMonth
(
LocalDateTime
.
now
(),
0
))
&&
!
Objects
.
equals
(
DateUtil
.
getYearAndMonth
(
dateFormat
,
0
)
,
DateUtil
.
getYearAndMonth
(
LocalDateTime
.
now
(),
1
))){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"适用起始月份只可填写“"
+
DateUtil
.
getYearAndMonth
(
new
Date
(),
0
,
CommonConstants
.
CENTER_SPLIT_LINE_STRING
)
+
"”或“"
+
DateUtil
.
getYearAndMonth
(
new
Date
(),
1
,
CommonConstants
.
CENTER_SPLIT_LINE_STRING
)
+
"”,请修改后重新提交。"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
temp
=
fundSetInfoMap
.
get
(
excel
.
getDepartName
());
// 如果已经存在使用周期内,然后判断新增的起始月份是否大于已有的起始月份,然后已有的截止月赋值为新的起始月的上月月底最后一天
if
(
Common
.
isNotNull
(
temp
)){
if
(
temp
.
getApplyStartDate
().
getTime
()
>=
dateFormat
.
getTime
()){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"请检查数据,使用起始月份不能小于已存在的使用起始月份"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
temp
.
setApplyEndDate
(
DateUtil
.
addDayByDate
(
dateFormat
,-
1
));
}
//执行月份校验
dateUse
=
DateUtil
.
stringToDate2
(
excel
.
getDoMonth
()+
"-01"
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
);
if
(
null
!=
dateUse
){
infoVo
.
setDoMonth
(
DateUtil
.
getYearAndMonth
(
dateFormat
,
0
));
}
else
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"执行月份格式错误,请修改后重新提交。"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//执行月份不能大于使用起始月份
if
(
dateUse
.
after
(
dateFormat
)){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"执行月份只可填写“"
+
DateUtil
.
getYearAndMonth
(
dateFormat
,
0
,
CommonConstants
.
CENTER_SPLIT_LINE_STRING
)
+
"”及之前的月份,请修改后重新提交。"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//基数上下限赋值
infoVo
.
setLowerLimit
(
excel
.
getLowerLimit
());
infoVo
.
setUpperLimit
(
excel
.
getUpperLimit
());
infoVo
.
setFundPayLowerLimit
(
excel
.
getLowerLimit
());
infoVo
.
setFundPayUpperLimit
(
excel
.
getUpperLimit
());
//单边小数点
if
(!
Common
.
getSet
(
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
,
CommonConstants
.
THREE_STRING
,
CommonConstants
.
FOUR_STRING
,
CommonConstants
.
FIVE_STRING
,
CommonConstants
.
SIX_STRING
)
.
contains
(
excel
.
getFundPayPoint
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"单边小数点必填,只可填写“四舍五入取整或元以下舍去或见角进元或保留两位小数或保留一位小数或见分进元”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setFundPayPoint
(
Integer
.
parseInt
(
excel
.
getFundPayPoint
()));
//单位公积金比例,个人公积金比例 :需要校验格式 为 10,10;12,13
if
(!
Common
.
isNotNull
(
excel
.
getHousingFundPro
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"单位公积金比例,个人公积金比例必填,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
// 校验 单位公积金比例,个人公积金比例格式:10,10;12,13
if
(!
Common
.
validateFormat
(
excel
.
getHousingFundPro
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"单位公积金比例,个人公积金比例格式错误,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
split
=
excel
.
getHousingFundPro
().
split
(
CommonConstants
.
SEMICOLON_STRING
);
fundProList
=
new
ArrayList
<>();
for
(
String
var
:
split
)
{
fundPro
=
new
SysPayProportion
();
splitSub
=
var
.
split
(
CommonConstants
.
COMMA_STRING
);
if
(
null
!=
splitSub
&&
splitSub
.
length
==
2
){
fundPro
.
setCompanyPro
(
Double
.
valueOf
(
splitSub
[
0
]));
fundPro
.
setPersonalPro
(
Double
.
valueOf
(
splitSub
[
1
]));
}
fundProList
.
add
(
fundPro
);
}
//是否可补缴 只可以填写是或否,必填
if
(!
Common
.
getSet
(
CommonConstants
.
ZERO_STRING
,
CommonConstants
.
ONE_STRING
).
contains
(
excel
.
getCanOverpay
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"是否可补缴必填,只可填写“是”或“否”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//是否可补缴为是时补缴险种必填
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getCanOverpay
()))
{
//最大补缴期限 若是否可补缴为“是”,必填,只可填写一个月~十二个月中的任意一个月
if
(!
Common
.
getSet
(
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
,
CommonConstants
.
THREE_STRING
,
CommonConstants
.
FOUR_STRING
,
CommonConstants
.
FIVE_STRING
,
CommonConstants
.
SIX_STRING
,
CommonConstants
.
SEVEN_STRING
,
CommonConstants
.
EIGHT_STRING
,
CommonConstants
.
NINE_STRING
,
CommonConstants
.
TEN_STRING
,
CommonConstants
.
ELEVEN_STRING
,
CommonConstants
.
TWELVE_STRING
)
.
contains
(
excel
.
getOverpayNumber
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"最大补缴期限必填,只可填写“一个月”~“十二个月”中的任意一个月,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setOverpayNumber
(
Integer
.
parseInt
(
excel
.
getOverpayNumber
()));
}
//是否含起缴当月
//是否含起缴当月 必填
if
(!
Common
.
getSet
(
CommonConstants
.
ZERO_STRING
,
CommonConstants
.
ONE_STRING
).
contains
(
excel
.
getHaveThisMonth
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"是否含起缴当月必填,只可填写“是”或“否”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setHaveThisMonth
(
excel
.
getHaveThisMonth
());
// 补缴基数 若是否可补缴为“是”,必填,只可填写“最新基数”或“当期基数”
if
(!
Common
.
getSet
(
CommonConstants
.
ZERO_STRING
,
CommonConstants
.
ONE_STRING
).
contains
(
excel
.
getInsuranceIsLatestCardinality
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"补缴基数必填,只可填写“最新基数”或“当期基数”,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
// 补缴政策 必填
if
(
Common
.
isEmpty
(
excel
.
getPayPolicy
()))
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"补缴政策必填,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setPayPolicy
(
excel
.
getPayPolicy
());
infoVo
.
setInsuranceIsLatestCardinality
(
excel
.
getInsuranceIsLatestCardinality
());
infoVo
.
setCanOverpay
(
excel
.
getCanOverpay
());
infoVo
.
setStatus
(
CommonConstants
.
ZERO_INT
);
infoVo
.
setBaseType
(
CommonConstants
.
ONE_STRING
);
// 插入
try
{
insertFundExcel
(
temp
,
infoVo
,
fundProList
);
}
catch
(
Exception
e
){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"数据保存失败,请修改后重新提交"
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
/**
* 插入excel bad record
*/
private
void
insertFundExcel
(
SysBaseSetInfo
old
,
SysBaseSetInfo
insert
,
List
<
SysPayProportion
>
fundProList
)
{
if
(
Common
.
isNotNull
(
old
)
&&
Common
.
isNotNull
(
old
.
getId
()));{
baseMapper
.
updateById
(
old
);
}
baseMapper
.
insert
(
insert
);
if
(
Common
.
isNotNull
(
fundProList
)){
for
(
SysPayProportion
fundPro
:
fundProList
)
{
fundPro
.
setSysBaseSetId
(
insert
.
getId
());
sysPayProportionService
.
save
(
fundPro
);
}
}
}
/**
* 转换缴纳地址为省市县ID
**/
private
SysBaseSetInfo
initAddress
(
String
[]
areaArray
,
HashMap
<
String
,
Integer
>
areaMap2
,
SysBaseSetInfo
s
)
{
if
(
null
==
areaArray
||
null
==
areaMap2
||
null
==
s
)
{
return
s
;
}
Integer
temp
;
if
(
areaArray
.
length
>=
CommonConstants
.
TWO_INT
)
{
temp
=
areaMap2
.
get
(
areaArray
[
0
]
+
CommonConstants
.
DOWN_LINE_STRING
+
"null"
);
if
(
Common
.
isNotNull
(
temp
))
{
s
.
setProvince
(
temp
);
}
temp
=
areaMap2
.
get
(
areaArray
[
1
]
+
CommonConstants
.
DOWN_LINE_STRING
+
(
null
==
s
.
getProvince
()
?
"null"
:
s
.
getProvince
()));
if
(
Common
.
isNotNull
(
temp
))
{
s
.
setCity
(
temp
);
}
if
(
areaArray
.
length
>=
CommonConstants
.
THREE_INT
)
{
temp
=
areaMap2
.
get
(
areaArray
[
2
]
+
CommonConstants
.
DOWN_LINE_STRING
+
(
null
==
s
.
getCity
()
?
"null"
:
s
.
getCity
()));
if
(
Common
.
isNotNull
(
temp
))
{
s
.
setTown
(
temp
);
}
}
}
return
s
;
}
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/SysBaseSetInfoMapper.xml
View file @
878e5763
...
@@ -464,4 +464,110 @@
...
@@ -464,4 +464,110 @@
</where>
</where>
limit 1
limit 1
</select>
</select>
<select
id=
"noPageSocialDiy"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetSocialExportVo"
>
select
a.DEPART_NAME departName,
CONCAT_WS('-',
CASE WHEN a1.id is NOT NULL THEN a1.AREA_NAME ELSE NULL END,
CASE WHEN a2.id is NOT NULL THEN a2.AREA_NAME ELSE NULL END,
CASE WHEN a3.id is NOT NULL THEN a3.AREA_NAME ELSE NULL END
) as province,
a.STATUS 'status',
CONCAT(a.APPLY_START_DATE,'~',IF(a.APPLY_END_DATE is NULL,"永久",a.APPLY_END_DATE)) applyStartDate,
a.APPLY_START_DATE applyStartDate,
a.DO_MONTH doMonth,
a.IS_SAME_BASE isSameBase,
a.LOWER_PERSION lowerPersion,
a.UP_PERSION upPersion,
a.LOWER_INJURY lowerInjury,
a.UP_INJURY upInjury,
a.LOWER_MEDICAL lowerMedical,
a.UP_MEDICAL upMedical,
a.LOWER_BIRTH lowerBirth,
a.UP_BIRTH upBirth,
a.LOWER_UNEMPLOYMENT lowerUnemployment,
a.UP_UNEMPLOYMENT upUnemployment,
a.LOWER_BIG lowerBig,
a.UP_BIG upBig,
a.IS_ILLNESS isIllness,
a.COLLECT_TYPE collectType,
a.IS_CHARGE_PERSONAL isChargePersonal,
a.COLLECT_MOTH collectMoth,
a.VALUE_TYPE valueType,
a.CHARGE_COMPANY chargeCompany,
a.CHARGE_PERSONAL chargePersonal,
a.UNIT_MEDICAL_PRO unitMedicalPro,
a.PERSONAL_MEDICAL_PRO personalMedicalPro,
a.UNIT_BIRTH_PRO unitBirthPro,
a.UNIT_PERSION_PRO unitPersionPro,
a.PERSONAL_PERSION_PRO personalPersionPro,
a.UNIT_INJURY_PRO unitInjuryPro,
a.UNIT_UNEMPLOYMENT_PRO unitUnemploymentPro,
a.PERSONAL_UNEMPLOYMENT_PRO personalUnemploymentPro,
a.PAY_COMPANY_PRO payCompanyPro,
a.PAY_PERSONAL_PRO payPersonalPro,
a.CAN_OVERPAY canOverpay,
a.UNIT_PRO_SUM unitProSum,
a.PERSONAL_PRO_SUM personalProSum,
CONCAT_WS(',',
CASE WHEN a.INSURANCE_PENSION=0 THEN '养老' ELSE NULL END,
CASE WHEN a.INSURANCE_MEDICAL=0 THEN '医疗' ELSE NULL END,
CASE WHEN a.INSURANCE_INJURY=0 THEN '工伤' ELSE NULL END,
CASE WHEN a.INSURANCE_UNEMPLOYMENT=0 THEN '失业' ELSE NULL END,
CASE WHEN a.INSURANCE_BIRTH=0 THEN '生育' ELSE NULL END,
CASE WHEN a.INSURANCE_BIGAILMENT=0 THEN '大病' ELSE NULL END
) as insurancePension,
a.OVERPAY_NUMBER overpayNumber,
a.HAVE_THIS_MONTH haveThisMonth,
a.INSURANCE_IS_LATEST_CARDINALITY insuranceIsLatestCardinality,
a.PAY_POLICY payPolicy
FROM sys_base_set_info a
LEFT JOIN sys_area a1 on a1.id=a.PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.CITY
LEFT JOIN sys_area a3 on a3.id=a.TOWN
<where>
a.DELETE_FLAG='0'
and a.BASE_TYPE ='0'
<include
refid=
"sysBaseSetInfo_where"
/>
</where>
order by a.CREATE_TIME desc
</select>
<select
id=
"noPageFundDiy"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetFundExportVo"
>
select
a.DEPART_NAME departName,
a.FUND_PAY_TYPE fundPayType,
CONCAT_WS('-',
CASE WHEN a1.id is NOT NULL THEN a1.AREA_NAME ELSE NULL END,
CASE WHEN a2.id is NOT NULL THEN a2.AREA_NAME ELSE NULL END,
CASE WHEN a3.id is NOT NULL THEN a3.AREA_NAME ELSE NULL END
) as provinceStr,
a.STATUS 'status',
CONCAT(a.APPLY_START_DATE,'~',IF(a.APPLY_END_DATE is NULL,"永久",a.APPLY_END_DATE)) applyStartDate,
a.DO_MONTH doMonth,
a.LOWER_LIMIT lowerLimit,
a.UPPER_LIMIT upperLimit,
a.FUND_PAY_POINT fundPayPoint,
fp.pro housingFundPro,
a.CAN_OVERPAY canOverpay,
a.OVERPAY_NUMBER overpayNumber,
a.HAVE_THIS_MONTH haveThisMonth,
a.INSURANCE_IS_LATEST_CARDINALITY insuranceIsLatestCardinality,
a.PAY_POLICY payPolicy
FROM sys_base_set_info a
LEFT JOIN sys_area a1 on a1.id=a.PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.CITY
LEFT JOIN sys_area a3 on a3.id=a.TOWN
LEFT JOIN
(select GROUP_CONCAT(CONCAT(p.COMPANY_PRO,',',p.PERSONAL_PRO) SEPARATOR ';') as pro,p.SYS_BASE_SET_ID from sys_pay_proportion p GROUP BY p.SYS_BASE_SET_ID)
fp on fp.SYS_BASE_SET_ID=a.ID
<where>
a.DELETE_FLAG='0'
and a.BASE_TYPE ='1'
<include
refid=
"sysBaseSetInfo_where"
/>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/SysHouseHoldInfoMapper.xml
View file @
878e5763
...
@@ -198,6 +198,18 @@
...
@@ -198,6 +198,18 @@
order by a.CREATE_TIME desc
order by a.CREATE_TIME desc
</select>
</select>
<!--sysHouseHoldInfo简单分页查询-->
<select
id=
"getSysHouseHoldNoPage"
resultMap=
"sysHouseHoldInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM sys_house_hold_info a
<where>
1=1
<include
refid=
"sysHouseHoldInfo_where"
/>
</where>
order by a.CREATE_TIME desc
</select>
<!--sysHouseHoldInfo简单分页查询-->
<!--sysHouseHoldInfo简单分页查询-->
<select
id=
"getAllSingleSocailPage"
resultMap=
"sysHouseHoldSingleInfoMap"
>
<select
id=
"getAllSingleSocailPage"
resultMap=
"sysHouseHoldSingleInfoMap"
>
SELECT
SELECT
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment