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
c5938bc9
Commit
c5938bc9
authored
Dec 01, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目查询优化
parent
cef21fd8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
18 deletions
+23
-18
TSocialFundInfoMapper.java
...oud/plus/v1/yifu/social/mapper/TSocialFundInfoMapper.java
+2
-1
TSocialFundInfoServiceImpl.java
.../yifu/social/service/impl/TSocialFundInfoServiceImpl.java
+8
-1
TSocialFundInfoMapper.xml
...l-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
+13
-16
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TSocialFundInfoMapper.java
View file @
c5938bc9
...
...
@@ -83,6 +83,7 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
**/
void
updateFundInfo
(
@Param
(
"infoVo"
)
UpdateSocialFoundVo
infoVo
);
int
selectSocialFoundByContract
(
@Param
(
"tSocialFundInfo"
)
TSocialFundInfo
tSocialFundInfo
);
String
selectSocialByContract
(
@Param
(
"tSocialFundInfo"
)
TSocialFundInfo
tSocialFundInfo
);
String
selectFundByContract
(
@Param
(
"tSocialFundInfo"
)
TSocialFundInfo
tSocialFundInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFundInfoServiceImpl.java
View file @
c5938bc9
...
...
@@ -794,7 +794,14 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
@Override
public
int
selectSocialFoundByContract
(
TSocialFundInfo
sf
)
{
return
baseMapper
.
selectSocialFoundByContract
(
sf
);
String
socials
=
baseMapper
.
selectSocialByContract
(
sf
);
String
funds
=
baseMapper
.
selectFundByContract
(
sf
);
if
((
Common
.
isEmpty
(
socials
)
&&
Common
.
isNotNull
(
funds
)
&&
CommonConstants
.
THREE_STRING
.
equals
(
funds
))
||
(
Common
.
isEmpty
(
funds
)
&&
Common
.
isNotNull
(
socials
)
&&
CommonConstants
.
THREE_STRING
.
equals
(
socials
))
||
(
Common
.
isNotNull
(
socials
)
&&
Common
.
isNotNull
(
funds
)
&&
CommonConstants
.
THREE_STRING
.
equals
(
socials
)
&&
CommonConstants
.
THREE_STRING
.
equals
(
funds
)))
{
return
CommonConstants
.
ONE_INT
;
}
return
CommonConstants
.
ZERO_INT
;
}
}
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
View file @
c5938bc9
...
...
@@ -1083,22 +1083,19 @@
</update>
<!--获取count,合同使用-->
<select
id=
"selectSocialFoundByContract"
resultType=
"java.lang.Integer"
>
select count(1) from
(SELECT
a.EMP_IDCARD,a.HANDLE_STATUS social_status
FROM t_social_info a
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain} ORDER BY a.CREATE_TIME desc limit 1) a
left join
(SELECT
a.EMP_IDCARD,a.HANDLE_STATUS fund_status
FROM t_provident_fund a
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain} ORDER BY a.CREATE_TIME desc limit 1) b
on a.EMP_IDCARD=b.EMP_IDCARD
where
(a.social_status='3' and b.fund_status='3' )
or (a.social_status='3' and b.fund_status is null )
or (a.social_status is null and b.fund_status ='3' )
<select
id=
"selectSocialByContract"
resultType=
"java.lang.String"
>
SELECT
HANDLE_STATUS
FROM t_social_info a
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain} ORDER BY a.CREATE_TIME desc limit 1
</select>
<!--获取count,合同使用-->
<select
id=
"selectFundByContract"
resultType=
"java.lang.String"
>
SELECT
HANDLE_STATUS
FROM t_provident_fund a
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain} ORDER BY a.CREATE_TIME desc limit 1
</select>
</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