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
0b70bd3f
Commit
0b70bd3f
authored
Apr 16, 2026
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
户截止日调整-fxj
parent
a164cdbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
19 deletions
+36
-19
THouseHoldLimitController.java
.../v1/yifu/social/controller/THouseHoldLimitController.java
+3
-3
THouseHoldLimitServiceImpl.java
.../yifu/social/service/impl/THouseHoldLimitServiceImpl.java
+33
-16
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/THouseHoldLimitController.java
View file @
0b70bd3f
...
...
@@ -186,14 +186,14 @@ public class THouseHoldLimitController {
}
/**
* 户截止日配置表 批量导入
* 户截止日配置表 批量导入
新增或更新
*
* @author fxj
* @date 2025-12-11 14:19:54
**/
@SneakyThrows
@Operation
(
description
=
"批量新增户截止日配置表"
)
@SysLog
(
"批量新增户截止日配置表"
)
@Operation
(
description
=
"批量新增
或更新
户截止日配置表"
)
@SysLog
(
"批量新增
或更新
户截止日配置表"
)
@PostMapping
(
"/importListAdd"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/THouseHoldLimitServiceImpl.java
View file @
0b70bd3f
...
...
@@ -306,14 +306,9 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe
continue
;
}
holdLimit
=
baseMapper
.
selectOne
(
Wrappers
.<
THouseHoldLimit
>
query
().
lambda
()
.
eq
(
THouseHoldLimit:
:
getType
,
excel
.
getType
())
.
eq
(
THouseHoldLimit:
:
getName
,
excel
.
getName
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
null
!=
holdLimit
){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"该户名及户类型已存在"
,
excel
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
.
eq
(
THouseHoldLimit:
:
getType
,
excel
.
getType
())
.
eq
(
THouseHoldLimit:
:
getName
,
excel
.
getName
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
excel
.
getDeadLineDay
())){
if
(!
Common
.
isNumber
(
excel
.
getDeadLineDay
())){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"派增截止(日)只能是数字"
,
excel
);
...
...
@@ -347,17 +342,32 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe
limitInsert
.
setDeadLineDay
(
excel
.
getDeadLineDay
());
limitInsert
.
setAddHandleRule
(
excel
.
getAddHandleRule
());
limitInsert
.
setName
(
excel
.
getName
());
limitInsert
.
setCreateBy
(
user
.
getId
());
limitInsert
.
setUpdateBy
(
user
.
getId
());
limitInsert
.
setCreateTime
(
LocalDateTime
.
now
());
limitInsert
.
setUpdateTime
(
LocalDateTime
.
now
());
limitInsert
.
setCreateName
(
user
.
getNickname
());
limitInsert
.
setProvince
(
houseHold
.
getProvince
());
limitInsert
.
setCity
(
houseHold
.
getCity
());
limitInsert
.
setTown
(
houseHold
.
getTown
());
// 从户配置中覆盖省市县信息(处理空值情况)
limitInsert
.
setProvince
(
Common
.
isEmpty
(
houseHold
.
getProvince
())
?
""
:
houseHold
.
getProvince
());
limitInsert
.
setCity
(
Common
.
isEmpty
(
houseHold
.
getCity
())
?
null
:
houseHold
.
getCity
());
limitInsert
.
setTown
(
Common
.
isEmpty
(
houseHold
.
getTown
())
?
null
:
houseHold
.
getTown
());
map
.
put
(
excel
.
getName
()+
excel
.
getType
(),
excel
.
getRowIndex
().
toString
());
// 插入
if
(!
insertExcel
(
limitInsert
)){
// 判断是新增还是更新
boolean
success
;
if
(
null
!=
holdLimit
){
// 更新已有记录
limitInsert
.
setId
(
holdLimit
.
getId
());
limitInsert
.
setCreateBy
(
holdLimit
.
getCreateBy
());
limitInsert
.
setCreateTime
(
holdLimit
.
getCreateTime
());
limitInsert
.
setCreateName
(
holdLimit
.
getCreateName
());
limitInsert
.
setUpdateBy
(
user
.
getId
());
limitInsert
.
setUpdateTime
(
LocalDateTime
.
now
());
success
=
updateExcel
(
limitInsert
);
}
else
{
// 新增记录
limitInsert
.
setCreateBy
(
user
.
getId
());
limitInsert
.
setCreateTime
(
LocalDateTime
.
now
());
limitInsert
.
setCreateName
(
user
.
getNickname
());
success
=
insertExcel
(
limitInsert
);
}
if
(!
success
){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"导入异常"
,
excel
);
errorMessageList
.
add
(
errorMsg
);
continue
;
...
...
@@ -373,6 +383,13 @@ public class THouseHoldLimitServiceImpl extends ServiceImpl<THouseHoldLimitMappe
return
baseMapper
.
insert
(
insert
)
>=
1
;
}
/**
* 更新excel record
*/
private
boolean
updateExcel
(
THouseHoldLimit
update
)
{
return
baseMapper
.
updateById
(
update
)
>=
1
;
}
/**
* 通过户名称及类型查询到具体截止日期后去看是否为工作日,如果不是工作日则往前推,知道找到工作日,然后返回工作日
* 如果找不到对应截止日期,则返回null
...
...
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