Merge branch 'dev' of https://git.njzscloud.com/lzq/njzscloud into dev
commit
38984e90fc
|
|
@ -96,12 +96,23 @@ public class SupervisionStatisticsService {
|
|||
double warnRate = todayTotalCount == 0 ? 0 : todayWarnCount / todayTotalCount * 100;
|
||||
double incWarnRate = yesterdayWarnCount == 0 ? 0 : (todayWarnCount - yesterdayWarnCount) / yesterdayWarnCount * 100;
|
||||
|
||||
|
||||
Double yesterdayTotalCount = MapUtil.getDouble(dataStatistics, "yesterdayTotalCount", 0.0);
|
||||
double incDayCountRate = yesterdayTotalCount == 0 ? 0 : (todayTotalCount - yesterdayTotalCount) / yesterdayTotalCount * 100;
|
||||
|
||||
Double currentMonthTotalCount = MapUtil.getDouble(dataStatistics, "currentMonthTotalCount", 0.0);
|
||||
Double lastMonthTotalCount = MapUtil.getDouble(dataStatistics, "lastMonthTotalCount", 0.0);
|
||||
double incMonthCountRate = lastMonthTotalCount == 0 ? 0 : (currentMonthTotalCount - lastMonthTotalCount) / lastMonthTotalCount * 100;
|
||||
|
||||
|
||||
dataStatistics.put("dayRate", NumberUtil.decimalFormat("#.##", dayRate));
|
||||
dataStatistics.put("monthRate", NumberUtil.decimalFormat("#.##", monthRate));
|
||||
dataStatistics.put("finishRate", NumberUtil.decimalFormat("#.##", todayFinishRate));
|
||||
dataStatistics.put("incFinishRate", NumberUtil.decimalFormat("#.##", incFinishRate));
|
||||
dataStatistics.put("warnRate", NumberUtil.decimalFormat("#.##", warnRate));
|
||||
dataStatistics.put("incWarnRate", NumberUtil.decimalFormat("#.##", incWarnRate));
|
||||
dataStatistics.put("incDayCountRate", NumberUtil.decimalFormat("#.##", incDayCountRate));
|
||||
dataStatistics.put("incMonthCountRate", NumberUtil.decimalFormat("#.##", incMonthCountRate));
|
||||
return dataStatistics;
|
||||
})
|
||||
.exceptionally(ex -> {
|
||||
|
|
|
|||
|
|
@ -161,7 +161,11 @@
|
|||
MAX(IF(t = 9, c, 0)) todayWarnCount,
|
||||
MAX(IF(t = 10, c, 0)) todayUnwarnCount,
|
||||
MAX(IF(t = 11, c, 0)) yesterdayWarnCount,
|
||||
MAX(IF(t = 12, c, 0)) yesterdayUnwarnCount
|
||||
MAX(IF(t = 12, c, 0)) yesterdayUnwarnCount,
|
||||
MAX(IF(t = 13, c, 0)) todayTotalCount,
|
||||
MAX(IF(t = 14, c, 0)) yesterdayTotalCount,
|
||||
MAX(IF(t = 15, c, 0)) currentMonthTotalCount,
|
||||
MAX(IF(t = 16, c, 0)) lastMonthTotalCount
|
||||
FROM (SELECT ROUND(SUM(b.settle_weight) / 1000, 2) c, 1 t
|
||||
FROM order_info a
|
||||
INNER JOIN order_car_in_out b ON b.id = a.car_in_out_id
|
||||
|
|
@ -256,7 +260,31 @@
|
|||
WHERE a.deleted = 0
|
||||
AND a.warn = 0
|
||||
AND b.out_time >= DATE_SUB(CURDATE(), INTERVAL 1 DAY)
|
||||
AND b.out_time <![CDATA[ < ]]> CURDATE()) tt
|
||||
AND b.out_time <![CDATA[ < ]]> CURDATE()
|
||||
UNION ALL
|
||||
SELECT COUNT(*) c, 14 t
|
||||
FROM order_info a
|
||||
INNER JOIN order_car_in_out b ON b.id = a.car_in_out_id
|
||||
WHERE a.deleted = 0
|
||||
AND a.order_status = 'YiWanCheng'
|
||||
AND b.out_time >= DATE_SUB(CURDATE(), INTERVAL 1 DAY)
|
||||
AND b.out_time <![CDATA[ < ]]> CURDATE()
|
||||
UNION ALL
|
||||
SELECT COUNT(*) c, 15 t
|
||||
FROM order_info a
|
||||
INNER JOIN order_car_in_out b ON b.id = a.car_in_out_id
|
||||
WHERE a.deleted = 0
|
||||
AND a.order_status = 'YiWanCheng'
|
||||
AND b.out_time >= DATE_FORMAT(NOW(), '%Y-%m-01 00:00:00')
|
||||
AND b.out_time <![CDATA[ < ]]> DATE_ADD(DATE_FORMAT(NOW(), '%Y-%m-01'), INTERVAL 1 MONTH)
|
||||
UNION ALL
|
||||
SELECT COUNT(*) c, 16 t
|
||||
FROM order_info a
|
||||
INNER JOIN order_car_in_out b ON b.id = a.car_in_out_id
|
||||
WHERE a.deleted = 0
|
||||
AND a.order_status = 'YiWanCheng'
|
||||
AND b.out_time >= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 MONTH), '%Y-%m-01 00:00:00')
|
||||
AND b.out_time <![CDATA[ < ]]> DATE_FORMAT(NOW(), '%Y-%m-01 00:00:00')) tt
|
||||
</select>
|
||||
|
||||
<select id="warnTruck" resultType="java.util.Map">
|
||||
|
|
|
|||
Loading…
Reference in New Issue