From 8b09fbc19a96b57bf1d0e4d7c79b51a76aeca554 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 28 三月 2025 19:57:56 +0800 Subject: [PATCH] 修改bug --- ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderLogisticsMapper.xml | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderLogisticsMapper.xml b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderLogisticsMapper.xml index 7fa75e0..d90b185 100644 --- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderLogisticsMapper.xml +++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderLogisticsMapper.xml @@ -138,10 +138,12 @@ case when income1.type = 1 then income1.money else 0 end as platIncome, case when income1.type = 2 then income1.money else 0 end as companyIncome, case when income1.type = 3 then income1.money else 0 end as franchiseeIncome, + IFNULL(sd.price, 0) as settlementPrice, IFNULL(income2.money,0) as driverIncome, CONCAT(di.firstName, " ", di.lastName,'-',di.phone) as driver,CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, '市内小件物流' as typeStr, - dd.name as companyName, + cc.type as companyType, + cc.name as companyName, ot.*, oc.money as cancelMoney, case when oc.payType = 1 then '手机支付' @@ -156,11 +158,12 @@ LEFT JOIN t_company as dd on dd.id = ci.companyId LEFT JOIN t_order_cancel as oc on ot.id = oc.orderId and oc.orderType = 4 LEFT JOIN ( - SELECT ii.money,ii.incomeId,cc.type FROM t_income as ii + SELECT sum(ii.money) as money,ii.incomeId,cc.type FROM t_income as ii LEFT JOIN t_company as cc on ii.objectId = cc.id - where ii.userType = 1 and ii.type != 1 and ii.orderType = 4 + where ii.userType = 1 and ii.type != 1 and ii.orderType = 4 group by ii.incomeId, cc.type ) as income1 on income1.incomeId = ot.id - LEFT JOIN (SELECT incomeId, money FROM t_income where userType = 2 and type != 1 and orderType = 4) as income2 on income2.incomeId = ot.id + LEFT JOIN (SELECT incomeId, sum(money) as money FROM t_income where userType = 2 and type != 1 and orderType = 4 group by incomeId) as income2 on income2.incomeId = ot.id + LEFT JOIN t_settlement_detail sd on ot.id = sd.orderId and sd.orderType = 4 where ot.id = #{orderId} </select> -- Gitblit v1.7.1