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
9434f9e8
Commit
9434f9e8
authored
Dec 06, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
户添加审核办理必填
parent
736ae472
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
194 additions
and
1 deletion
+194
-1
SysHouseHoldInfo.java
...fu/cloud/plus/v1/yifu/social/entity/SysHouseHoldInfo.java
+49
-0
TSocialfundHouseResMapper.java
...plus/v1/yifu/social/mapper/TSocialfundHouseResMapper.java
+9
-0
TSocialfundHouseResService.java
...us/v1/yifu/social/service/TSocialfundHouseResService.java
+18
-0
SysHouseHoldInfoServiceImpl.java
...yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
+58
-0
TSocialfundHouseResServiceImpl.java
...u/social/service/impl/TSocialfundHouseResServiceImpl.java
+36
-0
SysHouseHoldInfoMapper.xml
...-biz/src/main/resources/mapper/SysHouseHoldInfoMapper.xml
+9
-1
TSocialfundHouseResMapper.xml
...z/src/main/resources/mapper/TSocialfundHouseResMapper.xml
+15
-0
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/SysHouseHoldInfo.java
View file @
9434f9e8
...
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.entity;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
...
...
@@ -130,4 +131,52 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty
(
"所属机构名称"
)
private
String
organName
;
/**
* 审核人id
*/
@ExcelAttribute
(
name
=
"审核人id"
)
@Schema
(
description
=
"审核人id"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"审核人id"
)
private
String
auditUser
;
/**
* 办理人id
*/
@ExcelAttribute
(
name
=
"办理人id"
)
@Schema
(
description
=
"办理人id"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"办理人id"
)
private
String
handleUser
;
/**
* 审核人
*/
@ExcelAttribute
(
name
=
"审核人"
)
@Schema
(
description
=
"审核人"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"审核人"
)
private
String
auditUserName
;
/**
* 办理人
*/
@ExcelAttribute
(
name
=
"办理人"
)
@Schema
(
description
=
"办理人"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"办理人"
)
private
String
handleUserName
;
/**
* 审核人部门
*/
@TableField
(
exist
=
false
)
private
String
auditUserDeptName
;
/**
* 办理人部门
*/
@TableField
(
exist
=
false
)
private
String
handleUserDeptName
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TSocialfundHouseResMapper.java
View file @
9434f9e8
...
...
@@ -47,4 +47,13 @@ public interface TSocialfundHouseResMapper extends BaseMapper<TSocialfundHouseRe
* @return
*/
List
<
TSocialfundHouseRes
>
getexportList
(
@Param
(
"tSocialfundHouseRes"
)
TSocialfundHouseRes
tSocialfundHouseRes
);
/**
* @Description: 删权限
* @Author: hgw
* @Date: 2022/12/6 16:44
* @return: void
**/
void
deleteByUserIdAndHuName
(
@Param
(
"tSocialfundHouseRes"
)
TSocialfundHouseRes
tSocialfundHouseRes
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialfundHouseResService.java
View file @
9434f9e8
...
...
@@ -18,6 +18,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialfundHouseRes
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -45,4 +46,21 @@ public interface TSocialfundHouseResService extends IService<TSocialfundHouseRes
List
<
TSocialfundHouseRes
>
getexportList
(
TSocialfundHouseRes
searchVo
);
R
saveSocialAuth
(
TSocialfundHouseRes
searchVo
);
/**
* @Description: 删除审核人权限
* @Author: hgw
* @Date: 2022/12/6 15:57
* @return: void
**/
void
deleteAuditUser
(
SysHouseHoldInfo
holdInfo
);
/**
* @Description: 删除办理人权限
* @Author: hgw
* @Date: 2022/12/6 15:57
* @return: void
**/
void
deleteHandleUser
(
SysHouseHoldInfo
holdInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
View file @
9434f9e8
...
...
@@ -26,10 +26,13 @@ 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.entity.TSocialfundHouseRes
;
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
com.yifu.cloud.plus.v1.yifu.social.service.TSocialfundHouseResService
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
...
...
@@ -43,6 +46,10 @@ import org.springframework.stereotype.Service;
public
class
SysHouseHoldInfoServiceImpl
extends
ServiceImpl
<
SysHouseHoldInfoMapper
,
SysHouseHoldInfo
>
implements
SysHouseHoldInfoService
{
private
final
SysBaseSetInfoMapper
baseSetInfoMapper
;
@Autowired
private
TSocialfundHouseResService
tSocialfundHouseResService
;
/**
* 社保户公积金户数据简单分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
...
...
@@ -68,9 +75,45 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if
(
null
!=
info
){
return
R
.
failed
(
"对应账户性质、户名的配置已存在!"
);
}
if
(
Common
.
isEmpty
(
sysHouseHoldInfo
.
getAuditUser
())
||
Common
.
isEmpty
(
sysHouseHoldInfo
.
getHandleUser
()))
{
return
R
.
failed
(
"审核人或办理人必填!"
);
}
baseMapper
.
insert
(
sysHouseHoldInfo
);
// 同步审核权限、办理权限
this
.
saveAuditUserOrHandleUser
(
sysHouseHoldInfo
,
CommonConstants
.
ZERO_STRING
);
this
.
saveAuditUserOrHandleUser
(
sysHouseHoldInfo
,
CommonConstants
.
ONE_STRING
);
return
R
.
ok
();
}
/**
* @param authType 0 审核人 1办理人
* @Description: 添加审核人、办理人
* @Author: hgw
* @Date: 2022/12/6 15:50
* @return: void
**/
private
void
saveAuditUserOrHandleUser
(
SysHouseHoldInfo
sysHouseHoldInfo
,
String
authType
)
{
TSocialfundHouseRes
searchVo
=
new
TSocialfundHouseRes
();
searchVo
.
setAuthType
(
authType
);
searchVo
.
setHouseNameType
(
sysHouseHoldInfo
.
getType
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
sysHouseHoldInfo
.
getType
()))
{
searchVo
.
setSocialHousehold
(
sysHouseHoldInfo
.
getName
());
}
else
{
searchVo
.
setFundHousehold
(
sysHouseHoldInfo
.
getName
());
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
authType
))
{
searchVo
.
setUserId
(
sysHouseHoldInfo
.
getAuditUser
());
searchVo
.
setUserName
(
sysHouseHoldInfo
.
getAuditUserName
());
searchVo
.
setUserDeptName
(
sysHouseHoldInfo
.
getAuditUserDeptName
());
}
else
{
searchVo
.
setUserId
(
sysHouseHoldInfo
.
getHandleUser
());
searchVo
.
setUserName
(
sysHouseHoldInfo
.
getHandleUserName
());
searchVo
.
setUserDeptName
(
sysHouseHoldInfo
.
getHandleUserDeptName
());
}
tSocialfundHouseResService
.
saveSocialAuth
(
searchVo
);
}
/**
* @Author fxj
* @Description 修改社保户公积金户数据
...
...
@@ -81,6 +124,9 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if
(
Common
.
isEmpty
(
hold
.
getId
())){
return
R
.
failed
(
CommonConstants
.
PARAM_INFO_ERROR
);
}
if
(
Common
.
isEmpty
(
hold
.
getAuditUser
())
||
Common
.
isEmpty
(
hold
.
getHandleUser
()))
{
return
R
.
failed
(
"审核人或办理人必填!"
);
}
SysHouseHoldInfo
holdInfo
=
baseMapper
.
selectById
(
hold
.
getId
());
if
(
Common
.
isEmpty
(
holdInfo
)){
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
...
...
@@ -98,6 +144,18 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
}
int
res
=
baseMapper
.
updateById
(
hold
);
if
(
res
>=
0
){
// 新老数据审核人办理人不同,先删除,再添加
if
(
Common
.
isNotNull
(
holdInfo
.
getAuditUser
())
&&
!
holdInfo
.
getAuditUser
().
equals
(
hold
.
getAuditUser
()))
{
tSocialfundHouseResService
.
deleteAuditUser
(
holdInfo
);
}
if
(
Common
.
isNotNull
(
holdInfo
.
getHandleUser
())
&&
!
holdInfo
.
getHandleUser
().
equals
(
hold
.
getHandleUser
()))
{
tSocialfundHouseResService
.
deleteHandleUser
(
holdInfo
);
}
// 同步审核权限、办理权限
this
.
saveAuditUserOrHandleUser
(
hold
,
CommonConstants
.
ZERO_STRING
);
this
.
saveAuditUserOrHandleUser
(
hold
,
CommonConstants
.
ONE_STRING
);
return
R
.
ok
();
}
else
{
return
R
.
failed
(
CommonConstants
.
SAVE_FAILED
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialfundHouseResServiceImpl.java
View file @
9434f9e8
...
...
@@ -23,6 +23,7 @@ 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.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialfundHouseRes
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialfundHouseResMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSocialfundHouseResService
;
...
...
@@ -93,4 +94,39 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse
return
R
.
ok
();
}
}
@Override
public
void
deleteAuditUser
(
SysHouseHoldInfo
holdInfo
)
{
if
(
Common
.
isNotNull
(
holdInfo
.
getType
())
&&
Common
.
isNotNull
(
holdInfo
.
getName
())
&&
Common
.
isNotNull
(
holdInfo
.
getAuditUser
()))
{
// 审核权限
TSocialfundHouseRes
searchVo
=
new
TSocialfundHouseRes
();
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
holdInfo
.
getType
()))
{
searchVo
.
setSocialHousehold
(
holdInfo
.
getName
());
}
else
{
searchVo
.
setFundHousehold
(
holdInfo
.
getName
());
}
searchVo
.
setUserId
(
holdInfo
.
getAuditUser
());
searchVo
.
setAuthType
(
CommonConstants
.
ZERO_STRING
);
baseMapper
.
deleteByUserIdAndHuName
(
searchVo
);
}
}
@Override
public
void
deleteHandleUser
(
SysHouseHoldInfo
holdInfo
)
{
if
(
Common
.
isNotNull
(
holdInfo
.
getType
())
&&
Common
.
isNotNull
(
holdInfo
.
getName
())
&&
Common
.
isNotNull
(
holdInfo
.
getHandleUser
()))
{
// 办理权限
TSocialfundHouseRes
searchVo
=
new
TSocialfundHouseRes
();
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
holdInfo
.
getType
()))
{
searchVo
.
setSocialHousehold
(
holdInfo
.
getName
());
}
else
{
searchVo
.
setFundHousehold
(
holdInfo
.
getName
());
}
searchVo
.
setUserId
(
holdInfo
.
getHandleUser
());
searchVo
.
setAuthType
(
CommonConstants
.
ONE_STRING
);
baseMapper
.
deleteByUserIdAndHuName
(
searchVo
);
}
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/SysHouseHoldInfoMapper.xml
View file @
9434f9e8
...
...
@@ -35,6 +35,10 @@
<result
property=
"town"
column=
"TOWN"
/>
<result
property=
"rmark"
column=
"RMARK"
/>
<result
property=
"organName"
column=
"ORGAN_NAME"
/>
<result
property=
"auditUser"
column=
"AUDIT_USER"
/>
<result
property=
"auditUserName"
column=
"AUDIT_USER_NAME"
/>
<result
property=
"handleUser"
column=
"HANDLE_USER"
/>
<result
property=
"handleUserName"
column=
"HANDLE_USER_NAME"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
...
...
@@ -56,7 +60,11 @@
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME
a.UPDATE_TIME,
a.AUDIT_USER,
a.AUDIT_USER_NAME,
a.HANDLE_USER,
a.HANDLE_USER_NAME
</sql>
<sql
id=
"sysHouseHoldInfo_where"
>
<if
test=
"sysHouseHoldInfo != null"
>
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialfundHouseResMapper.xml
View file @
9434f9e8
...
...
@@ -111,4 +111,19 @@
<include
refid=
"tSocialfundHouseRes_where"
/>
</where>
</select>
<!-- 删权限 -->
<delete
id=
"deleteByUserIdAndHuName"
>
delete from t_socialfund_house_res where USER_ID = #{tSocialfundHouseRes.userId} and AUTH_TYPE = #{tSocialfundHouseRes.authType}
<if
test=
"tSocialfundHouseRes.socialHousehold != null and tSocialfundHouseRes.socialHousehold.trim() != ''"
>
AND a.SOCIAL_HOUSEHOLD = #{tSocialfundHouseRes.socialHousehold}
</if>
<if
test=
"tSocialfundHouseRes.fundHousehold != null and tSocialfundHouseRes.fundHousehold.trim() != ''"
>
AND a.FUND_HOUSEHOLD = #{tSocialfundHouseRes.fundHousehold}
</if>
<if
test=
"tSocialfundHouseRes.socialHousehold == null and tSocialfundHouseRes.fundHousehold == null"
>
AND 1=2
</if>
</delete>
</mapper>
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