作者 朱兆平

运单查询

  1 +package com.tianbo.analysis.controller;
  2 +
  3 +import com.github.pagehelper.PageInfo;
  4 +import com.tianbo.analysis.dao.COMPANYUSERMapper;
  5 +import com.tianbo.analysis.dao.ORIGINMANIFESTMASTERMapper;
  6 +import com.tianbo.analysis.model.*;
  7 +import com.tianbo.analysis.service.OriginService;
  8 +import com.tianbo.analysis.service.PREPARMASTERService;
  9 +import com.tianbo.util.Date.DateUtil;
  10 +import io.swagger.annotations.ApiOperation;
  11 +import lombok.extern.slf4j.Slf4j;
  12 +import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.beans.factory.annotation.Value;
  14 +import org.springframework.web.bind.annotation.*;
  15 +
  16 +import javax.annotation.Resource;
  17 +import javax.servlet.http.HttpServletRequest;
  18 +import java.util.Arrays;
  19 +import java.util.Date;
  20 +import java.util.List;
  21 +import java.util.UUID;
  22 +
  23 +@Slf4j
  24 +@RestController
  25 +@RequestMapping("/nmms/exp")
  26 +public class NmmsExportController {
  27 +
  28 + @Autowired
  29 + OriginService originService;
  30 +
  31 + @Autowired
  32 + PREPARMASTERService preparmasterService;
  33 +
  34 + @GetMapping("search")
  35 + public ResultJson<PageInfo> searh(@RequestParam(value = "awba",required = false) String awba,
  36 + @RequestParam(value = "flightDate",required = false) String flightDate,
  37 + @RequestParam(value = "flightNo",required = false) String flightNo,
  38 + @RequestParam(value = "dom",required = false) String dom,
  39 + @RequestParam(value = "pageNum",defaultValue = "1") int pageNum,
  40 + @RequestParam(value = "pageSize",defaultValue = "10") int pageSize
  41 + ){
  42 + if ("imp".equals(dom)){
  43 + PageInfo<ORIGINMANIFESTMASTER> result = originService.search(awba,flightDate,flightNo,pageNum,pageSize);
  44 + return new ResultJson<>("200", "success", result);
  45 + }else{
  46 + PageInfo<PREPAREMASTER> result = preparmasterService.search_exp(awba,flightDate,flightNo,pageNum,pageSize);
  47 + return new ResultJson<>("200", "success", result);
  48 + }
  49 +
  50 + }
  51 +
  52 +
  53 +
  54 +}
@@ -50,4 +50,6 @@ public class PREPAREMASTERController { @@ -50,4 +50,6 @@ public class PREPAREMASTERController {
50 PageInfo<PREPAREMASTER> pageInfo= preparmasterService.search(preparemaster,page,limit); 50 PageInfo<PREPAREMASTER> pageInfo= preparmasterService.search(preparemaster,page,limit);
51 return new ResultJson("200","OK",pageInfo); 51 return new ResultJson("200","OK",pageInfo);
52 } 52 }
  53 +
  54 +
53 } 55 }
@@ -17,4 +17,11 @@ public interface ORIGINMANIFESTMASTERMapper { @@ -17,4 +17,11 @@ public interface ORIGINMANIFESTMASTERMapper {
17 ORIGINMANIFESTMASTER selectByAHBA(ORIGINMANIFESTMASTER record); 17 ORIGINMANIFESTMASTER selectByAHBA(ORIGINMANIFESTMASTER record);
18 18
19 List<Map> statics(@Param("startDate") String var1, @Param("endDate")String var2); 19 List<Map> statics(@Param("startDate") String var1, @Param("endDate")String var2);
  20 +
  21 + List<ORIGINMANIFESTMASTER> search(@Param("waybillnomaster") String var1,
  22 + @Param("flightNo")String var2,
  23 + @Param("flightDate")String var3
  24 + );
  25 +
  26 + List<ORIGINMANIFESTMASTER> searchSec(String autoid);
20 } 27 }
1 package com.tianbo.analysis.dao; 1 package com.tianbo.analysis.dao;
2 2
3 import com.tianbo.analysis.model.PREPAREMASTER; 3 import com.tianbo.analysis.model.PREPAREMASTER;
  4 +import org.apache.ibatis.annotations.Param;
4 5
5 import java.util.List; 6 import java.util.List;
6 7
@@ -27,4 +28,12 @@ public interface PREPAREMASTERMapper { @@ -27,4 +28,12 @@ public interface PREPAREMASTERMapper {
27 int updateByPrimaryKey(PREPAREMASTER record); 28 int updateByPrimaryKey(PREPAREMASTER record);
28 29
29 int updatePreArrivedBill(PREPAREMASTER record); 30 int updatePreArrivedBill(PREPAREMASTER record);
  31 +
  32 + List<PREPAREMASTER> searchTree(@Param("waybillnomaster") String var1,
  33 + @Param("flightNo")String var2,
  34 + @Param("flightDate")String var3,
  35 + @Param("carrier")String var4
  36 + );
  37 +
  38 + List<PREPAREMASTER> searchSec(String autoid);
30 } 39 }
  1 +package com.tianbo.analysis.dao;
  2 +
  3 +import com.tianbo.analysis.model.SENDPLAN;
  4 +
  5 +public interface SENDPLANMapper {
  6 + int deleteByPrimaryKey(String carrier);
  7 +
  8 + int insert(SENDPLAN record);
  9 +
  10 + int insertSelective(SENDPLAN record);
  11 +}
  1 +package com.tianbo.analysis.model;
  2 +
  3 +import lombok.Data;
  4 +
  5 +public class ManifestBase {
  6 + public String messagetype;
  7 +}
1 package com.tianbo.analysis.model; 1 package com.tianbo.analysis.model;
2 2
3 import java.util.Date; 3 import java.util.Date;
  4 +import java.util.List;
