OrderAbnormalDataSmapper.xml
7.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?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.zteits.order.mapper.smapper.OrderAbnormalDataSmapper">
<resultMap id="BaseResultMap" type="com.zteits.order.domain.OrderAbnormalData">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="data_source" jdbcType="INTEGER" property="dataSource" />
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
<result column="record_id" jdbcType="VARCHAR" property="recordId" />
<result column="abnormal_type" jdbcType="INTEGER" property="abnormalType" />
<result column="abnormal_state" jdbcType="INTEGER" property="abnormalState" />
<result column="park_event" jdbcType="INTEGER" property="parkEvent" />
<result column="terminal_source" jdbcType="INTEGER" property="terminalSource" />
<result column="source_type" jdbcType="INTEGER" property="sourceType" />
<result column="pl_no" jdbcType="VARCHAR" property="plNo" />
<result column="pl_name" jdbcType="VARCHAR" property="plName" />
<result column="berth_range_no" jdbcType="VARCHAR" property="berthRangeNo" />
<result column="berth_range_name" jdbcType="VARCHAR" property="berthRangeName" />
<result column="berth_no" jdbcType="VARCHAR" property="berthNo" />
<result column="order_dicount_fee" jdbcType="BIGINT" property="orderDicountFee" />
<result column="order_act_fee" jdbcType="BIGINT" property="orderActFee" />
<result column="order_total_fee" jdbcType="BIGINT" property="orderTotalFee" />
<result column="car_number" jdbcType="VARCHAR" property="carNumber" />
<result column="car_type" jdbcType="INTEGER" property="carType" />
<result column="car_number_color" jdbcType="VARCHAR" property="carNumberColor" />
<result column="park_in_time" jdbcType="TIMESTAMP" property="parkInTime" />
<result column="park_out_time" jdbcType="TIMESTAMP" property="parkOutTime" />
<result column="parking_duration" jdbcType="BIGINT" property="parkingDuration" />
<result column="park_in_source_code" jdbcType="VARCHAR" property="parkInSourceCode" />
<result column="park_in_source_name" jdbcType="VARCHAR" property="parkInSourceName" />
<result column="park_in_device_code" jdbcType="VARCHAR" property="parkInDeviceCode" />
<result column="park_in_device_name" jdbcType="VARCHAR" property="parkInDeviceName" />
<result column="park_out_source_code" jdbcType="VARCHAR" property="parkOutSourceCode" />
<result column="park_out_source_name" jdbcType="VARCHAR" property="parkOutSourceName" />
<result column="park_out_device_code" jdbcType="VARCHAR" property="parkOutDeviceCode" />
<result column="park_out_device_name" jdbcType="VARCHAR" property="parkOutDeviceName" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
<result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="modfiy_emp_id" jdbcType="VARCHAR" property="modfiyEmpId" />
<result column="modfiy_emp_name" jdbcType="VARCHAR" property="modfiyEmpName" />
<result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
<result column="org_id" jdbcType="BIGINT" property="orgId" />
<result column="data_state" jdbcType="INTEGER" property="dataState" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, data_source, order_id, record_id, abnormal_type, abnormal_state, park_event,
terminal_source, source_type, pl_no, pl_name, berth_range_no, berth_range_name, berth_no,
order_dicount_fee, order_act_fee, order_total_fee, car_number, car_type, car_number_color,
park_in_time, park_out_time, parking_duration, park_in_source_code, park_in_source_name,
park_in_device_code, park_in_device_name, park_out_source_code, park_out_source_name,
park_out_device_code, park_out_device_name, remark, create_emp_id, create_emp_name,
create_date, modfiy_emp_id, modfiy_emp_name, modfiy_date, org_id, data_state
</sql>
<!-- 查询异常停车记录 -->
<select id="queryOrderAbnormalDataForList" resultMap="BaseResultMap"
parameterType="com.zteits.clouds.api.dto.order.hvabnormal.param.OrderAbnormalRequest">
select
<include refid="Base_Column_List"/>
from order_abnormal_data o
where 1=1
and o.data_state = 1
<if test="plNos != null and plNos.size >0 ">
AND o.pl_no IN
<foreach collection="plNos" item="plNo" index="index" open="(" close=")" separator=",">
/*停车场编号*/
#{plNo}
</foreach>
</if>
<if test="carNumber !=null and carNumber !=''">
AND o.car_number like CONCAT(#{carNumber},'%')
</if>
<if test="abnormalType != 0 and abnormalType != -1">
AND abnormal_type = #{abnormalType,jdbcType=INTEGER}
</if>
<if test="abnormalType == 0">
AND abnormal_type = #{abnormalType,jdbcType=INTEGER}
</if>
<if test="beginCreateTime !=null and endCreateTime !=null">
AND create_date between #{beginCreateTime} and #{endCreateTime}
</if>
<if test="berthNo != null and berthNo !=''">
and o.berth_no=#{berthNo}
</if>
order by o.id desc
</select>
</mapper>