Prechádzať zdrojové kódy

订单查询支持互联平台筛选

skyline 3 týždňov pred
rodič
commit
9ff5e987a6

+ 12 - 0
admin-web/src/views/admin/ordering/index.vue

@@ -52,6 +52,18 @@
             @on-change="loadData(true)"
             class="wd150 mr10">
         </ext-select>
+        <ext-select
+            v-model="state.formQuery.platformName"
+            placeholder="互联平台"
+            clearable
+            url="platform/list"
+            urlMethod="get"
+            data-key="list"
+            label-key="platformName"
+            value-key="platformName"
+            @on-change="loadData(true)"
+            class="wd150 mr10">
+        </ext-select>
         <el-input
             v-model="state.formQuery.startChargeSeq"
             placeholder="充电订单号"

+ 5 - 0
entity/src/main/java/com/kym/entity/admin/queryParams/CustomChargeOrdersQueryParam.java

@@ -87,4 +87,9 @@ public class CustomChargeOrdersQueryParam extends PageParams {
      */
     private Integer stopReason;
 
+    /**
+     * 互联平台名称
+     */
+    private String platformName;
+
 }

+ 10 - 0
mapper/src/main/resources/mappers/miniapp/ChargeOrderMapper.xml

@@ -111,6 +111,11 @@
             <if test="params.endDate != null">
                 and t1.start_time &lt;= #{params.endDate}
             </if>
+            <if test="params.platformName != null and params.platformName != ''">
+                and t1.station_id IN (
+                    SELECT station_id FROM t_equipment_relation WHERE platform_name = #{params.platformName}
+                )
+            </if>
             <if test="params.stationIds != null and params.stationIds.size() > 0">
                 and t1.station_id IN
                 <foreach collection="params.stationIds" item="stationId" index="index" open="(" close=")" separator=",">
@@ -177,6 +182,11 @@
             <if test="params.stopReason != null">
                 and t1.stop_reason = #{params.stopReason}
             </if>
+            <if test="params.platformName != null and params.platformName != ''">
+                and t1.station_id IN (
+                    SELECT station_id FROM t_equipment_relation WHERE platform_name = #{params.platformName}
+                )
+            </if>
             <if test="params.stationIds != null and params.stationIds.size() > 0">
                 and t1.station_id IN
                 <foreach collection="params.stationIds" item="stationId" index="index" open="(" close=")" separator=",">