作者 朱兆平

合并分支 'agent' 到 'master'

Agent

合并包含转发放行回执给代理人

查看合并请求 !1
... ... @@ -49,7 +49,8 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
#oracle
driver-class-name: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@218.28.199.134:8004:CGODB
url: jdbc:oracle:thin:@10.50.3.69:1521:CGODB
# url: jdbc:oracle:thin:@192.168.1.253:1522:ORCLL
username: CGONMS
password: 1q2w3e4r
#spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码
... ... @@ -132,7 +133,7 @@ jwt:
#自定义配置
custom:
#进港放行回执读取目录
receptDirectory: /Users/mrz/Downloads/rdp_temp/logs/回执报文样例/20191104
receptDirectory: /Users/mrz/Downloads/rdp_temp/logs/回执报文样例
#回执解析成功后的备份目录
receptBakDir: /Users/mrz/Downloads/rdp_temp/logs/success
#解析错误报文的备份目录
... ... @@ -141,6 +142,8 @@ custom:
transmitDir: /Users/mrz/Downloads/rdp_temp/logs/transmit
#匹配技术回执正则
delTechnologyReceptMatch: CN_MT(.*)_1P0_460470678920X_(.*).xml
#报文导入生成目录,这个地方目录结尾要带/
extRedioMsgDir: /Users/mrz/Downloads/rdp_temp/logs/transmit/
devops:
dir:
singlewindow-tcs-recept: D:\TCSSingleWindow\recive
... ...
... ... @@ -61,3 +61,5 @@
* 11-放行;
* 12-拒装;
* 13-禁卸。
# 心愿
\ No newline at end of file
... ...
... ... @@ -4,7 +4,6 @@
*/
package com.tianbo.analysis;
import com.tianbo.analysis.task.TaskAnalysis;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
... ... @@ -13,11 +12,12 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;
import java.time.Duration;
@SpringBootApplication
@EnableScheduling
@EnableDiscoveryClient
... ... @@ -34,7 +34,8 @@ public class BootApplication {
@LoadBalanced
RestTemplate restTemplate(RestTemplateBuilder builder){
return builder.build();
return builder.setConnectTimeout(Duration.ofSeconds(15)).setReadTimeout(Duration.ofSeconds(15))
.build();
}
}
... ...
... ... @@ -56,6 +56,13 @@ public class WlptBaseModel {
@Autowired
public CustomMessageService customMessageService;
@Autowired
public MANIFESTLOADMapper manifestloadMapper;
@Autowired
public MANIFESTLOSTCHANGEMapper manifestlostchangeMapper;
public WlptBaseModel() {
//处理多线程时 springboot 无法注入bean的问题
if (allocatearrivalMapper==null){
... ... @@ -103,6 +110,12 @@ public class WlptBaseModel {
if(customMessageService==null){
customMessageService = SpringBeanUtitl.getBean(CustomMessageService.class);
}
if(manifestloadMapper==null){
manifestloadMapper = SpringBeanUtitl.getBean(MANIFESTLOADMapper.class);
}
if(manifestlostchangeMapper==null){
manifestlostchangeMapper = SpringBeanUtitl.getBean(MANIFESTLOSTCHANGEMapper.class);
}
}
... ...
package com.tianbo.analysis.controller;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.File;
import java.io.IOException;
import java.util.UUID;
/**
* 在线报文导入管理
*/
@RestController
@RequestMapping("/Rmsg")
@Slf4j
public class RadioMsgController {
//备份目录
@Value("${custom.extRedioMsgDir}")
private String extRedioMsgDir;
private final static String FFM_HEADER = "<MSG>\n" +
"<META>\n" +
"<SNDR>TXD</SNDR>\n" +
"<DDTM>20200113050339</DDTM>\n" +
"<TYPE>IATA</TYPE>\n" +
"<STYP>FFM</STYP>\n" +
"<SEQN>95205940</SEQN>\n" +
"</META>\n" +
"<FFM>\n";
private final static String FFM_FOOTER = "\n</FFM>\n" +
"</MSG>";
private final static String FWB_HEADER="<MSG>\n" +
"<META>\n" +
"<SNDR>TXD</SNDR>\n" +
"<DDTM>20200113004608</DDTM>\n" +
"<TYPE>IATA</TYPE>\n" +
"<STYP>IFWB</STYP>\n" +
"<SEQN>95203026</SEQN>\n" +
"</META>\n" +
"<FWB>\n";
private final static String FWB_FOOTER="\n</FWB>\n" +
"</MSG>";
private final static String FHL_HEADER="<MSG>\n" +
"<META>\n" +
"<SNDR>TXD</SNDR>\n" +
"<DDTM>20200113003006</DDTM>\n" +
"<TYPE>IATA</TYPE>\n" +
"<STYP>IFHL</STYP>\n" +
"<SEQN>95202782</SEQN>\n" +
"</META>\n" +
"<FHL>\n";
private final static String FHL_FOOTER="\n</FHL>\n" +
"</MSG>";
@PostMapping("ffm")
public int extFFM(String ffmmsg){
if (ffmmsg!=null){
ffmmsg = FFM_HEADER + ffmmsg;
ffmmsg = ffmmsg + FFM_FOOTER;
File file = new File(extRedioMsgDir+UUID.randomUUID()+".txt");
try {
FileUtils.writeStringToFile(file,ffmmsg,"UTF-8");
log.info("FFM报文导入成功");
return 1;
}catch (IOException e){
e.printStackTrace();
}
}
return 0;
}
@PostMapping("fwb")
public int extFWB(String ffmmsg){
if (ffmmsg!=null) {
ffmmsg = FWB_HEADER + ffmmsg;
ffmmsg = ffmmsg + FWB_FOOTER;
File file = new File(extRedioMsgDir + UUID.randomUUID() + ".txt");
try {
FileUtils.writeStringToFile(file, ffmmsg, "UTF-8");
log.info("FWB报文导入成功");
return 1;
} catch (IOException e) {
e.printStackTrace();
}
}
return 0;
}
@PostMapping("fhl")
public int extFHL(String ffmmsg){
if (ffmmsg!=null) {
ffmmsg = FHL_HEADER + ffmmsg;
ffmmsg = ffmmsg + FHL_FOOTER;
File file = new File(extRedioMsgDir + UUID.randomUUID() + ".txt");
try {
FileUtils.writeStringToFile(file, ffmmsg, "UTF-8");
log.info("FHL报文导入成功");
return 1;
} catch (IOException e) {
e.printStackTrace();
}
}
return 0;
}
}
... ...
package com.tianbo.analysis.dao;
import com.tianbo.analysis.model.MANIFESTLOAD;
import java.util.List;
public interface MANIFESTLOADMapper {
int insert(MANIFESTLOAD record);
int insertSelective(MANIFESTLOAD record);
int updateRECEIPTION(MANIFESTLOAD record);
List<MANIFESTLOAD> selectAutoIdByawbAawbH(MANIFESTLOAD record);
}
\ No newline at end of file
... ...
package com.tianbo.analysis.dao;
import com.tianbo.analysis.model.MANIFESTLOSTCHANGE;
import java.util.List;
public interface MANIFESTLOSTCHANGEMapper {
int insert(MANIFESTLOSTCHANGE record);
int insertSelective(MANIFESTLOSTCHANGE record);
int updateRECEIPTION(MANIFESTLOSTCHANGE record);
List<MANIFESTLOSTCHANGE> selectAutoIdByawbAawbH(MANIFESTLOSTCHANGE record);
}
\ No newline at end of file
... ...
package com.tianbo.analysis.handle;
import com.tianbo.analysis.model.Agent_Notice;
import com.tianbo.analysis.model.CustomReception;
import com.tianbo.analysis.tools.AWBTools;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import javax.annotation.PostConstruct;
@Slf4j
@Component
public class AgentXmlHandle {
private static AgentXmlHandle agentXmlHandle;
public void Http_resolver(CustomReception customReception){
try{
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
requestFactory.setConnectTimeout(5000);
requestFactory.setReadTimeout(5000);
RestTemplate restTemplate = new RestTemplate(requestFactory);
String secondSplit = "_";
String waybillnosecondary="";
if (customReception.getWayBillSecond()!=null && customReception.getWayBillSecond().contains(secondSplit)){
//取分单号
String[] awbhArr = customReception.getWayBillSecond().split("_");
waybillnosecondary = awbhArr[1];
}
Agent_Notice notice = restTemplate.getForObject("http://10.50.3.73:1983/agent/receipt/a0608c4054662dd902e1314f7e450e3eaa81c114?message_type={1}&waybillNo={2}&waybillNoSub={3}&response_code={4}&response_text={5}"
, Agent_Notice.class,"MT2201", AWBTools.awbFormat(customReception.getWayBillMaster()),waybillnosecondary,customReception.getResponseCode(),customReception.getResponseText());
log.info(notice.toString());
}catch (Exception e){
log.error("链接代理人服务器超时或者接口异常,{}",e);
}
}
}
... ...
... ... @@ -248,6 +248,8 @@ public class CustomXmlHandleThread implements Runnable{
i=arrivedmaster9999.masterAnalysisReception();
}
}
AgentXmlHandle agentXmlHandle=new AgentXmlHandle();
agentXmlHandle.Http_resolver(customReception);
break;
case "MT3201":
if (customReception.getWayBillSecond()!=null && customReception.getWayBillSecond().contains(secondSplit)){
... ... @@ -309,6 +311,14 @@ public class CustomXmlHandleThread implements Runnable{
case "MT8205":
i = transXmlHandel(document,customReception);
break;
case "MT8202":
MANIFESTLOAD manifestload = new MANIFESTLOAD(customReception);
i= manifestload.secondAnalysisReception();
break;
case "MT8203":
MANIFESTLOSTCHANGE manifestlostchange = new MANIFESTLOSTCHANGE(customReception);
i= manifestlostchange.secondAnalysisReception();
break;
default:
break;
... ...
package com.tianbo.analysis.model;
import lombok.Data;
@Data
public class Agent_Notice {
private int status;
private int code;
private String msg;
private Object data;
private int page;
private int count;
}
... ...
package com.tianbo.analysis.model;
import com.tianbo.analysis.bean.WlptBaseModel;
import com.tianbo.analysis.tools.AWBTools;
import com.tianbo.util.Date.DateUtil;
import lombok.extern.slf4j.Slf4j;
import java.util.Date;
import java.util.List;
@Slf4j
public class MANIFESTLOAD extends WlptBaseModel {
private String id;
private Date createdate;
private String flightno;
private String waybillnomaster;
private Date flightdate;
private String waybillnosecondary;
private String remark;
private String status;
private String receiption;
private String customcode;
private String reason;
private String contactname;
private String contacttel;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public Date getCreatedate() {
return createdate;
}
public void setCreatedate(Date createdate) {
this.createdate = createdate;
}
public String getFlightno() {
return flightno;
}
public void setFlightno(String flightno) {
this.flightno = flightno == null ? null : flightno.trim();
}
public String getWaybillnomaster() {
return waybillnomaster;
}
public void setWaybillnomaster(String waybillnomaster) {
this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();
}
public Date getFlightdate() {
return flightdate;
}
public void setFlightdate(Date flightdate) {
this.flightdate = flightdate;
}
public String getWaybillnosecondary() {
return waybillnosecondary;
}
public void setWaybillnosecondary(String waybillnosecondary) {
this.waybillnosecondary = waybillnosecondary == null ? null : waybillnosecondary.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
public String getReceiption() {
return receiption;
}
public void setReceiption(String receiption) {
this.receiption = receiption == null ? null : receiption.trim();
}
public String getCustomcode() {
return customcode;
}
public void setCustomcode(String customcode) {
this.customcode = customcode == null ? null : customcode.trim();
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason == null ? null : reason.trim();
}
public String getContactname() {
return contactname;
}
public void setContactname(String contactname) {
this.contactname = contactname == null ? null : contactname.trim();
}
public String getContacttel() {
return contacttel;
}
public void setContacttel(String contacttel) {
this.contacttel = contacttel == null ? null : contacttel.trim();
}
public MANIFESTLOAD() {
}
public MANIFESTLOAD(CustomReception customReception) {
this.waybillnomaster = AWBTools.awbFormat(customReception.getWayBillMaster());
//取分单号
if(!customReception.getWayBillSecond().isEmpty()){
String[] awbhArr = customReception.getWayBillSecond().split("_");
this.waybillnosecondary = awbhArr[1];
}
this.flightno = customReception.getFlightNo();
this.flightdate = DateUtil.formatByyyyyMMdd(customReception.getFlightDate());
this.status = AWBTools.transCusRspCode(customReception.getResponseCode());
this.receiption = customReception.getResponseText();
}
@Override
public int secondAnalysisReception(){
//更新分单回执
int i = manifestloadMapper.updateRECEIPTION(this);
//获取分单autoid
List<MANIFESTLOAD> secondaryList = manifestloadMapper.selectAutoIdByawbAawbH(this);
if(!secondaryList.isEmpty()){
MANIFESTLOAD arrivedSecond = secondaryList.get(0);
String autoId = arrivedSecond.getId();
//插入sendlog记录表
log.info("即将插入回执日志运单号为:{}{},->autoid={}",waybillnomaster,waybillnosecondary,autoId);
int ii = sendLogService.insertSendlog("MT8202",receiption,autoId);
//todo:同时更新发送日志表的回执信息
if (i>0 && ii>0 ){
log.info("运单号 {} 落装分单回执更新成功",waybillnosecondary);
return 1;
}
}else {
//todo:如果都没适配到的话,要从发送日志表里面通过回执中的messageid 找到发送信息,适配回执
}
return 0;
}
}
\ No newline at end of file
... ...
package com.tianbo.analysis.model;
import com.tianbo.analysis.bean.WlptBaseModel;
import com.tianbo.analysis.tools.AWBTools;
import com.tianbo.util.Date.DateUtil;
import lombok.extern.slf4j.Slf4j;
import java.util.Date;
import java.util.List;
@Slf4j
public class MANIFESTLOSTCHANGE extends WlptBaseModel{
private String id;
private String flightno;
private Date flightdate;
private String waybillnomaster;
private String waybillnosecondary;
private String cwaybillnomaster;
private String cwaybillnosecondary;
private Date createdate;
private String status;
private String receiption;
private String cflightno;
private Date cflightdate;
private String sequencenumeric;
private String quantity;
private String cargodescription;
private String goodsmeasure;
private String customcode;
private String reason;
private String contactname;
private String contacttel;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getFlightno() {
return flightno;
}
public void setFlightno(String flightno) {
this.flightno = flightno == null ? null : flightno.trim();
}
public Date getFlightdate() {
return flightdate;
}
public void setFlightdate(Date flightdate) {
this.flightdate = flightdate;
}
public String getWaybillnomaster() {
return waybillnomaster;
}
public void setWaybillnomaster(String waybillnomaster) {
this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();
}
public String getWaybillnosecondary() {
return waybillnosecondary;
}
public void setWaybillnosecondary(String waybillnosecondary) {
this.waybillnosecondary = waybillnosecondary == null ? null : waybillnosecondary.trim();
}
public String getCwaybillnomaster() {
return cwaybillnomaster;
}
public void setCwaybillnomaster(String cwaybillnomaster) {
this.cwaybillnomaster = cwaybillnomaster == null ? null : cwaybillnomaster.trim();
}
public String getCwaybillnosecondary() {
return cwaybillnosecondary;
}
public void setCwaybillnosecondary(String cwaybillnosecondary) {
this.cwaybillnosecondary = cwaybillnosecondary == null ? null : cwaybillnosecondary.trim();
}
public Date getCreatedate() {
return createdate;
}
public void setCreatedate(Date createdate) {
this.createdate = createdate;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
public String getReceiption() {
return receiption;
}
public void setReceiption(String receiption) {
this.receiption = receiption == null ? null : receiption.trim();
}
public String getCflightno() {
return cflightno;
}
public void setCflightno(String cflightno) {
this.cflightno = cflightno == null ? null : cflightno.trim();
}
public Date getCflightdate() {
return cflightdate;
}
public void setCflightdate(Date cflightdate) {
this.cflightdate = cflightdate;
}
public String getSequencenumeric() {
return sequencenumeric;
}
public void setSequencenumeric(String sequencenumeric) {
this.sequencenumeric = sequencenumeric == null ? null : sequencenumeric.trim();
}
public String getQuantity() {
return quantity;
}
public void setQuantity(String quantity) {
this.quantity = quantity == null ? null : quantity.trim();
}
public String getCargodescription() {
return cargodescription;
}
public void setCargodescription(String cargodescription) {
this.cargodescription = cargodescription == null ? null : cargodescription.trim();
}
public String getGoodsmeasure() {
return goodsmeasure;
}
public void setGoodsmeasure(String goodsmeasure) {
this.goodsmeasure = goodsmeasure == null ? null : goodsmeasure.trim();
}
public String getCustomcode() {
return customcode;
}
public void setCustomcode(String customcode) {
this.customcode = customcode == null ? null : customcode.trim();
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason == null ? null : reason.trim();
}
public String getContactname() {
return contactname;
}
public void setContactname(String contactname) {
this.contactname = contactname == null ? null : contactname.trim();
}
public String getContacttel() {
return contacttel;
}
public void setContacttel(String contacttel) {
this.contacttel = contacttel == null ? null : contacttel.trim();
}
public MANIFESTLOSTCHANGE() {
}
public MANIFESTLOSTCHANGE(CustomReception customReception) {
this.waybillnomaster = AWBTools.awbFormat(customReception.getWayBillMaster());
//取分单号
if(!customReception.getWayBillSecond().isEmpty()){
String[] awbhArr = customReception.getWayBillSecond().split("_");
this.waybillnosecondary = awbhArr[1];
}
this.flightno = customReception.getFlightNo();
this.flightdate = DateUtil.formatByyyyyMMdd(customReception.getFlightDate());
this.status = AWBTools.transCusRspCode(customReception.getResponseCode());
this.receiption = customReception.getResponseText();
}
@Override
public int secondAnalysisReception(){
//更新分单回执
int i = manifestlostchangeMapper.updateRECEIPTION(this);
//获取分单autoid
List<MANIFESTLOSTCHANGE> secondaryList = manifestlostchangeMapper.selectAutoIdByawbAawbH(this);
if(!secondaryList.isEmpty()){
MANIFESTLOSTCHANGE arrivedSecond = secondaryList.get(0);
String autoId = arrivedSecond.getId();
//插入sendlog记录表
log.info("即将插入回执日志运单号为:{}{},->autoid={}",waybillnomaster,waybillnosecondary,autoId);
int ii = sendLogService.insertSendlog("MT8203",receiption,autoId);
//todo:同时更新发送日志表的回执信息
if (i>0 && ii>0 ){
log.info("运单号 {} 落装改配分单回执更新成功",waybillnosecondary);
return 1;
}
}else {
//todo:如果都没适配到的话,要从发送日志表里面通过回执中的messageid 找到发送信息,适配回执
}
return 0;
}
}
\ No newline at end of file
... ...
${AnsiColor.YELLOW}
##################*CETC-TIANBO*#########################
.::::.
.::::::::.
:::::::::::
..:::::::::::'
'::::::::::::'
.::::::::::
'::::::::::::::..
..::::::::::::.
``::::::::::::::::
::::``:::::::::' .:::.
::::' ':::::' .::::::::.
.::::' :::: .:::::::'::::.
.:::' ::::: .:::::::::' ':::::.
.::' :::::.:::::::::' ':::::.
.::' ::::::::::::::' ``::::.
...::: ::::::::::::' ``::.
```` ':. ':::::::::' ::::..
'.:::::' ':'````..
,----------------, ,---------,
,-----------------------, ," ,"|
," ,"| ," ," |
+-----------------------+ | ," ," |
| .-----------------. | | +---------+ |
| | | | | | -==----'| |
| | I LOVE DOS! | | | | | |
| | Bad command or | | |/----|`---= | |
| | C:\>_ | | | ,/|==== ooo | ;
| | | | | // |(((( [33]| ,"
| `-----------------' |," .;'| |(((( | ,"
+-----------------------+ ;; | | |,"
/_)______________(_/ //' | +---------+
___________________________/___ `,
/ oooooooooooooooo .o. oooo /, \,"-----------
/ ==ooooooooooooooo==.o. ooo= // ,`\--{)B ,"
/_==__==========__==_ooo__ooo=_/' /___________,"
#########################################################
... ...
... ... @@ -4,8 +4,8 @@
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 数据库驱动:选择你的本地硬盘上面的数据库驱动包-->
<classPathEntry location="/Users/mrz/Downloads/mybatis-generator-core-1.3.2/lib/mysql-connector-java-5.1.25-bin.jar"/>
<!--<classPathEntry location="/Users/mrz/Documents/maven/ojdbc6.jar"/>-->
<!--<classPathEntry location="/Users/mrz/Downloads/mybatis-generator-core-1.3.2/lib/mysql-connector-java-5.1.25-bin.jar"/>-->
<classPathEntry location="/Users/mrz/Documents/maven/ojdbc6.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="true"/>
... ... @@ -13,16 +13,16 @@
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<!--数据库链接URL,用户名、密码 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://118.31.66.166:3306/WLPT_NMMS"
userId="110"
password="QAHqCJf2kFYCLirM">
</jdbcConnection>
<!--<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"-->
<!--connectionURL="jdbc:oracle:thin:@218.28.199.134:8004:CGODB"-->
<!--userId="CGONMS"-->
<!--password="1q2w3e4r">-->
<!--<jdbcConnection driverClass="com.mysql.jdbc.Driver"-->
<!--connectionURL="jdbc:mysql://118.31.66.166:3306/WLPT_NMMS"-->
<!--userId="110"-->
<!--password="QAHqCJf2kFYCLirM">-->
<!--</jdbcConnection>-->
<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@10.50.3.69:1521:CGODB"
userId="CGONMS"
password="1q2w3e4r">
</jdbcConnection>
<!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
NUMERIC 类型解析为java.math.BigDecimal -->
<!--<javaTypeResolver>-->
... ... @@ -45,6 +45,6 @@
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<table tableName="CUSTOM_RESPONSE" domainObjectName="CUSTOM_RESPONSE" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="MANIFESTLOSTCHANGE" domainObjectName="MANIFESTLOSTCHANGE" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration>
\ No newline at end of file
... ...
<?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.MANIFESTLOADMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.MANIFESTLOAD" >
<result column="ID" property="id" jdbcType="VARCHAR" />
<result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
<result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
<result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
<result column="FLIGHTDATE" property="flightdate" jdbcType="DATE" />
<result column="WAYBILLNOSECONDARY" property="waybillnosecondary" jdbcType="VARCHAR" />
<result column="REMARK" property="remark" jdbcType="VARCHAR" />
<result column="STATUS" property="status" jdbcType="VARCHAR" />
<result column="RECEIPTION" property="receiption" jdbcType="VARCHAR" />
<result column="CUSTOMCODE" property="customcode" jdbcType="VARCHAR" />
<result column="REASON" property="reason" jdbcType="VARCHAR" />
<result column="CONTACTNAME" property="contactname" jdbcType="VARCHAR" />
<result column="CONTACTTEL" property="contacttel" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.tianbo.analysis.model.MANIFESTLOAD" >
insert into MANIFESTLOAD (ID, CREATEDATE, FLIGHTNO,
WAYBILLNOMASTER, FLIGHTDATE, WAYBILLNOSECONDARY,
REMARK, STATUS, RECEIPTION,
CUSTOMCODE, REASON, CONTACTNAME,
CONTACTTEL)
values (#{id,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{flightno,jdbcType=VARCHAR},
#{waybillnomaster,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP}, #{waybillnosecondary,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{receiption,jdbcType=VARCHAR},
#{customcode,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR}, #{contactname,jdbcType=VARCHAR},
#{contacttel,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.MANIFESTLOAD" >
insert into MANIFESTLOAD
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="createdate != null" >
CREATEDATE,
</if>
<if test="flightno != null" >
FLIGHTNO,
</if>
<if test="waybillnomaster != null" >
WAYBILLNOMASTER,
</if>
<if test="flightdate != null" >
FLIGHTDATE,
</if>
<if test="waybillnosecondary != null" >
WAYBILLNOSECONDARY,
</if>
<if test="remark != null" >
REMARK,
</if>
<if test="status != null" >
STATUS,
</if>
<if test="receiption != null" >
RECEIPTION,
</if>
<if test="customcode != null" >
CUSTOMCODE,
</if>
<if test="reason != null" >
REASON,
</if>
<if test="contactname != null" >
CONTACTNAME,
</if>
<if test="contacttel != null" >
CONTACTTEL,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="createdate != null" >
#{createdate,jdbcType=TIMESTAMP},
</if>
<if test="flightno != null" >
#{flightno,jdbcType=VARCHAR},
</if>
<if test="waybillnomaster != null" >
#{waybillnomaster,jdbcType=VARCHAR},
</if>
<if test="flightdate != null" >
#{flightdate,jdbcType=TIMESTAMP},
</if>
<if test="waybillnosecondary != null" >
#{waybillnosecondary,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="receiption != null" >
#{receiption,jdbcType=VARCHAR},
</if>
<if test="customcode != null" >
#{customcode,jdbcType=VARCHAR},
</if>
<if test="reason != null" >
#{reason,jdbcType=VARCHAR},
</if>
<if test="contactname != null" >
#{contactname,jdbcType=VARCHAR},
</if>
<if test="contacttel != null" >
#{contacttel,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.MANIFESTLOAD" >
UPDATE MANIFESTLOAD
SET
RECEIPTION= #{receiption,jdbcType=VARCHAR},
STATUS = #{status,jdbcType=VARCHAR}
WHERE
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
AND
WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
AND
FLIGHTNO = #{flightno,jdbcType=VARCHAR}
AND
trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE}
</update>
<select id="selectAutoIdByawbAawbH" parameterType="com.tianbo.analysis.model.MANIFESTLOAD" resultType="com.tianbo.analysis.model.MANIFESTLOAD">
SELECT ID
FROM MANIFESTLOAD
WHERE
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
AND
WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
<if test="flightno != null" >
AND
FLIGHTNO = #{flightno,jdbcType=VARCHAR}
</if>
<if test="flightdate != null" >
AND
trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE}
</if>
</select>
</mapper>
\ No newline at end of file
... ...
<?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.MANIFESTLOSTCHANGEMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.MANIFESTLOSTCHANGE" >
<result column="ID" property="id" jdbcType="VARCHAR" />
<result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
<result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" />
<result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
<result column="WAYBILLNOSECONDARY" property="waybillnosecondary" jdbcType="VARCHAR" />
<result column="CWAYBILLNOMASTER" property="cwaybillnomaster" jdbcType="VARCHAR" />
<result column="CWAYBILLNOSECONDARY" property="cwaybillnosecondary" jdbcType="VARCHAR" />
<result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
<result column="STATUS" property="status" jdbcType="VARCHAR" />
<result column="RECEIPTION" property="receiption" jdbcType="VARCHAR" />
<result column="CFLIGHTNO" property="cflightno" jdbcType="VARCHAR" />
<result column="CFLIGHTDATE" property="cflightdate" jdbcType="DATE" />
<result column="SEQUENCENUMERIC" property="sequencenumeric" jdbcType="VARCHAR" />
<result column="QUANTITY" property="quantity" jdbcType="VARCHAR" />
<result column="CARGODESCRIPTION" property="cargodescription" jdbcType="VARCHAR" />
<result column="GOODSMEASURE" property="goodsmeasure" jdbcType="VARCHAR" />
<result column="CUSTOMCODE" property="customcode" jdbcType="VARCHAR" />
<result column="REASON" property="reason" jdbcType="VARCHAR" />
<result column="CONTACTNAME" property="contactname" jdbcType="VARCHAR" />
<result column="CONTACTTEL" property="contacttel" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.tianbo.analysis.model.MANIFESTLOSTCHANGE" >
insert into MANIFESTLOSTCHANGE (ID, FLIGHTNO, FLIGHTDATE,
WAYBILLNOMASTER, WAYBILLNOSECONDARY, CWAYBILLNOMASTER,
CWAYBILLNOSECONDARY, CREATEDATE, STATUS,
RECEIPTION, CFLIGHTNO, CFLIGHTDATE,
SEQUENCENUMERIC, QUANTITY, CARGODESCRIPTION,
GOODSMEASURE, CUSTOMCODE, REASON,
CONTACTNAME, CONTACTTEL)
values (#{id,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP},
#{waybillnomaster,jdbcType=VARCHAR}, #{waybillnosecondary,jdbcType=VARCHAR}, #{cwaybillnomaster,jdbcType=VARCHAR},
#{cwaybillnosecondary,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR},
#{receiption,jdbcType=VARCHAR}, #{cflightno,jdbcType=VARCHAR}, #{cflightdate,jdbcType=TIMESTAMP},
#{sequencenumeric,jdbcType=VARCHAR}, #{quantity,jdbcType=VARCHAR}, #{cargodescription,jdbcType=VARCHAR},
#{goodsmeasure,jdbcType=VARCHAR}, #{customcode,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR},
#{contactname,jdbcType=VARCHAR}, #{contacttel,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.MANIFESTLOSTCHANGE" >
insert into MANIFESTLOSTCHANGE
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="flightno != null" >
FLIGHTNO,
</if>
<if test="flightdate != null" >
FLIGHTDATE,
</if>
<if test="waybillnomaster != null" >
WAYBILLNOMASTER,
</if>
<if test="waybillnosecondary != null" >
WAYBILLNOSECONDARY,
</if>
<if test="cwaybillnomaster != null" >
CWAYBILLNOMASTER,
</if>
<if test="cwaybillnosecondary != null" >
CWAYBILLNOSECONDARY,
</if>
<if test="createdate != null" >
CREATEDATE,
</if>
<if test="status != null" >
STATUS,
</if>
<if test="receiption != null" >
RECEIPTION,
</if>
<if test="cflightno != null" >
CFLIGHTNO,
</if>
<if test="cflightdate != null" >
CFLIGHTDATE,
</if>
<if test="sequencenumeric != null" >
SEQUENCENUMERIC,
</if>
<if test="quantity != null" >
QUANTITY,
</if>
<if test="cargodescription != null" >
CARGODESCRIPTION,
</if>
<if test="goodsmeasure != null" >
GOODSMEASURE,
</if>
<if test="customcode != null" >
CUSTOMCODE,
</if>
<if test="reason != null" >
REASON,
</if>
<if test="contactname != null" >
CONTACTNAME,
</if>
<if test="contacttel != null" >
CONTACTTEL,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="flightno != null" >
#{flightno,jdbcType=VARCHAR},
</if>
<if test="flightdate != null" >
#{flightdate,jdbcType=TIMESTAMP},
</if>
<if test="waybillnomaster != null" >
#{waybillnomaster,jdbcType=VARCHAR},
</if>
<if test="waybillnosecondary != null" >
#{waybillnosecondary,jdbcType=VARCHAR},
</if>
<if test="cwaybillnomaster != null" >
#{cwaybillnomaster,jdbcType=VARCHAR},
</if>
<if test="cwaybillnosecondary != null" >
#{cwaybillnosecondary,jdbcType=VARCHAR},
</if>
<if test="createdate != null" >
#{createdate,jdbcType=TIMESTAMP},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="receiption != null" >
#{receiption,jdbcType=VARCHAR},
</if>
<if test="cflightno != null" >
#{cflightno,jdbcType=VARCHAR},
</if>
<if test="cflightdate != null" >
#{cflightdate,jdbcType=TIMESTAMP},
</if>
<if test="sequencenumeric != null" >
#{sequencenumeric,jdbcType=VARCHAR},
</if>
<if test="quantity != null" >
#{quantity,jdbcType=VARCHAR},
</if>
<if test="cargodescription != null" >
#{cargodescription,jdbcType=VARCHAR},
</if>
<if test="goodsmeasure != null" >
#{goodsmeasure,jdbcType=VARCHAR},
</if>
<if test="customcode != null" >
#{customcode,jdbcType=VARCHAR},
</if>
<if test="reason != null" >
#{reason,jdbcType=VARCHAR},
</if>
<if test="contactname != null" >
#{contactname,jdbcType=VARCHAR},
</if>
<if test="contacttel != null" >
#{contacttel,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.MANIFESTLOSTCHANGE" >
UPDATE MANIFESTLOSTCHANGE
SET
RECEIPTION= #{receiption,jdbcType=VARCHAR},
STATUS = #{status,jdbcType=VARCHAR}
WHERE
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
AND
WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
AND
FLIGHTNO = #{flightno,jdbcType=VARCHAR}
AND
trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE}
</update>
<select id="selectAutoIdByawbAawbH" parameterType="com.tianbo.analysis.model.MANIFESTLOSTCHANGE" resultType="com.tianbo.analysis.model.MANIFESTLOSTCHANGE">
SELECT ID
FROM MANIFESTLOSTCHANGE
WHERE
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
AND
WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
<if test="flightno != null" >
AND
FLIGHTNO = #{flightno,jdbcType=VARCHAR}
</if>
<if test="flightdate != null" >
AND
trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE}
</if>
</select>
</mapper>
\ No newline at end of file
... ...