🔥 移除毛利分析价格缺失统计
This commit is contained in:
-2
@@ -43,6 +43,4 @@ public class PrcProfitReportProductRow implements Serializable
|
||||
@Excel(name = "未计算提成订单数", width = 20)
|
||||
private Long commissionMissingOrderCount;
|
||||
*/
|
||||
@Excel(name = "产品价或价格缺失订单数", width = 22)
|
||||
private Long incompleteOrderCount;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,4 @@ public class PrcProfitReportQuery extends BaseEntity
|
||||
private String arBillStatus;
|
||||
/** 是否按产品维度分组值下钻订单明细,允许分组字段为空。 */
|
||||
private Boolean productDrilldown;
|
||||
/** 订单明细弹窗的筛选类型:ALL、INCOMPLETE;COMMISSION_MISSING 暂停使用。 */
|
||||
private String detailType;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ public class PrcProfitReportSummary implements Serializable
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long orderCount;
|
||||
private Long incompleteOrderCount;
|
||||
private String currency;
|
||||
private BigDecimal costAmount;
|
||||
private BigDecimal redlineAmount;
|
||||
|
||||
@@ -98,12 +98,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="commissionAmount" column="commission_amount"/>
|
||||
<result property="commissionMissingOrderCount" column="commission_missing_order_count"/>
|
||||
-->
|
||||
<result property="incompleteOrderCount" column="incomplete_order_count"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="PrcProfitReportSummary" id="PrcProfitReportSummaryResult">
|
||||
<result property="orderCount" column="order_count"/>
|
||||
<result property="incompleteOrderCount" column="incomplete_order_count"/>
|
||||
<result property="currency" column="currency"/>
|
||||
<result property="costAmount" column="cost_amount"/>
|
||||
<result property="redlineAmount" column="redline_amount"/>
|
||||
@@ -193,16 +191,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<!-- 提成未计算订单下钻暂停使用。
|
||||
<when test="detailType == 'COMMISSION_MISSING'">
|
||||
and (cr.commission_rate is null or i.product_amount is null or i.sales_amount is null)
|
||||
</when>
|
||||
-->
|
||||
<when test="detailType == 'INCOMPLETE'">
|
||||
and (i.product_amount is null or i.redline_amount is null or i.sales_amount is null)
|
||||
</when>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
@@ -271,15 +259,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
then i.sales_amount - i.product_amount else null end) * 100 /
|
||||
sum(case when i.product_amount is not null and i.sales_amount is not null
|
||||
then i.sales_amount else null end), 4)
|
||||
end as sales_gross_margin_rate,
|
||||
end as sales_gross_margin_rate
|
||||
<!-- 提成金额与未计算订单数暂停使用。
|
||||
sum(case when cr.commission_rate is not null and i.product_amount is not null and i.sales_amount is not null
|
||||
then (i.sales_amount - i.product_amount) * cr.commission_rate / 100 else null end) as commission_amount,
|
||||
sum(case when cr.commission_rate is null or i.product_amount is null or i.sales_amount is null
|
||||
then 1 else 0 end) as commission_missing_order_count,
|
||||
-->
|
||||
sum(case when i.product_amount is null or i.redline_amount is null or i.sales_amount is null
|
||||
then 1 else 0 end) as incomplete_order_count
|
||||
<include refid="profitReportFromAndWhere"/>
|
||||
group by p.product_code, p.product_name, p.country_code, p.country_name, i.currency
|
||||
order by p.product_code, p.country_code, i.currency
|
||||
@@ -287,8 +273,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectSummary" resultMap="PrcProfitReportSummaryResult">
|
||||
select i.currency, count(*) as order_count,
|
||||
sum(case when i.product_amount is null or i.redline_amount is null or i.sales_amount is null
|
||||
then 1 else 0 end) as incomplete_order_count,
|
||||
sum(i.product_amount) as cost_amount,
|
||||
sum(i.redline_amount) as redline_amount,
|
||||
sum(case when i.product_amount is not null and i.redline_amount is not null
|
||||
|
||||
@@ -98,9 +98,6 @@
|
||||
<div class="metric-item"><div class="metric-label">提成金额</div><div class="metric-value">{{ money(summary.commissionAmount) }}</div></div>
|
||||
</el-col>
|
||||
-->
|
||||
<el-col :xs="12" :sm="8" :md="6">
|
||||
<div class="metric-item"><div class="metric-label">价格缺失订单</div><div class="metric-value">{{ summary.incompleteOrderCount || 0 }}</div></div>
|
||||
</el-col>
|
||||
<!-- 提成功能暂停使用。
|
||||
<el-col :xs="12" :sm="8" :md="6">
|
||||
<div class="metric-item"><div class="metric-label">提成未计算订单</div><div class="metric-value">{{ summary.commissionMissingOrderCount || 0 }}</div></div>
|
||||
@@ -149,7 +146,7 @@
|
||||
<el-table-column prop="countryCode" label="国家代码" width="100" align="center" />
|
||||
<el-table-column prop="currency" label="币种" width="80" align="center" />
|
||||
<el-table-column prop="orderCount" label="订单数" width="100" align="right">
|
||||
<template #default="{ row }"><span class="success-value order-count-link" :class="{ 'is-disabled': !row.orderCount }" @click.stop="openOrderList(row, 'ALL', '订单数')">{{ row.orderCount }}</span></template>
|
||||
<template #default="{ row }"><span class="success-value order-count-link" :class="{ 'is-disabled': !row.orderCount }" @click.stop="openOrderList(row)">{{ row.orderCount }}</span></template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="costAmount" label="产品价" min-width="130" align="right"><template #default="{ row }">{{ money(row.costAmount) }}</template></el-table-column>
|
||||
<el-table-column prop="redlineAmount" label="红线价" min-width="130" align="right"><template #default="{ row }">{{ money(row.redlineAmount) }}</template></el-table-column>
|
||||
@@ -164,9 +161,6 @@
|
||||
<template #default="{ row }"><span class="success-value order-count-link" :class="{ 'is-disabled': !row.commissionMissingOrderCount }" @click.stop="openOrderList(row, 'COMMISSION_MISSING', '提成未计算订单')">{{ row.commissionMissingOrderCount }}</span></template>
|
||||
</el-table-column>
|
||||
-->
|
||||
<el-table-column prop="incompleteOrderCount" label="价格缺失订单" width="130" align="right">
|
||||
<template #default="{ row }"><span class="success-value order-count-link" :class="{ 'is-disabled': !row.incompleteOrderCount }" @click.stop="openOrderList(row, 'INCOMPLETE', '价格缺失订单')">{{ row.incompleteOrderCount }}</span></template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-table-column prop="bizDate" label="计费时间" width="170" align="center"><template #default="{ row }">{{ parseTime(row.bizDate) }}</template></el-table-column>
|
||||
@@ -446,15 +440,12 @@ function handleDimensionChange() {
|
||||
Promise.all([loadSummary(), loadRows()])
|
||||
}
|
||||
|
||||
function openOrderList(row, detailType, label) {
|
||||
function openOrderList(row) {
|
||||
if (!validateMultiValueFilters()) return
|
||||
// 提成未计算订单下钻暂停使用:detailType === 'COMMISSION_MISSING' ? row.commissionMissingOrderCount
|
||||
const count = detailType === 'ALL' ? row.orderCount : row.incompleteOrderCount
|
||||
if (!count) return
|
||||
orderListTitle.value = `${label}订单列表`
|
||||
if (!row.orderCount) return
|
||||
orderListTitle.value = '订单列表'
|
||||
orderListContext.value = {
|
||||
productDrilldown: true,
|
||||
detailType,
|
||||
productCode: row.productCode,
|
||||
countryCode: row.countryCode,
|
||||
currency: row.currency
|
||||
|
||||
Reference in New Issue
Block a user