4 5
5 -public class ORIGINMANIFESTMASTER { 6 +public class ORIGINMANIFESTMASTER extends ManifestBase{
6 private String autoid; 7 private String autoid;
7 8
8 private String waybillnomaster; 9 private String waybillnomaster;
@@ -91,6 +92,8 @@ public class ORIGINMANIFESTMASTER { @@ -91,6 +92,8 @@ public class ORIGINMANIFESTMASTER {
91 92
92 private String consigneePhone; 93 private String consigneePhone;
93 94
  95 + public List<ORIGINMANIFESTMASTER> chidren;
  96 +
94 public String getAutoid() { 97 public String getAutoid() {
95 return autoid; 98 return autoid;
96 } 99 }
@@ -452,4 +455,4 @@ public class ORIGINMANIFESTMASTER { @@ -452,4 +455,4 @@ public class ORIGINMANIFESTMASTER {
452 this.flightno = flightno; 455 this.flightno = flightno;
453 this.flightDate = flightDate; 456 this.flightDate = flightDate;
454 } 457 }
455 -}  
  458 +}
1 package com.tianbo.analysis.model; 1 package com.tianbo.analysis.model;
2 2
3 import java.util.Date; 3 import java.util.Date;
  4 +import java.util.List;
4 5
5 public class PREPAREMASTER { 6 public class PREPAREMASTER {
6 private String autoid; 7 private String autoid;
@@ -9,6 +10,8 @@ public class PREPAREMASTER { @@ -9,6 +10,8 @@ public class PREPAREMASTER {
9 10
10 private Date flightdate; 11 private Date flightdate;
11 12
  13 + private Date flightDate;
  14 +
12 private String originatingstation; 15 private String originatingstation;
13 16
14 private String destinationstation; 17 private String destinationstation;
@@ -81,6 +84,10 @@ public class PREPAREMASTER { @@ -81,6 +84,10 @@ public class PREPAREMASTER {
81 84
82 private String arrivedAhead; 85 private String arrivedAhead;
83 86
  87 + public String messagetype;
  88 +
  89 + public List<PREPAREMASTER> chidren;
  90 +
84 public String getAutoid() { 91 public String getAutoid() {
85 return autoid; 92 return autoid;
86 } 93 }
@@ -392,4 +399,13 @@ public class PREPAREMASTER { @@ -392,4 +399,13 @@ public class PREPAREMASTER {
392 public void setArrivedAhead(String arrivedAhead) { 399 public void setArrivedAhead(String arrivedAhead) {
393 this.arrivedAhead = arrivedAhead == null ? null : arrivedAhead.trim(); 400 this.arrivedAhead = arrivedAhead == null ? null : arrivedAhead.trim();
394 } 401 }
395 -}  
  402 +
  403 + public Date getFlightDate() {
  404 + return flightdate;
  405 + }
  406 +
  407 + public void setFlightDate(Date flightDate) {
  408 + this.flightDate = flightDate;
  409 + this.flightdate = flightDate;
  410 + }
  411 +}
  1 +package com.tianbo.analysis.model;
  2 +
  3 +public class SENDPLAN {
  4 + private String carrier;
  5 +
  6 + public String getCarrier() {
  7 + return carrier;
  8 + }
  9 +
  10 + public void setCarrier(String carrier) {
  11 + this.carrier = carrier == null ? null : carrier.trim();
  12 + }
  13 +}
1 package com.tianbo.analysis.service; 1 package com.tianbo.analysis.service;
2 2
  3 +import com.github.pagehelper.PageInfo;
3 import com.tianbo.analysis.model.Originmanifestsecondary; 4 import com.tianbo.analysis.model.Originmanifestsecondary;
  5 +import org.springframework.web.bind.annotation.RequestParam;
4 6
5 public interface OriginService { 7 public interface OriginService {
6 8
@@ -10,4 +12,11 @@ public interface OriginService { @@ -10,4 +12,11 @@ public interface OriginService {
10 * @return 12 * @return
11 */ 13 */
12 int deleteAwbh(String awbhAutoId); 14 int deleteAwbh(String awbhAutoId);
  15 +
  16 + PageInfo search( String awba,
  17 + String flightDate,
  18 + String flightNo,
  19 + int page,
  20 + int limit);
  21 +
13 } 22 }
@@ -5,4 +5,19 @@ import com.tianbo.analysis.model.PREPAREMASTER; @@ -5,4 +5,19 @@ import com.tianbo.analysis.model.PREPAREMASTER;
5 5
6 public interface PREPARMASTERService { 6 public interface PREPARMASTERService {
7 PageInfo<PREPAREMASTER> search(PREPAREMASTER preparemaster,int pageNum, int pageSize); 7 PageInfo<PREPAREMASTER> search(PREPAREMASTER preparemaster,int pageNum, int pageSize);
  8 +
  9 + /**
  10 + * 出港查询
  11 + * @param awba
  12 + * @param flightDate
  13 + * @param flightNo
  14 + * @param page
  15 + * @param limit
  16 + * @return
  17 + */
  18 + PageInfo<PREPAREMASTER> search_exp( String awba,
  19 + String flightDate,
  20 + String flightNo,
  21 + int page,
  22 + int limit);
8 } 23 }
1 package com.tianbo.analysis.service.imp; 1 package com.tianbo.analysis.service.imp;
2 2
  3 +import com.github.pagehelper.Page;
  4 +import com.github.pagehelper.PageHelper;
  5 +import com.github.pagehelper.PageInfo;
3 import com.tianbo.analysis.dao.ORIGINMANIFESTMASTERMapper; 6 import com.tianbo.analysis.dao.ORIGINMANIFESTMASTERMapper;
4 import com.tianbo.analysis.dao.OriginmanifestsecondaryMapper; 7 import com.tianbo.analysis.dao.OriginmanifestsecondaryMapper;
  8 +import com.tianbo.analysis.model.MANIFEST_AIR_CHANGE;
  9 +import com.tianbo.analysis.model.ORIGINMANIFESTMASTER;
5 import com.tianbo.analysis.service.OriginService; 10 import com.tianbo.analysis.service.OriginService;
6 import org.springframework.beans.factory.annotation.Autowired; 11 import org.springframework.beans.factory.annotation.Autowired;
7 import org.springframework.stereotype.Service; 12 import org.springframework.stereotype.Service;
8 13
9 import javax.annotation.Resource; 14 import javax.annotation.Resource;
  15 +import java.util.List;
10 16
11 @Service 17 @Service
12 public class OriginServiceImp implements OriginService { 18 public class OriginServiceImp implements OriginService {
@@ -22,4 +28,13 @@ public class OriginServiceImp implements OriginService { @@ -22,4 +28,13 @@ public class OriginServiceImp implements OriginService {
22 public int deleteAwbh(String awbhAutoId){ 28 public int deleteAwbh(String awbhAutoId){
23 return originmanifestsecondaryMapper.deleteAwbh(awbhAutoId); 29 return originmanifestsecondaryMapper.deleteAwbh(awbhAutoId);
24 } 30 }
  31 +
  32 + @Override
  33 + public PageInfo<ORIGINMANIFESTMASTER> search(String awba, String flightDate, String flightNo, int pageNum, int pageSize) {
  34 + Page<ORIGINMANIFESTMASTER> page = PageHelper.startPage(pageNum,pageSize);
  35 + List<ORIGINMANIFESTMASTER> list = originmanifestmasterMapper.search(awba,flightNo,flightDate);
  36 + PageInfo<ORIGINMANIFESTMASTER> result = new PageInfo<ORIGINMANIFESTMASTER>(list);
  37 + return result;
  38 + }
  39 +
25 } 40 }
@@ -8,6 +8,7 @@ import com.tianbo.analysis.model.MANIFEST_AIR_CHANGE; @@ -8,6 +8,7 @@ import com.tianbo.analysis.model.MANIFEST_AIR_CHANGE;
8 import com.tianbo.analysis.model.PREPAREMASTER; 8 import com.tianbo.analysis.model.PREPAREMASTER;
9 import com.tianbo.analysis.service.PREPARMASTERService; 9 import com.tianbo.analysis.service.PREPARMASTERService;
10 import org.springframework.stereotype.Service; 10 import org.springframework.stereotype.Service;
  11 +import org.springframework.util.StringUtils;
11 12
12 import javax.annotation.Resource; 13 import javax.annotation.Resource;
13 import java.util.List; 14 import java.util.List;
@@ -25,4 +26,14 @@ public class PREPARMASTERServiceImpl implements PREPARMASTERService { @@ -25,4 +26,14 @@ public class PREPARMASTERServiceImpl implements PREPARMASTERService {
25 PageInfo<PREPAREMASTER> result = new PageInfo<PREPAREMASTER>(list); 26 PageInfo<PREPAREMASTER> result = new PageInfo<PREPAREMASTER>(list);
26 return result; 27 return result;
27 } 28 }
  29 +
  30 + @Override
  31 + public PageInfo search_exp(String awba, String flightDate, String flightNo, int pageNum, int pageSize) {
  32 + Page<PREPAREMASTER> page = PageHelper.startPage(pageNum,pageSize);
  33 + String carrier = StringUtils.isEmpty(flightNo) ? "" : flightNo.substring(0,2);
  34 + String flight = StringUtils.isEmpty(flightNo) ? "" : flightNo.substring(2);
  35 + List<PREPAREMASTER> list = preparemasterMapper.searchTree(awba,flight,flightDate,carrier);
  36 + PageInfo<PREPAREMASTER> result = new PageInfo<PREPAREMASTER>(list);
  37 + return result;
  38 + }
28 } 39 }
@@ -47,6 +47,6 @@ @@ -47,6 +47,6 @@
47 <property name="enableSubPackages" value="false"/> 47 <property name="enableSubPackages" value="false"/>
48 </javaClientGenerator> 48 </javaClientGenerator>
49 <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名--> 49 <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
50 - <table schema="CGONMS" tableName="FFM_INFO" domainObjectName="FFM_INFO" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table> 50 + <table schema="CGONMS" tableName="SENDPLAN" domainObjectName="SENDPLAN" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
51 </context> 51 </context>
52 </generatorConfiguration> 52 </generatorConfiguration>
1 <?xml version="1.0" encoding="UTF-8" ?> 1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3 -<mapper namespace="com.tianbo.analysis.dao.ORIGINMANIFESTMASTERMapper" >  
4 - <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >  
5 - <result column="AUTOID" property="autoid" jdbcType="VARCHAR" />  
6 - <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />  
7 - <result column="SEGMENT" property="segment" jdbcType="VARCHAR" />  
8 - <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" />  
9 - <result column="DESTINATIONSTATION" property="destinationstation" jdbcType="VARCHAR" />  
10 - <result column="TOTALWEIGHT" property="totalweight" jdbcType="VARCHAR" />  
11 - <result column="TOTALPIECE" property="totalpiece" jdbcType="VARCHAR" />  
12 - <result column="MANIFESTTOTALPIECE" property="manifesttotalpiece" jdbcType="VARCHAR" />  
13 - <result column="MANIFESTTOTALWEIGHT" property="manifesttotalweight" jdbcType="VARCHAR" />  
14 - <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />  
15 - <result column="PRODUCTNAME" property="productname" jdbcType="VARCHAR" />  
16 - <result column="CUSTOMSSTATUS" property="customsstatus" jdbcType="VARCHAR" />  
17 - <result column="CARRIER1" property="carrier1" jdbcType="VARCHAR" />  
18 - <result column="ARRIVALSTATION1" property="arrivalstation1" jdbcType="VARCHAR" />  
19 - <result column="CARRIER2" property="carrier2" jdbcType="VARCHAR" />  
20 - <result column="ARRIVALSTATION2" property="arrivalstation2" jdbcType="VARCHAR" />  
21 - <result column="CARRIER3" property="carrier3" jdbcType="VARCHAR" />  
22 - <result column="ARRIVALSTATION3" property="arrivalstation3" jdbcType="VARCHAR" />  
23 - <result column="PAYMODE" property="paymode" jdbcType="VARCHAR" />  
24 - <result column="SPECIALGOODSCODE" property="specialgoodscode" jdbcType="VARCHAR" />  
25 - <result column="CUSTOMSCODE" property="customscode" jdbcType="VARCHAR" />  
26 - <result column="SHIPPERNAME" property="shippername" jdbcType="VARCHAR" />  
27 - <result column="SHIPPERADDRESS" property="shipperaddress" jdbcType="VARCHAR" />  
28 - <result column="CONSIGNEENAME" property="consigneename" jdbcType="VARCHAR" />  
29 - <result column="CONSIGNEEADDRESS" property="consigneeaddress" jdbcType="VARCHAR" />  
30 - <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR" />  
31 - <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />  
32 - <result column="FLIGHT_DATE" property="flightDate" jdbcType="DATE" />  
33 - <result column="STATUS" property="status" jdbcType="VARCHAR" />  
34 - <result column="ISBATCH" property="isbatch" jdbcType="VARCHAR" />  
35 - <result column="ORIGINATINGSTATION_BILL" property="originatingstationBill" jdbcType="VARCHAR" />  
36 - <result column="DESTINATIONSTATION_BILL" property="destinationstationBill" jdbcType="VARCHAR" />  
37 - <result column="REPORTORDER" property="reportorder" jdbcType="VARCHAR" />  
38 - <result column="ISLAST" property="islast" jdbcType="VARCHAR" />  
39 - <result column="SHIPPER_CODE" property="shipperCode" jdbcType="VARCHAR" />  
40 - <result column="SHIPPER_COUNTRYCODE" property="shipperCountrycode" jdbcType="VARCHAR" />  
41 - <result column="SHIPPER_PHONE" property="shipperPhone" jdbcType="VARCHAR" />  
42 - <result column="SHIPPER_FAX" property="shipperFax" jdbcType="VARCHAR" />  
43 - <result column="CONSIGNEE_CODE" property="consigneeCode" jdbcType="VARCHAR" />  
44 - <result column="CONSIGNEE_COUNTRYCODE" property="consigneeCountrycode" jdbcType="VARCHAR" />  
45 - <result column="CONSIGNEE_FAX" property="consigneeFax" jdbcType="VARCHAR" />  
46 - <result column="SPECIFIC_CONSIGNEENAME" property="specificConsigneename" jdbcType="VARCHAR" />  
47 - <result column="SPECIFIC_CONSIGNEE_PHONE" property="specificConsigneePhone" jdbcType="VARCHAR" />  
48 - <result column="CONSIGNEE_PHONE" property="consigneePhone" jdbcType="VARCHAR" />  
49 - </resultMap>  
50 - <sql id="Base_Column_List"> 3 +<mapper namespace="com.tianbo.analysis.dao.ORIGINMANIFESTMASTERMapper">
  4 + <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.ORIGINMANIFESTMASTER">
  5 + <result column="AUTOID" property="autoid" jdbcType="VARCHAR"/>
  6 + <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR"/>
  7 + <result column="SEGMENT" property="segment" jdbcType="VARCHAR"/>
  8 + <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR"/>
  9 + <result column="DESTINATIONSTATION" property="destinationstation" jdbcType="VARCHAR"/>
  10 + <result column="TOTALWEIGHT" property="totalweight" jdbcType="VARCHAR"/>
  11 + <result column="TOTALPIECE" property="totalpiece" jdbcType="VARCHAR"/>
  12 + <result column="MANIFESTTOTALPIECE" property="manifesttotalpiece" jdbcType="VARCHAR"/>
  13 + <result column="MANIFESTTOTALWEIGHT" property="manifesttotalweight" jdbcType="VARCHAR"/>
  14 + <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR"/>
  15 + <result column="PRODUCTNAME" property="productname" jdbcType="VARCHAR"/>
  16 + <result column="CUSTOMSSTATUS" property="customsstatus" jdbcType="VARCHAR"/>
  17 + <result column="CARRIER1" property="carrier1" jdbcType="VARCHAR"/>
  18 + <result column="ARRIVALSTATION1" property="arrivalstation1" jdbcType="VARCHAR"/>
  19 + <result column="CARRIER2" property="carrier2" jdbcType="VARCHAR"/>
  20 + <result column="ARRIVALSTATION2" property="arrivalstation2" jdbcType="VARCHAR"/>
  21 + <result column="CARRIER3" property="carrier3" jdbcType="VARCHAR"/>
  22 + <result column="ARRIVALSTATION3" property="arrivalstation3" jdbcType="VARCHAR"/>
  23 + <result column="PAYMODE" property="paymode" jdbcType="VARCHAR"/>
  24 + <result column="SPECIALGOODSCODE" property="specialgoodscode" jdbcType="VARCHAR"/>
  25 + <result column="CUSTOMSCODE" property="customscode" jdbcType="VARCHAR"/>
  26 + <result column="SHIPPERNAME" property="shippername" jdbcType="VARCHAR"/>
  27 + <result column="SHIPPERADDRESS" property="shipperaddress" jdbcType="VARCHAR"/>
  28 + <result column="CONSIGNEENAME" property="consigneename" jdbcType="VARCHAR"/>
  29 + <result column="CONSIGNEEADDRESS" property="consigneeaddress" jdbcType="VARCHAR"/>
  30 + <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR"/>
  31 + <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP"/>
  32 + <result column="FLIGHT_DATE" property="flightDate" jdbcType="DATE"/>
  33 + <result column="STATUS" property="status" jdbcType="VARCHAR"/>
  34 + <result column="ISBATCH" property="isbatch" jdbcType="VARCHAR"/>
  35 + <result column="ORIGINATINGSTATION_BILL" property="originatingstationBill" jdbcType="VARCHAR"/>
  36 + <result column="DESTINATIONSTATION_BILL" property="destinationstationBill" jdbcType="VARCHAR"/>
  37 + <result column="REPORTORDER" property="reportorder" jdbcType="VARCHAR"/>
  38 + <result column="ISLAST" property="islast" jdbcType="VARCHAR"/>
  39 + <result column="SHIPPER_CODE" property="shipperCode" jdbcType="VARCHAR"/>
  40 + <result column="SHIPPER_COUNTRYCODE" property="shipperCountrycode" jdbcType="VARCHAR"/>
  41 + <result column="SHIPPER_PHONE" property="shipperPhone" jdbcType="VARCHAR"/>
  42 + <result column="SHIPPER_FAX" property="shipperFax" jdbcType="VARCHAR"/>
  43 + <result column="CONSIGNEE_CODE" property="consigneeCode" jdbcType="VARCHAR"/>
  44 + <result column="CONSIGNEE_COUNTRYCODE" property="consigneeCountrycode" jdbcType="VARCHAR"/>
  45 + <result column="CONSIGNEE_FAX" property="consigneeFax" jdbcType="VARCHAR"/>
  46 + <result column="SPECIFIC_CONSIGNEENAME" property="specificConsigneename" jdbcType="VARCHAR"/>
  47 + <result column="SPECIFIC_CONSIGNEE_PHONE" property="specificConsigneePhone" jdbcType="VARCHAR"/>
  48 + <result column="CONSIGNEE_PHONE" property="consigneePhone" jdbcType="VARCHAR"/>
  49 + <result column="messagetype" property="messagetype" jdbcType="VARCHAR"/>
  50 + </resultMap>
  51 + <sql id="Base_Column_List">
51 AUTOID, WAYBILLNOMASTER, FLIGHTNO, FLIGHT_DATE 52 AUTOID, WAYBILLNOMASTER, FLIGHTNO, FLIGHT_DATE
52 </sql> 53 </sql>
53 - <insert id="insert" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" > 54 + <resultMap id="TreeMap" type="com.tianbo.analysis.model.ORIGINMANIFESTMASTER">
  55 + <result column="AUTOID" property="autoid" jdbcType="VARCHAR"/>
  56 + <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR"/>
  57 + <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR"/>
  58 + <result column="DESTINATIONSTATION" property="destinationstation" jdbcType="VARCHAR"/>
  59 + <result column="MANIFESTTOTALPIECE" property="manifesttotalpiece" jdbcType="VARCHAR"/>
  60 + <result column="MANIFESTTOTALWEIGHT" property="manifesttotalweight" jdbcType="VARCHAR"/>
  61 + <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR"/>
  62 + <result column="PRODUCTNAME" property="productname" jdbcType="VARCHAR"/>
  63 + <result column="CUSTOMSSTATUS" property="customsstatus" jdbcType="VARCHAR"/>
  64 + <result column="CUSTOMSCODE" property="customscode" jdbcType="VARCHAR"/>
  65 + <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR"/>
  66 + <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP"/>
  67 + <result column="FLIGHT_DATE" property="flightDate" jdbcType="DATE"/>
  68 + <result column="STATUS" property="status" jdbcType="VARCHAR"/>
  69 + <result column="messagetype" property="messagetype" jdbcType="VARCHAR"/>
  70 + <collection property="chidren"
  71 + column="AUTOID"
  72 + ofType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER"
  73 + select="com.tianbo.analysis.dao.ORIGINMANIFESTMASTERMapper.searchSec">
  74 + </collection>
  75 + </resultMap>
  76 + <insert id="insert" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER">
54 insert into ORIGINMANIFESTMASTER (AUTOID, WAYBILLNOMASTER, SEGMENT, 77 insert into ORIGINMANIFESTMASTER (AUTOID, WAYBILLNOMASTER, SEGMENT,
55 ORIGINATINGSTATION, DESTINATIONSTATION, 78 ORIGINATINGSTATION, DESTINATIONSTATION,
56 TOTALWEIGHT, TOTALPIECE, MANIFESTTOTALPIECE, 79 TOTALWEIGHT, TOTALPIECE, MANIFESTTOTALPIECE,
@@ -84,278 +107,278 @@ @@ -84,278 +107,278 @@
84 #{specificConsigneename,jdbcType=VARCHAR}, #{specificConsigneePhone,jdbcType=VARCHAR}, 107 #{specificConsigneename,jdbcType=VARCHAR}, #{specificConsigneePhone,jdbcType=VARCHAR},
85 #{consigneePhone,jdbcType=VARCHAR}) 108 #{consigneePhone,jdbcType=VARCHAR})
86 </insert> 109 </insert>
87 - <insert id="insertSelective" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >  
88 - insert into ORIGINMANIFESTMASTER  
89 - <trim prefix="(" suffix=")" suffixOverrides="," >  
90 - <if test="autoid != null" >  
91 - AUTOID,  
92 - </if>  
93 - <if test="waybillnomaster != null" >  
94 - WAYBILLNOMASTER,  
95 - </if>  
96 - <if test="segment != null" >  
97 - SEGMENT,  
98 - </if>  
99 - <if test="originatingstation != null" >  
100 - ORIGINATINGSTATION,  
101 - </if>  
102 - <if test="destinationstation != null" >  
103 - DESTINATIONSTATION,  
104 - </if>  
105 - <if test="totalweight != null" >  
106 - TOTALWEIGHT,  
107 - </if>  
108 - <if test="totalpiece != null" >  
109 - TOTALPIECE,  
110 - </if>  
111 - <if test="manifesttotalpiece != null" >  
112 - MANIFESTTOTALPIECE,  
113 - </if>  
114 - <if test="manifesttotalweight != null" >  
115 - MANIFESTTOTALWEIGHT,  
116 - </if>  
117 - <if test="flightno != null" >  
118 - FLIGHTNO,  
119 - </if>  
120 - <if test="productname != null" >  
121 - PRODUCTNAME,  
122 - </if>  
123 - <if test="customsstatus != null" >  
124 - CUSTOMSSTATUS,  
125 - </if>  
126 - <if test="carrier1 != null" >  
127 - CARRIER1,  
128 - </if>  
129 - <if test="arrivalstation1 != null" >  
130 - ARRIVALSTATION1,  
131 - </if>  
132 - <if test="carrier2 != null" >  
133 - CARRIER2,  
134 - </if>  
135 - <if test="arrivalstation2 != null" >  
136 - ARRIVALSTATION2,  
137 - </if>  
138 - <if test="carrier3 != null" >  
139 - CARRIER3,  
140 - </if>  
141 - <if test="arrivalstation3 != null" >  
142 - ARRIVALSTATION3,  
143 - </if>  
144 - <if test="paymode != null" >  
145 - PAYMODE,  
146 - </if>  
147 - <if test="specialgoodscode != null" >  
148 - SPECIALGOODSCODE,  
149 - </if>  
150 - <if test="customscode != null" >  
151 - CUSTOMSCODE,  
152 - </if>  
153 - <if test="shippername != null" >  
154 - SHIPPERNAME,  
155 - </if>  
156 - <if test="shipperaddress != null" >  
157 - SHIPPERADDRESS,  
158 - </if>  
159 - <if test="consigneename != null" >  
160 - CONSIGNEENAME,  
161 - </if>  
162 - <if test="consigneeaddress != null" >  
163 - CONSIGNEEADDRESS,  
164 - </if>  
165 - <if test="receiptinformation != null" >  
166 - RECEIPTINFORMATION,  
167 - </if>  
168 - <if test="createdate != null" >  
169 - CREATEDATE,  
170 - </if>  
171 - <if test="flightDate != null" >  
172 - FLIGHT_DATE,  
173 - </if>  
174 - <if test="status != null" >  
175 - STATUS,  
176 - </if>  
177 - <if test="isbatch != null" >  
178 - ISBATCH,  
179 - </if>  
180 - <if test="originatingstationBill != null" >  
181 - ORIGINATINGSTATION_BILL,  
182 - </if>  
183 - <if test="destinationstationBill != null" >  
184 - DESTINATIONSTATION_BILL,  
185 - </if>  
186 - <if test="reportorder != null" >  
187 - REPORTORDER,  
188 - </if>  
189 - <if test="islast != null" >  
190 - ISLAST,  
191 - </if>  
192 - <if test="shipperCode != null" >  
193 - SHIPPER_CODE,  
194 - </if>  
195 - <if test="shipperCountrycode != null" >  
196 - SHIPPER_COUNTRYCODE,  
197 - </if>  
198 - <if test="shipperPhone != null" >  
199 - SHIPPER_PHONE,  
200 - </if>  
201 - <if test="shipperFax != null" >  
202 - SHIPPER_FAX,  
203 - </if>  
204 - <if test="consigneeCode != null" >  
205 - CONSIGNEE_CODE,  
206 - </if>  
207 - <if test="consigneeCountrycode != null" >  
208 - CONSIGNEE_COUNTRYCODE,  
209 - </if>  
210 - <if test="consigneeFax != null" >  
211 - CONSIGNEE_FAX,  
212 - </if>  
213 - <if test="specificConsigneename != null" >  
214 - SPECIFIC_CONSIGNEENAME,  
215 - </if>  
216 - <if test="specificConsigneePhone != null" >  
217 - SPECIFIC_CONSIGNEE_PHONE,  
218 - </if>  
219 - <if test="consigneePhone != null" >  
220 - CONSIGNEE_PHONE,  
221 - </if>  
222 - </trim>  
223 - <trim prefix="values (" suffix=")" suffixOverrides="," >  
224 - <if test="autoid != null" >  
225 - #{autoid,jdbcType=VARCHAR},  
226 - </if>  
227 - <if test="waybillnomaster != null" >  
228 - #{waybillnomaster,jdbcType=VARCHAR},  
229 - </if>  
230 - <if test="segment != null" >  
231 - #{segment,jdbcType=VARCHAR},  
232 - </if>  
233 - <if test="originatingstation != null" >  
234 - #{originatingstation,jdbcType=VARCHAR},  
235 - </if>  
236 - <if test="destinationstation != null" >  
237 - #{destinationstation,jdbcType=VARCHAR},  
238 - </if>  
239 - <if test="totalweight != null" >  
240 - #{totalweight,jdbcType=VARCHAR},  
241 - </if>  
242 - <if test="totalpiece != null" >  
243 - #{totalpiece,jdbcType=VARCHAR},  
244 - </if>  
245 - <if test="manifesttotalpiece != null" >  
246 - #{manifesttotalpiece,jdbcType=VARCHAR},  
247 - </if>  
248 - <if test="manifesttotalweight != null" >  
249 - #{manifesttotalweight,jdbcType=VARCHAR},  
250 - </if>  
251 - <if test="flightno != null" >  
252 - #{flightno,jdbcType=VARCHAR},  
253 - </if>  
254 - <if test="productname != null" >  
255 - #{productname,jdbcType=VARCHAR},  
256 - </if>  
257 - <if test="customsstatus != null" >  
258 - #{customsstatus,jdbcType=VARCHAR},  
259 - </if>  
260 - <if test="carrier1 != null" >  
261 - #{carrier1,jdbcType=VARCHAR},  
262 - </if>  
263 - <if test="arrivalstation1 != null" >  
264 - #{arrivalstation1,jdbcType=VARCHAR},  
265 - </if>  
266 - <if test="carrier2 != null" >  
267 - #{carrier2,jdbcType=VARCHAR},  
268 - </if>  
269 - <if test="arrivalstation2 != null" >  
270 - #{arrivalstation2,jdbcType=VARCHAR},  
271 - </if>  
272 - <if test="carrier3 != null" >  
273 - #{carrier3,jdbcType=VARCHAR},  
274 - </if>  
275 - <if test="arrivalstation3 != null" >  
276 - #{arrivalstation3,jdbcType=VARCHAR},  
277 - </if>  
278 - <if test="paymode != null" >  
279 - #{paymode,jdbcType=VARCHAR},  
280 - </if>  
281 - <if test="specialgoodscode != null" >  
282 - #{specialgoodscode,jdbcType=VARCHAR},  
283 - </if>  
284 - <if test="customscode != null" >  
285 - #{customscode,jdbcType=VARCHAR},  
286 - </if>  
287 - <if test="shippername != null" >  
288 - #{shippername,jdbcType=VARCHAR},  
289 - </if>  
290 - <if test="shipperaddress != null" >  
291 - #{shipperaddress,jdbcType=VARCHAR},  
292 - </if>  
293 - <if test="consigneename != null" >  
294 - #{consigneename,jdbcType=VARCHAR},  
295 - </if>  
296 - <if test="consigneeaddress != null" >  
297 - #{consigneeaddress,jdbcType=VARCHAR},  
298 - </if>  
299 - <if test="receiptinformation != null" >  
300 - #{receiptinformation,jdbcType=VARCHAR},  
301 - </if>  
302 - <if test="createdate != null" >  
303 - #{createdate,jdbcType=TIMESTAMP},  
304 - </if>  
305 - <if test="flightDate != null" >  
306 - #{flightDate,jdbcType=TIMESTAMP},  
307 - </if>  
308 - <if test="status != null" >  
309 - #{status,jdbcType=VARCHAR},  
310 - </if>  
311 - <if test="isbatch != null" >  
312 - #{isbatch,jdbcType=VARCHAR},  
313 - </if>  
314 - <if test="originatingstationBill != null" >  
315 - #{originatingstationBill,jdbcType=VARCHAR},  
316 - </if>  
317 - <if test="destinationstationBill != null" >  
318 - #{destinationstationBill,jdbcType=VARCHAR},  
319 - </if>  
320 - <if test="reportorder != null" >  
321 - #{reportorder,jdbcType=VARCHAR},  
322 - </if>  
323 - <if test="islast != null" >  
324 - #{islast,jdbcType=VARCHAR},  
325 - </if>  
326 - <if test="shipperCode != null" >  
327 - #{shipperCode,jdbcType=VARCHAR},  
328 - </if>  
329 - <if test="shipperCountrycode != null" >  
330 - #{shipperCountrycode,jdbcType=VARCHAR},  
331 - </if>  
332 - <if test="shipperPhone != null" >  
333 - #{shipperPhone,jdbcType=VARCHAR},  
334 - </if>  
335 - <if test="shipperFax != null" >  
336 - #{shipperFax,jdbcType=VARCHAR},  
337 - </if>  
338 - <if test="consigneeCode != null" >  
339 - #{consigneeCode,jdbcType=VARCHAR},  
340 - </if>  
341 - <if test="consigneeCountrycode != null" >  
342 - #{consigneeCountrycode,jdbcType=VARCHAR},  
343 - </if>  
344 - <if test="consigneeFax != null" >  
345 - #{consigneeFax,jdbcType=VARCHAR},  
346 - </if>  
347 - <if test="specificConsigneename != null" >  
348 - #{specificConsigneename,jdbcType=VARCHAR},  
349 - </if>  
350 - <if test="specificConsigneePhone != null" >  
351 - #{specificConsigneePhone,jdbcType=VARCHAR},  
352 - </if>  
353 - <if test="consigneePhone != null" >  
354 - #{consigneePhone,jdbcType=VARCHAR},  
355 - </if>  
356 - </trim>  
357 - </insert>  
358 - <update id="changeFlightDate" parameterType="hashmap"> 110 + <insert id="insertSelective" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER">
  111 + insert into ORIGINMANIFESTMASTER
  112 + <trim prefix="(" suffix=")" suffixOverrides=",">
  113 + <if test="autoid != null">
  114 + AUTOID,
  115 + </if>
  116 + <if test="waybillnomaster != null">
  117 + WAYBILLNOMASTER,
  118 + </if>
  119 + <if test="segment != null">
  120 + SEGMENT,
  121 + </if>
  122 + <if test="originatingstation != null">
  123 + ORIGINATINGSTATION,
  124 + </if>
  125 + <if test="destinationstation != null">
  126 + DESTINATIONSTATION,
  127 + </if>
  128 + <if test="totalweight != null">
  129 + TOTALWEIGHT,
  130 + </if>
  131 + <if test="totalpiece != null">
  132 + TOTALPIECE,
  133 + </if>
  134 + <if test="manifesttotalpiece != null">
  135 + MANIFESTTOTALPIECE,
  136 + </if>
  137 + <if test="manifesttotalweight != null">
  138 + MANIFESTTOTALWEIGHT,
  139 + </if>
  140 + <if test="flightno != null">
  141 + FLIGHTNO,
  142 + </if>
  143 + <if test="productname != null">
  144 + PRODUCTNAME,
  145 + </if>
  146 + <if test="customsstatus != null">
  147 + CUSTOMSSTATUS,
  148 + </if>
  149 + <if test="carrier1 != null">
  150 + CARRIER1,
  151 + </if>
  152 + <if test="arrivalstation1 != null">
  153 + ARRIVALSTATION1,
  154 + </if>
  155 + <if test="carrier2 != null">
  156 + CARRIER2,
  157 + </if>
  158 + <if test="arrivalstation2 != null">
  159 + ARRIVALSTATION2,
  160 + </if>
  161 + <if test="carrier3 != null">
  162 + CARRIER3,
  163 + </if>
  164 + <if test="arrivalstation3 != null">
  165 + ARRIVALSTATION3,
  166 + </if>
  167 + <if test="paymode != null">
  168 + PAYMODE,
  169 + </if>
  170 + <if test="specialgoodscode != null">
  171 + SPECIALGOODSCODE,
  172 + </if>
  173 + <if test="customscode != null">
  174 + CUSTOMSCODE,
  175 + </if>
  176 + <if test="shippername != null">
  177 + SHIPPERNAME,
  178 + </if>
  179 + <if test="shipperaddress != null">
  180 + SHIPPERADDRESS,
  181 + </if>
  182 + <if test="consigneename != null">
  183 + CONSIGNEENAME,
  184 + </if>
  185 + <if test="consigneeaddress != null">
  186 + CONSIGNEEADDRESS,
  187 + </if>
  188 + <if test="receiptinformation != null">
  189 + RECEIPTINFORMATION,
  190 + </if>
  191 + <if test="createdate != null">
  192 + CREATEDATE,
  193 + </if>
  194 + <if test="flightDate != null">
  195 + FLIGHT_DATE,
  196 + </if>
  197 + <if test="status != null">
  198 + STATUS,
  199 + </if>
  200 + <if test="isbatch != null">
  201 + ISBATCH,
  202 + </if>
  203 + <if test="originatingstationBill != null">
  204 + ORIGINATINGSTATION_BILL,
  205 + </if>
  206 + <if test="destinationstationBill != null">
  207 + DESTINATIONSTATION_BILL,
  208 + </if>
  209 + <if test="reportorder != null">
  210 + REPORTORDER,
  211 + </if>
  212 + <if test="islast != null">
  213 + ISLAST,
  214 + </if>
  215 + <if test="shipperCode != null">
  216 + SHIPPER_CODE,
  217 + </if>
  218 + <if test="shipperCountrycode != null">
  219 + SHIPPER_COUNTRYCODE,
  220 + </if>
  221 + <if test="shipperPhone != null">
  222 + SHIPPER_PHONE,
  223 + </if>
  224 + <if test="shipperFax != null">
  225 + SHIPPER_FAX,
  226 + </if>
  227 + <if test="consigneeCode != null">
  228 + CONSIGNEE_CODE,
  229 + </if>
  230 + <if test="consigneeCountrycode != null">
  231 + CONSIGNEE_COUNTRYCODE,
  232 + </if>
  233 + <if test="consigneeFax != null">
  234 + CONSIGNEE_FAX,
  235 + </if>
  236 + <if test="specificConsigneename != null">
  237 + SPECIFIC_CONSIGNEENAME,
  238 + </if>
  239 + <if test="specificConsigneePhone != null">
  240 + SPECIFIC_CONSIGNEE_PHONE,
  241 + </if>
  242 + <if test="consigneePhone != null">
  243 + CONSIGNEE_PHONE,
  244 + </if>
  245 + </trim>
  246 + <trim prefix="values (" suffix=")" suffixOverrides=",">
  247 + <if test="autoid != null">
  248 + #{autoid,jdbcType=VARCHAR},
  249 + </if>
  250 + <if test="waybillnomaster != null">
  251 + #{waybillnomaster,jdbcType=VARCHAR},
  252 + </if>
  253 + <if test="segment != null">
  254 + #{segment,jdbcType=VARCHAR},
  255 + </if>
  256 + <if test="originatingstation != null">
  257 + #{originatingstation,jdbcType=VARCHAR},
  258 + </if>
  259 + <if test="destinationstation != null">
  260 + #{destinationstation,jdbcType=VARCHAR},
  261 + </if>
  262 + <if test="totalweight != null">
  263 + #{totalweight,jdbcType=VARCHAR},
  264 + </if>
  265 + <if test="totalpiece != null">
  266 + #{totalpiece,jdbcType=VARCHAR},
  267 + </if>
  268 + <if test="manifesttotalpiece != null">
  269 + #{manifesttotalpiece,jdbcType=VARCHAR},
  270 + </if>
  271 + <if test="manifesttotalweight != null">
  272 + #{manifesttotalweight,jdbcType=VARCHAR},
  273 + </if>
  274 + <if test="flightno != null">
  275 + #{flightno,jdbcType=VARCHAR},
  276 + </if>
  277 + <if test="productname != null">
  278 + #{productname,jdbcType=VARCHAR},
  279 + </if>
  280 + <if test="customsstatus != null">
  281 + #{customsstatus,jdbcType=VARCHAR},
  282 + </if>
  283 + <if test="carrier1 != null">
  284 + #{carrier1,jdbcType=VARCHAR},
  285 + </if>
  286 + <if test="arrivalstation1 != null">
  287 + #{arrivalstation1,jdbcType=VARCHAR},
  288 + </if>
  289 + <if test="carrier2 != null">
  290 + #{carrier2,jdbcType=VARCHAR},
  291 + </if>
  292 + <if test="arrivalstation2 != null">
  293 + #{arrivalstation2,jdbcType=VARCHAR},
  294 + </if>
  295 + <if test="carrier3 != null">
  296 + #{carrier3,jdbcType=VARCHAR},
  297 + </if>
  298 + <if test="arrivalstation3 != null">
  299 + #{arrivalstation3,jdbcType=VARCHAR},
  300 + </if>
  301 + <if test="paymode != null">
  302 + #{paymode,jdbcType=VARCHAR},
  303 + </if>
  304 + <if test="specialgoodscode != null">
  305 + #{specialgoodscode,jdbcType=VARCHAR},
  306 + </if>
  307 + <if test="customscode != null">
  308 + #{customscode,jdbcType=VARCHAR},
  309 + </if>
  310 + <if test="shippername != null">
  311 + #{shippername,jdbcType=VARCHAR},
  312 + </if>
  313 + <if test="shipperaddress != null">
  314 + #{shipperaddress,jdbcType=VARCHAR},
  315 + </if>
  316 + <if test="consigneename != null">
  317 + #{consigneename,jdbcType=VARCHAR},
  318 + </if>
  319 + <if test="consigneeaddress != null">
  320 + #{consigneeaddress,jdbcType=VARCHAR},
  321 + </if>
  322 + <if test="receiptinformation != null">
  323 + #{receiptinformation,jdbcType=VARCHAR},
  324 + </if>
  325 + <if test="createdate != null">
  326 + #{createdate,jdbcType=TIMESTAMP},
  327 + </if>
  328 + <if test="flightDate != null">
  329 + #{flightDate,jdbcType=TIMESTAMP},
  330 + </if>
  331 + <if test="status != null">
  332 + #{status,jdbcType=VARCHAR},
  333 + </if>
  334 + <if test="isbatch != null">
  335 + #{isbatch,jdbcType=VARCHAR},
  336 + </if>
  337 + <if test="originatingstationBill != null">
  338 + #{originatingstationBill,jdbcType=VARCHAR},
  339 + </if>
  340 + <if test="destinationstationBill != null">
  341 + #{destinationstationBill,jdbcType=VARCHAR},
  342 + </if>
  343 + <if test="reportorder != null">
  344 + #{reportorder,jdbcType=VARCHAR},
  345 + </if>
  346 + <if test="islast != null">
  347 + #{islast,jdbcType=VARCHAR},
  348 + </if>
  349 + <if test="shipperCode != null">
  350 + #{shipperCode,jdbcType=VARCHAR},
  351 + </if>
  352 + <if test="shipperCountrycode != null">
  353 + #{shipperCountrycode,jdbcType=VARCHAR},
  354 + </if>
  355 + <if test="shipperPhone != null">
  356 + #{shipperPhone,jdbcType=VARCHAR},
  357 + </if>
  358 + <if test="shipperFax != null">
  359 + #{shipperFax,jdbcType=VARCHAR},
  360 + </if>
  361 + <if test="consigneeCode != null">
  362 + #{consigneeCode,jdbcType=VARCHAR},
  363 + </if>
  364 + <if test="consigneeCountrycode != null">
  365 + #{consigneeCountrycode,jdbcType=VARCHAR},
  366 + </if>
  367 + <if test="consigneeFax != null">
  368 + #{consigneeFax,jdbcType=VARCHAR},
  369 + </if>
  370 + <if test="specificConsigneename != null">
  371 + #{specificConsigneename,jdbcType=VARCHAR},
  372 + </if>
  373 + <if test="specificConsigneePhone != null">
  374 + #{specificConsigneePhone,jdbcType=VARCHAR},
  375 + </if>
  376 + <if test="consigneePhone != null">
  377 + #{consigneePhone,jdbcType=VARCHAR},
  378 + </if>
  379 + </trim>
  380 + </insert>
  381 + <update id="changeFlightDate" parameterType="hashmap">
359 UPDATE ORIGINMANIFESTMASTER 382 UPDATE ORIGINMANIFESTMASTER
360 set FLIGHT_DATE = "TO_DATE"(#{setDate},'yyyy-mm-dd') 383 set FLIGHT_DATE = "TO_DATE"(#{setDate},'yyyy-mm-dd')
361 WHERE 384 WHERE
@@ -363,20 +386,20 @@ @@ -363,20 +386,20 @@
363 AND FLIGHTNO=#{flightNo} 386 AND FLIGHTNO=#{flightNo}
364 </update> 387 </update>
365 388
366 - <select id="selectByAHBA" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" resultMap="BaseResultMap">  
367 - select  
368 - <include refid="Base_Column_List" />  
369 - from 389 + <select id="selectByAHBA" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" resultMap="BaseResultMap">
  390 + select
  391 + <include refid="Base_Column_List"/>
  392 + from
370 ORIGINMANIFESTMASTER 393 ORIGINMANIFESTMASTER
371 - where 394 + where
372 FLIGHT_DATE = #{flightDate ,jdbcType=DATE} 395 FLIGHT_DATE = #{flightDate ,jdbcType=DATE}
373 - AND 396 + AND
374 FLIGHTNO= #{flightNo,jdbcType=VARCHAR} 397 FLIGHTNO= #{flightNo,jdbcType=VARCHAR}
375 - AND 398 + AND
376 WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 399 WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
377 - </select> 400 + </select>
378 401
379 - <select id="statics" resultType="map"> 402 + <select id="statics" resultType="map">
380 SELECT 403 SELECT
381 FLIGHTNO, 404 FLIGHTNO,
382 ORIGINATINGSTATION, 405 ORIGINATINGSTATION,
@@ -407,4 +430,85 @@ GROUP BY @@ -407,4 +430,85 @@ GROUP BY
407 ORIGINATINGSTATION, 430 ORIGINATINGSTATION,
408 DESTINATIONSTATION 431 DESTINATIONSTATION
409 </select> 432 </select>
  433 + <select id="search" resultMap="TreeMap">
  434 + SELECT
  435 + * FROM (
  436 + SELECT
  437 + autoid,
  438 + flightno,
  439 + flight_date,
  440 + originatingstation,
  441 + destinationstation,
  442 + waybillnomaster,
  443 + manifesttotalpiece AS totalpiece,
  444 + manifesttotalweight AS totalweight,
  445 + customscode,
  446 + createdate,
  447 + status AS status,
  448 + receiptinformation,
  449 + 'MT1201' AS messagetype
  450 + FROM
  451 + originmanifestmaster UNION ALL
  452 + SELECT
  453 + autoid,
  454 + flightno,
  455 + flightdate as flight_date,
  456 + originatingstation,
  457 + destinationstation,
  458 + waybillnomaster,
  459 + tallytotalpiece AS totalpiece,
  460 + tallytotalweight AS totalweight,
  461 + customscode,
  462 + createdate,
  463 + status,
  464 + receiptinformation,
  465 + talltype AS messagetype
  466 + FROM
  467 + tallymaster
  468 + WHERE
  469 + talltype = 'MT5201'
  470 + ) T
  471 + WHERE
  472 + totalpiece>=0 and destinationstation='CGO'
  473 + <if test="waybillnomaster != null and waybillnomaster != ''">
  474 + AND waybillnomaster= #{waybillnomaster,jdbcType=VARCHAR}
  475 + </if>
  476 + <if test="flightNo != null and flightNo != ''">
  477 + AND flightno = #{flightNo,jdbcType=VARCHAR}
  478 + </if>
  479 + <if test="flightDate != null and flightDate != ''">
  480 + AND flight_date = TO_DATE( #{flightDate ,jdbcType=DATE}, 'yyyy-MM-dd' )
  481 + </if>
  482 + ORDER BY
  483 + flightno,
  484 + waybillnomaster DESC,
  485 + messagetype ASC
  486 + </select>
  487 +
  488 + <select id="searchSec" parameterType="string" resultMap="BaseResultMap">
  489 + select autoid,
  490 + waybillnosecondary as waybillnomaster,
  491 + manifestpiece as totalpiece,
  492 + manifestweight as totalweight,
  493 + customscode,
  494 + createdate,
  495 + status,
  496 + receiption as receiptinformation,
  497 + 'MT1201-1' as messagetype
  498 + from originmanifestsecondary
  499 + where originmanifestmasterautoid= #{autoid}
  500 + UNION ALL
  501 + select autoid,
  502 + waybillnosecondary as waybillnomaster,
  503 + tallypiece as totalpiece,
  504 + tallyweight as totalweight,
  505 + customscode,
  506 + createdate,
  507 + status,
  508 + receiptinformation,
  509 + 'MT5201-1' as messagetype
  510 + from tallysecondary
  511 + where tallymasterid= #{autoid}
  512 + </select>
  513 +
410 </mapper> 514 </mapper>
@@ -51,6 +51,42 @@ @@ -51,6 +51,42 @@
51 CONSIGNEE_CODE, CONSIGNEE_COUNTRYCODE, CONSIGNEE_FAX, CONSIGNEE_PHONE, SHIPPER_AEO, 51 CONSIGNEE_CODE, CONSIGNEE_COUNTRYCODE, CONSIGNEE_FAX, CONSIGNEE_PHONE, SHIPPER_AEO,
52 CONSIGNEE_AEO, UNLOADINGSTATION, ARRIVED_AHEAD 52 CONSIGNEE_AEO, UNLOADINGSTATION, ARRIVED_AHEAD
53 </sql> 53 </sql>
  54 + <resultMap id="TreeMap" type="com.tianbo.analysis.model.PREPAREMASTER">
  55 + <result column="AUTOID" property="autoid" jdbcType="VARCHAR"/>
  56 + <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR"/>
  57 + <result column="TOTALWEIGHT" property="totalweight" jdbcType="VARCHAR" />
  58 + <result column="TOTALPIECE" property="totalpiece" jdbcType="VARCHAR" />
  59 + <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR"/>
  60 + <result column="PRODUCTNAME" property="productname" jdbcType="VARCHAR"/>
  61 + <result column="CUSTOMSSTATUS" property="customsstatus" jdbcType="VARCHAR"/>
  62 + <result column="CUSTOMSCODE" property="customscode" jdbcType="VARCHAR"/>
  63 + <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR"/>
  64 + <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP"/>
  65 + <result column="FLIGHTDATE" property="flightdate" jdbcType="DATE" />
  66 + <result column="STATUS" property="status" jdbcType="VARCHAR"/>
  67 + <result column="messagetype" property="messagetype" jdbcType="VARCHAR"/>
  68 + <collection property="chidren"
  69 + column="AUTOID"
  70 + ofType="com.tianbo.analysis.model.PREPAREMASTER"
  71 + select="com.tianbo.analysis.dao.PREPAREMASTERMapper.searchSec">
  72 + </collection>
  73 + </resultMap>
  74 + <sql id="TreeCondition">
  75 + <where>
  76 + <if test="waybillnomaster != null and waybillnomaster != ''">
  77 + AND waybillnomaster= #{waybillnomaster,jdbcType=VARCHAR}
  78 + </if>
  79 + <if test="carrier != null and carrier != ''">
  80 + AND CARRIER = #{carrier,jdbcType=VARCHAR}
  81 + </if>
  82 + <if test="flightNo != null and flightNo != ''">
  83 + AND flightno = #{flightNo,jdbcType=VARCHAR}
  84 + </if>
  85 + <if test="flightDate != null and flightDate != ''">
  86 + AND flightdate = TO_DATE( #{flightDate ,jdbcType=DATE}, 'yyyy-MM-dd' )
  87 + </if>
  88 + </where>
  89 + </sql>
54 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > 90 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
55 select 91 select
56 <include refid="Base_Column_List" /> 92 <include refid="Base_Column_List" />
@@ -538,4 +574,157 @@ @@ -538,4 +574,157 @@
538 where WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 574 where WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
539 </update> 575 </update>
540 576
  577 + <select id="searchTree" resultMap="TreeMap">
  578 +select * from(
  579 + SELECT
  580 + autoid,
  581 + concat( carrier, flightno )AS flightno,
  582 + flightdate,
  583 + originatingstation,
  584 + destinationstation,
  585 + waybillnomaster,
  586 + preparetotalpiece AS totalpiece,
  587 + preparetotalweight AS totalweight,
  588 + customscode,
  589 + createdate,
  590 + status AS status,
  591 + concat( receiptinformation, arrived_ahead ) AS receiptinformation,
  592 + 'MT2201' AS messagetype,
  593 + customsstatus
  594 + FROM
  595 + preparemaster
  596 + <include refid="TreeCondition" />
  597 + UNION ALL
  598 + SELECT
  599 + autoid,
  600 + concat( carrier, flightno ) AS flightno,
  601 + flightdate,
  602 + originatingstation,
  603 + destinationstation,
  604 + waybillnomaster,
  605 + arrivedtotalpiece AS totalpiece,
  606 + arrivedtotalweight AS totalweight,
  607 + customscode,
  608 + createdate,
  609 + status,
  610 + receiptinformation,
  611 + 'MT3201' AS messagetype,
  612 + arrived_ahead AS customsstatus
  613 + FROM
  614 + arrivedmaster
  615 + <include refid="TreeCondition" />
  616 + UNION ALL
  617 + SELECT
  618 + id AS autoid,
  619 + flightno,
  620 + flightdate,
  621 + originatingstation,
  622 + destinationstation,
  623 + waybillno AS waybillnomaster,
  624 + stowagepieces AS totalpiece,
  625 + stowageweight AS totalweight,
  626 + customs AS customscode,
  627 + createdate,
  628 + status,
  629 + receiption AS receiptinformation,
  630 + 'MT4201' AS messagetype,
  631 + '' AS customsstatus
  632 + FROM
  633 + departuresloading
  634 + <where>
  635 + <if test="waybillnomaster != null and waybillnomaster != ''">
  636 + AND waybillno= #{waybillnomaster,jdbcType=VARCHAR}
  637 + </if>
  638 + <if test="carrier != null and carrier != ''">
  639 + AND substr(flightno,0,2) = #{carrier,jdbcType=VARCHAR}
  640 + </if>
  641 + <if test="flightNo != null and flightNo != ''">
  642 + AND substr(flightno,3) = #{flightNo,jdbcType=VARCHAR}
  643 + </if>
  644 + <if test="flightDate != null and flightDate != ''">
  645 + AND FLIGHTDATE = TO_DATE( #{flightDate ,jdbcType=DATE}, 'yyyy-MM-dd' )
  646 + </if>
  647 + </where>
  648 + UNION ALL
  649 + SELECT
  650 + autoid,
  651 + flightno,
  652 + flightdate,
  653 + originatingstation,
  654 + destinationstation,
  655 + waybillnomaster,
  656 + tallytotalpiece AS totalpiece,
  657 + tallytotalweight AS totalweight,
  658 + customscode,
  659 + createdate,
  660 + status,
  661 + receiptinformation,
  662 + talltype AS messagetype,
  663 + '' AS customsstatus
  664 + FROM
  665 + tallymaster
  666 + <where>
  667 + talltype = 'MT5202'
  668 + <if test="waybillnomaster != null and waybillnomaster != ''">
  669 + AND waybillnomaster= #{waybillnomaster,jdbcType=VARCHAR}
  670 + </if>
  671 + <if test="carrier != null and carrier != ''">
  672 + AND substr(flightno,0,2) = #{carrier,jdbcType=VARCHAR}
  673 + </if>
  674 + <if test="flightNo != null and flightNo != ''">
  675 + AND substr(flightno,3) = #{flightNo,jdbcType=VARCHAR}
  676 + </if>
  677 + <if test="flightDate != null and flightDate != ''">
  678 + AND FLIGHTDATE = TO_DATE( #{flightDate ,jdbcType=DATE}, 'yyyy-MM-dd' )
  679 + </if>
  680 + </where>
  681 + ) t
  682 + ORDER BY flightno,waybillnomaster DESC,messagetype asc
  683 +
  684 + </select>
  685 +
  686 + <select id="searchSec" parameterType="string" resultMap="BaseResultMap">
  687 + select
  688 + autoid,
  689 + waybillnosecondary as waybillnomaster,
  690 + preparepiece as totalpiece,
  691 + prepareweight as totalweight,
  692 + customscode,
  693 + createdate,
  694 + status,
  695 + receiptinformation,
  696 + 'MT2201-1' as messagetype,
  697 + customsstatus
  698 + from preparesecondary
  699 + where PREPAREMASTERID= #{autoid}
  700 +
  701 + UNION ALL
  702 + select
  703 + autoid,
  704 + waybillnosecondary as waybillnomaster,
  705 + arrivedtotalpiece as totalpiece,
  706 + arrivedtotalweight as totalweight,
  707 + customscode,
  708 + createdate,
  709 + status,
  710 + receiption as receiptinformation,
  711 + 'MT3201-1' as messagetype,
  712 + '' as customsstatus
  713 + from arrivedsecondary
  714 + where ARRIVEDMASTERID= #{autoid}
  715 + UNION ALL
  716 + select
  717 + autoid,
  718 + waybillnosecondary as waybillnomaster,
  719 + tallypiece as totalpiece,
  720 + tallyweight as totalweight,
  721 + customscode,
  722 + createdate,
  723 + status,
  724 + receiptinformation,
  725 + 'MT5202-1' as messagetype,
  726 + '' as customsstatus
  727 + from tallysecondary
  728 + where tallymasterID= #{autoid}
  729 + </select>
541 </mapper> 730 </mapper>
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 +<mapper namespace="com.tianbo.analysis.dao.SENDPLANMapper" >
  4 + <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.SENDPLAN" >
  5 + <id column="CARRIER" property="carrier" jdbcType="VARCHAR" />
  6 + </resultMap>
  7 + <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  8 + delete from CGONMS.SENDPLAN
  9 + where CARRIER = #{carrier,jdbcType=VARCHAR}
  10 + </delete>
  11 + <insert id="insert" parameterType="com.tianbo.analysis.model.SENDPLAN" >
  12 + insert into CGONMS.SENDPLAN (CARRIER)
  13 + values (#{carrier,jdbcType=VARCHAR})
  14 + </insert>
  15 + <insert id="insertSelective" parameterType="com.tianbo.analysis.model.SENDPLAN" >
  16 + insert into CGONMS.SENDPLAN
  17 + <trim prefix="(" suffix=")" suffixOverrides="," >
  18 + <if test="carrier != null" >
  19 + CARRIER,
  20 + </if>
  21 + </trim>
  22 + <trim prefix="values (" suffix=")" suffixOverrides="," >
  23 + <if test="carrier != null" >
  24 + #{carrier,jdbcType=VARCHAR},
  25 + </if>
  26 + </trim>
  27 + </insert>
  28 +</mapper>