INTERNATIONALTRANSITMapper.xml
8.0 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?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.tianbo.analysis.dao.INTERNATIONALTRANSITMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
<result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
<result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
<result column="ORIGINAL_CARRIER" property="originalCarrier" jdbcType="VARCHAR" />
<result column="ORIGINAL_FLIGHTNO" property="originalFlightno" jdbcType="VARCHAR" />
<result column="ORIGINAL_FLIGHTDATE" property="originalFlightdate" jdbcType="TIMESTAMP" />
<result column="ORIGINAL_BILLNO" property="originalBillno" jdbcType="VARCHAR" />
<result column="ORIGINAL_SUB_NUMBER" property="originalSubNumber" jdbcType="VARCHAR" />
<result column="PRE_CARRIER" property="preCarrier" jdbcType="VARCHAR" />
<result column="PRE_FLIGHTNO" property="preFlightno" jdbcType="VARCHAR" />
<result column="PRE_FLIGHTDATE" property="preFlightdate" jdbcType="TIMESTAMP" />
<result column="PRE_BILLNO" property="preBillno" jdbcType="VARCHAR" />
<result column="PRE_SUB_NUMBER" property="preSubNumber" jdbcType="VARCHAR" />
<result column="BILLPIECE" property="billpiece" jdbcType="VARCHAR" />
<result column="BILLWEIGHT" property="billweight" jdbcType="VARCHAR" />
<result column="PRODUCT" property="product" jdbcType="VARCHAR" />
<result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" />
<result column="PACKAGINGTYPE" property="packagingtype" jdbcType="VARCHAR" />
<result column="STATUS" property="status" jdbcType="VARCHAR" />
<result column="RECEIPTION" property="receiption" jdbcType="VARCHAR" />
<result column="DESTINATIONSTATION_BILL" property="destinationstationBill" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
insert into INTERNATIONALTRANSIT (AUTOID, CREATEDATE, ORIGINAL_CARRIER,
ORIGINAL_FLIGHTNO, ORIGINAL_FLIGHTDATE,
ORIGINAL_BILLNO, ORIGINAL_SUB_NUMBER, PRE_CARRIER,
PRE_FLIGHTNO, PRE_FLIGHTDATE, PRE_BILLNO,
PRE_SUB_NUMBER, BILLPIECE, BILLWEIGHT,
PRODUCT, ORIGINATINGSTATION, PACKAGINGTYPE,
STATUS, RECEIPTION, DESTINATIONSTATION_BILL
)
values (#{autoid,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{originalCarrier,jdbcType=VARCHAR},
#{originalFlightno,jdbcType=VARCHAR}, #{originalFlightdate,jdbcType=TIMESTAMP},
#{originalBillno,jdbcType=VARCHAR}, #{originalSubNumber,jdbcType=VARCHAR}, #{preCarrier,jdbcType=VARCHAR},
#{preFlightno,jdbcType=VARCHAR}, #{preFlightdate,jdbcType=TIMESTAMP}, #{preBillno,jdbcType=VARCHAR},
#{preSubNumber,jdbcType=VARCHAR}, #{billpiece,jdbcType=VARCHAR}, #{billweight,jdbcType=VARCHAR},
#{product,jdbcType=VARCHAR}, #{originatingstation,jdbcType=VARCHAR}, #{packagingtype,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{receiption,jdbcType=VARCHAR}, #{destinationstationBill,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
insert into INTERNATIONALTRANSIT
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
AUTOID,
</if>
<if test="createdate != null" >
CREATEDATE,
</if>
<if test="originalCarrier != null" >
ORIGINAL_CARRIER,
</if>
<if test="originalFlightno != null" >
ORIGINAL_FLIGHTNO,
</if>
<if test="originalFlightdate != null" >
ORIGINAL_FLIGHTDATE,
</if>
<if test="originalBillno != null" >
ORIGINAL_BILLNO,
</if>
<if test="originalSubNumber != null" >
ORIGINAL_SUB_NUMBER,
</if>
<if test="preCarrier != null" >
PRE_CARRIER,
</if>
<if test="preFlightno != null" >
PRE_FLIGHTNO,
</if>
<if test="preFlightdate != null" >
PRE_FLIGHTDATE,
</if>
<if test="preBillno != null" >
PRE_BILLNO,
</if>
<if test="preSubNumber != null" >
PRE_SUB_NUMBER,
</if>
<if test="billpiece != null" >
BILLPIECE,
</if>
<if test="billweight != null" >
BILLWEIGHT,
</if>
<if test="product != null" >
PRODUCT,
</if>
<if test="originatingstation != null" >
ORIGINATINGSTATION,
</if>
<if test="packagingtype != null" >
PACKAGINGTYPE,
</if>
<if test="status != null" >
STATUS,
</if>
<if test="receiption != null" >
RECEIPTION,
</if>
<if test="destinationstationBill != null" >
DESTINATIONSTATION_BILL,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
#{autoid,jdbcType=VARCHAR},
</if>
<if test="createdate != null" >
#{createdate,jdbcType=TIMESTAMP},
</if>
<if test="originalCarrier != null" >
#{originalCarrier,jdbcType=VARCHAR},
</if>
<if test="originalFlightno != null" >
#{originalFlightno,jdbcType=VARCHAR},
</if>
<if test="originalFlightdate != null" >
#{originalFlightdate,jdbcType=TIMESTAMP},
</if>
<if test="originalBillno != null" >
#{originalBillno,jdbcType=VARCHAR},
</if>
<if test="originalSubNumber != null" >
#{originalSubNumber,jdbcType=VARCHAR},
</if>
<if test="preCarrier != null" >
#{preCarrier,jdbcType=VARCHAR},
</if>
<if test="preFlightno != null" >
#{preFlightno,jdbcType=VARCHAR},
</if>
<if test="preFlightdate != null" >
#{preFlightdate,jdbcType=TIMESTAMP},
</if>
<if test="preBillno != null" >
#{preBillno,jdbcType=VARCHAR},
</if>
<if test="preSubNumber != null" >
#{preSubNumber,jdbcType=VARCHAR},
</if>
<if test="billpiece != null" >
#{billpiece,jdbcType=VARCHAR},
</if>
<if test="billweight != null" >
#{billweight,jdbcType=VARCHAR},
</if>
<if test="product != null" >
#{product,jdbcType=VARCHAR},
</if>
<if test="originatingstation != null" >
#{originatingstation,jdbcType=VARCHAR},
</if>
<if test="packagingtype != null" >
#{packagingtype,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="receiption != null" >
#{receiption,jdbcType=VARCHAR},
</if>
<if test="destinationstationBill != null" >
#{destinationstationBill,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" >
UPDATE INTERNATIONALTRANSIT
SET RECEIPTION= #{receiption,jdbcType=VARCHAR},
STATUS = #{status,jdbcType=VARCHAR }
WHERE
ORIGINAL_FLIGHTNO = #{originalFlightno,jdbcType=VARCHAR}
AND
ORIGINAL_CARRIER = #{originalCarrier,jdbcType=VARCHAR}
AND
trunc(ORIGINAL_FLIGHTDATE)= #{originalFlightdate,jdbcType=DATE}
AND
ORIGINAL_BILLNO = #{originalBillno,jdbcType=VARCHAR}
<if test="originalSubNumber != null and originalSubNumber != ''" >
AND
ORIGINAL_SUB_NUMBER = #{originalSubNumber,jdbcType=VARCHAR}
</if>
</update>
<select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.INTERNATIONALTRANSIT" resultType="com.tianbo.analysis.model.INTERNATIONALTRANSIT">
SELECT AUTOID
FROM INTERNATIONALTRANSIT
WHERE
ORIGINAL_FLIGHTNO= #{originalFlightno,jdbcType=VARCHAR}
AND
ORIGINAL_CARRIER = #{originalCarrier,jdbcType=VARCHAR}
AND
trunc(ORIGINAL_FLIGHTDATE)= #{originalFlightdate,jdbcType=DATE}
AND
ORIGINAL_BILLNO = #{originalBillno,jdbcType=VARCHAR}
<if test="originalSubNumber != null and originalSubNumber != ''" >
AND
ORIGINAL_SUB_NUMBER = #{originalSubNumber,jdbcType=VARCHAR}
</if>
</select>
</mapper>