electripper/electripper-system/src/main/resources/mapper/system/EtOperatingAreaMapper.xml

117 lines
7.1 KiB
XML
Raw Normal View History

2024-05-23 17:24:41 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.EtOperatingAreaMapper">
<resultMap type="EtOperatingArea" id="EtOperatingAreaResult">
<result property="areaId" column="area_id" />
<result property="areaName" column="area_name" />
<result property="boundary" column="boundary" />
<result property="boundaryStr" column="boundary_str" />
2024-06-13 15:03:23 +08:00
<result property="picture" column="picture" />
2024-05-23 17:24:41 +08:00
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="contact" column="contact" />
<result property="phone" column="phone" />
<result property="status" column="status" />
<result property="areaTime" column="area_time" />
2024-05-29 09:59:50 +08:00
<result property="areaTimeStart" column="area_time_start" />
<result property="areaTimeEnd" column="area_time_end" />
2024-05-23 17:24:41 +08:00
<result property="servicePhone" column="service_phone" />
<result property="slogan" column="slogan" />
<result property="province" column="province" />
<result property="city" column="city" />
<result property="county" column="county" />
<result property="areaOutOutage" column="area_out_outage" />
<result property="parkingOutDispatch" column="parking_out_dispatch" />
<result property="areaOutDispatch" column="area_out_dispatch" />
<result property="noRidingOutage" column="no_riding_outage" />
<result property="authentication" column="authentication" />
<result property="msgSwitch" column="msg_switch" />
<result property="undercharge" column="undercharge" />
<result property="error" column="error" />
<result property="agreement" column="agreement" />
<result property="deposit" column="deposit" />
<result property="outage" column="outage" />
<result property="appointmentServiceFee" column="appointment_service_fee" />
<result property="dispatchFee" column="dispatch_fee" />
<result property="vehicleManagementFee" column="vehicle_management_fee" />
<result property="timeoutMinutes" column="timeout_minutes" />
<result property="autoReplacementOrder" column="auto_replacement_order" />
2024-06-07 21:31:39 +08:00
<result property="parkingReturn" column="parking_return" />
<result property="areaOutReturn" column="area_out_return" />
2024-07-03 21:18:16 +08:00
<result property="serviceName1" column="service_name1" />
<result property="serviceName2" column="service_name2" />
<result property="serviceName3" column="service_name3" />
<result property="servicePhone1" column="service_phone1" />
<result property="servicePhone2" column="service_phone2" />
<result property="servicePhone3" column="service_phone3" />
<result property="customService" column="custom_service" />
2024-07-08 14:18:58 +08:00
<result property="isDepositDeduction" column="is_deposit_deduction" />
2024-07-13 14:12:47 +08:00
<result property="returnVerify" column="return_verify" />
<result property="upperRight" column="upper_right" />
<result property="lowerLeft" column="lower_left" />
<result property="guideMap" column="guide_map" />
<result property="guideSwitch" column="guide_switch" />
2024-05-23 17:24:41 +08:00
</resultMap>
<sql id="selectEtOperatingAreaVo">
select area_id, area_name, AsText(boundary) boundary,
2024-06-13 15:03:23 +08:00
boundary_str, picture, longitude, latitude, create_by, create_time,
2024-05-23 17:24:41 +08:00
contact, phone, status, area_time, service_phone, slogan, province,city,
county, area_out_outage, parking_out_dispatch, area_out_dispatch,
no_riding_outage, authentication, msg_switch, undercharge, error, cast(agreement as char) as agreement, deposit,
2024-05-31 21:52:08 +08:00
outage, appointment_service_fee, dispatch_fee, vehicle_management_fee, timeout_minutes,
2024-07-08 14:18:58 +08:00
auto_replacement_order, area_time_start, area_time_end, area_out_return, parking_return, service_name1, service_name2,
service_name3, service_phone1, service_phone2, service_phone3, custom_service, is_deposit_deduction, return_verify, upper_right, lower_left, guide_map,guide_switch from et_operating_area
2024-05-23 17:24:41 +08:00
</sql>
<select id="selectEtOperatingAreaList" parameterType="EtOperatingArea" resultMap="EtOperatingAreaResult">
2024-05-31 21:52:08 +08:00
select a.area_id, a.area_name, AsText(a.boundary) boundary,
a.boundary_str, a.picture, a.longitude, a.latitude, a.create_by, a.create_time,d.dept_id deptId,d.dept_name deptName,
2024-05-31 21:52:08 +08:00
a.contact, a.phone, a.status, a.area_time, a.service_phone, a.slogan, a.province, a.city,
a.county, a.area_out_outage, a.parking_out_dispatch, a.area_out_dispatch,
a.no_riding_outage, a.authentication, a.msg_switch, a.undercharge, a.error, a.agreement, a.deposit,
a.outage, a.appointment_service_fee, a.dispatch_fee, a.vehicle_management_fee, a.timeout_minutes,
2024-07-03 21:18:16 +08:00
a.auto_replacement_order, a.area_time_start, a.area_time_end, a.area_out_return, a.parking_return,
a.service_name1, a.service_name2, a.service_name3, a.service_phone1, a.service_phone2, a.service_phone3, a.custom_service, a.is_deposit_deduction,a.return_verify, a.upper_right, a.lower_left, a.guide_map,guide_switch from et_operating_area a
2024-06-01 14:25:02 +08:00
left join et_area_dept ad on ad.area_id = a.area_id
left join sys_dept d on d.dept_id = ad.dept_id
2024-05-31 21:52:08 +08:00
where 1 = 1
<if test="areaName != null and areaName != ''"> and a.area_name like concat('%', #{areaName}, '%')</if>
2024-06-11 13:37:43 +08:00
<if test="deptId != null "> and d.dept_id = #{deptId}</if>
<if test="areaId != null "> and a.area_id = #{areaId}</if>
2024-05-31 21:52:08 +08:00
<!-- 数据范围过滤 -->
${params.dataScope}
2024-05-23 17:24:41 +08:00
</select>
<select id="selectEtOperatingAreaByAreaId" parameterType="Long" resultMap="EtOperatingAreaResult">
<include refid="selectEtOperatingAreaVo"/>
where area_id = #{areaId}
</select>
2024-05-25 18:47:31 +08:00
<select id="selectAreaListByDeptId" resultType="java.lang.Long" parameterType="Long">
select a.area_id
from et_operating_area a
left join et_area_dept ad on ad.area_id = a.area_id
left join sys_dept d on d.dept_id = ad.dept_id
2024-06-18 11:30:58 +08:00
<where>
<if test="deptId != null"> and d.dept_id = #{deptId}</if>
</where>
2024-05-25 18:47:31 +08:00
</select>
2024-06-25 09:25:38 +08:00
<select id="selectAreaListByDeptId2" resultMap="EtOperatingAreaResult" parameterType="Long">
select a.area_id, a.area_name
from et_operating_area a
left join et_area_dept ad on ad.area_id = a.area_id
left join sys_dept d on d.dept_id = ad.dept_id
<where>
<if test="deptId != null"> and d.dept_id = #{deptId}</if>
</where>
</select>
2024-05-23 17:24:41 +08:00
</mapper>