diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java index 77893a38..2a0b9a63 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java @@ -120,12 +120,12 @@ public class HighGasController { Map history = new HashMap<>(); // 历史加油总金额 - Map historyTotal = highOrderService.getGasStaffHistoryOrderCount(userInfoModel.getGasStaff().getId(), "2,3,4,6,7"); + Map historyTotal = highOrderService.getGasStaffHistoryOrderCount(userInfoModel.getGasStaff().getId(), "2,4,5,6"); history.put("totalPrice", historyTotal.get("price")); history.put("totalCount", historyTotal.get("count")); // 历史加油金额 - Map historyIncomet = highOrderService.getGasStaffHistoryOrderCount(userInfoModel.getGasStaff().getId(), "2,3,6,7"); + Map historyIncomet = highOrderService.getGasStaffHistoryOrderCount(userInfoModel.getGasStaff().getId(), "2,5,6"); history.put("incomePrice", historyIncomet.get("price")); history.put("incomeCount", historyIncomet.get("count")); @@ -138,12 +138,12 @@ public class HighGasController { Map today = new HashMap<>(); // 今日加油总金额 - Map todayTotal = highOrderService.getGasStaffTheDayOrderCount(userInfoModel.getGasStaff().getId(), "2,3,4,6,7"); + Map todayTotal = highOrderService.getGasStaffTheDayOrderCount(userInfoModel.getGasStaff().getId(), "2,4,5,6"); today.put("totalPrice", todayTotal.get("price")); today.put("totalCount", todayTotal.get("count")); // 今日加油金额 - Map todayIncomet = highOrderService.getGasStaffTheDayOrderCount(userInfoModel.getGasStaff().getId(), "2,3,6,7"); + Map todayIncomet = highOrderService.getGasStaffTheDayOrderCount(userInfoModel.getGasStaff().getId(), "2,5,6"); today.put("incomePrice", todayIncomet.get("price")); today.put("incomeCount", todayIncomet.get("count")); @@ -156,12 +156,12 @@ public class HighGasController { } else { Map history = new HashMap<>(); // 历史加油总金额 - Map historyTotal = highOrderService.getGasHistoryOrderCount(userInfoModel.getMerchantStore().getId(), "2,3,4,6,7"); + Map historyTotal = highOrderService.getGasHistoryOrderCount(userInfoModel.getMerchantStore().getId(), "2,4,5,6"); history.put("totalPrice", historyTotal.get("price")); history.put("totalCount", historyTotal.get("count")); // 历史加油金额 - Map historyIncomet = highOrderService.getGasHistoryOrderCount(userInfoModel.getMerchantStore().getId(), "2,3,6,7"); + Map historyIncomet = highOrderService.getGasHistoryOrderCount(userInfoModel.getMerchantStore().getId(), "2,5,6"); history.put("incomePrice", historyIncomet.get("price")); history.put("incomeCount", historyIncomet.get("count")); @@ -174,12 +174,12 @@ public class HighGasController { Map today = new HashMap<>(); // 今日加油总金额 - Map todayTotal = highOrderService.getGasTheDayOrderCount(userInfoModel.getMerchantStore().getId(), "2,3,4,6,7"); + Map todayTotal = highOrderService.getGasTheDayOrderCount(userInfoModel.getMerchantStore().getId(), "2,4,5,6"); today.put("totalPrice", todayTotal.get("price")); today.put("totalCount", todayTotal.get("count")); // 今日加油金额 - Map todayIncomet = highOrderService.getGasTheDayOrderCount(userInfoModel.getMerchantStore().getId(), "2,3,6,7"); + Map todayIncomet = highOrderService.getGasTheDayOrderCount(userInfoModel.getMerchantStore().getId(), "2,5,6"); today.put("incomePrice", todayIncomet.get("price")); today.put("incomeCount", todayIncomet.get("count")); diff --git a/hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java index c6de3a56..2cbbf50b 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java @@ -1119,33 +1119,29 @@ public interface HighOrderMapperExt { @Select({" select" + - " case when SUM(b.total_price) is null then 0 else SUM(b.total_price) end price," + + " case when SUM(gas_refuel_price) is null then 0 else SUM(gas_refuel_price) end price," + " count(1) count" + - " from high_child_order a,high_order b " + - " where a.order_id = b.id and goods_type = 3 and goods_id = #{storeId} and b.order_status in (${status}) " + + " from high_gas_order where store_id = #{storeId} and status in (${status}) " + " and to_days(pay_time) = to_days(now())"}) Map selectGasTheDayOrderCount(@Param("storeId") Long storeId, @Param("status") String status); @Select({" select" + - " case when SUM(b.total_price) is null then 0 else SUM(b.total_price) end price," + + " case when SUM(a.gas_refuel_price) is null then 0 else SUM(a.gas_refuel_price) end price," + " count(1) count" + - " from high_child_order a,high_order b " + - " where a.order_id = b.id and goods_type = 3 and gas_staff_id = #{gasStaffId} and b.order_status in (${status}) " + + " from high_gas_order a where a.gas_staff_id = #{gasStaffId} and a.status in (${status}) " + " and to_days(pay_time) = to_days(now())"}) Map selectGasStaffTheDayOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status); @Select({" select" + - " case when SUM(b.total_price) is null then 0 else SUM(b.total_price) end price," + + " case when SUM(a.gas_refuel_price) is null then 0 else SUM(a.gas_refuel_price) end price," + " count(1) count" + - " from high_child_order a,high_order b " + - " where a.order_id = b.id and goods_type = 3 and goods_id = #{storeId} and b.order_status in (${status}) "}) + " from high_gas_order a where store_id = #{storeId} and a.status in (${status}) "}) Map selectGasHistoryOrderCount(@Param("storeId") Long storeId, @Param("status") String status); @Select({" select" + - " case when SUM(b.total_price) is null then 0 else SUM(b.total_price) end price," + + " case when SUM(a.total_price) is null then 0 else SUM(a.total_price) end price," + " count(1) count" + - " from high_child_order a,high_order b " + - " where a.order_id = b.id and goods_type = 3 and gas_staff_id = #{gasStaffId} and b.order_status in (${status}) "}) + " from high_gas_order a where a.gas_staff_id = #{gasStaffId} and a.status in (${status}) "}) Map selectGasStaffHistoryOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status); @Select({