作者 zhangFan

add entetCancel

... ... @@ -4,10 +4,8 @@ package com.sy.logic;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.sy.crossDomain.buildBarCode;
import com.sy.model.GatherInfo;
import com.sy.model.LandBusinessTypeList;
import com.sy.model.LandRoadVe;
import com.sy.model.RESMESSAGE;
import com.sy.model.*;
import com.sy.service.EnterCancelServer;
import com.sy.service.LandBusListService;
import com.sy.service.LandRoadVeService;
import com.sy.service.ResMessageService;
... ... @@ -52,7 +50,10 @@ public class LogicOperation {
@Autowired
private ResMessageService resMessageService;
private static LogicOperation logic;
@Autowired
private EnterCancelServer enterCancelServer;
private static LogicOperation logic = new LogicOperation();
//读取配置文件里的载重与称重的可控范围
private static String checkWt = FileTool.readProperties("grossWt");
... ... @@ -64,8 +65,8 @@ public class LogicOperation {
private static String INPUTSTATION = "此车辆未做进站申请";
private static String ENTERSTATION = "此车辆未做出站申请";
private static String ISVALID = "二维码数据异常,请使用正确的二维码数据";
private static String ERRORWT="出起始场站的重量和进目的场站的重量不一致";
private static String IEPORSE="无相对应进出场申请";
private static String ERRORWT = "出起始场站的重量和进目的场站的重量不一致";
private static String IEPORSE = "无相对应进出场申请";
@PostConstruct
public void init() {
... ... @@ -73,6 +74,7 @@ public class LogicOperation {
logic.listService = this.listService;
logic.veService = this.veService;
logic.resMessageService = this.resMessageService;
logic.enterCancelServer = this.enterCancelServer;
}
/**
... ... @@ -96,7 +98,7 @@ public class LogicOperation {
}
LandBusinessTypeList list = logic.listService.selectForOne(info.getVename(), info.getBarcode(), info.getAreaid
(), info.getChnlno(), info.getIetype());
if(list == null) {
if (list == null) {
CommandClient.Client(info, IEPORSE);
return result;
}
... ... @@ -113,14 +115,13 @@ public class LogicOperation {
type = "E";
}
logger.info("=======================>>>>>>>>>>" + type + "<<<<<<<<<<========================");
goodsWt = GoodsWt(list.getMasterList(), type);
goodsWt = logic.GoodsWt(list.getMasterList(), type);
}
//车自重
double selfWt = Double.parseDouble(ve.getSelfWt());
if (!logic.checkFlag(growssWt, (selfWt+goodsWt))) {
if (!logic.checkFlag(growssWt, (selfWt + goodsWt))) {
List<LandBusinessTypeList> typeLists = logic.listService.selectMessageId(list.getMassageId());
for (int i = 0; i < typeLists.size(); i++) {
... ... @@ -133,14 +134,14 @@ public class LogicOperation {
}
}
if ("出口送货".equals(list.getBusinesstype())){
if ("出口送货".equals(list.getBusinesstype())) {
if ("E".equals(list.getTurnoverflag())) {
if ("I".equals(typeLists.get(i).getTurnoverflag()) && typeLists.get(i).getContrastflag() != null) {
if("1".equals(list.getIsfull())){
if(list.getMasterList().length()>0){
selfWt = typeLists.get(i).getAislewt()-Double.parseDouble(typeLists.get(i).getRemark());
}else {
selfWt=growssWt;
if ("1".equals(list.getIsfull())) {
if (list.getMasterList().length() > 0) {
selfWt = typeLists.get(i).getAislewt() - Double.parseDouble(typeLists.get(i).getRemark());
} else {
selfWt = growssWt;
}
}
break;
... ... @@ -148,8 +149,8 @@ public class LogicOperation {
}
}
if(list.getBusinesstype().endsWith("流转")){
if(list.getMasterList().length()>0){
if (list.getBusinesstype().endsWith("业务")) {
if (list.getMasterList().length() > 0) {
if ("E".equals(list.getTurnoverflag())) {
if ("I".equals(typeLists.get(i).getTurnoverflag()) && typeLists.get(i).getContrastflag() != null) {
selfWt = typeLists.get(i).getAislewt() > 1 ? typeLists.get(i).getAislewt() : selfWt;
... ... @@ -158,7 +159,7 @@ public class LogicOperation {
}
if ("I".equals(list.getTurnoverflag())) {
if ("E".equals(typeLists.get(i).getTurnoverflag()) && typeLists.get(i).getContrastflag() != null) {
if(!logic.checkFlag(growssWt,typeLists.get(i).getAislewt())){
if (!logic.checkFlag(growssWt, typeLists.get(i).getAislewt())) {
logger.info("-------->>>>>>>>出起始场站的重量和进目的场站的总量不一致<<<<<<<<--------");
CommandClient.Client(info, ERRORWT);
return result;
... ... @@ -167,11 +168,10 @@ public class LogicOperation {
}
}
}
}
}
boolean check = checkResult(growssWt, selfWt, goodsWt);
boolean check = logic.checkResult(growssWt, selfWt, goodsWt);
boolean checkMainfest = logic.checkManifest(list.getMasterList());
boolean checkResult = false;
... ... @@ -187,25 +187,37 @@ public class LogicOperation {
checkResult = true;
}
}
logger.info("重量校验结果:"+check+",运单校验结果:"+checkMainfest+",最终校验结果:"+checkResult);
logger.info("重量校验结果:" + check + ",运单校验结果:" + checkMainfest + ",最终校验结果:" + checkResult);
if (sendBw(info, checkResult)) {
if (logic.sendBw(info, checkResult)) {
if ("I".equals(info.getIetype())) {
System.out.println(info.getGrosswt().doubleValue());
// LandRoadVe veName = logic.veService.selectByFrameNo(vaName);
list.setAislewt(info.getGrosswt().doubleValue());
list.setUpdateDate(new Date());
list.setRemark(String.format("%.1f",goodsWt));
list.setRemark(String.format("%.1f", goodsWt));
list.setRemark2(ve.getSelfWt());
list.setContrastflag("已进站");
logic.checkData(list);
} else {
List<LandBusinessTypeList> typeLists = logic.listService.selectMessageId(list.getMassageId());
//进出相差重量
double diffVal = 0;
for (int i = 0; i < typeLists.size(); i++) {
if ("I".equals(typeLists.get(i).getTurnoverflag()) && typeLists.get(i).getEndstation().equals(list.getEndstation())) {
diffVal = typeLists.get(i).getAislewt() - growssWt;
break;
}
}
LandRoadVe veName = logic.veService.selectByFrameNo(vaName);
list.setAislewt(info.getGrosswt().doubleValue());
list.setUpdateDate(new Date());
list.setRemark(String.format("%.1f",goodsWt));
list.setRemark(String.format("%.1f", goodsWt));
list.setRemark1(String.format("%.1f", diffVal));
list.setRemark2(veName.getSelfWt());
list.setContrastflag("已出站");
logic.checkData(list);
}
int row = logic.listService.updateById(list);
System.out.println(row);
List<LandBusinessTypeList> businessTypeLists = logic.listService.selectByBarcode(info.getBarcode());
int count = 0;
for (int i = 0; i < businessTypeLists.size(); i++) {
... ... @@ -215,6 +227,7 @@ public class LogicOperation {
}
}
if (list.getBusinesstype().indexOf("业务") > 0) {
logic.inOrUpEnterCancel(list);
if (count == 4) {
buildBarCode.cancleBarCode(vaName);
logic.listService.updateByBarcode(info.getBarcode());
... ... @@ -255,7 +268,7 @@ public class LogicOperation {
* @Param goodsWt 货物总重
* @Result 获取运单重量
*/
public static boolean checkResult(double grossWt, double wt, double goodsWt) {
public boolean checkResult(double grossWt, double wt, double goodsWt) {
DecimalFormat df = new DecimalFormat("0.00");
boolean flag = false;
double result = 0.0;
... ... @@ -275,90 +288,95 @@ public class LogicOperation {
* @Param ietype 进出标志
* 获取货物总重
*/
public static double GoodsWt(String mainifast, String ietype) {
public double GoodsWt(String mainifast, String ietype) {
Double sum = 0.0;
if (mainifast.length() > 0) {
String[] mainifastList = mainifast.split(",");
for (String mainBill : mainifastList) {
sum = sum += getGrossWt(mainBill, ietype);
sum += getGrossWt(mainBill, ietype);
}
}
return sum;
}
/**
* 查询运单是否全部放行
*
* @param manifestList
* @return
*/
public boolean checkManifest(String manifestList) {
if (manifestList.length() < 1) return false;
manifestList = manifestList.replace("-", "");
String[] maifest = manifestList.split(",");
boolean flag = false;
int count = 0;
for (int i = 0; i < maifest.length; i++) {
RESMESSAGE resmessage = logic.resMessageService.selectByManifest(maifest[i]);
if(resmessage !=null){
if ("11".equals(resmessage.getResponsecode())) {
count++;
}
}
}
if (count == maifest.length) {
flag = true;
}
return flag;
}
/**
* @Param waybill 主单号
* @Param imp 进出港标识
* @Result 获取运单重量
*/
public static double getGrossWt(String waybill, String imp) {
// logger.info("进入获取重量action");
public double getGrossWt(String waybill, String imp) {
logger.info("进入获取重量action");
if (!(waybill.indexOf("-") != -1)) {
waybill = waybill.substring(0, 3) + "-" + waybill.substring(3);
}
String url = "http://10.50.3.64:8080/tj/orig/orig?waybill=" + waybill + "&imp=" + imp;
// String url = "http://tjfx.15miaoo.com:8003/tj/orig/orig=" + waybill + "&imp=" + imp;
// String url = "http://tjfx.15miaoo.com:8003/tj/orig/orig?waybill=" + waybill + "&imp=" + imp;
StringBuilder json = new StringBuilder();
Map map = null;
double bg = 0;
try {
URL Url = new URL(url);
URLConnection yc = Url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream(), "utf-8"));
String inputLine = null;
while ((inputLine = in.readLine()) != null) {
json.append(inputLine);
}
// logger.info("返回数据:" + json);
logger.info("返回数据:" + json);
JSONArray array = JSONArray.parseArray(json.toString());
for (int i = 0; i < array.size(); i++) {
map = JSON.parseObject(array.getString(i));
System.out.println(map);
if(map.containsKey("receiptinformation")){
if (map.containsKey("receiptinformation")) {
if (map.get("receiptinformation").toString().startsWith("41301") || map.get("receiptinformation")
.toString().startsWith("41106") || map.get("receiptinformation")
.toString().startsWith("31301") || map.get("receiptinformation")
.toString().startsWith("31106") || map.get("receiptinformation")
.toString().indexOf("提运单放行")!=-1) {
.toString().indexOf("提运单放行") != -1) {
logger.info(map);
bg = Double.parseDouble((String) map.get("totalweight"));
logger.info("for循环取重量:" + bg);
return bg;
}
}
}
// logger.info("访问返回的数据重量:" + bg);
logger.info("访问返回的数据重量:" + bg);
in.close();
} catch (MalformedURLException e) {
// logger.info(e.toString());
e.printStackTrace();
logger.error(e);
} catch (IOException e) {
// logger.info(e.toString());
e.printStackTrace();
logger.error(e);
}
return bg;
}
/**
* 查询运单是否全部放行
*
* @param manifestList
* @return
*/
public boolean checkManifest(String manifestList) {
if (manifestList.length() < 1) return false;
manifestList = manifestList.replace("-", "");
String[] maifest = manifestList.split(",");
boolean flag = false;
int count = 0;
for (int i = 0; i < maifest.length; i++) {
RESMESSAGE resmessage = logic.resMessageService.selectByManifest(maifest[i]);
if (resmessage != null) {
if ("11".equals(resmessage.getResponsecode())) {
count++;
}
}
}
if (count == maifest.length) {
flag = true;
}
return flag;
}
/**
* 给码头发送卡口数据
... ... @@ -411,7 +429,7 @@ public class LogicOperation {
* 校验重量并发送报文
*/
public static boolean sendBw(GatherInfo info, boolean check) {
public boolean sendBw(GatherInfo info, boolean check) {
boolean flag = false;
if (check) {
CommandClient.Client(info, PERMITTHOUGH);
... ... @@ -448,5 +466,55 @@ public class LogicOperation {
return flag;
}
/**
* 生成或者更新货物冻结标识
*
* @param landBusinessTypeList
*/
public void inOrUpEnterCancel(LandBusinessTypeList landBusinessTypeList) {
if (landBusinessTypeList.getMasterList().length() < 1) return;
String[] list = landBusinessTypeList.getMasterList().split(",");
String flag = null;
for (int i = 0; i < list.length; i++) {
if("调拨业务".equals(landBusinessTypeList.getBusinesstype())){
flag = "E";
}else {
flag = "I";
}
double wt = getGrossWt(list[i],flag);
ENTERCANCCEL entercanccel = logic.enterCancelServer.selectByManifest(list[i]);
if (entercanccel != null) {
if ("0".equals(entercanccel.getIsfreeze())) {
entercanccel.setIsfreeze("1");
entercanccel.setEndport(landBusinessTypeList.getEndstation());
entercanccel.setUpdateBy(landBusinessTypeList.getCreateBy());
entercanccel.setUpdateTime(new Date());
logic.enterCancelServer.updateByPermaryKey(entercanccel);
}
}else {
if("E".equals(landBusinessTypeList.getTurnoverflag())){
ENTERCANCCEL canccel = new ENTERCANCCEL();
canccel.setIsfreeze("0");
canccel.setVename(landBusinessTypeList.getTrailerFrameNo());
canccel.setId(String.valueOf(System.currentTimeMillis()));
canccel.setVeCompanyName(landBusinessTypeList.getAgentno());
canccel.setBusinesstype(landBusinessTypeList.getBusinesstype());
canccel.setManifest(list[i]);
canccel.setAgentname(landBusinessTypeList.getAgentname());
canccel.setStartport(landBusinessTypeList.getEndstation());
canccel.setGrosswt(landBusinessTypeList.getAislewt());
canccel.setCreateBy(landBusinessTypeList.getCreateBy());
canccel.setCreateTime(new Date());
canccel.setUpdateBy(landBusinessTypeList.getCreateBy());
canccel.setUpdateTime(new Date());
canccel.setWeight(wt);
logic.enterCancelServer.insertEntry(canccel);
}
}
}
}
}
... ...
package com.sy.mapper;
import com.sy.model.ENTERCANCCEL;
import org.springframework.stereotype.Component;
@Component
public interface ENTERCANCCELMapper {
int deleteByPrimaryKey(String id);
int insert(ENTERCANCCEL record);
int insertSelective(ENTERCANCCEL record);
ENTERCANCCEL selectByPrimaryKey(String id);
int updateByPrimaryKeySelective(ENTERCANCCEL record);
int updateByPrimaryKey(ENTERCANCCEL record);
ENTERCANCCEL selectByManifest(String manifest);
}
\ No newline at end of file
... ...
package com.sy.model;
import java.util.Date;
public class ENTERCANCCEL {
private String id;
private String vename;
private String veCompanyName;
private String agentname;
private String businesstype;
private String manifest;
private Double weight;
private Double grosswt;
private String goodname;
private String startport;
private String endport;
private String isfreeze;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getVename() {
return vename;
}
public void setVename(String vename) {
this.vename = vename == null ? null : vename.trim();
}
public String getVeCompanyName() {
return veCompanyName;
}
public void setVeCompanyName(String veCompanyName) {
this.veCompanyName = veCompanyName == null ? null : veCompanyName.trim();
}
public String getAgentname() {
return agentname;
}
public void setAgentname(String agentname) {
this.agentname = agentname == null ? null : agentname.trim();
}
public String getBusinesstype() {
return businesstype;
}
public void setBusinesstype(String businesstype) {
this.businesstype = businesstype == null ? null : businesstype.trim();
}
public String getManifest() {
return manifest;
}
public void setManifest(String manifest) {
this.manifest = manifest == null ? null : manifest.trim();
}
public Double getWeight() {
return weight;
}
public void setWeight(Double weight) {
this.weight = weight;
}
public Double getGrosswt() {
return grosswt;
}
public void setGrosswt(Double grosswt) {
this.grosswt = grosswt;
}
public String getGoodname() {
return goodname;
}
public void setGoodname(String goodname) {
this.goodname = goodname == null ? null : goodname.trim();
}
public String getStartport() {
return startport;
}
public void setStartport(String startport) {
this.startport = startport == null ? null : startport.trim();
}
public String getEndport() {
return endport;
}
public void setEndport(String endport) {
this.endport = endport == null ? null : endport.trim();
}
public String getIsfreeze() {
return isfreeze;
}
public void setIsfreeze(String isfreeze) {
this.isfreeze = isfreeze == null ? null : isfreeze.trim();
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
... ...
package com.sy.service;
import com.sy.model.ENTERCANCCEL;
/**
* @author
* @time 2019-05-20 14:36
*/
public interface EnterCancelServer {
ENTERCANCCEL selectByManifest(String manifest);
int updateByPermaryKey(ENTERCANCCEL entercanccel);
int insertEntry(ENTERCANCCEL entercanccel);
}
... ...
package com.sy.service.impl;
import com.sy.mapper.ENTERCANCCELMapper;
import com.sy.model.ENTERCANCCEL;
import com.sy.service.EnterCancelServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author
* @time 2019-05-20 14:41
*/
@Service
public class EnterCancelServerImpl implements EnterCancelServer {
@Autowired
private ENTERCANCCELMapper mapper;
@Override
public int insertEntry(ENTERCANCCEL entercanccel){
int row = 0;
try {
row = mapper.insertSelective(entercanccel);
}catch (NullPointerException e){
e.printStackTrace();
}
return row;
}
@Override
public int updateByPermaryKey(ENTERCANCCEL entercanccel) {
int row = 0;
try {
row = mapper.updateByPrimaryKey(entercanccel);
}catch (NullPointerException e){
e.printStackTrace();
}
return row;
}
@Override
public ENTERCANCCEL selectByManifest(String manifest) {
ENTERCANCCEL entercanccel = mapper.selectByManifest(manifest);
return entercanccel;
}
}
... ...
... ... @@ -74,7 +74,7 @@
<!-- <table tableName="ResMessage" domainObjectName="RESMESSAGE" enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
<table tableName="land_businesstype_list" domainObjectName="LandBusinessTypeList" enableCountByExample="false"
<table tableName="entercancel" domainObjectName="ENTERCANCCEL" enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
... ...
<?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.sy.mapper.ENTERCANCCELMapper">
<resultMap id="BaseResultMap" type="com.sy.model.ENTERCANCCEL">
<id column="ID" jdbcType="VARCHAR" property="id" />
<result column="VENAME" jdbcType="VARCHAR" property="vename" />
<result column="VE_COMPANY_NAME" jdbcType="VARCHAR" property="veCompanyName" />
<result column="AGENTNAME" jdbcType="VARCHAR" property="agentname" />
<result column="BUSINESSTYPE" jdbcType="VARCHAR" property="businesstype" />
<result column="MANIFEST" jdbcType="VARCHAR" property="manifest" />
<result column="WEIGHT" jdbcType="DOUBLE" property="weight" />
<result column="GROSSWT" jdbcType="DOUBLE" property="grosswt" />
<result column="GOODNAME" jdbcType="VARCHAR" property="goodname" />
<result column="STARTPORT" jdbcType="VARCHAR" property="startport" />
<result column="ENDPORT" jdbcType="VARCHAR" property="endport" />
<result column="ISFREEZE" jdbcType="VARCHAR" property="isfreeze" />
<result column="CREATE_BY" jdbcType="VARCHAR" property="createBy" />
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
<result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy" />
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
ID, VENAME, VE_COMPANY_NAME, AGENTNAME, BUSINESSTYPE, MANIFEST, WEIGHT, GROSSWT,
GOODNAME, STARTPORT, ENDPORT, ISFREEZE, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from entercancel
where ID = #{id,jdbcType=VARCHAR}
</select>
<select id="selectByManifest" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from entercancel
where MANIFEST = #{manifest,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from entercancel
where ID = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sy.model.ENTERCANCCEL">
insert into entercancel (ID, VENAME, VE_COMPANY_NAME,
AGENTNAME, BUSINESSTYPE, MANIFEST,
WEIGHT, GROSSWT, GOODNAME,
STARTPORT, ENDPORT, ISFREEZE,
CREATE_BY, CREATE_TIME, UPDATE_BY,
UPDATE_TIME)
values (#{id,jdbcType=VARCHAR}, #{vename,jdbcType=VARCHAR}, #{veCompanyName,jdbcType=VARCHAR},
#{agentname,jdbcType=VARCHAR}, #{businesstype,jdbcType=VARCHAR}, #{manifest,jdbcType=VARCHAR},
#{weight,jdbcType=DOUBLE}, #{grosswt,jdbcType=DOUBLE}, #{goodname,jdbcType=VARCHAR},
#{startport,jdbcType=VARCHAR}, #{endport,jdbcType=VARCHAR}, #{isfreeze,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sy.model.ENTERCANCCEL">
insert into entercancel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="vename != null">
VENAME,
</if>
<if test="veCompanyName != null">
VE_COMPANY_NAME,
</if>
<if test="agentname != null">
AGENTNAME,
</if>
<if test="businesstype != null">
BUSINESSTYPE,
</if>
<if test="manifest != null">
MANIFEST,
</if>
<if test="weight != null">
WEIGHT,
</if>
<if test="grosswt != null">
GROSSWT,
</if>
<if test="goodname != null">
GOODNAME,
</if>
<if test="startport != null">
STARTPORT,
</if>
<if test="endport != null">
ENDPORT,
</if>
<if test="isfreeze != null">
ISFREEZE,
</if>
<if test="createBy != null">
CREATE_BY,
</if>
<if test="createTime != null">
CREATE_TIME,
</if>
<if test="updateBy != null">
UPDATE_BY,
</if>
<if test="updateTime != null">
UPDATE_TIME,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="vename != null">
#{vename,jdbcType=VARCHAR},
</if>
<if test="veCompanyName != null">
#{veCompanyName,jdbcType=VARCHAR},
</if>
<if test="agentname != null">
#{agentname,jdbcType=VARCHAR},
</if>
<if test="businesstype != null">
#{businesstype,jdbcType=VARCHAR},
</if>
<if test="manifest != null">
#{manifest,jdbcType=VARCHAR},
</if>
<if test="weight != null">
#{weight,jdbcType=DOUBLE},
</if>
<if test="grosswt != null">
#{grosswt,jdbcType=DOUBLE},
</if>
<if test="goodname != null">
#{goodname,jdbcType=VARCHAR},
</if>
<if test="startport != null">
#{startport,jdbcType=VARCHAR},
</if>
<if test="endport != null">
#{endport,jdbcType=VARCHAR},
</if>
<if test="isfreeze != null">
#{isfreeze,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sy.model.ENTERCANCCEL">
update entercancel
<set>
<if test="vename != null">
VENAME = #{vename,jdbcType=VARCHAR},
</if>
<if test="veCompanyName != null">
VE_COMPANY_NAME = #{veCompanyName,jdbcType=VARCHAR},
</if>
<if test="agentname != null">
AGENTNAME = #{agentname,jdbcType=VARCHAR},
</if>
<if test="businesstype != null">
BUSINESSTYPE = #{businesstype,jdbcType=VARCHAR},
</if>
<if test="manifest != null">
MANIFEST = #{manifest,jdbcType=VARCHAR},
</if>
<if test="weight != null">
WEIGHT = #{weight,jdbcType=DOUBLE},
</if>
<if test="grosswt != null">
GROSSWT = #{grosswt,jdbcType=DOUBLE},
</if>
<if test="goodname != null">
GOODNAME = #{goodname,jdbcType=VARCHAR},
</if>
<if test="startport != null">
STARTPORT = #{startport,jdbcType=VARCHAR},
</if>
<if test="endport != null">
ENDPORT = #{endport,jdbcType=VARCHAR},
</if>
<if test="isfreeze != null">
ISFREEZE = #{isfreeze,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
CREATE_BY = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sy.model.ENTERCANCCEL">
update entercancel
set VENAME = #{vename,jdbcType=VARCHAR},
VE_COMPANY_NAME = #{veCompanyName,jdbcType=VARCHAR},
AGENTNAME = #{agentname,jdbcType=VARCHAR},
BUSINESSTYPE = #{businesstype,jdbcType=VARCHAR},
MANIFEST = #{manifest,jdbcType=VARCHAR},
WEIGHT = #{weight,jdbcType=DOUBLE},
GROSSWT = #{grosswt,jdbcType=DOUBLE},
GOODNAME = #{goodname,jdbcType=VARCHAR},
STARTPORT = #{startport,jdbcType=VARCHAR},
ENDPORT = #{endport,jdbcType=VARCHAR},
ISFREEZE = #{isfreeze,jdbcType=VARCHAR},
CREATE_BY = #{createBy,jdbcType=VARCHAR},
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
... ...