ORIGINMANIFESTMASTERMapper.xml 20.6 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 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560
<?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.imfClient.dao.ORIGINMANIFESTMASTERMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.imfClient.model.ORIGINMANIFESTMASTER" >
    <result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
    <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
    <result column="WAYBILLNOSECONDARY" property="waybillnosecondary" jdbcType="VARCHAR" />
    <result column="SEGMENT" property="segment" jdbcType="VARCHAR" />
    <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" />
    <result column="ORIGINATINGSTATIONCN" property="originatingstationcn" jdbcType="VARCHAR" />
    <result column="DESTINATIONSTATION" property="destinationstation" jdbcType="VARCHAR" />
    <result column="DESTINATIONSTATIONCN" property="destinationstationcn" jdbcType="VARCHAR" />
    <result column="TOTALWEIGHT" property="totalweight" jdbcType="VARCHAR" />
    <result column="TOTALPIECE" property="totalpiece" jdbcType="VARCHAR" />
    <result column="MANIFESTTOTALPIECE" property="manifesttotalpiece" jdbcType="VARCHAR" />
    <result column="MANIFESTTOTALWEIGHT" property="manifesttotalweight" jdbcType="VARCHAR" />
    <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
    <result column="PRODUCTNAME" property="productname" jdbcType="VARCHAR" />
    <result column="CUSTOMSSTATUS" property="customsstatus" jdbcType="VARCHAR" />
    <result column="CARRIER1" property="carrier1" jdbcType="VARCHAR" />
    <result column="ARRIVALSTATION1" property="arrivalstation1" jdbcType="VARCHAR" />
    <result column="CARRIER2" property="carrier2" jdbcType="VARCHAR" />
    <result column="ARRIVALSTATION2" property="arrivalstation2" jdbcType="VARCHAR" />
    <result column="CARRIER3" property="carrier3" jdbcType="VARCHAR" />
    <result column="ARRIVALSTATION3" property="arrivalstation3" jdbcType="VARCHAR" />
    <result column="PAYMODE" property="paymode" jdbcType="VARCHAR" />
    <result column="SPECIALGOODSCODE" property="specialgoodscode" jdbcType="VARCHAR" />
    <result column="CUSTOMSCODE" property="customscode" jdbcType="VARCHAR" />
    <result column="SHIPPERNAME" property="shippername" jdbcType="VARCHAR" />
    <result column="SHIPPERADDRESS" property="shipperaddress" jdbcType="VARCHAR" />
    <result column="CONSIGNEENAME" property="consigneename" jdbcType="VARCHAR" />
    <result column="CONSIGNEEADDRESS" property="consigneeaddress" jdbcType="VARCHAR" />
    <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR" />
    <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
    <result column="FLIGHT_DATE" property="flightDate" jdbcType="TIMESTAMP" />
    <result column="STATUS" property="status" jdbcType="VARCHAR" />
    <result column="ISBATCH" property="isbatch" jdbcType="VARCHAR" />
    <result column="ORIGINATINGSTATION_BILL" property="originatingstationBill" jdbcType="VARCHAR" />
    <result column="ORIGINATINGSTATIONBILLCN" property="originatingstationbillcn" jdbcType="VARCHAR" />
    <result column="DESTINATIONSTATION_BILL" property="destinationstationBill" jdbcType="VARCHAR" />
    <result column="DESTINATIONSTATIONBILLCN" property="destinationstationbillcn" jdbcType="VARCHAR" />
    <result column="REPORTORDER" property="reportorder" jdbcType="VARCHAR" />
    <result column="ISLAST" property="islast" jdbcType="VARCHAR" />
    <result column="SHIPPER_CODE" property="shipperCode" jdbcType="VARCHAR" />
    <result column="SHIPPER_COUNTRYCODE" property="shipperCountrycode" jdbcType="VARCHAR" />
    <result column="SHIPPER_PHONE" property="shipperPhone" jdbcType="VARCHAR" />
    <result column="SHIPPER_FAX" property="shipperFax" jdbcType="VARCHAR" />
    <result column="CONSIGNEE_CODE" property="consigneeCode" jdbcType="VARCHAR" />
    <result column="CONSIGNEE_COUNTRYCODE" property="consigneeCountrycode" jdbcType="VARCHAR" />
    <result column="CONSIGNEE_FAX" property="consigneeFax" jdbcType="VARCHAR" />
    <result column="SPECIFIC_CONSIGNEENAME" property="specificConsigneename" jdbcType="VARCHAR" />
    <result column="SPECIFIC_CONSIGNEE_PHONE" property="specificConsigneePhone" jdbcType="VARCHAR" />
    <result column="CONSIGNEE_PHONE" property="consigneePhone" jdbcType="VARCHAR" />
    <result column="COUNTRYDESCCHN" property="countrydescchn" jdbcType="VARCHAR" />
    <result column="AREADESCCHN" property="areadescchn" jdbcType="VARCHAR" />
  </resultMap>

  <select id="analysis" resultMap="BaseResultMap" parameterType="java.util.Map">
