|
@@ -57,7 +57,8 @@ public class ContractInfoDao extends BaseDao<ContractInfoMapper, ContractInfo> {
|
|
|
_count(0).as(ContractStatisticsVo::getContractQuantity),
|
|
|
_sum(ci.amount).as(ContractStatisticsVo::getContractAmount),
|
|
|
t.field(ContractStatisticsVo::getFundReceivedAmount),
|
|
|
- column("t.fund_received_amount - t2.amount").as(ContractStatisticsVo::getProfit)
|
|
|
+ t.field(ContractStatisticsVo::getFundReceivedAmount)
|
|
|
+ .subtract(_ifNull(t2.field("amount"),0)).as(ContractStatisticsVo::getProfit)
|
|
|
)
|
|
|
.from(ci)
|
|
|
.leftJoin(t).on(ci.sellerCompany.eq(t.field(ContractInfo::getSellerCompany)))
|