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 {
...
@@ -113,30 +113,12 @@ public class TSocialDeadlineInfoController {
@SysLog
(
"新增社保医疗截止日配置"
)
@SysLog
(
"新增社保医疗截止日配置"
)
@PostMapping
@PostMapping
public
R
<
Boolean
>
save
(
@RequestBody
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
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
)
{
return
tSocialDeadlineInfoService
.
saveAsso
(
tSocialDeadlineInfo
);
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
);
}
}
}
/**
/**
* 修改社保医疗截止日配置
* 修改社保医疗截止日配置
*
*
...
@@ -147,14 +129,7 @@ public class TSocialDeadlineInfoController {
...
@@ -147,14 +129,7 @@ public class TSocialDeadlineInfoController {
@SysLog
(
"修改社保医疗截止日配置"
)
@SysLog
(
"修改社保医疗截止日配置"
)
@PutMapping
@PutMapping
public
R
<
Boolean
>
updateById
(
@RequestBody
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
public
R
<
Boolean
>
updateById
(
@RequestBody
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
LambdaQueryWrapper
<
TSocialDeadlineInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
return
tSocialDeadlineInfoService
.
updateByIdAsso
(
tSocialDeadlineInfo
);
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
));
}
}
/**
/**
...
...
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
...
@@ -52,7 +52,7 @@ public interface TSocialDeadlineInfoService extends IService<TSocialDeadlineInfo
void
createDeadLineSetInfo
();
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
...
@@ -303,10 +303,20 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
}
}
@Transactional
@Transactional
@Override
@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
);
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
)
{
private
void
updateType
(
TSocialDeadlineInfo
tSocialDeadlineInfo
)
{
...
@@ -331,11 +341,34 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
...
@@ -331,11 +341,34 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
update
(
updateWrapper
);
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
@Transactional
@Override
@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
);
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
)
{
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