SELECT
	T.FLIGHTNO,
	T.FLIGHT_DATE,
	T.SEGMENT,
	T.WAYBILLNOMASTER,
	T.WAYBILLNOSECONDARY,
	T.TOTALPIECE,
	T.TOTALWEIGHT,
	T.MANIFESTTOTALPIECE,
	T.MANIFESTTOTALWEIGHT,
	T.PRODUCTNAME,
	T.ORIGINATINGSTATION,
			C.CHINESEDESCRIPTION as ORIGINATINGSTATIONCN,
	T.DESTINATIONSTATION,
			C1.CHINESEDESCRIPTION AS DESTINATIONSTATIONCN,
    T.ORIGINATINGSTATION_BILL,
			CB1.CHINESEDESCRIPTION as ORIGINATINGSTATIONBILLCN,
	T.DESTINATIONSTATION_BILL,
			CB2.CHINESEDESCRIPTION AS DESTINATIONSTATIONBILLCN,
	T.SHIPPER_COUNTRYCODE,
	COUNTRY.COUNTRYDESCCHN,
	AREA.AREADESCCHN
FROM
	(
	SELECT
		M.FLIGHTNO AS FLIGHTNO,
		M.FLIGHT_DATE AS FLIGHT_DATE,
		M.SEGMENT AS SEGMENT,
		M.WAYBILLNOMASTER AS WAYBILLNOMASTER,
		'' AS WAYBILLNOSECONDARY,
		M.TOTALPIECE AS TOTALPIECE,
		M.TOTALWEIGHT AS TOTALWEIGHT,
		M.MANIFESTTOTALPIECE AS MANIFESTTOTALPIECE,
		M.MANIFESTTOTALWEIGHT AS MANIFESTTOTALWEIGHT,
		M.PRODUCTNAME AS PRODUCTNAME,
		M.ORIGINATINGSTATION AS ORIGINATINGSTATION,
		M.DESTINATIONSTATION AS DESTINATIONSTATION,
		M.ORIGINATINGSTATION_BILL AS ORIGINATINGSTATION_BILL,
		M.DESTINATIONSTATION_BILL AS DESTINATIONSTATION_BILL,
		M.SHIPPER_COUNTRYCODE AS SHIPPER_COUNTRYCODE
	FROM
		ORIGINMANIFESTMASTER M UNION
	SELECT
		awbh.FLIGHTNO AS FLIGHTNO,
		awbh.FLIGHT_DATE AS FLIGHT_DATE,
		awbh.SEGMENT AS SEGMENT,
		awbh.WAYBILLNOMASTER AS WAYBILLNOMASTER,
		awbh.WAYBILLNOSECONDARY AS WAYBILLNOSECONDARY,
		awbh.PIECE AS TOTALPIECE,
		awbh.WEIGHT AS TOTALWEIGHT,
		awbh.MANIFESTTOTALWEIGHT AS MANIFESTTOTALPIECE,
		awbh.MANIFESTWEIGHT AS MANIFESTTOTALWEIGHT,
		awbh.AWBHPRODUCTNAME AS PRODUCTNAME,
		awbh.ORIGINATINGSTATION AS ORIGINATINGSTATION,
		awbh.DESTINATIONSTATION AS DESTINATIONSTATION,
		awbh.ORIGINATINGSTATION_BILL AS ORIGINATINGSTATION_BILL,
		awbh.DESTINATIONSTATION_BILL AS DESTINATIONSTATION_BILL,
		awbh.AWBHSHIPPER_COUNTRYCODE AS SHIPPER_COUNTRYCODE
	FROM
		V_AWBA_AWBH awbh
	) T
