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
2e7a0ba5
Commit
2e7a0ba5
authored
Jun 12, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
8bfccdad
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
276 additions
and
209 deletions
+276
-209
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+276
-209
No files found.
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
2e7a0ba5
...
...
@@ -841,14 +841,14 @@
</if>
</sql>
<sql
id=
"tPaymentInfo_export_socialFund_where"
>
<sql
id=
"tPaymentInfo_export_socialFund_where
2
"
>
<if
test=
"tPaymentInfo != null"
>
<if
test=
"tPaymentInfo.idList == null"
>
<if
test=
"tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''"
>
AND
w
.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
AND
c
.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if>
<if
test=
"tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''"
>
AND
w
.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
AND
c
.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if>
</if>
</if>
...
...
@@ -1154,6 +1154,22 @@
<!--tPaymentInfo简单分页查询-->
<select
id=
"getTPaymentInfoNewPage"
resultMap=
"tPaymentInfoNewMap"
>
SELECT
c.keyGroup,
c.EMP_IDCARD,
c.EMP_NAME,
c.UNIT_NAME,
c.SETTLE_DOMAIN_NAME,
c.SOCIAL_HOUSEHOLD,
c.SOCIAL_PAY_ADDR,
c.SOCIAL_PAY_MONTH,
c.SOCIAL_CREATE_MONTH,
c.SUM_ALL AS SUM_ALL,
c.PROVIDENT_HOUSEHOLD AS PROVIDENT_HOUSEHOLD,
c.PROVIDENT_PAY_ADDR AS PROVIDENT_PAY_ADDR,
c.SOCIAL_SUM,
c.PROVIDENT_SUM AS PROVIDENT_SUM
from (
select
w.keyGroup,
w.EMP_IDCARD,
w.EMP_NAME,
...
...
@@ -1215,11 +1231,11 @@
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
)
) w
GROUP BY w.keyGroup ) c
<where>
1 = 1
<include
refid=
"tPaymentInfo_export_socialFund_where"
/>
<include
refid=
"tPaymentInfo_export_socialFund_where
2
"
/>
</where>
GROUP BY w.keyGroup
</select>
<!--tPaymentInfo简单分页查询-->
...
...
@@ -1441,37 +1457,88 @@
SELECT
count(1)
FROM (
select
*
from (
select
w.SOCIAL_HOUSEHOLD,w.PROVIDENT_HOUSEHOLD
from (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.SOCIAL_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD
FROM t_payment_info a
<where>
IFNULL(a.SOCIAL_ID,'1') != '1'
<include
refid=
"tPaymentInfo_export_social_where"
/>
</where>
GROUP BY
a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
GROUP BY
a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
)
union all
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.SOCIAL_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD
FROM t_payment_info a
<where>
IFNULL(a.FUND_ID,'1') != '1'
<include
refid=
"tPaymentInfo_export_fund_where"
/>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
,a.SETTLE_DOMAIN_CODE
)
) w
GROUP BY w.keyGroup) c
<where>
1 = 1
<include
refid=
"tPaymentInfo_export_socialFund_where"
/>
<include
refid=
"tPaymentInfo_export_socialFund_where
2
"
/>
</where>
GROUP BY w.keyGroup) c
</select>
<!--tPaymentInfo简单分页查询-->
<select
id=
"getTPaymentInfoNewExportInfo"
resultMap=
"tPaymentInfoNewExportMap"
>
SELECT
c.keyGroup,
c.EMP_IDCARD,
c.EMP_NO,
c.EMP_NAME,
c.UNIT_NAME,
c.SETTLE_DOMAIN_CODE,
c.SETTLE_DOMAIN_NAME,
c.SOCIAL_HOUSEHOLD,
c.SOCIAL_SECURITY_NO,
c.SOCIAL_PAY_ADDR,
c.SOCIAL_PAY_MONTH,
c.SOCIAL_CREATE_MONTH,
c.PERSONAL_PROVIDENT_SUM,
c.SUM_ALL,
c.PROVIDENT_PAY_MONTH,
c.PROVIDENT_CREATE_MONTH,
c.PROVIDENT_HOUSEHOLD,
c.PROVIDENT_PAY_ADDR,
c.SOCIAL_SUM,
c.UNIT_SOCIAL_SUM,
c.SOCIAL_SECURITY_PERSONAL_SUM,
c.PROVIDENT_SUM,
c.INAUGURAL_TEAM,
c.COMPANY_ACCRUAL,
c.PERSONAL_ACCRUAL,
c.UNIT_PENSION_SET,
c.UNIT_MEDICAL_SET,
c.UNIT_UNEMPLOYMENT_SET,
c.UNIT_INJURY_SET,
c.UNIT_BIRTH_SET,
c.UNIT_PENSION_MONEY,
c.UNIT_MEDICAL_MONEY,
c.UNIT_UNEMPLOYMENT_MONEY,
c.UNIT_INJURY_MONEY,
c.UNIT_BIRTH_MONEY,
c.UNIT_BIGMAILMENT_MONEY,
c.PERSONAL_PENSION_MONEY,
c.PERSONAL_MEDICAL_MONEY,
c.PERSONAL_UNEMPLOYMENT_MONEY,
c.PERSONAL_BIGMAILMENT_MONEY,
c.PROVIDENT_NO AS PROVIDENT_NO,
c.PERSONAL_PROIDENT_SET,
c.UNIT_PROVIDENT_SET,
c.PROVIDENT_PERCENT,
c.UNIT_PROVIDENT_SUM
from (
select
w.keyGroup,
w.EMP_IDCARD,
w.EMP_NO,
...
...
@@ -1626,11 +1693,11 @@
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
)
) w
GROUP BY w.keyGroup) c
<where>
1 = 1
<include
refid=
"tPaymentInfo_export_socialFund_where"
/>
<include
refid=
"tPaymentInfo_export_socialFund_where
2
"
/>
</where>
GROUP BY w.keyGroup
limit #{tPaymentInfo.limitStart},#{tPaymentInfo.limitEnd}
</select>
...
...
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