Browse Source

[update] 司机在途核算记录增加仓库id搜索条件, sql逻辑增加如果运营商id未填写时查询当前账号运营商数据逻辑

miajio 1 month ago
parent
commit
4088f88813

+ 5 - 0
warehouse-admin-data/src/main/java/com/yr/warehouse/admin/driver/bo/DriverRouteAccountRecordPageBo.java

@@ -26,6 +26,11 @@ public class DriverRouteAccountRecordPageBo extends BasePageBo implements AreaSt
     private Long operatorId;
 
     /**
+     * 仓库id
+     */
+    private Long warehouseId;
+
+    /**
      * 区域员工名称
      */
     private String areaStaffName;

+ 10 - 2
warehouse-admin-data/src/main/resources/mapper/driver/DriverOnRouteAccountRecordMainMapper.xml

@@ -80,8 +80,16 @@
         <if test="bo.onlySearchCurrentDriver != null and bo.onlySearchCurrentDriver == true">
             and oas.accountId = #{bo.uid}
         </if>
-        <if test="bo.operatorId != null">
-            and dorarm.operatorId = #{bo.operatorId}
+        <choose>
+            <when test="bo.operatorId != null">
+                and dorarm.operatorId = #{bo.operatorId}
+            </when>
+            <otherwise>
+                and dorarm.operatorId = #{bo.adminOperatorId}
+            </otherwise>
+        </choose>
+        <if test="bo.warehouseId != null and bo.warehouseId > 0">
+            and dorarm.warehouseId = #{bo.warehouseId}
         </if>
         <if test="bo.areaStaffIds != null and bo.areaStaffIds.size > 0">
             <foreach item="item" index="index" collection="bo.areaStaffIds" open="and dorarm.areaStaffId in ("

+ 10 - 0
warehouse-admin-web/src/main/java/com/yr/warehouse/admin/web/driver/request/DriverRouteAccountRecordExportRequest.java

@@ -16,6 +16,16 @@ public class DriverRouteAccountRecordExportRequest implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /**
+     * 运营商id
+     */
+    private Long operatorId;
+
+    /**
+     * 仓库id
+     */
+    private Long warehouseId;
+
+    /**
      * 区域员工名称
      */
     private String areaStaffName;

+ 5 - 0
warehouse-admin-web/src/main/java/com/yr/warehouse/admin/web/driver/request/DriverRouteAccountRecordPageRequest.java

@@ -24,6 +24,11 @@ public class DriverRouteAccountRecordPageRequest extends PageRequest implements
     private Long operatorId;
 
     /**
+     * 仓库id
+     */
+    private Long warehouseId;
+
+    /**
      * 区域员工名称
      */
     private String areaStaffName;

+ 0 - 1
warehouse-admin-web/src/main/java/com/yr/warehouse/admin/web/driver/request/RouteAccountRecordDetailRequest.java

@@ -16,7 +16,6 @@ public class RouteAccountRecordDetailRequest implements Serializable {
 
     /**
      * 司机在途核算记录 - id
-
      */
     private Long routeAccountRecordMainId;