作者 朱兆平

新舱单辅助管理-提前运抵业务优化

... ... @@ -11,7 +11,7 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.tianbo</groupId>
<artifactId>nmms</artifactId>
<artifactId>nmms-manage</artifactId>
<version>1.0-SNAPSHOT</version>
<name>nmms-manage</name>
<description>nmms management system</description>
... ...
package com.tianbo.analysis.controller;
import com.tianbo.analysis.model.CarAndWayBill;
import com.tianbo.analysis.model.AdvanceArrive;
import com.tianbo.analysis.model.ResultJson;
import com.tianbo.analysis.service.ArriveMasterService;
import com.tianbo.analysis.tools.WaybillTools;
... ... @@ -22,7 +22,7 @@ public class ArrivedAMasterController {
@ApiOperation(value = "提前运抵接口",notes = "接收卡口车辆过卡放行后的通知,车单数据")
@PostMapping("forkako")
public ResultJson applyfor(@RequestBody CarAndWayBill carAndWayBill){
public ResultJson applyfor(@RequestBody AdvanceArrive carAndWayBill){
boolean result = arriveMasterService.arrivedAhead(carAndWayBill);
return result? new ResultJson("200","处理完毕"):new ResultJson("处理失败");
}
... ... @@ -32,4 +32,11 @@ public class ArrivedAMasterController {
WaybillTools.checkWaybillFormat(waybill);
}
@ApiOperation(value = "提前运抵-接收申请数据通知接口",notes = "接收卡口进出场申请中的提前运抵运单数据,并更新到预配中")
@PostMapping("prebill")
public ResultJson acceptWaybill(@RequestBody AdvanceArrive preArrivedWaybillList){
int result = arriveMasterService.updatePremasterArrivedHeadStatus(preArrivedWaybillList);
return result>0? new ResultJson("200","提前运抵状态已更新"):new ResultJson("提前运抵状态更新失败");
}
}
... ...
... ... @@ -40,6 +40,13 @@ public class DomTransController {
return domTransitService.deleteByPrimaryKey(domtransit.getId())>0 ? new ResultJson("200","删除成功") :new ResultJson("400","删除失败");
}
@ApiOperation(value = "删除转运申请,非RESFUL支持IIS",notes = "id必须传")
@PostMapping("domDel")
@UserPermissionCheck
public ResultJson delDom(@RequestBody DOMTRANSIT domtransit,@CookieValue("username") String username,@CookieValue("userid") String userid){
return domTransitService.deleteByPrimaryKey(domtransit.getId())>0 ? new ResultJson("200","删除成功") :new ResultJson("400","删除失败");
}
@ApiOperation(value = "修改转运申请",notes = "id必须传")
@PutMapping("dom")
@UserPermissionCheck
... ... @@ -47,6 +54,13 @@ public class DomTransController {
return domTransitService.updateByPrimaryKeySelective(domtransit)>0 ? new ResultJson("200","修改成功") :new ResultJson("400","修改失败");
}
@ApiOperation(value = "修改转运申请非RESFUL,IIS不支持",notes = "id必须传")
@PostMapping("domUpdate")
@UserPermissionCheck
public ResultJson updateDom(@Validated(ValidateUpdate.class) @RequestBody DOMTRANSIT domtransit,@CookieValue("username") String username,@CookieValue("userid") String userid){
return domTransitService.updateByPrimaryKeySelective(domtransit)>0 ? new ResultJson("200","修改成功") :new ResultJson("400","修改失败");
}
@ApiOperation(value = "转运申请查询搜索",notes = "awba转运前主单,awbh转运前分单,flightDate,flightNo转运前航班信息")
@GetMapping("dom")
... ... @@ -59,12 +73,14 @@ public class DomTransController {
@RequestParam(value = "originHousewaybill",required = false) String awbh,
@RequestParam(value = "originFlightdate",required = false) String flightDate,
@RequestParam(value = "originFlightno",required = false) String flightNo,
@RequestParam(value = "transType",required = false) String transType,
@CookieValue("username") String username,
@CookieValue("userid") String userid){
DOMTRANSIT domtransit = new DOMTRANSIT();
domtransit.setOriginMasterwaybill(awba);
domtransit.setOriginHousewaybill(awbh);
domtransit.setOriginFlightno(flightNo);
domtransit.setTransitType(transType);
if (!"admin".equals(username)){
domtransit.setUserName(username);
}
... ...
package com.tianbo.analysis.controller;
import com.github.pagehelper.PageInfo;
import com.tianbo.analysis.model.MANIFEST_AIR_CHANGE;
import com.tianbo.analysis.model.ResultJson;
import com.tianbo.analysis.service.MT8204Service;
import com.tianbo.util.Date.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
@Slf4j
@RestController
@RequestMapping("/mt8024/")
public class MT8204Controller {
@Autowired
MT8204Service mt8204Service;
@GetMapping("/")
public ResultJson index(@RequestParam(value = "page",defaultValue = "1") int page,
@RequestParam(value = "limit",defaultValue = "10") int limit,
@RequestParam(value = "flightNo",required = false) String flightNo,
@RequestParam(value = "flightDate",required = false) String flightDate,
@RequestParam(value = "waybillNo",required = false) String waybillNo){
MANIFEST_AIR_CHANGE manifest_air_change = new MANIFEST_AIR_CHANGE();
if(StringUtils.isNotEmpty(flightDate)){
Date flight_Date = DateUtil.parseDate(flightDate,"yyyy-MM-dd");
manifest_air_change.setFlightDate(flight_Date);
}
manifest_air_change.setFlightno(flightNo);
manifest_air_change.setWaybillnomaster(waybillNo);
PageInfo<MANIFEST_AIR_CHANGE> result = mt8204Service.selectList(manifest_air_change,page,limit);
return new ResultJson("200","success",result);
}
}
... ...
package com.tianbo.analysis.dao;
import com.tianbo.analysis.model.MANIFEST_AIR_CHANGE;
import java.util.List;
public interface MANIFEST_AIR_CHANGEMapper {
int deleteByPrimaryKey(String autoid);
int insert(MANIFEST_AIR_CHANGE record);
int insertSelective(MANIFEST_AIR_CHANGE record);
MANIFEST_AIR_CHANGE selectByPrimaryKey(String autoid);
List<MANIFEST_AIR_CHANGE> selectList(MANIFEST_AIR_CHANGE record);
int updateByPrimaryKeySelective(MANIFEST_AIR_CHANGE record);
int updateByPrimaryKey(MANIFEST_AIR_CHANGE record);
}
... ...
... ... @@ -23,4 +23,6 @@ public interface PREPAREMASTERMapper {
int updateByPrimaryKeySelective(PREPAREMASTER record);
int updateByPrimaryKey(PREPAREMASTER record);
int updatePreArrivedBill(PREPAREMASTER record);
}
... ...
package com.tianbo.analysis.filter;
import com.tianbo.analysis.dao.COMPANYUSERMapper;
import com.tianbo.analysis.model.COMPANYUSER;
import org.apache.commons.lang.StringUtils;
import org.springframework.web.servlet.HandlerInterceptor;
import javax.annotation.Resource;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
/**
* 用户提交时的权限拦截器
* 根据用户的request cookie中的userid 进行用户信息的判定及用户相关权限的判定
*/
public class UserRquestInterceptor { //implements HandlerInterceptor {
@Resource
COMPANYUSERMapper companyuserMapper;
// @Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//1.获取cookie
Cookie[] requestCookies = request.getCookies();
COMPANYUSER user = new COMPANYUSER();
if(requestCookies != null){
for (Cookie cookie : requestCookies) {
if ("username".equals(cookie.getName())){
user.setCropCode(cookie.getValue());
}
if ("userid".equals(cookie.getName())){
user.setId(cookie.getValue());
}
}
}
//2.判定结果
if(StringUtils.isNotEmpty(user.getId()) && StringUtils.isNotEmpty(user.getCropCode())){
}else {
response.sendError(SC_BAD_REQUEST,"unknow user infomation");
}
return false;
}
}
... ...
package com.tianbo.analysis.model;
import java.util.List;
public class AdvanceArrive extends Throwable {
private String vname;
private List<LAND_BUSINEESTYPE_LIST_INFO> masterList;
public String getVname() {
return vname;
}
public void setVname(String vname) {
this.vname = vname;
}
public List<LAND_BUSINEESTYPE_LIST_INFO> getMasterList() {
return masterList;
}
public void setMasterList(List<LAND_BUSINEESTYPE_LIST_INFO> masterList) {
this.masterList = masterList;
}
}
... ...
package com.tianbo.analysis.model;
public class LAND_BUSINEESTYPE_LIST_INFO {
private String id;
private String licenseplatenumber;
private String awba;
private String partialidentity;
private String arrivedaheadtime;
private String applicationformid;
private String ext1;
private String ext2;
private String ext3;
private String ext4;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getLicenseplatenumber() {
return licenseplatenumber;
}
public void setLicenseplatenumber(String licenseplatenumber) {
this.licenseplatenumber = licenseplatenumber == null ? null : licenseplatenumber.trim();
}
public String getAwba() {
return awba;
}
public void setAwba(String awba) {
this.awba = awba == null ? null : awba.trim();
}
public String getPartialidentity() {
return partialidentity;
}
public void setPartialidentity(String partialidentity) {
this.partialidentity = partialidentity == null ? null : partialidentity.trim();
}
public String getArrivedaheadtime() {
return arrivedaheadtime;
}
public void setArrivedaheadtime(String arrivedaheadtime) {
this.arrivedaheadtime = arrivedaheadtime == null ? null : arrivedaheadtime.trim();
}
public String getApplicationformid() {
return applicationformid;
}
public void setApplicationformid(String applicationformid) {
this.applicationformid = applicationformid == null ? null : applicationformid.trim();
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1 == null ? null : ext1.trim();
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2 == null ? null : ext2.trim();
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3 == null ? null : ext3.trim();
}
public String getExt4() {
return ext4;
}
public void setExt4(String ext4) {
this.ext4 = ext4 == null ? null : ext4.trim();
}
}
... ...
package com.tianbo.analysis.model;
import java.util.Date;
public class MANIFEST_AIR_CHANGE {
private String autoid;
private String flightno;
private String changeFlightno;
private String waybillnomaster;
private String changeWaybillnomaster;
private String cont;
private Date createdate;
private Date changetime;
private String carrier;
private String changeCarrier;
private Date flightDate;
private Date changeFlightDate;
public String getAutoid() {
return autoid;
}
public void setAutoid(String autoid) {
this.autoid = autoid == null ? null : autoid.trim();
}
public String getFlightno() {
return flightno;
}
public void setFlightno(String flightno) {
this.flightno = flightno == null ? null : flightno.trim();
}
public String getChangeFlightno() {
return changeFlightno;
}
public void setChangeFlightno(String changeFlightno) {
this.changeFlightno = changeFlightno == null ? null : changeFlightno.trim();
}
public String getWaybillnomaster() {
return waybillnomaster;
}
public void setWaybillnomaster(String waybillnomaster) {
this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();
}
public String getChangeWaybillnomaster() {
return changeWaybillnomaster;
}
public void setChangeWaybillnomaster(String changeWaybillnomaster) {
this.changeWaybillnomaster = changeWaybillnomaster == null ? null : changeWaybillnomaster.trim();
}
public String getCont() {
return cont;
}
public void setCont(String cont) {
this.cont = cont == null ? null : cont.trim();
}
public Date getCreatedate() {
return createdate;
}
public void setCreatedate(Date createdate) {
this.createdate = createdate;
}
public Date getChangetime() {
return changetime;
}
public void setChangetime(Date changetime) {
this.changetime = changetime;
}
public String getCarrier() {
return carrier;
}
public void setCarrier(String carrier) {
this.carrier = carrier == null ? null : carrier.trim();
}
public String getChangeCarrier() {
return changeCarrier;
}
public void setChangeCarrier(String changeCarrier) {
this.changeCarrier = changeCarrier == null ? null : changeCarrier.trim();
}
public Date getFlightDate() {
return flightDate;
}
public void setFlightDate(Date flightDate) {
this.flightDate = flightDate;
}
public Date getChangeFlightDate() {
return changeFlightDate;
}
public void setChangeFlightDate(Date changeFlightDate) {
this.changeFlightDate = changeFlightDate;
}
}
\ No newline at end of file
... ...
package com.tianbo.analysis.service;
import com.tianbo.analysis.model.CarAndWayBill;
import com.tianbo.analysis.model.AdvanceArrive;
import com.tianbo.analysis.model.PREPAREMASTER;
import org.jetbrains.annotations.NotNull;
... ... @@ -9,10 +9,12 @@ public interface ArriveMasterService {
/**
* 提前运抵业务处理
*/
boolean arrivedAhead(CarAndWayBill carAndWayBill);
boolean arrivedAhead(AdvanceArrive carAndWayBill);
/**
* 根据提前运抵的预配主单生成运抵,主分单都会被生成
*/
boolean importFromPreplan(@NotNull PREPAREMASTER preparemasterFirst);
int updatePremasterArrivedHeadStatus(AdvanceArrive preArrivedWaybillList);
}
... ...
package com.tianbo.analysis.service;
import com.github.pagehelper.PageInfo;
import com.tianbo.analysis.model.DOMTRANSIT;
import com.tianbo.analysis.model.LAND_BUSINEESTYPE_LIST_INFO;
import com.tianbo.analysis.model.MANIFEST_AIR_CHANGE;
public interface MT8204Service {
PageInfo<MANIFEST_AIR_CHANGE> selectList(MANIFEST_AIR_CHANGE record, int pageNum, int pageSize);
}
... ...
... ... @@ -35,17 +35,16 @@ public class ArriveMasterServiceImpl implements ArriveMasterService {
SENDLOGMapper sendlogMapper;
@Override
public boolean arrivedAhead(CarAndWayBill carAndWayBill) {
public boolean arrivedAhead(AdvanceArrive carAndWayBill) {
try {
/**
* 根据运单列表,与预配核碰提前运抵货物。
*/
log.info("接收到通知车辆{}拉货数据{}",carAndWayBill.vname,carAndWayBill.getMasterList());
carAndWayBill.setMasterList(carAndWayBill.getMasterList().replace(",",","));
carAndWayBill.waybillList = Arrays.asList(carAndWayBill.getMasterList().split(","));
List<String> waybillList = carAndWayBill.waybillList;
List<LAND_BUSINEESTYPE_LIST_INFO> waybillList = carAndWayBill.getMasterList();
if (!waybillList.isEmpty()){
for (String waybillmaster : waybillList) {
log.info("接收到通知车辆{}拉货数据{}条",carAndWayBill.getVname(),carAndWayBill.getMasterList().size());
for (LAND_BUSINEESTYPE_LIST_INFO waybillmasterInfo : waybillList) {
String waybillmaster = waybillmasterInfo.getAwba();
log.info("开始核对运单{}",waybillmaster);
/**
* 校验运单格式,要为172-66666666,中间有减号的才行
... ... @@ -68,12 +67,12 @@ public class ArriveMasterServiceImpl implements ArriveMasterService {
if (!preparemasterList.isEmpty()) {
PREPAREMASTER preparemasterFirst = preparemasterList.get(0);
log.info("查到提前运抵运单:{}", preparemasterFirst.getWaybillnomaster());
return importFromPreplan(preparemasterFirst);
importFromPreplan(preparemasterFirst);
}else {
log.info("运单{}不属于提前运抵运单", waybillmaster);
return false;
}
}
return true;
}
return false;
} catch (Exception e) {
... ... @@ -201,4 +200,33 @@ public class ArriveMasterServiceImpl implements ArriveMasterService {
return true;
}
@Override
public int updatePremasterArrivedHeadStatus(AdvanceArrive preArrivedWaybillList) {
log.info("接收到来自卡口申请的拉货列表通知");
if (!preArrivedWaybillList.getMasterList().isEmpty()){
int m = 0;
for (LAND_BUSINEESTYPE_LIST_INFO waybillnomaster: preArrivedWaybillList.getMasterList() ) {
String waybillNo = waybillnomaster.getAwba();
log.info("开始处理列表中的运单号:[{}]",waybillNo);
if ("1".equals(waybillnomaster.getArrivedaheadtime())){
log.info("运单号{}识别为提前运抵业务,即将增加数据标识",waybillNo);
PREPAREMASTER preparemaster = new PREPAREMASTER();
preparemaster.setWaybillnomaster(waybillNo);
preparemaster.setArrivedAhead("Y");
int i = preparemasterMapper.updatePreArrivedBill(preparemaster);
if (i > 0) {
log.info("运单号{}的预配提前运抵标识增加成功", waybillNo);
} else {
log.info("ERROR :未找到相关预配信息, 运单号{}的预配提前运抵标识增加失败!!!", waybillNo);
}
m =+ i;
}
}
return m;
}
return 0;
}
}
... ...
package com.tianbo.analysis.service.imp;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tianbo.analysis.dao.MANIFEST_AIR_CHANGEMapper;
import com.tianbo.analysis.model.MANIFEST_AIR_CHANGE;
import com.tianbo.analysis.service.MT8204Service;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class MT8204ServiceImp implements MT8204Service {
@Resource
MANIFEST_AIR_CHANGEMapper manifest_air_changeMapper;
public PageInfo<MANIFEST_AIR_CHANGE> selectList(MANIFEST_AIR_CHANGE record, int pageNum, int pageSize){
Page<MANIFEST_AIR_CHANGE> page = PageHelper.startPage(pageNum,pageSize);
List<MANIFEST_AIR_CHANGE> list = manifest_air_changeMapper.selectList(record);
PageInfo<MANIFEST_AIR_CHANGE> result = new PageInfo<MANIFEST_AIR_CHANGE>(list);
return result;
}
}
... ...
... ... @@ -47,6 +47,6 @@
<property name="enableSubPackages" value="false"/>
</javaClientGenerator>
<!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<table schema="CGONMS" tableName="SENDLOG" domainObjectName="SENDLOG" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table schema="CGONMS" tableName="MANIFEST_AIR_CHANGE" domainObjectName="MANIFEST_AIR_CHANGE" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration>
... ...
<?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.MANIFEST_AIR_CHANGEMapper" >
<resultMap id="BaseResultMap" type="com.tianbo.analysis.model.MANIFEST_AIR_CHANGE" >
<id column="AUTOID" property="autoid" jdbcType="VARCHAR" />
<result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
<result column="CHANGE_FLIGHTNO" property="changeFlightno" jdbcType="VARCHAR" />
<result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
<result column="CHANGE_WAYBILLNOMASTER" property="changeWaybillnomaster" jdbcType="VARCHAR" />
<result column="CONT" property="cont" jdbcType="VARCHAR" />
<result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
<result column="CHANGETIME" property="changetime" jdbcType="TIMESTAMP" />
<result column="CARRIER" property="carrier" jdbcType="VARCHAR" />
<result column="CHANGE_CARRIER" property="changeCarrier" jdbcType="VARCHAR" />
<result column="FLIGHT_DATE" property="flightDate" jdbcType="TIMESTAMP" />
<result column="CHANGE_FLIGHT_DATE" property="changeFlightDate" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
AUTOID, FLIGHTNO, CHANGE_FLIGHTNO, WAYBILLNOMASTER, CHANGE_WAYBILLNOMASTER, CONT,
CREATEDATE, CHANGETIME, CARRIER, CHANGE_CARRIER, FLIGHT_DATE, CHANGE_FLIGHT_DATE
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from CGONMS.MANIFEST_AIR_CHANGE
where AUTOID = #{autoid,jdbcType=VARCHAR}
</select>
<select id="selectList" resultMap="BaseResultMap" parameterType="com.tianbo.analysis.model.MANIFEST_AIR_CHANGE" >
select
<include refid="Base_Column_List" />
from CGONMS.MANIFEST_AIR_CHANGE
<where>
<if test="flightno != null and flightno != ''">
FLIGHTNO = #{flightno,jdbcType=VARCHAR}
</if>
<if test="flightDate != null and flightDate != ''">
AND FLIGHT_DATE = #{flightDate,jdbcType=DATE}
</if>
<if test="waybillnomaster != null and waybillnomaster != ''">
AND WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
</if>
</where>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from CGONMS.MANIFEST_AIR_CHANGE
where AUTOID = #{autoid,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.tianbo.analysis.model.MANIFEST_AIR_CHANGE" >
insert into CGONMS.MANIFEST_AIR_CHANGE (AUTOID, FLIGHTNO, CHANGE_FLIGHTNO,
WAYBILLNOMASTER, CHANGE_WAYBILLNOMASTER,
CONT, CREATEDATE, CHANGETIME,
CARRIER, CHANGE_CARRIER, FLIGHT_DATE,
CHANGE_FLIGHT_DATE)
values (#{autoid,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{changeFlightno,jdbcType=VARCHAR},
#{waybillnomaster,jdbcType=VARCHAR}, #{changeWaybillnomaster,jdbcType=VARCHAR},
#{cont,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{changetime,jdbcType=TIMESTAMP},
#{carrier,jdbcType=VARCHAR}, #{changeCarrier,jdbcType=VARCHAR}, #{flightDate,jdbcType=TIMESTAMP},
#{changeFlightDate,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.tianbo.analysis.model.MANIFEST_AIR_CHANGE" >
insert into CGONMS.MANIFEST_AIR_CHANGE
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
AUTOID,
</if>
<if test="flightno != null" >
FLIGHTNO,
</if>
<if test="changeFlightno != null" >
CHANGE_FLIGHTNO,
</if>
<if test="waybillnomaster != null" >
WAYBILLNOMASTER,
</if>
<if test="changeWaybillnomaster != null" >
CHANGE_WAYBILLNOMASTER,
</if>
<if test="cont != null" >
CONT,
</if>
<if test="createdate != null" >
CREATEDATE,
</if>
<if test="changetime != null" >
CHANGETIME,
</if>
<if test="carrier != null" >
CARRIER,
</if>
<if test="changeCarrier != null" >
CHANGE_CARRIER,
</if>
<if test="flightDate != null" >
FLIGHT_DATE,
</if>
<if test="changeFlightDate != null" >
CHANGE_FLIGHT_DATE,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="autoid != null" >
#{autoid,jdbcType=VARCHAR},
</if>
<if test="flightno != null" >
#{flightno,jdbcType=VARCHAR},
</if>
<if test="changeFlightno != null" >
#{changeFlightno,jdbcType=VARCHAR},
</if>
<if test="waybillnomaster != null" >
#{waybillnomaster,jdbcType=VARCHAR},
</if>
<if test="changeWaybillnomaster != null" >
#{changeWaybillnomaster,jdbcType=VARCHAR},
</if>
<if test="cont != null" >
#{cont,jdbcType=VARCHAR},
</if>
<if test="createdate != null" >
#{createdate,jdbcType=TIMESTAMP},
</if>
<if test="changetime != null" >
#{changetime,jdbcType=TIMESTAMP},
</if>
<if test="carrier != null" >
#{carrier,jdbcType=VARCHAR},
</if>
<if test="changeCarrier != null" >
#{changeCarrier,jdbcType=VARCHAR},
</if>
<if test="flightDate != null" >
#{flightDate,jdbcType=DATE},
</if>
<if test="changeFlightDate != null" >
#{changeFlightDate,jdbcType=DATE},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.tianbo.analysis.model.MANIFEST_AIR_CHANGE" >
update CGONMS.MANIFEST_AIR_CHANGE
<set >
<if test="flightno != null" >
FLIGHTNO = #{flightno,jdbcType=VARCHAR},
</if>
<if test="changeFlightno != null" >
CHANGE_FLIGHTNO = #{changeFlightno,jdbcType=VARCHAR},
</if>
<if test="waybillnomaster != null" >
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR},
</if>
<if test="changeWaybillnomaster != null" >
CHANGE_WAYBILLNOMASTER = #{changeWaybillnomaster,jdbcType=VARCHAR},
</if>
<if test="cont != null" >
CONT = #{cont,jdbcType=VARCHAR},
</if>
<if test="createdate != null" >
CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
</if>
<if test="changetime != null" >
CHANGETIME = #{changetime,jdbcType=TIMESTAMP},
</if>
<if test="carrier != null" >
CARRIER = #{carrier,jdbcType=VARCHAR},
</if>
<if test="changeCarrier != null" >
CHANGE_CARRIER = #{changeCarrier,jdbcType=VARCHAR},
</if>
<if test="flightDate != null" >
FLIGHT_DATE = #{flightDate,jdbcType=TIMESTAMP},
</if>
<if test="changeFlightDate != null" >
CHANGE_FLIGHT_DATE = #{changeFlightDate,jdbcType=TIMESTAMP},
</if>
</set>
where AUTOID = #{autoid,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.tianbo.analysis.model.MANIFEST_AIR_CHANGE" >
update CGONMS.MANIFEST_AIR_CHANGE
set FLIGHTNO = #{flightno,jdbcType=VARCHAR},
CHANGE_FLIGHTNO = #{changeFlightno,jdbcType=VARCHAR},
WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR},
CHANGE_WAYBILLNOMASTER = #{changeWaybillnomaster,jdbcType=VARCHAR},
CONT = #{cont,jdbcType=VARCHAR},
CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
CHANGETIME = #{changetime,jdbcType=TIMESTAMP},
CARRIER = #{carrier,jdbcType=VARCHAR},
CHANGE_CARRIER = #{changeCarrier,jdbcType=VARCHAR},
FLIGHT_DATE = #{flightDate,jdbcType=TIMESTAMP},
CHANGE_FLIGHT_DATE = #{changeFlightDate,jdbcType=TIMESTAMP}
where AUTOID = #{autoid,jdbcType=VARCHAR}
</update>
</mapper>
... ...
... ... @@ -503,4 +503,11 @@
ARRIVED_AHEAD = #{arrivedAhead,jdbcType=VARCHAR}
where AUTOID = #{autoid,jdbcType=VARCHAR}
</update>
<update id="updatePreArrivedBill" parameterType="com.tianbo.analysis.model.PREPAREMASTER">
update CGONMS.PREPAREMASTER
set
ARRIVED_AHEAD = #{arrivedAhead,jdbcType=VARCHAR}
where WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
</update>
</mapper>
... ...
import com.tianbo.analysis.NmmsAdminApplication;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest(classes = NmmsAdminApplication.class)
@Slf4j
public class Test {
@org.junit.jupiter.api.Test
public void send(){
// MSGS msgs = new MSGS();
// MSG msg = new MSG();
//
// HEADER header = new HEADER();
// header.setSNDR("TXD");
// header.setDDTM("20210429103322081");
// header.setSEQNO(2021042910);
// header.setTYPE("HYXX");
// header.setSTYPE("ISLI");
//
// msg.setHEADER(header);
// msg.setBODY("111test");
//
//
//
//
// msgs.setMSG(msg);
//
// ResultJson response = kafkaSendApi.send(msgs);
// log.info(response.toString());
}
}
... ...