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
c9e234c7
Commit
c9e234c7
authored
Dec 30, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.18' into MVP1.7.18
parents
81e21237
a32a5e87
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
141 additions
and
19 deletions
+141
-19
Common.java
.../com/yifu/cloud/plus/v1/yifu/common/core/util/Common.java
+14
-0
ExcelUtil.java
...m/yifu/cloud/plus/v1/yifu/common/core/util/ExcelUtil.java
+11
-17
SysBaseSetInfoService.java
...ud/plus/v1/yifu/social/service/SysBaseSetInfoService.java
+2
-0
SysBaseSetInfoServiceImpl.java
...1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
+55
-0
SysHouseHoldInfoServiceImpl.java
...yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
+39
-2
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+20
-0
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/Common.java
View file @
c9e234c7
...
...
@@ -819,4 +819,18 @@ public class Common {
// 支持三种格式:2025-11、2025/11、202511
return
str
.
matches
(
"\\d{4}[-/]\\d{1,2}"
)
||
str
.
matches
(
"\\d{6}"
);
}
/**
* 安全解析字符串为Integer,处理可能的转换异常
*/
public
static
Integer
parseInteger
(
String
value
)
{
if
(
Common
.
isEmpty
(
value
))
{
return
null
;
}
try
{
return
Integer
.
valueOf
(
value
);
}
catch
(
NumberFormatException
e
)
{
return
null
;
}
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/ExcelUtil.java
View file @
c9e234c7
...
...
@@ -290,44 +290,38 @@ public class ExcelUtil <T> implements Serializable {
if
(
Common
.
isNotNull
(
attr
.
readConverterExp
()))
{
tempStr
=
reverseByExp
(
c
,
attr
.
readConverterExp
());
if
(
Common
.
isEmpty
(
tempStr
)){
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
"未找到:"
+
c
+
"的字典数据"
),
errorTemp
);
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()+
"列不可填写:"
+
c
),
errorTemp
);
continue
;
}
else
{
c
=
tempStr
;
}
}
else
if
(
attr
.
isDataId
())
{
if
(
Common
.
isNotNull
(
attr
.
dataType
()))
{
//非区域字段处理
TODO
//非区域字段处理
tempStr
=
getDicValue
(
c
,
tempStr
,
attr
,
rowNum
,
errorTemp
);
/*if (Common.isNotNull(attr.parentField())){
tempStr = dicMap.get(attr.dataType() + "_" + c.trim() + "_" + getFieldValueByName(attr.parentField(), entity, DateUtil.ISO_EXPANDED_DATE_FORMAT));
}else {
tempStr = dicMap.get(attr.dataType() + "_" + c.trim());
}*/
}
}
else
{
if
(
attr
.
isArea
())
{
//区域字段处理
TODO
//区域字段处理
if
(!
Common
.
isNotNull
(
attr
.
parentField
()))
{
tempStr
=
getAreaValue
(
c
.
trim
(),
tempStr
,
attr
,
rowNum
,
errorTemp
);
}
else
{
// TODO
tempStr
=
getAreaValue
(
c
.
trim
()+
"_"
+
getFieldValueByName
(
attr
.
parentField
(),
data
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
),
tempStr
,
attr
,
rowNum
,
errorTemp
);
}
}
}
if
(
StringUtils
.
isEmpty
(
tempStr
)
&&
(
attr
.
isArea
()
||
attr
.
isDataId
()))
{
if
(
attr
.
isOrgan
())
{
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
"
未找到:"
+
c
+
"的单位或项目数据,请确认存在项目权限"
),
errorTemp
);
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()+
"列
未找到:"
+
c
+
"的单位或项目数据,请确认存在项目权限"
),
errorTemp
);
}
if
(
attr
.
isArea
())
{
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
"
未找到:"
+
c
+
"的区域数据"
),
errorTemp
);
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()+
"列
未找到:"
+
c
+
"的区域数据"
),
errorTemp
);
}
else
{
if
(
Common
.
isNotNull
(
attr
.
errorInfoImport
()))
{
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
"数据'"
+
c
+
"':"
+
attr
.
errorInfoImport
()),
errorTemp
);
}
else
{
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
"未找到:"
+
c
+
"的字典数据"
),
errorTemp
);
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()+
"列不可填写:"
+
c
),
errorTemp
);
}
}
continue
;
...
...
@@ -910,19 +904,19 @@ public class ExcelUtil <T> implements Serializable {
}
if
(!
StringUtils
.
isNotBlank
(
tempStr
))
{
if
(
attr
.
isOrgan
())
{
errorList
.
add
(
new
ErrorMessage
(
i
+
2
,
"
未找到:"
+
c
+
"的单位或项目数据,请确认存在项目权限"
));
errorList
.
add
(
new
ErrorMessage
(
i
+
2
,
attr
.
name
()+
"列
未找到:"
+
c
+
"的单位或项目数据,请确认存在项目权限"
));
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
i
+
2
,
"未找到:"
+
c
+
"的单位或项目数据,请确认存在项目权限"
),
errorTemp
);
}
if
(
attr
.
isArea
())
{
errorList
.
add
(
new
ErrorMessage
(
i
+
2
,
"
未找到:"
+
c
+
"的区域数据"
));
errorList
.
add
(
new
ErrorMessage
(
i
+
2
,
attr
.
name
()+
"列
未找到:"
+
c
+
"的区域数据"
));
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
i
+
2
,
"未找到:"
+
c
+
"的区域数据"
),
errorTemp
);
}
else
{
if
(
Common
.
isNotNull
(
attr
.
errorInfoImport
()))
{
errorList
.
add
(
new
ErrorMessage
(
i
+
2
,
"数据'"
+
c
+
"':"
+
attr
.
errorInfoImport
()));
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
i
+
2
,
"数据'"
+
c
+
"':"
+
attr
.
errorInfoImport
()),
errorTemp
);
}
else
{
errorList
.
add
(
new
ErrorMessage
(
i
+
2
,
"未找到:"
+
c
+
"的字典数据"
));
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
i
+
2
,
"未找到:
"
+
c
+
"的字典数据"
),
errorTemp
);
errorList
.
add
(
new
ErrorMessage
(
i
+
2
,
attr
.
name
()+
"列不可填写:"
+
c
));
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
i
+
2
,
attr
.
name
()+
"列不可填写:
"
+
c
+
"的字典数据"
),
errorTemp
);
}
}
continue
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/SysBaseSetInfoService.java
View file @
c9e234c7
...
...
@@ -83,4 +83,6 @@ public interface SysBaseSetInfoService extends IService<SysBaseSetInfo> {
R
<
List
<
ErrorMessage
>>
importFundDiy
(
InputStream
inputStream
);
void
listFundExport
(
HttpServletResponse
response
,
SysBaseSetInfo
searchVo
);
void
updateAreaCode
(
String
name
,
String
province
,
String
city
,
String
town
,
String
type
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
View file @
c9e234c7
...
...
@@ -16,6 +16,7 @@
*/
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
;
...
...
@@ -25,6 +26,8 @@ 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.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -37,6 +40,7 @@ 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.salary.entity.TInsuranceUnpurchasePerson
;
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.SysPayProportion
;
...
...
@@ -1413,4 +1417,55 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
}
return
s
;
}
/**
* @Author fxj
* @Description 根据户名称及户性质去更新对应户的基数配置信息
* @Date 15:26 2025/12/24
* @Param name:户名称 province:省 city:市 town:县 type:户性质(0社保、1公积金)
* @return
**/
@Override
public
void
updateAreaCode
(
String
name
,
String
province
,
String
city
,
String
town
,
String
type
)
{
List
<
SysBaseSetInfo
>
sysBaseSetInfos
=
baseMapper
.
selectList
(
Wrappers
.<
SysBaseSetInfo
>
query
().
lambda
()
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
type
)
.
eq
(
SysBaseSetInfo:
:
getDepartName
,
name
));
if
(
Common
.
isEmpty
(
sysBaseSetInfos
)){
return
;
}
// 转换参数为Integer类型,处理可能的转换异常
Integer
provinceInt
=
Common
.
parseInteger
(
province
);
Integer
cityInt
=
Common
.
parseInteger
(
city
);
Integer
townInt
=
Common
.
parseInteger
(
town
);
LambdaUpdateWrapper
<
SysBaseSetInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
SysBaseSetInfo:
:
getDepartName
,
name
)
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
type
)
.
set
(
SysBaseSetInfo:
:
getTown
,
townInt
)
.
set
(
SysBaseSetInfo:
:
getCity
,
cityInt
)
.
set
(
SysBaseSetInfo:
:
getProvince
,
provinceInt
);
this
.
update
(
updateWrapper
);
//添加日志
int
logType
=
CommonConstants
.
ONE_INT
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
logType
=
CommonConstants
.
TWO_INT
;
}
// 创建旧数据副本用于日志记录
SysBaseSetInfo
old
=
null
;
for
(
SysBaseSetInfo
sysBaseSetInfo
:
sysBaseSetInfos
){
// 创建旧数据副本用于日志记录
old
=
new
SysBaseSetInfo
();
BeanUtil
.
copyProperties
(
sysBaseSetInfo
,
old
);
// 转换旧数据中的区域码为Integer类型
old
.
setTown
(
Common
.
parseInteger
(
String
.
valueOf
(
old
.
getTown
())));
old
.
setCity
(
Common
.
parseInteger
(
String
.
valueOf
(
old
.
getCity
())));
old
.
setProvince
(
Common
.
parseInteger
(
String
.
valueOf
(
old
.
getProvince
())));
// 设置新值到原对象用于日志记录
sysBaseSetInfo
.
setProvince
(
provinceInt
);
sysBaseSetInfo
.
setCity
(
cityInt
);
sysBaseSetInfo
.
setTown
(
townInt
);
tSocialLogService
.
saveModificationRecord
(
logType
,
old
.
getId
(),
old
,
sysBaseSetInfo
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
View file @
c9e234c7
...
...
@@ -75,7 +75,7 @@ import java.util.regex.Pattern;
@EnableConfigurationProperties
(
DaprCheckProperties
.
class
)
public
class
SysHouseHoldInfoServiceImpl
extends
ServiceImpl
<
SysHouseHoldInfoMapper
,
SysHouseHoldInfo
>
implements
SysHouseHoldInfoService
{
private
final
SysBaseSetInfo
Mapper
baseSetInfoMapper
;
private
final
SysBaseSetInfo
Service
baseSetInfoService
;
private
final
TSocialLogService
tSocialLogService
;
...
...
@@ -473,7 +473,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
}
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
hold
.
getDelFlag
())
&&
baseSetInfo
Mapper
.
selectC
ount
(
Wrappers
.<
SysBaseSetInfo
>
query
().
lambda
()
&&
baseSetInfo
Service
.
c
ount
(
Wrappers
.<
SysBaseSetInfo
>
query
().
lambda
()
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
holdInfo
.
getType
())
.
le
(
SysBaseSetInfo:
:
getApplyStartDate
,
DateUtil
.
getCurrentDateTime
())
.
in
(
SysBaseSetInfo:
:
getDepartId
,
holdInfo
.
getId
())
...
...
@@ -506,6 +506,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
sysHouseHoldInfoFailResService
.
removeById
(
hold
.
getId
());
}
}
//处理省市县空的情况
if
(
Common
.
isEmpty
(
hold
.
getProvince
())){
hold
.
setProvince
(
CommonConstants
.
EMPTY_STRING
);
}
if
(
Common
.
isEmpty
(
hold
.
getCity
())){
hold
.
setCity
(
CommonConstants
.
EMPTY_STRING
);
}
if
(
Common
.
isEmpty
(
hold
.
getTown
())){
hold
.
setTown
(
CommonConstants
.
EMPTY_STRING
);
}
int
res
=
baseMapper
.
updateById
(
hold
);
if
(
res
>=
0
){
//设置不记录更新日志字段
...
...
@@ -543,6 +553,13 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if
(
Common
.
isEmpty
(
hold
.
getCity
())
&&
Common
.
isEmpty
(
holdInfo
.
getCity
()))
{
holdInfo
.
setCity
(
hold
.
getCity
());
}
// 判断户的省市县是否有变更,有变更赋值给标识字段 changeFlag = true 否则 changeFlag = false
boolean
changeFlag
=
false
;
if
(!
holdInfo
.
getProvince
().
equals
(
hold
.
getProvince
())
||
!
holdInfo
.
getCity
().
equals
(
hold
.
getCity
())
||
!
holdInfo
.
getTown
().
equals
(
hold
.
getTown
())){
changeFlag
=
true
;
}
// 记录变更日志
tSocialLogService
.
saveModificationRecord
(
CommonConstants
.
FOUR_INT
,
holdInfo
.
getId
(),
holdInfo
,
hold
);
if
(
isEdit
)
{
...
...
@@ -557,6 +574,10 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
this
.
saveAuditUserOrHandleUser
(
hold
,
CommonConstants
.
ZERO_STRING
);
this
.
saveAuditUserOrHandleUser
(
hold
,
CommonConstants
.
ONE_STRING
);
}
// 区域变更同步户对应的基数配置的区域
if
(
changeFlag
){
baseSetInfoService
.
updateAreaCode
(
hold
.
getName
(),
hold
.
getProvince
(),
hold
.
getCity
(),
hold
.
getTown
(),
hold
.
getType
());
}
return
R
.
ok
();
}
else
{
return
R
.
failed
(
CommonConstants
.
SAVE_FAILED
);
...
...
@@ -1514,9 +1535,25 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
oldInfo
.
setDataFlagYsd
(
info
.
getDataFlagYsd
());
oldInfo
.
setIsSingleYsdPush
(
info
.
getIsSingleYsdPush
());
}
if
(
Common
.
isEmpty
(
oldInfo
.
getTown
())
&&
Common
.
isEmpty
(
info
.
getTown
()))
{
oldInfo
.
setTown
(
info
.
getTown
());
}
if
(
Common
.
isEmpty
(
oldInfo
.
getCity
())
&&
Common
.
isEmpty
(
info
.
getCity
()))
{
oldInfo
.
setCity
(
info
.
getCity
());
}
//判断户的省市县是否一致,不一致,则更新对应户基数配置的区域信息
boolean
changeFlag
=
false
;
if
(!
oldInfo
.
getProvince
().
equals
(
info
.
getProvince
())
||
!
oldInfo
.
getCity
().
equals
(
info
.
getCity
())
||
!
oldInfo
.
getTown
().
equals
(
info
.
getTown
())){
changeFlag
=
true
;
}
// 记录变更日志
tSocialLogService
.
saveModificationRecord
(
CommonConstants
.
FOUR_INT
,
oldInfo
.
getId
(),
oldInfo
,
info
);
baseMapper
.
updateById
(
info
);
if
(
changeFlag
){
baseSetInfoService
.
updateAreaCode
(
info
.
getName
(),
info
.
getProvince
(),
info
.
getCity
(),
info
.
getTown
(),
info
.
getType
());
}
}
//获取所有区域数据
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
c9e234c7
...
...
@@ -3249,6 +3249,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 是否SSC:SSC派单组-1659015946137583618L SSC审核组-1659016108176130049L
long
roleId
=
1659015946137583618L
;
boolean
isSsc
=
haveRole
(
user
,
roleId
);
StringBuilder
remarkTemp
;
TAuditInfo
auditInfo
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
socialFund
=
null
;
...
...
@@ -3316,7 +3318,25 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
isSsc
)
{
dispatch
.
setStatus
(
CommonConstants
.
FIVE_STRING
);
}
auditInfo
=
new
TAuditInfo
();
remarkTemp
=
new
StringBuilder
(
CommonConstants
.
EMPTY_STRING
);
if
(
Common
.
isNotNull
(
dispatch
.
getSocialId
())){
remarkTemp
.
append
(
"社保"
);
}
if
(
Common
.
isNotNull
(
dispatch
.
getFundId
())){
if
(
remarkTemp
.
length
()
>
0
)
{
remarkTemp
.
append
(
"、公积金"
);
}
else
{
remarkTemp
.
append
(
"公积金"
);
}
}
remarkTemp
.
append
(
"派减申请:"
);
initAuditInfo
(
auditInfo
,
remarkTemp
.
toString
(),
CommonConstants
.
ZERO_STRING
,
user
,
remarkTemp
.
toString
(),
null
);
baseMapper
.
insert
(
dispatch
);
auditInfo
.
setEmpIdcard
(
dispatch
.
getEmpIdcard
());
auditInfo
.
setDispatchInfoId
(
dispatch
.
getId
());
auditInfo
.
setDispatchInfoId
(
dispatch
.
getId
());
auditInfoMapper
.
insert
(
auditInfo
);
//是否同步减档减项减合同未是时新增任务处理表
if
(
Common
.
isNotNull
(
dispatch
.
getChangeContractAndEmployee
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dispatch
.
getChangeContractAndEmployee
()))
{
...
...
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