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
8a49f4e4
Commit
8a49f4e4
authored
Nov 14, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
户禁用时存在户的基数配置,不可禁用
parent
ab1323d9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletion
+41
-1
SysHouseHoldInfoController.java
...v1/yifu/social/controller/SysHouseHoldInfoController.java
+1
-1
SysHouseHoldInfoService.java
.../plus/v1/yifu/social/service/SysHouseHoldInfoService.java
+2
-0
SysHouseHoldInfoServiceImpl.java
...yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
+38
-0
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/SysHouseHoldInfoController.java
View file @
8a49f4e4
...
...
@@ -107,7 +107,7 @@ public class SysHouseHoldInfoController {
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('demo_syshouseholdinfo_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
SysHouseHoldInfo
sysHouseHoldInfo
)
{
return
R
.
ok
(
sysHouseHoldInfoService
.
updateById
(
sysHouseHoldInfo
)
);
return
sysHouseHoldInfoService
.
updateByIdAsso
(
sysHouseHoldInfo
);
}
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/SysHouseHoldInfoService.java
View file @
8a49f4e4
...
...
@@ -44,4 +44,6 @@ public interface SysHouseHoldInfoService extends IService<SysHouseHoldInfo> {
* @return R
*/
R
<
Boolean
>
saveInfo
(
SysHouseHoldInfo
sysHouseHoldInfo
);
R
<
Boolean
>
updateByIdAsso
(
SysHouseHoldInfo
sysHouseHoldInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
View file @
8a49f4e4
...
...
@@ -21,8 +21,12 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
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.DateUtil
;
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.SysHouseHoldInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.SysBaseSetInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.SysHouseHoldInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -37,6 +41,8 @@ import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
public
class
SysHouseHoldInfoServiceImpl
extends
ServiceImpl
<
SysHouseHoldInfoMapper
,
SysHouseHoldInfo
>
implements
SysHouseHoldInfoService
{
private
final
SysBaseSetInfoMapper
baseSetInfoMapper
;
/**
* 社保户公积金户数据简单分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
...
...
@@ -65,5 +71,37 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
baseMapper
.
insert
(
sysHouseHoldInfo
);
return
R
.
ok
();
}
/**
* @Author fxj
* @Description 修改社保户公积金户数据
* @Date 16:08 2022/11/14
**/
@Override
public
R
<
Boolean
>
updateByIdAsso
(
SysHouseHoldInfo
hold
)
{
if
(
Common
.
isEmpty
(
hold
.
getId
())){
return
R
.
failed
(
CommonConstants
.
PARAM_INFO_ERROR
);
}
SysHouseHoldInfo
holdInfo
=
baseMapper
.
selectById
(
hold
.
getId
());
if
(
Common
.
isEmpty
(
holdInfo
)){
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
hold
.
getDelFlag
())
&&
baseSetInfoMapper
.
selectCount
(
Wrappers
.<
SysBaseSetInfo
>
query
().
lambda
()
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
hold
.
getType
())
.
le
(
SysBaseSetInfo:
:
getApplyStartDate
,
DateUtil
.
getCurrentDateTime
())
.
in
(
SysBaseSetInfo:
:
getDepartId
,
hold
.
getId
())
.
eq
(
SysBaseSetInfo:
:
getStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
SysBaseSetInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
and
(
obj
->
obj
.
isNull
(
SysBaseSetInfo:
:
getApplyEndDate
).
or
()
.
ge
(
SysBaseSetInfo:
:
getApplyEndDate
,
DateUtil
.
getCurrentDateTime
())))
>
CommonConstants
.
ZERO_INT
){
return
R
.
failed
(
"户下存在可用基数配置,请禁用可用基数配置后禁用户配置!"
);
}
int
res
=
baseMapper
.
updateById
(
hold
);
if
(
res
>=
0
){
return
R
.
ok
();
}
else
{
return
R
.
failed
(
CommonConstants
.
SAVE_FAILED
);
}
}
}
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