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
746e7f1d
Commit
746e7f1d
authored
Nov 23, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
寿险佣金基本信息维护38-在来佣比对页面查询特殊来佣
parent
9de8dd6c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
112 additions
and
17 deletions
+112
-17
yd-api/src/main/java/com/yd/api/commission/service/impl/LifeCommissionServiceImpl.java
+40
-17
yd-api/src/main/java/com/yd/dal/mapper/lifecommission/LifeCommissionMapper.java
+2
-0
yd-api/src/main/resources/mapper/lifecommission/LifeCommissionMapper.xml
+70
-0
No files found.
yd-api/src/main/java/com/yd/api/commission/service/impl/LifeCommissionServiceImpl.java
View file @
746e7f1d
...
@@ -50,24 +50,14 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
...
@@ -50,24 +50,14 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
@Override
@Override
public
ComeCommissionListResponseVO
queryComeCommissionList
(
QueryComeCommissionListRequestVO
requestVO
)
{
public
ComeCommissionListResponseVO
queryComeCommissionList
(
QueryComeCommissionListRequestVO
requestVO
)
{
ComeCommissionListResponseVO
resp
=
new
ComeCommissionListResponseVO
();
ComeCommissionListResponseVO
resp
=
new
ComeCommissionListResponseVO
();
String
commissionCategory
=
requestVO
.
getCommissionCategory
();
try
{
try
{
// 分页结果集
if
(
"2"
.
equals
(
commissionCategory
))
{
PageInfo
<
ComeCommissionVO
>
pageInfo
=
this
.
queryComeCommissionListPage
(
requestVO
);
this
.
querySpecialCommission
(
requestVO
,
resp
);
resp
.
setDataList
(
pageInfo
.
getList
());
}
else
{
pageInfo
.
setList
(
null
);
this
.
queryBaseCommission
(
requestVO
,
resp
);
// 不分页结果集统计总单数,总保费,总来佣,待来佣总数,已比对总数,已退保总数
}
Map
<
String
,
Object
>
summaries
=
lifeCommissionMapper
.
getSummaries
(
requestVO
);
// 不分页结果集统计总寿险经纪人人数
Integer
lifePractitionerCount
=
lifeCommissionMapper
.
queryLifePractitionerCount
(
requestVO
);
resp
.
setLifePractitionerCount
(
String
.
valueOf
(
lifePractitionerCount
));
resp
.
setTotalOrderPrice
(
summaries
.
get
(
"totalOrderPrice"
).
toString
());
resp
.
setTotalCommission
(
summaries
.
get
(
"totalCommission"
).
toString
());
resp
.
setTotalSingular
(
summaries
.
get
(
"totalSingular"
).
toString
());
resp
.
setTotalDaiLaiYong
(
summaries
.
get
(
"totalDaiLaiYong"
).
toString
());
resp
.
setTotalYiBiDui
(
summaries
.
get
(
"totalYiBiDui"
).
toString
());
resp
.
setTotalYiTuiBao
(
summaries
.
get
(
"totalYiTuiBao"
).
toString
());
resp
.
setPage
(
pageInfo
);
resp
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
resp
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -76,6 +66,39 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
...
@@ -76,6 +66,39 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
return
resp
;
return
resp
;
}
}
private
void
querySpecialCommission
(
QueryComeCommissionListRequestVO
requestVO
,
ComeCommissionListResponseVO
resp
)
{
PageInfo
<
ComeCommissionVO
>
page
=
requestVO
.
getPage
();
String
orderBy
=
"orderDate desc"
;
PageHelper
.
startPage
(
page
.
getPageNum
(),
page
.
getPageSize
(),
orderBy
);
List
<
ComeCommissionVO
>
dataList
=
lifeCommissionMapper
.
querySpecialCommissionList
(
requestVO
);
PageInfo
<
ComeCommissionVO
>
pageInfo
=
new
PageInfo
<>(
dataList
);
resp
.
setDataList
(
pageInfo
.
getList
());
pageInfo
.
setList
(
null
);
}
private
void
queryBaseCommission
(
QueryComeCommissionListRequestVO
requestVO
,
ComeCommissionListResponseVO
resp
)
{
// 分页结果集
PageInfo
<
ComeCommissionVO
>
pageInfo
=
this
.
queryComeCommissionListPage
(
requestVO
);
resp
.
setDataList
(
pageInfo
.
getList
());
pageInfo
.
setList
(
null
);
// 不分页结果集统计总单数,总保费,总来佣,待来佣总数,已比对总数,已退保总数
Map
<
String
,
Object
>
summaries
=
lifeCommissionMapper
.
getSummaries
(
requestVO
);
// 不分页结果集统计总寿险经纪人人数
Integer
lifePractitionerCount
=
lifeCommissionMapper
.
queryLifePractitionerCount
(
requestVO
);
resp
.
setLifePractitionerCount
(
String
.
valueOf
(
lifePractitionerCount
));
resp
.
setTotalOrderPrice
(
summaries
.
get
(
"totalOrderPrice"
).
toString
());
resp
.
setTotalCommission
(
summaries
.
get
(
"totalCommission"
).
toString
());
resp
.
setTotalSingular
(
summaries
.
get
(
"totalSingular"
).
toString
());
resp
.
setTotalDaiLaiYong
(
summaries
.
get
(
"totalDaiLaiYong"
).
toString
());
resp
.
setTotalYiBiDui
(
summaries
.
get
(
"totalYiBiDui"
).
toString
());
resp
.
setTotalYiTuiBao
(
summaries
.
get
(
"totalYiTuiBao"
).
toString
());
}
@Override
@Override
public
CheckComeCommissionResponseVO
updateCommissionCheckStatus
(
CheckComeCommissionRequestVO
requestVO
)
{
public
CheckComeCommissionResponseVO
updateCommissionCheckStatus
(
CheckComeCommissionRequestVO
requestVO
)
{
CheckComeCommissionResponseVO
resp
=
new
CheckComeCommissionResponseVO
();
CheckComeCommissionResponseVO
resp
=
new
CheckComeCommissionResponseVO
();
...
...
yd-api/src/main/java/com/yd/dal/mapper/lifecommission/LifeCommissionMapper.java
View file @
746e7f1d
...
@@ -22,4 +22,6 @@ public interface LifeCommissionMapper {
...
@@ -22,4 +22,6 @@ public interface LifeCommissionMapper {
List
<
String
>
querycheckBatchList
();
List
<
String
>
querycheckBatchList
();
Integer
queryLifePractitionerCount
(
QueryComeCommissionListRequestVO
requestVO
);
Integer
queryLifePractitionerCount
(
QueryComeCommissionListRequestVO
requestVO
);
List
<
ComeCommissionVO
>
querySpecialCommissionList
(
QueryComeCommissionListRequestVO
requestVO
);
}
}
yd-api/src/main/resources/mapper/lifecommission/LifeCommissionMapper.xml
View file @
746e7f1d
...
@@ -235,5 +235,74 @@
...
@@ -235,5 +235,74 @@
</select>
</select>
<select
id=
"querySpecialCommissionList"
parameterType=
"com.yd.api.commission.vo.lifecommission.QueryComeCommissionListRequestVO"
resultType=
"com.yd.api.commission.vo.lifecommission.ComeCommissionVO"
>
select
null as orderId,
c.check_yearmonth checkDate,
IFNULL(i.name_abbre,i.name) insurerName,
IFNULL(a.name,p.name) planName,
o.policy_no policyNo,
o.premium orderPrice,
o.commission_status commissionCheckStatus,
o.amount commissionAmount,
o.rate commissionRate,
o.created_at orderDate,
o.commission_no commissionNo,
date_format(o.commission_year, '%Y-%m-%d') commissionYear,
o.commission_time commissionTime,
o.commission_period commissionPeriod,
null as coverageTerm,
null as payTerm,
(case o.config_level when 2 then p2.pName2 else p3.pName3 END) categoryName,
(case o.config_level when 2 then p2.cName2 else p3.cName3 END) planCategoryName
from
(SELECT policy_no, commission_no, commission_year, amount, commission_status, commission_time, commission_check_id,premium,t.insurer_id,
commission_period, rate, order_id, commission_category, t.created_at, b.product_id, b.plan_id, b.config_level
from ag_po_order_commission t left join ag_product_life_commission_base b on t.commission_base_id = b.id
WHERE 1=1
<if
test=
"startDate != null "
>
and date_format(commission_year, '%Y-%m')
>
= #{startDate}
</if>
<if
test=
"endDate != null "
>
and date_format(commission_year, '%Y-%m')
<
= #{endDate}
</if>
) o
left join ag_po_order_commission_check c on o.commission_check_id = c.id
left join ag_product_plan a on o.plan_id = a.id
left join ag_product p on o.product_id = p.id
left join (select plcl.config_level, plcl.product_id, plc.name cName2, pc.name pName2
from ag_plan_category_list plcl
left join ag_plan_category plc on plcl.plan_category_id = plc.id
left join ag_product_category pc on plc.product_category_id = pc.id
where plcl.config_level = 2
) p2
on o.config_level = p2.config_level and o.product_id = p2.product_id
left join (select plcl.config_level, plcl.plan_id, plc.name cName3, pc.name pName3
from ag_plan_category_list plcl
left join ag_plan_category plc on plcl.plan_category_id = plc.id
left join ag_product_category pc on plc.product_category_id = pc.id
where plcl.config_level = 3
) p3
on o.config_level = p3.config_level and o.plan_id = p3.plan_id
left join ag_acl_insurer i on o.insurer_id = i.id
where 1=1
<if
test=
"insurerId != null"
>
and o.insurer_id = #{insurerId}
</if>
<if
test=
"commissionCheckStatus != null"
>
and o.commission_status = #{commissionCheckStatus}
</if>
<choose>
<when
test=
"historyDate != null "
>
and c.check_yearmonth = #{historyDate}
</when>
</choose>
</select>
</mapper>
</mapper>
\ No newline at end of file
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