提交代码

dev-discount
胡锐 2 years ago
parent f31d36a3d7
commit 8483d44a72
  1. 16
      hai-bweb/src/main/java/com/bweb/controller/HighGasController.java
  2. 20
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java

@ -120,12 +120,12 @@ public class HighGasController {
Map<String, Object> history = new HashMap<>(); Map<String, Object> history = new HashMap<>();
// 历史加油总金额 // 历史加油总金额
Map<String, Object> historyTotal = highOrderService.getGasStaffHistoryOrderCount(userInfoModel.getGasStaff().getId(), "2,3,4,6,7"); Map<String, Object> historyTotal = highOrderService.getGasStaffHistoryOrderCount(userInfoModel.getGasStaff().getId(), "2,4,5,6");
history.put("totalPrice", historyTotal.get("price")); history.put("totalPrice", historyTotal.get("price"));
history.put("totalCount", historyTotal.get("count")); history.put("totalCount", historyTotal.get("count"));
// 历史加油金额 // 历史加油金额
Map<String, Object> historyIncomet = highOrderService.getGasStaffHistoryOrderCount(userInfoModel.getGasStaff().getId(), "2,3,6,7"); Map<String, Object> historyIncomet = highOrderService.getGasStaffHistoryOrderCount(userInfoModel.getGasStaff().getId(), "2,5,6");
history.put("incomePrice", historyIncomet.get("price")); history.put("incomePrice", historyIncomet.get("price"));
history.put("incomeCount", historyIncomet.get("count")); history.put("incomeCount", historyIncomet.get("count"));
@ -138,12 +138,12 @@ public class HighGasController {
Map<String, Object> today = new HashMap<>(); Map<String, Object> today = new HashMap<>();
// 今日加油总金额 // 今日加油总金额
Map<String, Object> todayTotal = highOrderService.getGasStaffTheDayOrderCount(userInfoModel.getGasStaff().getId(), "2,3,4,6,7"); Map<String, Object> todayTotal = highOrderService.getGasStaffTheDayOrderCount(userInfoModel.getGasStaff().getId(), "2,4,5,6");
today.put("totalPrice", todayTotal.get("price")); today.put("totalPrice", todayTotal.get("price"));
today.put("totalCount", todayTotal.get("count")); today.put("totalCount", todayTotal.get("count"));
// 今日加油金额 // 今日加油金额
Map<String, Object> todayIncomet = highOrderService.getGasStaffTheDayOrderCount(userInfoModel.getGasStaff().getId(), "2,3,6,7"); Map<String, Object> todayIncomet = highOrderService.getGasStaffTheDayOrderCount(userInfoModel.getGasStaff().getId(), "2,5,6");
today.put("incomePrice", todayIncomet.get("price")); today.put("incomePrice", todayIncomet.get("price"));
today.put("incomeCount", todayIncomet.get("count")); today.put("incomeCount", todayIncomet.get("count"));
@ -156,12 +156,12 @@ public class HighGasController {
} else { } else {
Map<String, Object> history = new HashMap<>(); Map<String, Object> history = new HashMap<>();
// 历史加油总金额 // 历史加油总金额
Map<String, Object> historyTotal = highOrderService.getGasHistoryOrderCount(userInfoModel.getMerchantStore().getId(), "2,3,4,6,7"); Map<String, Object> historyTotal = highOrderService.getGasHistoryOrderCount(userInfoModel.getMerchantStore().getId(), "2,4,5,6");
history.put("totalPrice", historyTotal.get("price")); history.put("totalPrice", historyTotal.get("price"));
history.put("totalCount", historyTotal.get("count")); history.put("totalCount", historyTotal.get("count"));
// 历史加油金额 // 历史加油金额
Map<String, Object> historyIncomet = highOrderService.getGasHistoryOrderCount(userInfoModel.getMerchantStore().getId(), "2,3,6,7"); Map<String, Object> historyIncomet = highOrderService.getGasHistoryOrderCount(userInfoModel.getMerchantStore().getId(), "2,5,6");
history.put("incomePrice", historyIncomet.get("price")); history.put("incomePrice", historyIncomet.get("price"));
history.put("incomeCount", historyIncomet.get("count")); history.put("incomeCount", historyIncomet.get("count"));
@ -174,12 +174,12 @@ public class HighGasController {
Map<String, Object> today = new HashMap<>(); Map<String, Object> today = new HashMap<>();
// 今日加油总金额 // 今日加油总金额
Map<String, Object> todayTotal = highOrderService.getGasTheDayOrderCount(userInfoModel.getMerchantStore().getId(), "2,3,4,6,7"); Map<String, Object> todayTotal = highOrderService.getGasTheDayOrderCount(userInfoModel.getMerchantStore().getId(), "2,4,5,6");
today.put("totalPrice", todayTotal.get("price")); today.put("totalPrice", todayTotal.get("price"));
today.put("totalCount", todayTotal.get("count")); today.put("totalCount", todayTotal.get("count"));
// 今日加油金额 // 今日加油金额
Map<String, Object> todayIncomet = highOrderService.getGasTheDayOrderCount(userInfoModel.getMerchantStore().getId(), "2,3,6,7"); Map<String, Object> todayIncomet = highOrderService.getGasTheDayOrderCount(userInfoModel.getMerchantStore().getId(), "2,5,6");
today.put("incomePrice", todayIncomet.get("price")); today.put("incomePrice", todayIncomet.get("price"));
today.put("incomeCount", todayIncomet.get("count")); today.put("incomeCount", todayIncomet.get("count"));

@ -1119,33 +1119,29 @@ public interface HighOrderMapperExt {
@Select({" select" + @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" + " count(1) count" +
" from high_child_order a,high_order b " + " from high_gas_order where store_id = #{storeId} and status in (${status}) " +
" where a.order_id = b.id and goods_type = 3 and goods_id = #{storeId} and b.order_status in (${status}) " +
" and to_days(pay_time) = to_days(now())"}) " and to_days(pay_time) = to_days(now())"})
Map<String, Object> selectGasTheDayOrderCount(@Param("storeId") Long storeId, @Param("status") String status); Map<String, Object> selectGasTheDayOrderCount(@Param("storeId") Long storeId, @Param("status") String status);
@Select({" select" + @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" + " count(1) count" +
" from high_child_order a,high_order b " + " from high_gas_order a where a.gas_staff_id = #{gasStaffId} and a.status in (${status}) " +
" where a.order_id = b.id and goods_type = 3 and gas_staff_id = #{gasStaffId} and b.order_status in (${status}) " +
" and to_days(pay_time) = to_days(now())"}) " and to_days(pay_time) = to_days(now())"})
Map<String, Object> selectGasStaffTheDayOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status); Map<String, Object> selectGasStaffTheDayOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status);
@Select({" select" + @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" + " count(1) count" +
" from high_child_order a,high_order b " + " from high_gas_order a where store_id = #{storeId} and a.status in (${status}) "})
" where a.order_id = b.id and goods_type = 3 and goods_id = #{storeId} and b.order_status in (${status}) "})
Map<String, Object> selectGasHistoryOrderCount(@Param("storeId") Long storeId, @Param("status") String status); Map<String, Object> selectGasHistoryOrderCount(@Param("storeId") Long storeId, @Param("status") String status);
@Select({" select" + @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" + " count(1) count" +
" from high_child_order a,high_order b " + " from high_gas_order a where a.gas_staff_id = #{gasStaffId} and a.status in (${status}) "})
" where a.order_id = b.id and goods_type = 3 and gas_staff_id = #{gasStaffId} and b.order_status in (${status}) "})
Map<String, Object> selectGasStaffHistoryOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status); Map<String, Object> selectGasStaffHistoryOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status);
@Select({ @Select({

Loading…
Cancel
Save