首炬大屏

master
lzq 2026-01-16 10:54:58 +08:00
parent 45899d6fc5
commit a0a9ed6e00
2 changed files with 18 additions and 6 deletions

View File

@ -197,6 +197,12 @@ public class ShouJuStatisticsService implements StatisticsService {
log.error("订单动态数据获取失败", ex);
return 0D;
});
CompletableFuture<Double> total_disposeWeight = CompletableFuture.supplyAsync(() -> {
return statisticsMapper.disposeWeight(null, null);
}).exceptionally(ex -> {
log.error("订单动态数据获取失败", ex);
return 0D;
});
CompletableFuture<Double> yesterday_disposeWeight = CompletableFuture.supplyAsync(() -> {
DateTime yesterday = DateUtil.offsetDay(date, -1);
long yesterday_start = DateUtil.beginOfDay(yesterday).getTime() / 1000;
@ -388,6 +394,7 @@ public class ShouJuStatisticsService implements StatisticsService {
.put("yearAmountIn", yearAmount_.get_0())
.put("yearAmountOut", yearAmount_.get_1())
.put("chuzhi", map2)
.put("totaDisposeWeight", total_disposeWeight.get())
.build();
}

View File

@ -131,11 +131,16 @@
SELECT IFNULL(SUM(a.weight), 0) weight
FROM ba_order a
INNER JOIN ba_goods b ON b.id = a.goods_id AND b.depot_type = 1 AND b.category_id IN (51, 47) AND b.id NOT IN (287, 286, 279, 278, 293, 273, 271, 270, 262, 2)
WHERE a.create_time >= #{startTime}
<where>
<if test="startTime != null and endTime != null">
AND a.create_time >= #{startTime}
AND a.create_time <![CDATA[ <= ]]> #{endTime}
</if>
AND a.type != 4
AND a.finish = 1
AND a.status = 1
</where>
</select>
<select id="getTodayOrderSummary" resultType="com.njzscloud.supervisory.statistics.pojo.TodayOrderSummary">
SELECT MAX(IF(order_status = '已完成', order_count, 0)) completed,