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
c42b0453
Commit
c42b0453
authored
May 11, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
节假日配置表及社保医疗截止配置表
parent
d6c5495e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
35 deletions
+43
-35
TSocialDeadlineInfoController.java
...yifu/social/controller/TSocialDeadlineInfoController.java
+4
-29
TSocialDeadlineInfoService.java
...us/v1/yifu/social/service/TSocialDeadlineInfoService.java
+2
-2
TSocialDeadlineInfoServiceImpl.java
...u/social/service/impl/TSocialDeadlineInfoServiceImpl.java
+37
-4
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TSocialDeadlineInfoController.java
View file @
c42b0453
...
...
@@ -113,30 +113,12 @@ public class TSocialDeadlineInfoController {
@SysLog
(
"新增社保医疗截止日配置"
)
@PostMapping
public
R
<
Boolean
>
save
(
@RequestBody
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
LambdaQueryWrapper
<
TSocialDeadlineInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
initCheckSql
(
tSocialDeadlineInfo
,
queryWrapper
);
TSocialDeadlineInfo
exit
=
tSocialDeadlineInfoService
.
getOne
(
queryWrapper
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
exit
)){
return
R
.
failed
(
"已存在对应月份与缴纳地的配置,请确认后操作!"
);
}
return
R
.
ok
(
tSocialDeadlineInfoService
.
saveAsso
(
tSocialDeadlineInfo
));
}
private
void
initCheckSql
(
TSocialDeadlineInfo
tSocialDeadlineInfo
,
LambdaQueryWrapper
<
TSocialDeadlineInfo
>
queryWrapper
)
{
queryWrapper
.
eq
(
TSocialDeadlineInfo:
:
getMonth
,
tSocialDeadlineInfo
.
getMonth
());
queryWrapper
.
eq
(
TSocialDeadlineInfo:
:
getProvince
,
tSocialDeadlineInfo
.
getProvince
());
if
(
Common
.
isNotNull
(
tSocialDeadlineInfo
.
getCity
())){
queryWrapper
.
eq
(
TSocialDeadlineInfo:
:
getCity
,
tSocialDeadlineInfo
.
getCity
());
if
(
Common
.
isNotNull
(
tSocialDeadlineInfo
.
getTown
())){
queryWrapper
.
eq
(
TSocialDeadlineInfo:
:
getTown
,
tSocialDeadlineInfo
.
getTown
());
}
else
{
queryWrapper
.
isNull
(
TSocialDeadlineInfo:
:
getTown
);
}
}
else
{
queryWrapper
.
isNull
(
TSocialDeadlineInfo:
:
getCity
);
}
return
tSocialDeadlineInfoService
.
saveAsso
(
tSocialDeadlineInfo
);
}
/**
* 修改社保医疗截止日配置
*
...
...
@@ -147,14 +129,7 @@ public class TSocialDeadlineInfoController {
@SysLog
(
"修改社保医疗截止日配置"
)
@PutMapping
public
R
<
Boolean
>
updateById
(
@RequestBody
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
LambdaQueryWrapper
<
TSocialDeadlineInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
initCheckSql
(
tSocialDeadlineInfo
,
queryWrapper
);
queryWrapper
.
ne
(
TSocialDeadlineInfo:
:
getId
,
tSocialDeadlineInfo
.
getId
());
TSocialDeadlineInfo
exit
=
tSocialDeadlineInfoService
.
getOne
(
queryWrapper
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
exit
)){
return
R
.
failed
(
"已存在对应月份与缴纳地的配置,请确认后操作!"
);
}
return
R
.
ok
(
tSocialDeadlineInfoService
.
updateByIdAsso
(
tSocialDeadlineInfo
));
return
tSocialDeadlineInfoService
.
updateByIdAsso
(
tSocialDeadlineInfo
);
}
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialDeadlineInfoService.java
View file @
c42b0453
...
...
@@ -52,7 +52,7 @@ public interface TSocialDeadlineInfoService extends IService<TSocialDeadlineInfo
void
createDeadLineSetInfo
();
boolean
updateByIdAsso
(
TSocialDeadlineInfo
tSocialDeadlineInfo
);
R
<
Boolean
>
updateByIdAsso
(
TSocialDeadlineInfo
tSocialDeadlineInfo
);
boolean
saveAsso
(
TSocialDeadlineInfo
tSocialDeadlineInfo
);
R
<
Boolean
>
saveAsso
(
TSocialDeadlineInfo
tSocialDeadlineInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialDeadlineInfoServiceImpl.java
View file @
c42b0453
...
...
@@ -303,10 +303,20 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
}
@Transactional
@Override
public
boolean
updateByIdAsso
(
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
public
R
<
Boolean
>
updateByIdAsso
(
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
LambdaQueryWrapper
<
TSocialDeadlineInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
initCheckSql
(
tSocialDeadlineInfo
,
queryWrapper
);
queryWrapper
.
ne
(
TSocialDeadlineInfo:
:
getId
,
tSocialDeadlineInfo
.
getId
());
TSocialDeadlineInfo
exit
=
baseMapper
.
selectOne
(
queryWrapper
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
exit
)){
return
R
.
failed
(
"已存在对应月份与缴纳地的配置,请确认后操作!"
);
}
//如果是基础配置 重置之前的配置
updateType
(
tSocialDeadlineInfo
);
return
baseMapper
.
updateById
(
tSocialDeadlineInfo
)>
0
;
if
(
baseMapper
.
updateById
(
tSocialDeadlineInfo
)>=
0
){
return
R
.
ok
();
}
return
R
.
failed
(
CommonConstants
.
UPDATE_DATA_FAIL
);
}
private
void
updateType
(
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
...
...
@@ -331,11 +341,34 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
update
(
updateWrapper
);
}
}
private
void
initCheckSql
(
TSocialDeadlineInfo
tSocialDeadlineInfo
,
LambdaQueryWrapper
<
TSocialDeadlineInfo
>
queryWrapper
)
{
queryWrapper
.
eq
(
TSocialDeadlineInfo:
:
getMonth
,
tSocialDeadlineInfo
.
getMonth
());
queryWrapper
.
eq
(
TSocialDeadlineInfo:
:
getProvince
,
tSocialDeadlineInfo
.
getProvince
());
if
(
Common
.
isNotNull
(
tSocialDeadlineInfo
.
getCity
())){
queryWrapper
.
eq
(
TSocialDeadlineInfo:
:
getCity
,
tSocialDeadlineInfo
.
getCity
());
if
(
Common
.
isNotNull
(
tSocialDeadlineInfo
.
getTown
())){
queryWrapper
.
eq
(
TSocialDeadlineInfo:
:
getTown
,
tSocialDeadlineInfo
.
getTown
());
}
else
{
queryWrapper
.
isNull
(
TSocialDeadlineInfo:
:
getTown
);
}
}
else
{
queryWrapper
.
isNull
(
TSocialDeadlineInfo:
:
getCity
);
}
}
@Transactional
@Override
public
boolean
saveAsso
(
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
public
R
<
Boolean
>
saveAsso
(
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
LambdaQueryWrapper
<
TSocialDeadlineInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
initCheckSql
(
tSocialDeadlineInfo
,
queryWrapper
);
TSocialDeadlineInfo
exit
=
baseMapper
.
selectOne
(
queryWrapper
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
exit
)){
return
R
.
failed
(
"已存在对应月份与缴纳地的配置,请确认后操作!"
);
}
updateType
(
tSocialDeadlineInfo
);
return
baseMapper
.
insert
(
tSocialDeadlineInfo
)
>
0
;
if
(
baseMapper
.
insert
(
tSocialDeadlineInfo
)
>=
0
){
return
R
.
ok
();
}
return
R
.
failed
(
CommonConstants
.
SAVE_FAILED
);
}
private
void
initMedicalEndDate
(
Map
<
String
,
String
>
holidayMap
,
TSocialDeadlineInfo
save
)
{
...
...
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