Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
ba887352
Commit
ba887352
authored
Jun 11, 2020
by
Water Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize
parent
95e093bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
yd-api/src/main/resources/mapper/customer/AclPractitionerSubordinateSystemMapper.xml
+8
-5
No files found.
yd-api/src/main/resources/mapper/customer/AclPractitionerSubordinateSystemMapper.xml
View file @
ba887352
...
@@ -275,11 +275,14 @@
...
@@ -275,11 +275,14 @@
p.SAL_MST_ID_TYPE as titleCode,-- 职称code
p.SAL_MST_ID_TYPE as titleCode,-- 职称code
p.SAL_MST_OFFICIAL_TITLE as titleName,-- 职称名称
p.SAL_MST_OFFICIAL_TITLE as titleName,-- 职称名称
p.SAL_MST_MOBILE as mobileNo,
p.SAL_MST_MOBILE as mobileNo,
count(m.MON025_002) as count,-- 保单id
ifnull(count(distinct policy.INS_MST_ID),0) as count,-- 保单id
sum(m.MON025_401) as fyp,-- 保费
ifnull(sum(policy.INS_MST_TOTAL_PREIUM),0) as fyp,-- 保费
sum(policy.INS001_FYCTOTAL) as fyc -- 应发佣金
ifnull(sum(policy.INS001_FYCTOTAL),0) as fyc -- 应发佣金
FROM sal001 p INNER JOIN MON025 m on m.MON025_007 = p.SAL_MST_ID and m.MON025_109 IN (1,2,3) AND m.MON025_303 = 1 AND m.mon025_108 = 'S01'-- 业务员id
FROM ins001 policy INNER JOIN mon025 m on policy.INS_MST_ID = m.MON025_002 and m.MON025_109 IN (1,2,3) AND m.MON025_303 = 1 AND m.mon025_108 = 'S01'
inner JOIN ins001 policy on m.MON025_002 = policy.INS_MST_ID -- 保单id
INNER JOIN (
SELECT mon025_002,MAX(MON025_405) as MON025_405 FROM mon025 group by mon025_002 ORDER BY mon025_002
) b on m.mon025_002 = b.mon025_002 AND m.MON025_405 = b.MON025_405
INNER JOIN sal001 p on m.MON025_007 = p.SAL_MST_ID -- 业务员id
WHERE p.FK_SPC_DIV_ID = #{subordinateIdForEGolden,jdbcType=VARCHAR}
WHERE p.FK_SPC_DIV_ID = #{subordinateIdForEGolden,jdbcType=VARCHAR}
<choose>
<choose>
<when
test=
"time == 1"
>
<when
test=
"time == 1"
>
...
...
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