作者 朱兆平

航班日期更新接口

分单运抵更新接口
运单回执信息查询接口
... ... @@ -51,7 +51,7 @@ spring:
# username: root
# password:
# driver-class-name: com.mysql.jdbc.Driver
max-idle: 10
max-idle: 20
max-wait: 10000
min-idle: 5
initial-size: 5
... ... @@ -59,7 +59,8 @@ spring:
druid:
initial-size: 1
min-idle: 1
max-active: 20
#最大并发连接数
max-active: 40
#获取连接等待超时时间
max-wait: 60000
#一个连接在池中最小生存的时间
... ...
# 通用IMF接收客户端框架
# 通用IMF接收客户端框架 - 新舱单接收微信端修改数据业务后端服务
* 集成IMFjar包
* 集成Spring boot 及 srping cloud
* 集成websocket
* 可以在线查看imf客户端运行情况 web访问路径/log/imf,可查看项目logs目录下的imf.log
\ No newline at end of file
* 可以在线查看imf客户端运行情况 web访问路径/log/imf,可查看项目logs目录下的imf.log
* 目前提供的接口有
* 更新航班日期
* 更新分单运抵状态重发分单
* 查询运单回执信息,包括运单发送的报文ID
\ No newline at end of file
... ...
package com.tianbo.imfClient.controller;
import com.tianbo.imfClient.dao.ARRIVEDSECONDARYMapper;
import com.tianbo.imfClient.model.CUSTOMSMESSAGE;
import com.tianbo.imfClient.model.ResultJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
/**
* 出港运抵服务接口
*/
@RestController
@RequestMapping("/awb")
public class AWBController {
@Autowired
private ARRIVEDSECONDARYMapper arrivedsecondaryMapper;
/**
* 更新分单运抵发送状态为01-(未发送可发送)
* @param masterno 主单号
* @param secendno 分单号
* @return 更新成功/失败
*/
@PostMapping("/customres")
public ResultJson getCustomResponse(@RequestParam(value = "masterno",required = true) String masterno,
@RequestParam(value = "secendno",required = true) String secendno){
HashMap<String ,String> map = new HashMap();
map.put("masterno",masterno);
map.put("secendno",secendno);
int i = arrivedsecondaryMapper.updatestatus(map);
if (i>0)
{
return new ResultJson("200","重发分单运抵成功",i);
// return "航班日期更新成功"+i;
}
return new ResultJson("500","重发失败",i);
}
}
... ...
... ... @@ -13,6 +13,9 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
/**
* 航班信息服务接口
*/
@RestController
@RequestMapping("/flight")
public class FlightController {
... ...
package com.tianbo.imfClient.dao;
import com.tianbo.imfClient.model.ARRIVEDSECONDARY;
import java.util.HashMap;
public interface ARRIVEDSECONDARYMapper {
int insert(ARRIVEDSECONDARY record);
int insertSelective(ARRIVEDSECONDARY record);
int updatestatus(HashMap map);
}
\ No newline at end of file
... ...
package com.tianbo.imfClient.model;
import java.util.Date;
public class ARRIVEDSECONDARY {
private String autoid;
private String waybillnomaster;
private String tcdName;
private String tcdTypecode;
private String waybillnosecondary;
private String carrier;
private String oId;
private String oName;
private String fdId;
private String fdName;
private String flightno;
private Date flightdate;
private String arrivedtotalpiece;
private String totalpiecequantity;
private String arrivedtotalweight;
private String grossweightmeasureuc;
private String totalgrossweightmeasure;
private String totalgrossweightmeasureuc;
private String chargeableweightmeasure;
private String chargeableweightmeasureuc;
private Date arriveddate;
private String customscode;
private String productname;
private Date createdate;
private String arrivedmasterid;
private String transportsplitdescription;
private String receiption;
private String status;
public String getAutoid() {
return autoid;
}
public void setAutoid(String autoid) {
this.autoid = autoid == null ? null : autoid.trim();
}
public String getWaybillnomaster() {
return waybillnomaster;
}
public void setWaybillnomaster(String waybillnomaster) {
this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();
}
public String getTcdName() {
return tcdName;
}
public void setTcdName(String tcdName) {
this.tcdName = tcdName == null ? null : tcdName.trim();
}
public String getTcdTypecode() {
return tcdTypecode;
}
public void setTcdTypecode(String tcdTypecode) {
this.tcdTypecode = tcdTypecode == null ? null : tcdTypecode.trim();
}
public String getWaybillnosecondary() {
return waybillnosecondary;
}
public void setWaybillnosecondary(String waybillnosecondary) {
this.waybillnosecondary = waybillnosecondary == null ? null : waybillnosecondary.trim();
}
public String getCarrier() {
return carrier;
}
public void setCarrier(String carrier) {
this.carrier = carrier == null ? null : carrier.trim();
}
public String getoId() {
return oId;
}
public void setoId(String oId) {
this.oId = oId == null ? null : oId.trim();
}
public String getoName() {
return oName;
}
public void setoName(String oName) {
this.oName = oName == null ? null : oName.trim();
}
public String getFdId() {
return fdId;
}
public void setFdId(String fdId) {
this.fdId = fdId == null ? null : fdId.trim();
}
public String getFdName() {
return fdName;
}
public void setFdName(String fdName) {
this.fdName = fdName == null ? null : fdName.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 getArrivedtotalpiece() {
return arrivedtotalpiece;
}
public void setArrivedtotalpiece(String arrivedtotalpiece) {
this.arrivedtotalpiece = arrivedtotalpiece == null ? null : arrivedtotalpiece.trim();
}
public String getTotalpiecequantity() {
return totalpiecequantity;
}
public void setTotalpiecequantity(String totalpiecequantity) {
this.totalpiecequantity = totalpiecequantity == null ? null : totalpiecequantity.trim();
}
public String getArrivedtotalweight() {
return arrivedtotalweight;
}
public void setArrivedtotalweight(String arrivedtotalweight) {
this.arrivedtotalweight = arrivedtotalweight == null ? null : arrivedtotalweight.trim();
}
public String getGrossweightmeasureuc() {
return grossweightmeasureuc;
}
public void setGrossweightmeasureuc(String grossweightmeasureuc) {
this.grossweightmeasureuc = grossweightmeasureuc == null ? null : grossweightmeasureuc.trim();
}
public String getTotalgrossweightmeasure() {
return totalgrossweightmeasure;
}
public void setTotalgrossweightmeasure(String totalgrossweightmeasure) {
this.totalgrossweightmeasure = totalgrossweightmeasure == null ? null : totalgrossweightmeasure.trim();
}
public String getTotalgrossweightmeasureuc() {
return totalgrossweightmeasureuc;
}
public void setTotalgrossweightmeasureuc(String totalgrossweightmeasureuc) {
this.totalgrossweightmeasureuc = totalgrossweightmeasureuc == null ? null : totalgrossweightmeasureuc.trim();
}
public String getChargeableweightmeasure() {
return chargeableweightmeasure;
}
public void setChargeableweightmeasure(String chargeableweightmeasure) {
this.chargeableweightmeasure = chargeableweightmeasure == null ? null : chargeableweightmeasure.trim();
}
public String getChargeableweightmeasureuc() {
return chargeableweightmeasureuc;
}
public void setChargeableweightmeasureuc(String chargeableweightmeasureuc) {
this.chargeableweightmeasureuc = chargeableweightmeasureuc == null ? null : chargeableweightmeasureuc.trim();
}
public Date getArriveddate() {
return arriveddate;
}
public void setArriveddate(Date arriveddate) {
this.arriveddate = arriveddate;
}
public String getCustomscode() {
return customscode;
}
public void setCustomscode(String customscode) {
this.customscode = customscode == null ? null : customscode.trim();
}
public String getProductname() {
return productname;
}
public void setProductname(String productname) {
this.productname = productname == null ? null : productname.trim();
}
public Date getCreatedate() {
return createdate;
}
public void setCreatedate(Date createdate) {
this.createdate = createdate;
}
public String getArrivedmasterid() {
return arrivedmasterid;
}
public void setArrivedmasterid(String arrivedmasterid) {
this.arrivedmasterid = arrivedmasterid == null ? null : arrivedmasterid.trim();
}
public String getTransportsplitdescription() {
return transportsplitdescription;
}
public void setTransportsplitdescription(String transportsplitdescription) {
this.transportsplitdescription = transportsplitdescription == null ? null : transportsplitdescription.trim();
}
public String getReceiption() {
return receiption;
}
public void setReceiption(String receiption) {
this.receiption = receiption == null ? null : receiption.trim();
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
}
\ No newline at end of file
... ...
... ... @@ -45,6 +45,6 @@
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<table tableName="CUSTOMSMESSAGE" domainObjectName="CUSTOMSMESSAGE" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="ARRIVEDSECONDARY" domainObjectName="ARRIVEDSECONDARY" 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.imfClient.dao.ARRIVEDSECONDARYMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.imfClient.model.ARRIVEDSECONDARY" >
<result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
<result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
<result column="TCD_NAME" property="tcdName" jdbcType="VARCHAR" />
<result column="TCD_TYPECODE" property="tcdTypecode" jdbcType="VARCHAR" />
<result column="WAYBILLNOSECONDARY" property="waybillnosecondary" jdbcType="VARCHAR" />
<result column="CARRIER" property="carrier" jdbcType="VARCHAR" />
<result column="O_ID" property="oId" jdbcType="VARCHAR" />
<result column="O_NAME" property="oName" jdbcType="VARCHAR" />
<result column="FD_ID" property="fdId" jdbcType="VARCHAR" />
<result column="FD_NAME" property="fdName" jdbcType="VARCHAR" />
<result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
<result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" />
<result column="ARRIVEDTOTALPIECE" property="arrivedtotalpiece" jdbcType="VARCHAR" />
<result column="TOTALPIECEQUANTITY" property="totalpiecequantity" jdbcType="VARCHAR" />
<result column="ARRIVEDTOTALWEIGHT" property="arrivedtotalweight" jdbcType="VARCHAR" />
<result column="GROSSWEIGHTMEASUREUC" property="grossweightmeasureuc" jdbcType="VARCHAR" />
<result column="TOTALGROSSWEIGHTMEASURE" property="totalgrossweightmeasure" jdbcType="VARCHAR" />
<result column="TOTALGROSSWEIGHTMEASUREUC" property="totalgrossweightmeasureuc" jdbcType="VARCHAR" />
<result column="CHARGEABLEWEIGHTMEASURE" property="chargeableweightmeasure" jdbcType="VARCHAR" />
<result column="CHARGEABLEWEIGHTMEASUREUC" property="chargeableweightmeasureuc" jdbcType="VARCHAR" />
<result column="ARRIVEDDATE" property="arriveddate" jdbcType="TIMESTAMP" />
<result column="CUSTOMSCODE" property="customscode" jdbcType="VARCHAR" />
<result column="PRODUCTNAME" property="productname" jdbcType="VARCHAR" />
<result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
<result column="ARRIVEDMASTERID" property="arrivedmasterid" jdbcType="VARCHAR" />
<result column="TRANSPORTSPLITDESCRIPTION" property="transportsplitdescription" jdbcType="VARCHAR" />
<result column="RECEIPTION" property="receiption" jdbcType="VARCHAR" />
<result column="STATUS" property="status" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.tianbo.imfClient.model.ARRIVEDSECONDARY" >
insert into ARRIVEDSECONDARY (AUTOID, WAYBILLNOMASTER, TCD_NAME,
TCD_TYPECODE, WAYBILLNOSECONDARY, CARRIER,
O_ID, O_NAME, FD_ID, FD_NAME,
FLIGHTNO, FLIGHTDATE, ARRIVEDTOTALPIECE,
TOTALPIECEQUANTITY, ARRIVEDTOTALWEIGHT,
GROSSWEIGHTMEASUREUC, TOTALGROSSWEIGHTMEASURE,
TOTALGROSSWEIGHTMEASUREUC, CHARGEABLEWEIGHTMEASURE,
CHARGEABLEWEIGHTMEASUREUC, ARRIVEDDATE,
CUSTOMSCODE, PRODUCTNAME, CREATEDATE,
ARRIVEDMASTERID, TRANSPORTSPLITDESCRIPTION,
RECEIPTION, STATUS)
values (#{autoid,jdbcType=VARCHAR}, #{waybillnomaster,jdbcType=VARCHAR}, #{tcdName,jdbcType=VARCHAR},
#{tcdTypecode,jdbcType=VARCHAR}, #{waybillnosecondary,jdbcType=VARCHAR}, #{carrier,jdbcType=VARCHAR},
#{oId,jdbcType=VARCHAR}, #{oName,jdbcType=VARCHAR}, #{fdId,jdbcType=VARCHAR}, #{fdName,jdbcType=VARCHAR},
#{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP}, #{arrivedtotalpiece,jdbcType=VARCHAR},
#{totalpiecequantity,jdbcType=VARCHAR}, #{arrivedtotalweight,jdbcType=VARCHAR},
#{grossweightmeasureuc,jdbcType=VARCHAR}, #{totalgrossweightmeasure,jdbcType=VARCHAR},
#{totalgrossweightmeasureuc,jdbcType=VARCHAR}, #{chargeableweightmeasure,jdbcType=VARCHAR},
#{chargeableweightmeasureuc,jdbcType=VARCHAR}, #{arriveddate,jdbcType=TIMESTAMP},
#{customscode,jdbcType=VARCHAR}, #{productname,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP},
#{arrivedmasterid,jdbcType=VARCHAR}, #{transportsplitdescription,jdbcType=VARCHAR},
#{receiption,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.imfClient.model.ARRIVEDSECONDARY" >
insert into ARRIVEDSECONDARY
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
AUTOID,
</if>
<if test="waybillnomaster != null" >
WAYBILLNOMASTER,
</if>
<if test="tcdName != null" >
TCD_NAME,
</if>
<if test="tcdTypecode != null" >
TCD_TYPECODE,
</if>
<if test="waybillnosecondary != null" >
WAYBILLNOSECONDARY,
</if>
<if test="carrier != null" >
CARRIER,
</if>
<if test="oId != null" >
O_ID,
</if>
<if test="oName != null" >
O_NAME,
</if>
<if test="fdId != null" >
FD_ID,
</if>
<if test="fdName != null" >
FD_NAME,
</if>
<if test="flightno != null" >
FLIGHTNO,
</if>
<if test="flightdate != null" >
FLIGHTDATE,
</if>
<if test="arrivedtotalpiece != null" >
ARRIVEDTOTALPIECE,
</if>
<if test="totalpiecequantity != null" >
TOTALPIECEQUANTITY,
</if>
<if test="arrivedtotalweight != null" >
ARRIVEDTOTALWEIGHT,
</if>
<if test="grossweightmeasureuc != null" >
GROSSWEIGHTMEASUREUC,
</if>
<if test="totalgrossweightmeasure != null" >
TOTALGROSSWEIGHTMEASURE,
</if>
<if test="totalgrossweightmeasureuc != null" >
TOTALGROSSWEIGHTMEASUREUC,
</if>
<if test="chargeableweightmeasure != null" >
CHARGEABLEWEIGHTMEASURE,
</if>
<if test="chargeableweightmeasureuc != null" >
CHARGEABLEWEIGHTMEASUREUC,
</if>
<if test="arriveddate != null" >
ARRIVEDDATE,
</if>
<if test="customscode != null" >
CUSTOMSCODE,
</if>
<if test="productname != null" >
PRODUCTNAME,
</if>
<if test="createdate != null" >
CREATEDATE,
</if>
<if test="arrivedmasterid != null" >
ARRIVEDMASTERID,
</if>
<if test="transportsplitdescription != null" >
TRANSPORTSPLITDESCRIPTION,
</if>
<if test="receiption != null" >
RECEIPTION,
</if>
<if test="status != null" >
STATUS,
</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="tcdName != null" >
#{tcdName,jdbcType=VARCHAR},
</if>
<if test="tcdTypecode != null" >
#{tcdTypecode,jdbcType=VARCHAR},
</if>
<if test="waybillnosecondary != null" >
#{waybillnosecondary,jdbcType=VARCHAR},
</if>
<if test="carrier != null" >
#{carrier,jdbcType=VARCHAR},
</if>
<if test="oId != null" >
#{oId,jdbcType=VARCHAR},
</if>
<if test="oName != null" >
#{oName,jdbcType=VARCHAR},
</if>
<if test="fdId != null" >
#{fdId,jdbcType=VARCHAR},
</if>
<if test="fdName != null" >
#{fdName,jdbcType=VARCHAR},
</if>
<if test="flightno != null" >
#{flightno,jdbcType=VARCHAR},
</if>
<if test="flightdate != null" >
#{flightdate,jdbcType=TIMESTAMP},
</if>
<if test="arrivedtotalpiece != null" >
#{arrivedtotalpiece,jdbcType=VARCHAR},
</if>
<if test="totalpiecequantity != null" >
#{totalpiecequantity,jdbcType=VARCHAR},
</if>
<if test="arrivedtotalweight != null" >
#{arrivedtotalweight,jdbcType=VARCHAR},
</if>
<if test="grossweightmeasureuc != null" >
#{grossweightmeasureuc,jdbcType=VARCHAR},
</if>
<if test="totalgrossweightmeasure != null" >
#{totalgrossweightmeasure,jdbcType=VARCHAR},
</if>
<if test="totalgrossweightmeasureuc != null" >
#{totalgrossweightmeasureuc,jdbcType=VARCHAR},
</if>
<if test="chargeableweightmeasure != null" >
#{chargeableweightmeasure,jdbcType=VARCHAR},
</if>
<if test="chargeableweightmeasureuc != null" >
#{chargeableweightmeasureuc,jdbcType=VARCHAR},
</if>
<if test="arriveddate != null" >
#{arriveddate,jdbcType=TIMESTAMP},
</if>
<if test="customscode != null" >
#{customscode,jdbcType=VARCHAR},
</if>
<if test="productname != null" >
#{productname,jdbcType=VARCHAR},
</if>
<if test="createdate != null" >
#{createdate,jdbcType=TIMESTAMP},
</if>
<if test="arrivedmasterid != null" >
#{arrivedmasterid,jdbcType=VARCHAR},
</if>
<if test="transportsplitdescription != null" >
#{transportsplitdescription,jdbcType=VARCHAR},
</if>
<if test="receiption != null" >
#{receiption,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updatestatus" parameterType="hashmap">
UPDATE ARRIVEDSECONDARY
set STATUS = '01'
WHERE WAYBILLNOMASTER = #{masterno}
AND WAYBILLNOSECONDARY = #{secendno}
</update>
</mapper>
\ No newline at end of file
... ...