LEFT JOIN
	TB_AIRPORTCODE C
ON
		C.CITYCODE = T.ORIGINATINGSTATION
LEFT JOIN
	TB_AIRPORTCODE C1
	ON
		C1.CITYCODE = T.DESTINATIONSTATION
LEFT JOIN
	TB_AIRPORTCODE CB1
ON
		CB1.CITYCODE = T.ORIGINATINGSTATION_BILL
LEFT JOIN
	TB_AIRPORTCODE CB2
	ON
		CB2.CITYCODE = T.DESTINATIONSTATION_BILL
LEFT JOIN
	T_BAS_COUNTRY COUNTRY
	ON
		COUNTRY.COUNTRYID = T.SHIPPER_COUNTRYCODE
LEFT JOIN
	T_BAS_AREA AREA
	ON
	 C.AREA = AREA.AREAID
	WHERE
	trunc( T.FLIGHT_DATE ) BETWEEN to_date( #{startdate,jdbcType=VARCHAR}, 'yyyy-mm-dd' )
	AND to_date(#{enddate,jdbcType=VARCHAR},'yyyy-mm-dd')
    <if test="flightno != null" >
      AND T.FLIGHTNO = #{flightno,jdbcType=VARCHAR}
    </if>
	ORDER BY T.FLIGHT_DATE,T.FLIGHTNO,WAYBILLNOMASTER,WAYBILLNOSECONDARY DESC

  </select>
  <select id="analysis_with_tally" resultMap="BaseResultMap" parameterType="java.util.Map">
    SELECT
    T.FLIGHTNO,
    T.FLIGHT_DATE,
    T.SEGMENT,
    T.WAYBILLNOMASTER,
    T.WAYBILLNOSECONDARY,
    T.TOTALPIECE,
    T.TOTALWEIGHT,
    T.MANIFESTTOTALPIECE,
    T.MANIFESTTOTALWEIGHT,
    T.PRODUCTNAME,
    T.ORIGINATINGSTATION,
    C.CHINESEDESCRIPTION as ORIGINATINGSTATIONCN,
    T.DESTINATIONSTATION,
    C1.CHINESEDESCRIPTION AS DESTINATIONSTATIONCN,
    T.ORIGINATINGSTATION_BILL,
    CB1.CHINESEDESCRIPTION as ORIGINATINGSTATIONBILLCN,
    T.DESTINATIONSTATION_BILL,
    CB2.CHINESEDESCRIPTION AS DESTINATIONSTATIONBILLCN,
    T.SHIPPER_COUNTRYCODE,
    COUNTRY.COUNTRYDESCCHN,
    AREA.AREADESCCHN
    FROM
    (
    SELECT
    M.FLIGHTNO AS FLIGHTNO,
    M.FLIGHT_DATE AS FLIGHT_DATE,
    M.SEGMENT AS SEGMENT,
    M.WAYBILLNOMASTER AS WAYBILLNOMASTER,
    '' AS WAYBILLNOSECONDARY,
    M.TOTALPIECE AS TOTALPIECE,
    M.TOTALWEIGHT AS TOTALWEIGHT,
    M.MANIFESTTOTALPIECE AS MANIFESTTOTALPIECE,
    M.MANIFESTTOTALWEIGHT AS MANIFESTTOTALWEIGHT,
    M.PRODUCTNAME AS PRODUCTNAME,
    M.ORIGINATINGSTATION AS ORIGINATINGSTATION,
    M.DESTINATIONSTATION AS DESTINATIONSTATION,
    M.ORIGINATINGSTATION_BILL AS ORIGINATINGSTATION_BILL,
    M.DESTINATIONSTATION_BILL AS DESTINATIONSTATION_BILL,
    M.SHIPPER_COUNTRYCODE AS SHIPPER_COUNTRYCODE
    FROM
    V_TALLY_ORIGIN M UNION
    SELECT
    awbh.FLIGHTNO AS FLIGHTNO,
    awbh.FLIGHT_DATE AS FLIGHT_DATE,
    awbh.SEGMENT AS SEGMENT,
    awbh.WAYBILLNOMASTER AS WAYBILLNOMASTER,
    awbh.WAYBILLNOSECONDARY AS WAYBILLNOSECONDARY,
    awbh.PIECE AS TOTALPIECE,
    awbh.WEIGHT AS TOTALWEIGHT,
    awbh.TALLYPIECE AS MANIFESTTOTALPIECE,
    awbh.TALLYWEIGHT AS MANIFESTTOTALWEIGHT,
    awbh.AWBHPRODUCTNAME AS PRODUCTNAME,
    awbh.ORIGINATINGSTATION AS ORIGINATINGSTATION,
    awbh.DESTINATIONSTATION AS DESTINATIONSTATION,
    awbh.ORIGINATINGSTATION_BILL AS ORIGINATINGSTATION_BILL,
    awbh.DESTINATIONSTATION_BILL AS DESTINATIONSTATION_BILL,
    awbh.AWBHSHIPPER_COUNTRYCODE AS SHIPPER_COUNTRYCODE
    FROM
    V_TALLY_AWBA_AWBH awbh
    ) T
    LEFT JOIN
    TB_AIRPORTCODE C
    ON
    C.CITYCODE = T.ORIGINATINGSTATION
    LEFT JOIN
    TB_AIRPORTCODE C1
    ON
    C1.CITYCODE = T.DESTINATIONSTATION
    LEFT JOIN
    TB_AIRPORTCODE CB1
    ON
    CB1.CITYCODE = T.ORIGINATINGSTATION_BILL
    LEFT JOIN
    TB_AIRPORTCODE CB2
    ON
    CB2.CITYCODE = T.DESTINATIONSTATION_BILL
    LEFT JOIN
    T_BAS_COUNTRY COUNTRY
    ON
    COUNTRY.COUNTRYID = T.SHIPPER_COUNTRYCODE
    LEFT JOIN
    T_BAS_AREA AREA
    ON
    CB1.AREA = AREA.AREAID
    WHERE
    trunc( T.FLIGHT_DATE ) BETWEEN to_date( #{startdate,jdbcType=VARCHAR}, 'yyyy-mm-dd' )
    AND to_date(#{enddate,jdbcType=VARCHAR},'yyyy-mm-dd')
    <if test="flightno != null and flightno !=''" >
      AND T.FLIGHTNO = #{flightno,jdbcType=VARCHAR}
    </if>
    ORDER BY T.FLIGHT_DATE,T.FLIGHTNO,WAYBILLNOMASTER,WAYBILLNOSECONDARY DESC

  </select>
  <insert id="insert" parameterType="com.tianbo.imfClient.model.ORIGINMANIFESTMASTER" >
    insert into ORIGINMANIFESTMASTER (AUTOID, WAYBILLNOMASTER, SEGMENT, 
      ORIGINATINGSTATION, DESTINATIONSTATION, 
      TOTALWEIGHT, TOTALPIECE, MANIFESTTOTALPIECE, 
      MANIFESTTOTALWEIGHT, FLIGHTNO, PRODUCTNAME, 
      CUSTOMSSTATUS, CARRIER1, ARRIVALSTATION1, 
      CARRIER2, ARRIVALSTATION2, CARRIER3, 
      ARRIVALSTATION3, PAYMODE, SPECIALGOODSCODE, 
      CUSTOMSCODE, SHIPPERNAME, SHIPPERADDRESS, 
      CONSIGNEENAME, CONSIGNEEADDRESS, RECEIPTINFORMATION, 
      CREATEDATE, FLIGHT_DATE, STATUS, 
      ISBATCH, ORIGINATINGSTATION_BILL, DESTINATIONSTATION_BILL, 
      REPORTORDER, ISLAST, SHIPPER_CODE, 
      SHIPPER_COUNTRYCODE, SHIPPER_PHONE, SHIPPER_FAX, 
      CONSIGNEE_CODE, CONSIGNEE_COUNTRYCODE, CONSIGNEE_FAX, 
      SPECIFIC_CONSIGNEENAME, SPECIFIC_CONSIGNEE_PHONE, 
      CONSIGNEE_PHONE)
    values (#{autoid,jdbcType=VARCHAR}, #{waybillnomaster,jdbcType=VARCHAR}, #{segment,jdbcType=VARCHAR}, 
      #{originatingstation,jdbcType=VARCHAR}, #{destinationstation,jdbcType=VARCHAR}, 
      #{totalweight,jdbcType=VARCHAR}, #{totalpiece,jdbcType=VARCHAR}, #{manifesttotalpiece,jdbcType=VARCHAR}, 
      #{manifesttotalweight,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{productname,jdbcType=VARCHAR}, 
      #{customsstatus,jdbcType=VARCHAR}, #{carrier1,jdbcType=VARCHAR}, #{arrivalstation1,jdbcType=VARCHAR}, 
      #{carrier2,jdbcType=VARCHAR}, #{arrivalstation2,jdbcType=VARCHAR}, #{carrier3,jdbcType=VARCHAR}, 
      #{arrivalstation3,jdbcType=VARCHAR}, #{paymode,jdbcType=VARCHAR}, #{specialgoodscode,jdbcType=VARCHAR}, 
      #{customscode,jdbcType=VARCHAR}, #{shippername,jdbcType=VARCHAR}, #{shipperaddress,jdbcType=VARCHAR}, 
      #{consigneename,jdbcType=VARCHAR}, #{consigneeaddress,jdbcType=VARCHAR}, #{receiptinformation,jdbcType=VARCHAR}, 
      #{createdate,jdbcType=TIMESTAMP}, #{flightDate,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, 
      #{isbatch,jdbcType=VARCHAR}, #{originatingstationBill,jdbcType=VARCHAR}, #{destinationstationBill,jdbcType=VARCHAR}, 
      #{reportorder,jdbcType=VARCHAR}, #{islast,jdbcType=VARCHAR}, #{shipperCode,jdbcType=VARCHAR}, 
      #{shipperCountrycode,jdbcType=VARCHAR}, #{shipperPhone,jdbcType=VARCHAR}, #{shipperFax,jdbcType=VARCHAR}, 
      #{consigneeCode,jdbcType=VARCHAR}, #{consigneeCountrycode,jdbcType=VARCHAR}, #{consigneeFax,jdbcType=VARCHAR}, 
      #{specificConsigneename,jdbcType=VARCHAR}, #{specificConsigneePhone,jdbcType=VARCHAR}, 
      #{consigneePhone,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.imfClient.model.ORIGINMANIFESTMASTER" >
    insert into ORIGINMANIFESTMASTER
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="autoid != null" >
        AUTOID,
      </if>
      <if test="waybillnomaster != null" >
        WAYBILLNOMASTER,
      </if>
      <if test="segment != null" >
        SEGMENT,
      </if>
      <if test="originatingstation != null" >
        ORIGINATINGSTATION,
      </if>
      <if test="destinationstation != null" >
        DESTINATIONSTATION,
      </if>
      <if test="totalweight != null" >
        TOTALWEIGHT,
      </if>
      <if test="totalpiece != null" >
        TOTALPIECE,
      </if>
      <if test="manifesttotalpiece != null" >
        MANIFESTTOTALPIECE,
      </if>
      <if test="manifesttotalweight != null" >
        MANIFESTTOTALWEIGHT,
      </if>
      <if test="flightno != null" >
        FLIGHTNO,
      </if>
      <if test="productname != null" >
        PRODUCTNAME,
      </if>
      <if test="customsstatus != null" >
        CUSTOMSSTATUS,
      </if>
      <if test="carrier1 != null" >
        CARRIER1,
      </if>
      <if test="arrivalstation1 != null" >
        ARRIVALSTATION1,
      </if>
      <if test="carrier2 != null" >
        CARRIER2,
      </if>
      <if test="arrivalstation2 != null" >
        ARRIVALSTATION2,
      </if>
      <if test="carrier3 != null" >
        CARRIER3,
      </if>
      <if test="arrivalstation3 != null" >
        ARRIVALSTATION3,
      </if>
      <if test="paymode != null" >
        PAYMODE,
      </if>
      <if test="specialgoodscode != null" >
        SPECIALGOODSCODE,
      </if>
      <if test="customscode != null" >
        CUSTOMSCODE,
      </if>
      <if test="shippername != null" >
        SHIPPERNAME,
      </if>
      <if test="shipperaddress != null" >
        SHIPPERADDRESS,
      </if>
      <if test="consigneename != null" >
        CONSIGNEENAME,
      </if>
      <if test="consigneeaddress != null" >
        CONSIGNEEADDRESS,
      </if>
      <if test="receiptinformation != null" >
        RECEIPTINFORMATION,
      </if>
      <if test="createdate != null" >
        CREATEDATE,
      </if>
      <if test="flightDate != null" >
        FLIGHT_DATE,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
      <if test="isbatch != null" >
        ISBATCH,
      </if>
      <if test="originatingstationBill != null" >
        ORIGINATINGSTATION_BILL,
      </if>
      <if test="destinationstationBill != null" >
        DESTINATIONSTATION_BILL,
      </if>
      <if test="reportorder != null" >
        REPORTORDER,
      </if>
      <if test="islast != null" >
        ISLAST,
      </if>
      <if test="shipperCode != null" >
        SHIPPER_CODE,
      </if>
      <if test="shipperCountrycode != null" >
        SHIPPER_COUNTRYCODE,
      </if>
      <if test="shipperPhone != null" >
        SHIPPER_PHONE,
      </if>
      <if test="shipperFax != null" >
        SHIPPER_FAX,
      </if>
      <if test="consigneeCode != null" >
        CONSIGNEE_CODE,
      </if>
      <if test="consigneeCountrycode != null" >
        CONSIGNEE_COUNTRYCODE,
      </if>
      <if test="consigneeFax != null" >
        CONSIGNEE_FAX,
      </if>
      <if test="specificConsigneename != null" >
        SPECIFIC_CONSIGNEENAME,
      </if>
      <if test="specificConsigneePhone != null" >
        SPECIFIC_CONSIGNEE_PHONE,
      </if>
      <if test="consigneePhone != null" >
        CONSIGNEE_PHONE,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="autoid != null" >
        #{autoid,jdbcType=VARCHAR},
      </if>
      <if test="waybillnomaster != null" >
        #{waybillnomaster,jdbcType=VARCHAR},
      </if>
      <if test="segment != null" >
        #{segment,jdbcType=VARCHAR},
      </if>
      <if test="originatingstation != null" >
        #{originatingstation,jdbcType=VARCHAR},
      </if>
      <if test="destinationstation != null" >
        #{destinationstation,jdbcType=VARCHAR},
      </if>
      <if test="totalweight != null" >
        #{totalweight,jdbcType=VARCHAR},
      </if>
      <if test="totalpiece != null" >
        #{totalpiece,jdbcType=VARCHAR},
      </if>
      <if test="manifesttotalpiece != null" >
        #{manifesttotalpiece,jdbcType=VARCHAR},
      </if>
      <if test="manifesttotalweight != null" >
        #{manifesttotalweight,jdbcType=VARCHAR},
      </if>
      <if test="flightno != null" >
        #{flightno,jdbcType=VARCHAR},
      </if>
      <if test="productname != null" >
        #{productname,jdbcType=VARCHAR},
      </if>
      <if test="customsstatus != null" >
        #{customsstatus,jdbcType=VARCHAR},
      </if>
      <if test="carrier1 != null" >
        #{carrier1,jdbcType=VARCHAR},
      </if>
      <if test="arrivalstation1 != null" >
        #{arrivalstation1,jdbcType=VARCHAR},
      </if>
      <if test="carrier2 != null" >
        #{carrier2,jdbcType=VARCHAR},
      </if>
      <if test="arrivalstation2 != null" >
        #{arrivalstation2,jdbcType=VARCHAR},
      </if>
      <if test="carrier3 != null" >
        #{carrier3,jdbcType=VARCHAR},
      </if>
      <if test="arrivalstation3 != null" >
        #{arrivalstation3,jdbcType=VARCHAR},
      </if>
      <if test="paymode != null" >
        #{paymode,jdbcType=VARCHAR},
      </if>
      <if test="specialgoodscode != null" >
        #{specialgoodscode,jdbcType=VARCHAR},
      </if>
      <if test="customscode != null" >
        #{customscode,jdbcType=VARCHAR},
      </if>
      <if test="shippername != null" >
        #{shippername,jdbcType=VARCHAR},
      </if>
      <if test="shipperaddress != null" >
        #{shipperaddress,jdbcType=VARCHAR},
      </if>
      <if test="consigneename != null" >
        #{consigneename,jdbcType=VARCHAR},
      </if>
      <if test="consigneeaddress != null" >
        #{consigneeaddress,jdbcType=VARCHAR},
      </if>
      <if test="receiptinformation != null" >
        #{receiptinformation,jdbcType=VARCHAR},
      </if>
      <if test="createdate != null" >
        #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="flightDate != null" >
        #{flightDate,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null" >
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="isbatch != null" >
        #{isbatch,jdbcType=VARCHAR},
      </if>
      <if test="originatingstationBill != null" >
        #{originatingstationBill,jdbcType=VARCHAR},
      </if>
      <if test="destinationstationBill != null" >
        #{destinationstationBill,jdbcType=VARCHAR},
      </if>
      <if test="reportorder != null" >
        #{reportorder,jdbcType=VARCHAR},
      </if>
      <if test="islast != null" >
        #{islast,jdbcType=VARCHAR},
      </if>
      <if test="shipperCode != null" >
        #{shipperCode,jdbcType=VARCHAR},
      </if>
      <if test="shipperCountrycode != null" >
        #{shipperCountrycode,jdbcType=VARCHAR},
      </if>
      <if test="shipperPhone != null" >
        #{shipperPhone,jdbcType=VARCHAR},
      </if>
      <if test="shipperFax != null" >
        #{shipperFax,jdbcType=VARCHAR},
      </if>
      <if test="consigneeCode != null" >
        #{consigneeCode,jdbcType=VARCHAR},
      </if>
      <if test="consigneeCountrycode != null" >
        #{consigneeCountrycode,jdbcType=VARCHAR},
      </if>
      <if test="consigneeFax != null" >
        #{consigneeFax,jdbcType=VARCHAR},
      </if>
      <if test="specificConsigneename != null" >
        #{specificConsigneename,jdbcType=VARCHAR},
      </if>
      <if test="specificConsigneePhone != null" >
        #{specificConsigneePhone,jdbcType=VARCHAR},
      </if>
      <if test="consigneePhone != null" >
        #{consigneePhone,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="changeFlightDate" parameterType="hashmap">
      UPDATE ORIGINMANIFESTMASTER
      set FLIGHT_DATE = "TO_DATE"(#{setDate},'yyyy-mm-dd')
      WHERE
        FLIGHT_DATE = "TO_DATE"(#{currDate},'yyyy-mm-dd')
      AND FLIGHTNO=#{flightNo}
  </update>
</mapper>