update 修改逻辑卡号功能、占桩订单区分运营商和站点

This commit is contained in:
Lemon
2024-07-15 14:14:01 +08:00
parent 217284e272
commit 513ea9da4f
9 changed files with 183 additions and 20 deletions

View File

@@ -997,16 +997,30 @@
order_pile_occupy t1
JOIN pile_station_info t2 ON t1.station_id = t2.id
AND t1.del_flag = '0'
JOIN pile_merchant_info t3 on t2.merchant_id = t3.id and t2.del_flag = '0'
<where>
<if test="occupyCode != null and occupyCode != ''"> and t1.occupy_code = #{occupyCode}</if>
<if test="memberId != null and memberId != ''"> and t1.member_id = #{memberId}</if>
<if test="stationId != null and stationId != ''"> and t1.station_id = #{stationId}</if>
<if test="plateNumber != null and plateNumber != ''"> and t1.plate_number = #{plateNumber}</if>
<if test="status != null and status != ''"> and t1.status = #{status}</if>
<if test="startTime != null "> and t1.start_time = #{startTime}</if>
<if test="orderAmount != null "> and t1.order_amount = #{orderAmount}</if>
<if test="pileSn != null and pileSn != ''"> and t1.pile_sn = #{pileSn}</if>
<if test="pileConnectorCode != null and pileConnectorCode != ''"> and t1.pile_connector_code = #{pileConnectorCode}</if>
<!-- 数据范围过滤 -->
<if test="dto.merchantDeptIds != null and dto.merchantDeptIds.size() != 0">
and t3.dept_id in
<foreach collection="dto.merchantDeptIds" item="merchantDeptId" open="(" separator="," close=")">
#{merchantDeptId}
</foreach>
</if>
<if test="dto.stationDeptIds != null and dto.stationDeptIds.size() != 0">
and t2.dept_id in
<foreach collection="dto.stationDeptIds" item="stationDeptId" open="(" separator="," close=")">
#{stationDeptId}
</foreach>
</if>
<if test="dto.occupyCode != null and dto.occupyCode != ''"> and t1.occupy_code = #{dto.occupyCode}</if>
<if test="dto.memberId != null and dto.memberId != ''"> and t1.member_id = #{dto.memberId}</if>
<if test="dto.stationId != null and dto.stationId != ''"> and t1.station_id = #{dto.stationId}</if>
<if test="dto.plateNumber != null and dto.plateNumber != ''"> and t1.plate_number = #{dto.plateNumber}</if>
<if test="dto.status != null and dto.status != ''"> and t1.status = #{dto.status}</if>
<if test="dto.startTime != null "> and t1.start_time = #{dto.startTime}</if>
<if test="dto.orderAmount != null "> and t1.order_amount = #{dto.orderAmount}</if>
<if test="dto.pileSn != null and dto.pileSn != ''"> and t1.pile_sn = #{dto.pileSn}</if>
<if test="dto.pileConnectorCode != null and dto.pileConnectorCode != ''"> and t1.pile_connector_code = #{dto.pileConnectorCode}</if>
</where>
order by t1.create_time desc
</select>