作者 朱兆平

查询运单所有回执,目前只有出港

package com.tianbo.imfClient.controller;
import com.tianbo.imfClient.dao.CUSTOMSMESSAGEMapper;
import com.tianbo.imfClient.dao.ORIGINMANIFESTMASTERMapper;
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;
... ... @@ -9,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
@RestController
@RequestMapping("/flight")
... ... @@ -17,6 +20,9 @@ public class FlightController {
@Autowired
ORIGINMANIFESTMASTERMapper originmanifestmasterMapper;
@Autowired
CUSTOMSMESSAGEMapper customsmessageMapper;
/**
* 修改航班日期
* @param currDate 修改前日期
... ... @@ -40,4 +46,28 @@ public class FlightController {
}
return new ResultJson("500","更新失败或航班信息不正确",i);
}
/**
* 查询运单的回执状态,目前能查到出港运单的所有回执状态,进港不行
* @param waybillno
* @return 返回 业务类型、主单号、分单号、回执内容
*/
@PostMapping("/customres")
public ResultJson getCustomResponse(@RequestParam(value = "waybillno",required = true) String waybillno){
waybillno = waybillno.replace("-","");
List<CUSTOMSMESSAGE> customsmessageList = customsmessageMapper.selectCustomResponse(waybillno);
return new ResultJson(customsmessageList);
}
/**
* 查询运单的回执状态,目前能查到出港运单 发送海关生成报文的messageId
* @param waybillno
* @return 返回 messageId,业务类型、主单号、分单号、回执内容
*/
@PostMapping("/getmessageid")
public ResultJson getCustomMessageId(@RequestParam(value = "waybillno",required = true) String waybillno){
List<CUSTOMSMESSAGE> customsmessageList = customsmessageMapper.selectCustomId(waybillno);
return new ResultJson(customsmessageList);
}
}
... ...
... ... @@ -11,4 +11,9 @@ public class IndexController {
public String index(){
return "index";
}
@RequestMapping("/flight/reseption")
public String reception(){
return "flight/res";
}
}
... ...
package com.tianbo.imfClient.dao;
import com.tianbo.imfClient.model.CUSTOMSMESSAGE;
import com.tianbo.imfClient.model.CUSTOMSMESSAGEWithBLOBs;
import java.util.List;
public interface CUSTOMSMESSAGEMapper {
int insert(CUSTOMSMESSAGEWithBLOBs record);
int insertSelective(CUSTOMSMESSAGEWithBLOBs record);
List<CUSTOMSMESSAGE> selectCustomResponse(String waybillMasterNo);
List<CUSTOMSMESSAGE> selectCustomId(String waybillMasterNo);
}
\ No newline at end of file
... ...
package com.tianbo.imfClient.model;
import java.math.BigDecimal;
import java.util.Date;
public class CUSTOMSMESSAGE {
private String autoid;
private String messageid;
private String messagetype;
private String messagestatus;
private Date sendtime;
private Date receivetime;
private String objectid;
private String flightno;
private Date flightdate;
private String masterautoid;
private String waybillnomaster;
private String secondaryautoid;
private String waybillnosecondary;
private BigDecimal pcs;
private BigDecimal wt;
private String responsecode;
private String responsetext;
private Date createtime;
public String getAutoid() {
return autoid;
}
public void setAutoid(String autoid) {
this.autoid = autoid == null ? null : autoid.trim();
}
public String getMessageid() {
return messageid;
}
public void setMessageid(String messageid) {
this.messageid = messageid == null ? null : messageid.trim();
}
public String getMessagetype() {
return messagetype;
}
public void setMessagetype(String messagetype) {
this.messagetype = messagetype == null ? null : messagetype.trim();
}
public String getMessagestatus() {
return messagestatus;
}
public void setMessagestatus(String messagestatus) {
this.messagestatus = messagestatus == null ? null : messagestatus.trim();
}
public Date getSendtime() {
return sendtime;
}
public void setSendtime(Date sendtime) {
this.sendtime = sendtime;
}
public Date getReceivetime() {
return receivetime;
}
public void setReceivetime(Date receivetime) {
this.receivetime = receivetime;
}
public String getObjectid() {
return objectid;
}
public void setObjectid(String objectid) {
this.objectid = objectid == null ? null : objectid.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 getMasterautoid() {
return masterautoid;
}
public void setMasterautoid(String masterautoid) {
this.masterautoid = masterautoid == null ? null : masterautoid.trim();
}
public String getWaybillnomaster() {
return waybillnomaster;
}
public void setWaybillnomaster(String waybillnomaster) {
this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();
}
public String getSecondaryautoid() {
return secondaryautoid;
}
public void setSecondaryautoid(String secondaryautoid) {
this.secondaryautoid = secondaryautoid == null ? null : secondaryautoid.trim();
}
public String getWaybillnosecondary() {
return waybillnosecondary;
}
public void setWaybillnosecondary(String waybillnosecondary) {
this.waybillnosecondary = waybillnosecondary == null ? null : waybillnosecondary.trim();
}
public BigDecimal getPcs() {
return pcs;
}
public void setPcs(BigDecimal pcs) {
this.pcs = pcs;
}
public BigDecimal getWt() {
return wt;
}
public void setWt(BigDecimal wt) {
this.wt = wt;
}
public String getResponsecode() {
return responsecode;
}
public void setResponsecode(String responsecode) {
this.responsecode = responsecode == null ? null : responsecode.trim();
}
public String getResponsetext() {
return responsetext;
}
public void setResponsetext(String responsetext) {
this.responsetext = responsetext == null ? null : responsetext.trim();
}
public Date getCreatetime() {
return createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
}
\ No newline at end of file
... ...
package com.tianbo.imfClient.model;
public class CUSTOMSMESSAGEWithBLOBs extends CUSTOMSMESSAGE {
private String messagecontent;
private String receivecontent;
public String getMessagecontent() {
return messagecontent;
}
public void setMessagecontent(String messagecontent) {
this.messagecontent = messagecontent == null ? null : messagecontent.trim();
}
public String getReceivecontent() {
return receivecontent;
}
public void setReceivecontent(String receivecontent) {
this.receivecontent = receivecontent == null ? null : receivecontent.trim();
}
}
\ No newline at end of file
... ...
... ... @@ -45,6 +45,6 @@
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<table tableName="ORIGINMANIFESTMASTER" domainObjectName="ORIGINMANIFESTMASTER" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="CUSTOMSMESSAGE" domainObjectName="CUSTOMSMESSAGE" 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.CUSTOMSMESSAGEMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.imfClient.model.CUSTOMSMESSAGE" >
<result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
<result column="MESSAGEID" property="messageid" jdbcType="VARCHAR" />
<result column="MESSAGETYPE" property="messagetype" jdbcType="VARCHAR" />
<result column="MESSAGESTATUS" property="messagestatus" jdbcType="VARCHAR" />
<result column="SENDTIME" property="sendtime" jdbcType="TIMESTAMP" />
<result column="RECEIVETIME" property="receivetime" jdbcType="TIMESTAMP" />
<result column="OBJECTID" property="objectid" jdbcType="VARCHAR" />
<result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
<result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" />
<result column="MASTERAUTOID" property="masterautoid" jdbcType="VARCHAR" />
<result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
<result column="SECONDARYAUTOID" property="secondaryautoid" jdbcType="VARCHAR" />
<result column="WAYBILLNOSECONDARY" property="waybillnosecondary" jdbcType="VARCHAR" />
<result column="PCS" property="pcs" jdbcType="DECIMAL" />
<result column="WT" property="wt" jdbcType="DECIMAL" />
<result column="RESPONSECODE" property="responsecode" jdbcType="VARCHAR" />
<result column="RESPONSETEXT" property="responsetext" jdbcType="VARCHAR" />
<result column="CREATETIME" property="createtime" jdbcType="TIMESTAMP" />
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.tianbo.imfClient.model.CUSTOMSMESSAGEWithBLOBs" extends="BaseResultMap" >
<result column="MESSAGECONTENT" property="messagecontent" jdbcType="CLOB" />
<result column="RECEIVECONTENT" property="receivecontent" jdbcType="CLOB" />
</resultMap>
<sql id="Blob_Column_List" >
MESSAGECONTENT, RECEIVECONTENT
</sql>
<sql id="Response_Base">
MESSAGETYPE, WAYBILLNOMASTER, WAYBILLNOSECONDARY, RESPONSETEXT
</sql>
<select id="selectCustomResponse" parameterType="java.lang.String" resultType="com.tianbo.imfClient.model.CUSTOMSMESSAGE">
SELECT
<include refid="Response_Base" />
FROM
CUSTOMSMESSAGE
WHERE
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
ORDER BY MESSAGETYPE
</select>
<select id="selectCustomId" parameterType="java.lang.String" resultType="com.tianbo.imfClient.model.CUSTOMSMESSAGE">
SELECT
MESSAGEID,
<include refid="Response_Base" />
FROM
CUSTOMSMESSAGE
WHERE
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
ORDER BY MESSAGETYPE
</select>
<insert id="insert" parameterType="com.tianbo.imfClient.model.CUSTOMSMESSAGEWithBLOBs" >
insert into CUSTOMSMESSAGE (AUTOID, MESSAGEID, MESSAGETYPE,
MESSAGESTATUS, SENDTIME, RECEIVETIME,
OBJECTID, FLIGHTNO, FLIGHTDATE,
MASTERAUTOID, WAYBILLNOMASTER, SECONDARYAUTOID,
WAYBILLNOSECONDARY, PCS, WT,
RESPONSECODE, RESPONSETEXT, CREATETIME,
MESSAGECONTENT, RECEIVECONTENT)
values (#{autoid,jdbcType=VARCHAR}, #{messageid,jdbcType=VARCHAR}, #{messagetype,jdbcType=VARCHAR},
#{messagestatus,jdbcType=VARCHAR}, #{sendtime,jdbcType=TIMESTAMP}, #{receivetime,jdbcType=TIMESTAMP},
#{objectid,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP},
#{masterautoid,jdbcType=VARCHAR}, #{waybillnomaster,jdbcType=VARCHAR}, #{secondaryautoid,jdbcType=VARCHAR},
#{waybillnosecondary,jdbcType=VARCHAR}, #{pcs,jdbcType=DECIMAL}, #{wt,jdbcType=DECIMAL},
#{responsecode,jdbcType=VARCHAR}, #{responsetext,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP},
#{messagecontent,jdbcType=CLOB}, #{receivecontent,jdbcType=CLOB})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.imfClient.model.CUSTOMSMESSAGEWithBLOBs" >
insert into CUSTOMSMESSAGE
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
AUTOID,
</if>
<if test="messageid != null" >
MESSAGEID,
</if>
<if test="messagetype != null" >
MESSAGETYPE,
</if>
<if test="messagestatus != null" >
MESSAGESTATUS,
</if>
<if test="sendtime != null" >
SENDTIME,
</if>
<if test="receivetime != null" >
RECEIVETIME,
</if>
<if test="objectid != null" >
OBJECTID,
</if>
<if test="flightno != null" >
FLIGHTNO,
</if>
<if test="flightdate != null" >
FLIGHTDATE,
</if>
<if test="masterautoid != null" >
MASTERAUTOID,
</if>
<if test="waybillnomaster != null" >
WAYBILLNOMASTER,
</if>
<if test="secondaryautoid != null" >
SECONDARYAUTOID,
</if>
<if test="waybillnosecondary != null" >
WAYBILLNOSECONDARY,
</if>
<if test="pcs != null" >
PCS,
</if>
<if test="wt != null" >
WT,
</if>
<if test="responsecode != null" >
RESPONSECODE,
</if>
<if test="responsetext != null" >
RESPONSETEXT,
</if>
<if test="createtime != null" >
CREATETIME,
</if>
<if test="messagecontent != null" >
MESSAGECONTENT,
</if>
<if test="receivecontent != null" >
RECEIVECONTENT,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
#{autoid,jdbcType=VARCHAR},
</if>
<if test="messageid != null" >
#{messageid,jdbcType=VARCHAR},
</if>
<if test="messagetype != null" >
#{messagetype,jdbcType=VARCHAR},
</if>
<if test="messagestatus != null" >
#{messagestatus,jdbcType=VARCHAR},
</if>
<if test="sendtime != null" >
#{sendtime,jdbcType=TIMESTAMP},
</if>
<if test="receivetime != null" >
#{receivetime,jdbcType=TIMESTAMP},
</if>
<if test="objectid != null" >
#{objectid,jdbcType=VARCHAR},
</if>
<if test="flightno != null" >
#{flightno,jdbcType=VARCHAR},
</if>
<if test="flightdate != null" >
#{flightdate,jdbcType=TIMESTAMP},
</if>
<if test="masterautoid != null" >
#{masterautoid,jdbcType=VARCHAR},
</if>
<if test="waybillnomaster != null" >
#{waybillnomaster,jdbcType=VARCHAR},
</if>
<if test="secondaryautoid != null" >
#{secondaryautoid,jdbcType=VARCHAR},
</if>
<if test="waybillnosecondary != null" >
#{waybillnosecondary,jdbcType=VARCHAR},
</if>
<if test="pcs != null" >
#{pcs,jdbcType=DECIMAL},
</if>
<if test="wt != null" >
#{wt,jdbcType=DECIMAL},
</if>
<if test="responsecode != null" >
#{responsecode,jdbcType=VARCHAR},
</if>
<if test="responsetext != null" >
#{responsetext,jdbcType=VARCHAR},
</if>
<if test="createtime != null" >
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="messagecontent != null" >
#{messagecontent,jdbcType=CLOB},
</if>
<if test="receivecontent != null" >
#{receivecontent,jdbcType=CLOB},
</if>
</trim>
</insert>
</mapper>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>查询运单回执</title>
<!-- 引入样式 element-->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
</head>
<body>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="审批人">
<el-input v-model="formInline.user" placeholder="审批人"></el-input>
</el-form-item>
<el-form-item label="活动区域">
<el-select v-model="formInline.region" placeholder="活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
<script>
export default {
data() {
return {
formInline: {
user: '',
region: ''
}
}
},
methods: {
onSubmit() {
console.log('submit!');
}
}
}
</script>
</body>
</html>
\ No newline at end of file
... ...