|
@@ -6,9 +6,9 @@
|
|
SELECT
|
|
SELECT
|
|
t.id AS 'userId',
|
|
t.id AS 'userId',
|
|
t.realname AS 'userName',
|
|
t.realname AS 'userName',
|
|
- IFNULL(t1.totalCharge,0.0) as '1totalCharge',
|
|
|
|
- IFNULL(t3.totalCharge,0.0) as '2totalCharge',
|
|
|
|
- IFNULL(t5.totalCharge,0.0) as '3totalCharge'
|
|
|
|
|
|
+ IFNULL(ROUND(t1.totalCharge,3),0.0) as '1totalCharge',
|
|
|
|
+ IFNULL(ROUND(t3.totalCharge,3),0.0) as '2totalCharge',
|
|
|
|
+ IFNULL(ROUND(t5.totalCharge,3),0.0) as '3totalCharge'
|
|
FROM (SELECT id,realname FROM sys_user WHERE id in
|
|
FROM (SELECT id,realname FROM sys_user WHERE id in
|
|
<foreach collection="userIds" item="user" separator="," open="(" close=")">
|
|
<foreach collection="userIds" item="user" separator="," open="(" close=")">
|
|
#{user.userId}
|
|
#{user.userId}
|
|
@@ -54,20 +54,20 @@
|
|
SELECT
|
|
SELECT
|
|
t.id AS 'userId',
|
|
t.id AS 'userId',
|
|
t.realname AS 'userName',
|
|
t.realname AS 'userName',
|
|
- IFNULL(t1.totalCharge,0.0) as '1totalCharge',
|
|
|
|
- IFNULL(t1.totalCharge - t2.JLCharge - t2.KFCharge,0.0) as '1FWCharge',
|
|
|
|
- IFNULL(t2.JLCharge,0.0) as '1JLCharge',
|
|
|
|
- IFNULL(t2.KFCharge,0.0) as '1KFCharge',
|
|
|
|
|
|
+ IFNULL( ROUND(t1.totalCharge,3),0.0) as '1totalCharge',
|
|
|
|
+ IFNULL( ROUND(t1.totalCharge - t2.JLCharge - t2.KFCharge,3),0.0) as '1FWCharge',
|
|
|
|
+ IFNULL( ROUND(t2.JLCharge,3),0.0) as '1JLCharge',
|
|
|
|
+ IFNULL( ROUND(t2.KFCharge,3),0.0) as '1KFCharge',
|
|
|
|
|
|
- IFNULL(t3.totalCharge,0.0) as '2totalCharge',
|
|
|
|
- IFNULL(t3.totalCharge - t4.JLCharge - t4.KFCharge,0.0) as '2FWCharge',
|
|
|
|
- IFNULL(t4.JLCharge,0.0) as '2JLCharge',
|
|
|
|
- IFNULL(t4.KFCharge,0.0) as '2KFCharge',
|
|
|
|
|
|
+ IFNULL( ROUND(t3.totalCharge,3),0.0) as '2totalCharge',
|
|
|
|
+ IFNULL( ROUND(t3.totalCharge - t4.JLCharge - t4.KFCharge,3),0.0) as '2FWCharge',
|
|
|
|
+ IFNULL( ROUND(t4.JLCharge,3),0.0) as '2JLCharge',
|
|
|
|
+ IFNULL( ROUND(t4.KFCharge,3),0.0) as '2KFCharge',
|
|
|
|
|
|
- IFNULL(t5.totalCharge,0.0) as '3totalCharge',
|
|
|
|
- IFNULL(t5.totalCharge - t6.JLCharge - t6.KFCharge,0.0) as '3FWCharge',
|
|
|
|
- IFNULL(t6.JLCharge,0.0) as '3JLCharge',
|
|
|
|
- IFNULL(t6.KFCharge,0.0) as '3KFCharge'
|
|
|
|
|
|
+ IFNULL( ROUND(t5.totalCharge,3),0.0) as '3totalCharge',
|
|
|
|
+ IFNULL( ROUND(t5.totalCharge - t6.JLCharge - t6.KFCharge,3),0.0) as '3FWCharge',
|
|
|
|
+ IFNULL( ROUND(t6.JLCharge,3),0.0) as '3JLCharge',
|
|
|
|
+ IFNULL( ROUND(t6.KFCharge,3),0.0) as '3KFCharge'
|
|
FROM (SELECT id,realname FROM sys_user WHERE id in
|
|
FROM (SELECT id,realname FROM sys_user WHERE id in
|
|
<foreach collection="userIds" item="user" separator="," open="(" close=")">
|
|
<foreach collection="userIds" item="user" separator="," open="(" close=")">
|
|
#{user.userId}
|
|
#{user.userId}
|
|
@@ -156,10 +156,10 @@
|
|
SELECT
|
|
SELECT
|
|
t.id AS 'userId',
|
|
t.id AS 'userId',
|
|
t.realname AS 'userName',
|
|
t.realname AS 'userName',
|
|
- IFNULL(t1.totalCharge,0.0) as 'totalCharge',
|
|
|
|
- IFNULL(t1.totalCharge - t2.JLCharge - t2.KFCharge,0.0) as 'FWCharge',
|
|
|
|
- IFNULL(t2.JLCharge,0.0) as 'JLCharge',
|
|
|
|
- IFNULL(t2.KFCharge,0.0) as 'KFCharge'
|
|
|
|
|
|
+ IFNULL(ROUND(t1.totalCharge,3),0.0) as 'totalCharge',
|
|
|
|
+ IFNULL(ROUND(t1.totalCharge - t2.JLCharge - t2.KFCharge,3),0.0) as 'FWCharge',
|
|
|
|
+ IFNULL(ROUND(t2.JLCharge,3),0.0) as 'JLCharge',
|
|
|
|
+ IFNULL(ROUND(t2.KFCharge,3),0.0) as 'KFCharge'
|
|
FROM (SELECT id,realname FROM sys_user WHERE id in
|
|
FROM (SELECT id,realname FROM sys_user WHERE id in
|
|
<foreach collection="userIds" item="userId" separator="," open="(" close=")">
|
|
<foreach collection="userIds" item="userId" separator="," open="(" close=")">
|
|
#{userId}
|
|
#{userId}
|
|
@@ -197,7 +197,7 @@
|
|
SELECT
|
|
SELECT
|
|
t.id AS 'userId',
|
|
t.id AS 'userId',
|
|
t.realname AS 'userName',
|
|
t.realname AS 'userName',
|
|
- IFNULL(t1.totalCharge,0.0) as 'totalCharge'
|
|
|
|
|
|
+ IFNULL(ROUND(t1.totalCharge,3),0.0) as 'totalCharge'
|
|
FROM (SELECT id,realname FROM sys_user WHERE id in
|
|
FROM (SELECT id,realname FROM sys_user WHERE id in
|
|
<foreach collection="userIds" item="userId" separator="," open="(" close=")">
|
|
<foreach collection="userIds" item="userId" separator="," open="(" close=")">
|
|
#{userId}
|
|
#{userId}
|
|
@@ -218,7 +218,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getManageChargeCommission" resultType="java.math.BigDecimal">
|
|
<select id="getManageChargeCommission" resultType="java.math.BigDecimal">
|
|
- SELECT IFNULL(t1.totalCharge - t2.JLCharge - t2.KFCharge, 0.0)
|
|
|
|
|
|
+ SELECT IFNULL(ROUND(t1.totalCharge - t2.JLCharge - t2.KFCharge, 3), 0.0)
|
|
FROM (
|
|
FROM (
|
|
SELECT SUM(charge) as 'totalCharge'
|
|
SELECT SUM(charge) as 'totalCharge'
|
|
FROM application.kuaishou_operation_performance_base
|
|
FROM application.kuaishou_operation_performance_base
|
|
@@ -249,7 +249,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getTtManageChargeCommission" resultType="java.math.BigDecimal">
|
|
<select id="getTtManageChargeCommission" resultType="java.math.BigDecimal">
|
|
- SELECT IFNULL(SUM(cost), 0.0)
|
|
|
|
|
|
+ SELECT IFNULL(ROUND(SUM(cost), 3), 0.0)
|
|
FROM application.bytedance_operation_performance_base
|
|
FROM application.bytedance_operation_performance_base
|
|
WHERE account_id IN (
|
|
WHERE account_id IN (
|
|
SELECT account_id
|
|
SELECT account_id
|