...
|
...
|
@@ -106,7 +106,7 @@ FROM |
|
|
awbh.WAYBILLNOSECONDARY AS WAYBILLNOSECONDARY,
|
|
|
awbh.PIECE AS TOTALPIECE,
|
|
|
awbh.WEIGHT AS TOTALWEIGHT,
|
|
|
awbh.MANIFESTPIECE AS MANIFESTTOTALPIECE,
|
|
|
awbh.MANIFESTTOTALWEIGHT AS MANIFESTTOTALPIECE,
|
|
|
awbh.MANIFESTWEIGHT AS MANIFESTTOTALWEIGHT,
|
|
|
awbh.AWBHPRODUCTNAME AS PRODUCTNAME,
|
|
|
awbh.ORIGINATINGSTATION AS ORIGINATINGSTATION,
|
...
|
...
|
@@ -150,6 +150,101 @@ LEFT JOIN |
|
|
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,
|
...
|
...
|
|