Explorar el Código

优化余额查询,调价记录查询

zangguocen hace 3 años
padre
commit
edc1bbdc96

+ 8 - 3
yijia-station/src/main/java/com/yijia/station/controller/StationBalanceChangeController.java

@@ -49,7 +49,7 @@ public class StationBalanceChangeController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(StationBalanceChange stationBalanceChange)
     {
-        List<String> list = deptService.levelDeptList(stationBalanceChange.getLevelId());
+        List<String> list = deptService.selectdeptInfoList(new SysDept());
         if(list!=null && list.size()>0){
             stationBalanceChange.setStationIdList(list);
             stationBalanceChange.setStationId(null);
@@ -66,9 +66,14 @@ public class StationBalanceChangeController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(StationBalanceChange stationBalanceChange)
     {
-        List<StationBalanceChange> list = stationBalanceChangeService.selectStationBalanceChangeList(stationBalanceChange);
+        List<String> list = deptService.selectdeptInfoList(new SysDept());
+        if(list!=null && list.size()>0){
+            stationBalanceChange.setStationIdList(list);
+            stationBalanceChange.setStationId(null);
+        }
+        List<StationBalanceChange> changeList = stationBalanceChangeService.selectStationBalanceChangeList(stationBalanceChange);
         ExcelUtil<StationBalanceChange> util = new ExcelUtil<StationBalanceChange>(StationBalanceChange.class);
-        return util.exportExcel(list, "change");
+        return util.exportExcel(changeList, "change");
     }
 
     /**

+ 21 - 4
yijia-station/src/main/java/com/yijia/station/controller/StationSettlementPriceAdjustController.java

@@ -1,6 +1,11 @@
 package com.yijia.station.controller;
 
 import java.util.List;
+
+import com.yijia.common.core.domain.entity.SysDept;
+import com.yijia.common.core.domain.model.LoginUser;
+import com.yijia.common.utils.SecurityUtils;
+import com.yijia.system.service.ISysDeptService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -33,15 +38,22 @@ public class StationSettlementPriceAdjustController extends BaseController
     @Autowired
     private IStationSettlementPriceAdjustService stationSettlementPriceAdjustService;
 
+    @Autowired
+    private ISysDeptService deptService;
     /**
      * 查询结算价格,司机价格优惠调整列表
      */
     @GetMapping("/list")
     public TableDataInfo list(StationSettlementPriceAdjust stationSettlementPriceAdjust)
     {
+        List<String> list = deptService.selectdeptInfoList(new SysDept());
+        if(list!=null && list.size()>0){
+            stationSettlementPriceAdjust.setStationIdList(list);
+            stationSettlementPriceAdjust.setStationId(null);
+        }
         startPage();
-        List<StationSettlementPriceAdjust> list = stationSettlementPriceAdjustService.selectStationSettlementPriceAdjustList(stationSettlementPriceAdjust);
-        return getDataTable(list);
+        List<StationSettlementPriceAdjust> adjustlist = stationSettlementPriceAdjustService.selectStationSettlementPriceAdjustList(stationSettlementPriceAdjust);
+        return getDataTable(adjustlist);
     }
 
     /**
@@ -51,9 +63,14 @@ public class StationSettlementPriceAdjustController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(StationSettlementPriceAdjust stationSettlementPriceAdjust)
     {
-        List<StationSettlementPriceAdjust> list = stationSettlementPriceAdjustService.selectStationSettlementPriceAdjustList(stationSettlementPriceAdjust);
+        List<String> list = deptService.selectdeptInfoList(new SysDept());
+        if(list!=null && list.size()>0){
+            stationSettlementPriceAdjust.setStationIdList(list);
+            stationSettlementPriceAdjust.setStationId(null);
+        }
+        List<StationSettlementPriceAdjust> adjustlist = stationSettlementPriceAdjustService.selectStationSettlementPriceAdjustList(stationSettlementPriceAdjust);
         ExcelUtil<StationSettlementPriceAdjust> util = new ExcelUtil<StationSettlementPriceAdjust>(StationSettlementPriceAdjust.class);
-        return util.exportExcel(list, "adjust");
+        return util.exportExcel(adjustlist, "adjust");
     }
 
     /**

+ 7 - 0
yijia-station/src/main/resources/mapper/station/StationBalanceChangeMapper.xml

@@ -29,6 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
             <if test="type != null  and type != ''"> and type = #{type}</if>
             <if test="amt != null "> and amt = #{amt}</if>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
         </where>
     </select>
 

+ 7 - 0
yijia-station/src/main/resources/mapper/station/StationSettlementPriceAdjustMapper.xml

@@ -32,6 +32,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="driverPrice != null "> and driver_price = #{driverPrice}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
         </where>
     </select>