作者 王勇

车辆管理,CRUD

  1 +package com.sunyo.wlpt.vehicle.manage.cache;
  2 +
  3 +import org.springframework.beans.BeansException;
  4 +import org.springframework.context.ApplicationContext;
  5 +import org.springframework.context.ApplicationContextAware;
  6 +import org.springframework.stereotype.Component;
  7 +
  8 +/**
  9 + * @author 子诚
  10 + * Description:用来获取springboot创建好的工厂
  11 + * 时间:2020/8/6 9:31
  12 + */
  13 +@Component
  14 +public class ApplicationContextUtils implements ApplicationContextAware {
  15 +
  16 + /**
  17 + * 保留下来工厂
  18 + */
  19 + private static ApplicationContext context;
  20 +
  21 + /**
  22 + * 将创建好工厂以参数形式传递给这个类
  23 + *
  24 + * @param applicationContext 上下文
  25 + * @throws BeansException
  26 + */
  27 + @Override
  28 + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
  29 + {
  30 + context = applicationContext;
  31 + }
  32 +
  33 + /**
  34 + * 提供在工厂中获取对象的方法 例如:RedisTemplate redisTemplate
  35 + *
  36 + * @param beanName bean的名称
  37 + * @return
  38 + */
  39 + public static Object getBean(String beanName)
  40 + {
  41 + return context.getBean(beanName);
  42 + }
  43 +
  44 +}
  45 +
  46 +
  1 +package com.sunyo.wlpt.vehicle.manage.cache;
  2 +
  3 +import org.apache.ibatis.cache.Cache;
  4 +import org.slf4j.Logger;
  5 +import org.slf4j.LoggerFactory;
  6 +import org.springframework.data.redis.core.RedisTemplate;
  7 +import org.springframework.data.redis.serializer.StringRedisSerializer;
  8 +import org.springframework.util.DigestUtils;
  9 +
  10 +import java.util.concurrent.TimeUnit;
  11 +import java.util.concurrent.locks.ReadWriteLock;
  12 +import java.util.concurrent.locks.ReentrantReadWriteLock;
  13 +
  14 +
  15 +/**
  16 + * @author 子诚
  17 + * Description:自定义Redis作为mybatis二级缓存实现
  18 + * 问题描述:缓存穿透、缓存雪崩
  19 + * <p>
  20 + * 缓存穿透:就是说利用一些列措施,使得访问避开了缓存,直接访问数据库,使得数据库不堪重负引起的问题。比如(压测)访问数据库中不存在的数据
  21 + * 解决方案:读取数据库,不存在;依旧生成对应的key,放到缓存中,但是对应的value是null(mybatis的二级缓存是这样解决的)。
  22 + * 下次再次访问的话,就是读取缓存。
  23 + * <p>
  24 + * 缓存雪崩:是指在某一特殊时刻,缓存中的缓存全部失效,然后这一时刻又有大量的数据库访问,导致数据库不堪重负。
  25 + * 解决方案:根据业务的不同设置不同的缓存失效时间。
  26 + * 比如:这个项目,做了3个namespace的缓存,其中一个namespace,共有5个Mapper指向它。所以选择使用范围内的随机值,来做缓存失效时间
  27 + * <p>
  28 + * 时间:2020/8/6 9:37
  29 + */
  30 +public class RedisCache implements Cache {
  31 +
  32 + /**
  33 + * slf4j的日志记录器
  34 + */
  35 + private static final Logger logger = LoggerFactory.getLogger(com.sunyo.wlpt.vehicle.manage.cache.RedisCache.class);
  36 +
  37 + /**
  38 + * 用于事务性缓存操作的读写锁
  39 + */
  40 + private static final ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
  41 +
  42 + /**
  43 + * 当前放入缓存的mapper的namespace
  44 + */
  45 + private final String id;
  46 +
  47 + /**
  48 + * 必须存在构造方法
  49 + */
  50 + public RedisCache(String id)
  51 + {
  52 + this.id = id;
  53 + }
  54 +
  55 + /**
  56 + * 返回cache唯一标识
  57 + */
  58 + @Override
  59 + public String getId()
  60 + {
  61 + return this.id;
  62 + }
  63 +
  64 + /**
  65 + * 缓存放入值 redis RedisTemplate StringRedisTemplate
  66 + *
  67 + * @param key hash_key
  68 + * @param value hash_value
  69 + */
  70 + @Override
  71 + public void putObject(Object key, Object value)
  72 + {
  73 + RedisTemplate redisTemplate = getRedisTemplate();
  74 + // 使用redis的hash类型作为缓存存储模型
  75 + redisTemplate.opsForHash().put(id.toString(), encryptionKey(key.toString()), value);
  76 +
  77 + /**
  78 + * 根据业务的不同,设置不同的缓存时间,解决掉缓存雪崩
  79 + */
  80 + if (id.equals("com.sunyo.wlpt.vehicle.manage.mapper.LandRoadVeRecordMapper")) {
  81 + // 车辆查询
  82 + redisTemplate.expire(id.toString(), random(60, 120), TimeUnit.MINUTES);
  83 + } else {
  84 + // 其他,作为补充
  85 + redisTemplate.expire(id.toString(), random(30, 50), TimeUnit.MINUTES);
  86 + }
  87 + }
  88 +
  89 + /**
  90 + *
  91 + */
  92 + public int random(int low, int high)
  93 + {
  94 + int num = ((int) (Math.random() * (high - low))) + low;
  95 + return num;
  96 + }
  97 +
  98 + /**
  99 + * 缓存中中获取数据
  100 + */
  101 + @Override
  102 + public Object getObject(Object key)
  103 + {
  104 + RedisTemplate redisTemplate = getRedisTemplate();
  105 + //根据key 从redis的hash类型中获取数据
  106 + return redisTemplate.opsForHash().get(id.toString(), encryptionKey(key.toString()));
  107 + }
  108 +
  109 + /**
  110 + * 注意:这个方法为mybatis保留方法 默认没有实现 后续版本可能会实现
  111 + *
  112 + * @param key hash_key
  113 + * @return
  114 + */
  115 + @Override
  116 + public Object removeObject(Object key)
  117 + {
  118 + RedisTemplate redisTemplate = getRedisTemplate();
  119 + redisTemplate.delete(key);
  120 + return null;
  121 + }
  122 +
  123 + @Override
  124 + public void clear()
  125 + {
  126 + logger.info("清空->{}<-缓存", id);
  127 + RedisTemplate redisTemplate = getRedisTemplate();
  128 + // 清空 namespace
  129 + redisTemplate.delete(id.toString());
  130 + }
  131 +
  132 + /**
  133 + * 用来计算缓存数量
  134 + */
  135 + @Override
  136 + public int getSize()
  137 + {
  138 + RedisTemplate redisTemplate = getRedisTemplate();
  139 + // 获取hash中key value数量
  140 + return redisTemplate.opsForHash().size(id.toString()).intValue();
  141 + }
  142 +
  143 + /**
  144 + * 封装redisTemplate
  145 + *
  146 + * @return RedisTemplate
  147 + */
  148 + private RedisTemplate getRedisTemplate()
  149 + {
  150 + //通过application工具类获取redisTemplate
  151 + RedisTemplate redisTemplate = (RedisTemplate) com.sunyo.wlpt.vehicle.manage.cache.ApplicationContextUtils.getBean("redisTemplate");
  152 + redisTemplate.setKeySerializer(new StringRedisSerializer());
  153 + redisTemplate.setHashKeySerializer(new StringRedisSerializer());
  154 + return redisTemplate;
  155 + }
  156 +
  157 + /**
  158 + * 封装一个对key进行md5处理方法
  159 + */
  160 + private String encryptionKey(String key)
  161 + {
  162 + return DigestUtils.md5DigestAsHex(key.getBytes());
  163 + }
  164 +
  165 + @Override
  166 + public ReadWriteLock getReadWriteLock()
  167 + {
  168 + return readWriteLock;
  169 + }
  170 +
  171 +}
  172 +
  1 +package com.sunyo.wlpt.vehicle.manage.common;
  2 +
  3 +/**
  4 + * @author 子诚
  5 + * Description:常量公共类
  6 + * 时间:2020/7/17 9:49
  7 + */
  8 +public class Common {
  9 + public static final String RESULT_SUCCESS = "200";
  10 +}
  1 +package com.sunyo.wlpt.vehicle.manage.config;
  2 +
  3 +import org.springframework.context.annotation.Configuration;
  4 +import org.springframework.security.config.annotation.web.builders.HttpSecurity;
  5 +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
  6 +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
  7 +
  8 +/**
  9 + * @author 子诚
  10 + * Description:SpringSecurity 权限配置框架
  11 + * 时间:2020/7/5 13:38
  12 + */
  13 +@EnableWebSecurity
  14 +@Configuration
  15 +public class SecurityConfig extends WebSecurityConfigurerAdapter {
  16 + @Override
  17 + protected void configure(HttpSecurity http) throws Exception {
  18 + http.csrf().disable();
  19 + }
  20 +}
  1 +package com.sunyo.wlpt.vehicle.manage.config;
  2 +
  3 +import org.springframework.context.annotation.Bean;
  4 +import org.springframework.context.annotation.Configuration;
  5 +import springfox.documentation.builders.ApiInfoBuilder;
  6 +import springfox.documentation.builders.PathSelectors;
  7 +import springfox.documentation.builders.RequestHandlerSelectors;
  8 +import springfox.documentation.service.ApiInfo;
  9 +import springfox.documentation.spi.DocumentationType;
  10 +import springfox.documentation.spring.web.plugins.Docket;
  11 +import springfox.documentation.swagger2.annotations.EnableSwagger2;
  12 +
  13 +/**
  14 + * @author 子诚
  15 + * Description:swagger-knife4j 的配置文件
  16 + * 时间:2020/7/10 11:48
  17 + */
  18 +@Configuration
  19 +@EnableSwagger2
  20 +public class SwaggerConfig {
  21 + @Bean
  22 + public Docket createRestApi()
  23 + {
  24 + return new Docket(DocumentationType.SWAGGER_2)
  25 + .apiInfo(apiInfo())
  26 + .select()
  27 + .apis(RequestHandlerSelectors.basePackage("com.sunyo.wlpt.vehicle.manage.controller"))
  28 + .paths(PathSelectors.any())
  29 + .build();
  30 + }
  31 +
  32 + private ApiInfo apiInfo()
  33 + {
  34 + return new ApiInfoBuilder()
  35 + .title("车辆管理服务")
  36 + .description("车辆管理服务")
  37 + .termsOfServiceUrl("http://localhost:10001/")
  38 + .contact("子诚")
  39 + .version("1.0.0")
  40 + .build();
  41 + }
  42 +}
  1 +package com.sunyo.wlpt.vehicle.manage.controller;
  2 +
  3 +import com.github.pagehelper.PageInfo;
  4 +import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord;
  5 +import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
  6 +import com.sunyo.wlpt.vehicle.manage.service.LandRoadVeRecordService;
  7 +import org.springframework.web.bind.annotation.*;
  8 +
  9 +import javax.annotation.Resource;
  10 +
  11 +/**
  12 + * @author 子诚
  13 + * Description:
  14 + * 时间:2020/9/22 17:58
  15 + */
  16 +@CrossOrigin
  17 +@RequestMapping("vehicle")
  18 +@RestController
  19 +public class LandRoadVeRecordController {
  20 +
  21 + @Resource
  22 + LandRoadVeRecordService landRoadVeRecordService;
  23 +
  24 + /**
  25 + * 分页查询,车辆信息列表
  26 + *
  27 + * @param domesticLisenceNo 国内车牌号
  28 + * @param veType 车辆类型
  29 + * @param veState 车辆状态
  30 + * @param pageNum 当前页数
  31 + * @param pageSize 每页大小
  32 + * @return
  33 + */
  34 + @GetMapping("/page")
  35 + public ResultJson selectBusExchangeList(
  36 + @RequestParam(value = "domesticLisenceNo", required = false) String domesticLisenceNo,
  37 + @RequestParam(value = "veType", required = false) String veType,
  38 + @RequestParam(value = "veState", required = false) String veState,
  39 + @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
  40 + @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize)
  41 + {
  42 + LandRoadVeRecord landRoadVeRecord = LandRoadVeRecord.builder()
  43 + .domesticLisenceNo(domesticLisenceNo)
  44 + .veType(veType)
  45 + .veState(veState)
  46 + .build();
  47 + return landRoadVeRecordService.selectListByPage(landRoadVeRecord, pageNum, pageSize);
  48 + }
  49 +
  50 + @DeleteMapping("/delete")
  51 + public ResultJson deleteLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
  52 + {
  53 + return landRoadVeRecordService.deleteByPrimaryKey(landRoadVeRecord.getId());
  54 + }
  55 +
  56 +
  57 + @DeleteMapping("/batchRemove")
  58 + public ResultJson batchRemoveLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
  59 + {
  60 + String id = landRoadVeRecord.getId();
  61 + return id.contains(",")
  62 + ? landRoadVeRecordService.batchRemoveByIds(id)
  63 + : landRoadVeRecordService.deleteByPrimaryKey(id);
  64 + }
  65 +
  66 + @PostMapping("/insert")
  67 + public ResultJson insertLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
  68 + {
  69 + return landRoadVeRecordService.insertSelective(landRoadVeRecord);
  70 + }
  71 + @PutMapping("/update")
  72 + public ResultJson updateLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
  73 + {
  74 + return landRoadVeRecordService.updateByPrimaryKeySelective(landRoadVeRecord);
  75 + }
  76 +}
  1 +package com.sunyo.wlpt.vehicle.manage.domain;
  2 +
  3 +import io.swagger.annotations.ApiModel;
  4 +import io.swagger.annotations.ApiModelProperty;
  5 +
  6 +import java.io.Serializable;
  7 +import java.util.Date;
  8 +
  9 +import lombok.AllArgsConstructor;
  10 +import lombok.Builder;
  11 +import lombok.Data;
  12 +import lombok.NoArgsConstructor;
  13 +
  14 +/**
  15 + * @author 子诚
  16 + * Description:车辆详细信息
  17 + * 时间:2020/9/22 17:45
  18 + */
  19 +@ApiModel("LandRoadVeRecord:车辆详细信息")
  20 +@Data
  21 +@Builder
  22 +@AllArgsConstructor
  23 +@NoArgsConstructor
  24 +public class LandRoadVeRecord implements Serializable {
  25 +
  26 + private static final long serialVersionUID = -953128661933605427L;
  27 +
  28 + @ApiModelProperty(value = "")
  29 + private String id;
  30 +
  31 + /**
  32 + * 电子口岸录入号ID(电子口岸与海关数据传输使用,企业无需填写)
  33 + */
  34 + @ApiModelProperty(value = "电子口岸录入号ID(电子口岸与海关数据传输使用,企业无需填写)")
  35 + private String eportId;
  36 +
  37 + /**
  38 + * 主管海关代码
  39 + */
  40 + @ApiModelProperty(value = "主管海关代码")
  41 + private String mainPort;
  42 +
  43 + /**
  44 + * 运输公司代码
  45 + */
  46 + @ApiModelProperty(value = "运输公司代码")
  47 + private String coCode;
  48 +
  49 + /**
  50 + * 车牌指标编码
  51 + */
  52 + @ApiModelProperty(value = "车牌指标编码")
  53 + private String veTargetNo;
  54 +
  55 + /**
  56 + * 国内车牌
  57 + */
  58 + @ApiModelProperty(value = "国内车牌")
  59 + private String domesticLisenceNo;
  60 +
  61 + /**
  62 + * 车牌颜色
  63 + */
  64 + @ApiModelProperty(value = "车牌颜色")
  65 + private String domesticLicenseColor;
  66 +
  67 + /**
  68 + * 外籍车牌
  69 + */
  70 + @ApiModelProperty(value = "外籍车牌")
  71 + private String foreignLicense;
  72 +
  73 + @ApiModelProperty(value = "")
  74 + private String veRegPlace;
  75 +
  76 + /**
  77 + * 使用性质
  78 + */
  79 + @ApiModelProperty(value = "使用性质")
  80 + private String veProperty;
  81 +
  82 + /**
  83 + * 车辆运输资格
  84 + */
  85 + @ApiModelProperty(value = "车辆运输资格")
  86 + private String veConveyQua;
  87 +
  88 + /**
  89 + * 车辆行驶证编号
  90 + */
  91 + @ApiModelProperty(value = "车辆行驶证编号")
  92 + private String veCardNo;
  93 +
  94 + /**
  95 + * 车辆登记车主名称
  96 + */
  97 + @ApiModelProperty(value = "车辆登记车主名称")
  98 + private String veOwnerName;
  99 +
  100 + /**
  101 + * 车辆登记车主证件号码
  102 + */
  103 + @ApiModelProperty(value = "车辆登记车主证件号码")
  104 + private String veOwnerNo;
  105 +
  106 + /**
  107 + * 车主境内联系地址
  108 + */
  109 + @ApiModelProperty(value = "车主境内联系地址")
  110 + private String ownerInsideAddr;
  111 +
  112 + /**
  113 + * 车主境内联系电话
  114 + */
  115 + @ApiModelProperty(value = "车主境内联系电话")
  116 + private String ownerInsideTel;
  117 +
  118 + /**
  119 + * 车辆类型(型样)
  120 + */
  121 + @ApiModelProperty(value = "车辆类型(型样)")
  122 + private String veType;
  123 +
  124 + /**
  125 + * 厂牌
  126 + */
  127 + @ApiModelProperty(value = "厂牌")
  128 + private String brand;
  129 +
  130 + @ApiModelProperty(value = "")
  131 + private String model;
  132 +
  133 + /**
  134 + * 排气量
  135 + */
  136 + @ApiModelProperty(value = "排气量")
  137 + private String exhaustCapacity;
  138 +
  139 + /**
  140 + * 行驶证有效期日期(yyyyMMdd-0)
  141 + */
  142 + @ApiModelProperty(value = "行驶证有效期日期(yyyyMMdd-0)")
  143 + private Date veFactoryDate;
  144 +
  145 + /**
  146 + * 发动机号
  147 + */
  148 + @ApiModelProperty(value = "发动机号")
  149 + private String veMotorNo;
  150 +
  151 + /**
  152 + * 车架号(车辆识别代号)
  153 + */
  154 + @ApiModelProperty(value = "车架号(车辆识别代号)")
  155 + private String veFrameNo;
  156 +
  157 + /**
  158 + * 核定载客/核定载质量:客车的核定载客单位仍为:人;货车的核定载客单位改为:千克。
  159 + */
  160 + @ApiModelProperty(value = "核定载客/核定载质量:客车的核定载客单位仍为:人;货车的核定载客单位改为:千克。")
  161 + private String veTon;
  162 +
  163 + /**
  164 + * 自重(整备质量)
  165 + */
  166 + @ApiModelProperty(value = "自重(整备质量)")
  167 + private String selfWt;
  168 +
  169 + /**
  170 + * 准牵引总质量
  171 + */
  172 + @ApiModelProperty(value = "准牵引总质量")
  173 + private String allowTowTotalWt;
  174 +
  175 + /**
  176 + * 内部长度
  177 + */
  178 + @ApiModelProperty(value = "内部长度")
  179 + private String containerInnerLength;
  180 +
  181 + /**
  182 + * 货箱内部宽度(M)
  183 + */
  184 + @ApiModelProperty(value = "货箱内部宽度(M)")
  185 + private String containerInnerWidth;
  186 +
  187 + /**
  188 + * 货箱内部高度(M)
  189 + */
  190 + @ApiModelProperty(value = "货箱内部高度(M)")
  191 + private String containerInnerHeight;
  192 +
  193 + /**
  194 + * 外廓长度(M)
  195 + */
  196 + @ApiModelProperty(value = "外廓长度(M)")
  197 + private String outerLength;
  198 +
  199 + /**
  200 + * 外廓宽度(M)
  201 + */
  202 + @ApiModelProperty(value = "外廓宽度(M)")
  203 + private String outerWidth;
  204 +
  205 + /**
  206 + * 外廓高度(M)
  207 + */
  208 + @ApiModelProperty(value = "外廓高度(M)")
  209 + private String outerHeight;
  210 +
  211 + /**
  212 + * 车身颜色
  213 + */
  214 + @ApiModelProperty(value = "车身颜色")
  215 + private String veBodyColor;
  216 +
  217 + /**
  218 + * 油箱容量(升)
  219 + */
  220 + @ApiModelProperty(value = "油箱容量(升)")
  221 + private String oilBoxCapcity;
  222 +
  223 + /**
  224 + * 批准车辆进出口岸
  225 + */
  226 + @ApiModelProperty(value = "批准车辆进出口岸")
  227 + private String allowVeIePort;
  228 +
  229 + /**
  230 + * 批文/许可证编号
  231 + */
  232 + @ApiModelProperty(value = "批文/许可证编号")
  233 + private String apprNo;
  234 +
  235 + /**
  236 + * 批文/许可证有效期(yyyyMMdd-0)
  237 + */
  238 + @ApiModelProperty(value = "批文/许可证有效期(yyyyMMdd-0)")
  239 + private Date apprPeriod;
  240 +
  241 + /**
  242 + * 最新更新申请业务类型
  243 + */
  244 + @ApiModelProperty(value = "最新更新申请业务类型")
  245 + private String currApplyBussiness;
  246 +
  247 + /**
  248 + * 车前45度照片
  249 + */
  250 + @ApiModelProperty(value = "车前45度照片")
  251 + private String front45cPic;
  252 +
  253 + /**
  254 + * 车后45度照片
  255 + */
  256 + @ApiModelProperty(value = "车后45度照片")
  257 + private String back45cPic;
  258 +
  259 + /**
  260 + * 油箱照片
  261 + */
  262 + @ApiModelProperty(value = "油箱照片")
  263 + private String oilBoxPic;
  264 +
  265 + /**
  266 + * 车底照片
  267 + */
  268 + @ApiModelProperty(value = "车底照片")
  269 + private String veBottomPic;
  270 +
  271 + /**
  272 + * 备注
  273 + */
  274 + @ApiModelProperty(value = "备注")
  275 + private String memo;
  276 +
  277 + /**
  278 + * 挂靠单位
  279 + */
  280 + @ApiModelProperty(value = "挂靠单位")
  281 + private String proposer;
  282 +
  283 + /**
  284 + * 申请时间 yyyyMMddHHmmss
  285 + */
  286 + @ApiModelProperty(value = "申请时间 yyyyMMddHHmmss")
  287 + private Date proposeTime;
  288 +
  289 + /**
  290 + * 车辆分类。1是进出境公路运输工具;2是来往港澳公路运输工具;3是进出境公/私用公路交通工具;4是来往港澳公/私用公路交通工具
  291 + */
  292 + @ApiModelProperty(value = "车辆分类。1是进出境公路运输工具;2是来往港澳公路运输工具;3是进出境公/私用公路交通工具;4是来往港澳公/私用公路交通工具")
  293 + private String veClassFlag;
  294 +
  295 + /**
  296 + * 数据操作类型
  297 + */
  298 + @ApiModelProperty(value = "数据操作类型")
  299 + private String operationType;
  300 +
  301 + /**
  302 + * 挂车牌号
  303 + */
  304 + @ApiModelProperty(value = "挂车牌号")
  305 + private String trailerLicenseNo;
  306 +
  307 + /**
  308 + * 挂车车架号
  309 + */
  310 + @ApiModelProperty(value = "挂车车架号")
  311 + private String trailerFrameNo;
  312 +
  313 + /**
  314 + * 批文扫描图
  315 + */
  316 + @ApiModelProperty(value = "批文扫描图")
  317 + private String approNoPic;
  318 +
  319 + /**
  320 + * 车架号扫描图
  321 + */
  322 + @ApiModelProperty(value = "车架号扫描图")
  323 + private String veFrameNoPic;
  324 +
  325 + /**
  326 + * 发动机拓印件
  327 + */
  328 + @ApiModelProperty(value = "发动机拓印件")
  329 + private String motorNoPic;
  330 +
  331 + /**
  332 + * 外籍车牌照片
  333 + */
  334 + @ApiModelProperty(value = "外籍车牌照片")
  335 + private String foreignLicensePic;
  336 +
  337 + /**
  338 + * 国籍
  339 + */
  340 + @ApiModelProperty(value = "国籍")
  341 + private String nationality;
  342 +
  343 + /**
  344 + * 回执内容
  345 + */
  346 + @ApiModelProperty(value = "回执内容")
  347 + private String returnmessage;
  348 +
  349 + /**
  350 + * 二维码
  351 + */
  352 + @ApiModelProperty(value = "二维码")
  353 + private String barcode;
  354 +
  355 + @ApiModelProperty(value = "")
  356 + private String createBy;
  357 +
  358 + /**
  359 + * 创建时间
  360 + */
  361 + @ApiModelProperty(value = "创建时间")
  362 + private Date createDate;
  363 +
  364 + @ApiModelProperty(value = "")
  365 + private String updateBy;
  366 +
  367 + /**
  368 + * 修改时间
  369 + */
  370 + @ApiModelProperty(value = "修改时间")
  371 + private Date updateDate;
  372 +
  373 + /**
  374 + * 开始空闲时间
  375 + */
  376 + @ApiModelProperty(value = "开始空闲时间")
  377 + private Date veFreeTime;
  378 +
  379 + /**
  380 + * 优先级(备用字段)
  381 + */
  382 + @ApiModelProperty(value = "优先级(备用字段)")
  383 + private Integer vePriority;
  384 +
  385 + /**
  386 + * 车辆状态
  387 + */
  388 + @ApiModelProperty(value = "车辆状态")
  389 + private String veState;
  390 +}
  1 +package com.sunyo.wlpt.vehicle.manage.exception;
  2 +
  3 +/**
  4 + * @author 子诚
  5 + * Description:
  6 + * 时间:2020/7/17 16:43
  7 + */
  8 +public class CustomException extends RuntimeException {
  9 + private static final long serialVersionUID = 6098063244016154220L;
  10 +
  11 + /**
  12 + * 异常错误编码
  13 + */
  14 + private String code;
  15 +
  16 + /**
  17 + * 异常信息
  18 + */
  19 + private String message;
  20 +
  21 + public CustomException(CustomExceptionType exceptionTypeEnum, String message) {
  22 + this.code = exceptionTypeEnum.getCode();
  23 + this.message = message;
  24 + }
  25 +
  26 + public CustomException(CustomExceptionType exceptionTypeEnum) {
  27 + this.code = exceptionTypeEnum.getCode();
  28 + this.message = exceptionTypeEnum.getMsg();
  29 + }
  30 +
  31 + public String getCode() {
  32 + return code;
  33 + }
  34 +
  35 + @Override
  36 + public String getMessage() {
  37 + return message;
  38 + }
  39 +
  40 +}
  1 +package com.sunyo.wlpt.vehicle.manage.exception;
  2 +
  3 +/**
  4 + * @author 子诚
  5 + * Description:枚举,定制异常类型
  6 + * 时间:2020/7/17 16:27
  7 + */
  8 +
  9 +public enum CustomExceptionType {
  10 +
  11 + CLIENT_ERROR("400", "客户端异常"),
  12 + SYSTEM_ERROR("500", "系统服务异常"),
  13 + OTHER_ERROR("999", "其他未知异常");
  14 +
  15 + /**
  16 + * 响应业务状态
  17 + */
  18 + private String code;
  19 + /**
  20 + * 响应消息
  21 + */
  22 + private String msg;
  23 +
  24 + CustomExceptionType(String code, String msg)
  25 + {
  26 + this.code = code;
  27 + this.msg = msg;
  28 + }
  29 +
  30 + public String getCode()
  31 + {
  32 + return code;
  33 + }
  34 +
  35 + public String getMsg()
  36 + {
  37 + return msg;
  38 + }
  39 +
  40 +}
  1 +package com.sunyo.wlpt.vehicle.manage.exception;
  2 +
  3 +
  4 +import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
  5 +import org.slf4j.Logger;
  6 +import org.slf4j.LoggerFactory;
  7 +import org.springframework.web.bind.annotation.ExceptionHandler;
  8 +import org.springframework.web.bind.annotation.ResponseBody;
  9 +
  10 +/**
  11 + * @author 子诚
  12 + * Description:自定义全局异常处理类
  13 + * 时间:2020/7/17 17:44
  14 + */
  15 +//@ControllerAdvice
  16 +public class GlobalExceptionHandler {
  17 + private static final Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
  18 +
  19 + //处理程序员主动转换的自定义异常
  20 + @ExceptionHandler(CustomException.class)
  21 + @ResponseBody
  22 + public ResultJson customerException(CustomException e)
  23 + {
  24 + if (e.getCode() == CustomExceptionType.SYSTEM_ERROR.getCode()) {
  25 + //400异常不需要持久化,将异常信息以友好的方式告知用户就可以
  26 +
  27 + //TODO 将500异常信息持久化处理,方便运维人员处理
  28 + logger.error("");
  29 + }
  30 + return ResultJson.error(e);
  31 + }
  32 +}
  1 +package com.sunyo.wlpt.vehicle.manage.mapper;
  2 +
  3 +import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord;
  4 +import org.apache.ibatis.annotations.Mapper;
  5 +import org.apache.ibatis.annotations.Param;
  6 +
  7 +import java.util.List;
  8 +
  9 +/**
  10 + * @author 子诚
  11 + * Description:
  12 + * 时间:2020/9/22 17:45
  13 + */
  14 +@Mapper
  15 +public interface LandRoadVeRecordMapper {
  16 + /**
  17 + * delete by primary key
  18 + *
  19 + * @param id primaryKey
  20 + * @return deleteCount
  21 + */
  22 + int deleteByPrimaryKey(String id);
  23 +
  24 + /**
  25 + * 批量删除
  26 + *
  27 + * @param idList id数组
  28 + * @return
  29 + */
  30 + int batchRemoveByIds(String[] idList);
  31 +
  32 + /**
  33 + * insert record to table
  34 + *
  35 + * @param record the record
  36 + * @return insert count
  37 + */
  38 + int insert(LandRoadVeRecord record);
  39 +
  40 + /**
  41 + * insert record to table selective
  42 + *
  43 + * @param record the record
  44 + * @return insert count
  45 + */
  46 + int insertSelective(LandRoadVeRecord record);
  47 +
  48 + /**
  49 + * select by primary key
  50 + *
  51 + * @param id primary key
  52 + * @return object by primary key
  53 + */
  54 + LandRoadVeRecord selectByPrimaryKey(String id);
  55 +
  56 + /**
  57 + * update record selective
  58 + *
  59 + * @param record the updated record
  60 + * @return update count
  61 + */
  62 + int updateByPrimaryKeySelective(LandRoadVeRecord record);
  63 +
  64 + /**
  65 + * update record
  66 + *
  67 + * @param record the updated record
  68 + * @return update count
  69 + */
  70 + int updateByPrimaryKey(LandRoadVeRecord record);
  71 +
  72 + /**
  73 + * 分页查询车辆信息列表
  74 + * 条件:
  75 + *
  76 + * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
  77 + * @return 全部列表
  78 + */
  79 + List<LandRoadVeRecord> selectListByPage(LandRoadVeRecord landRoadVeRecord);
  80 +
  81 + /**
  82 + * 根据国内车牌号查询
  83 + *
  84 + * @param domesticLisenceNo 国内车牌号
  85 + * @return
  86 + */
  87 + LandRoadVeRecord selectByDomesticLisenceNo(@Param("domesticLisenceNo") String domesticLisenceNo);
  88 +}
  1 +package com.sunyo.wlpt.vehicle.manage.response;
  2 +
  3 +
  4 +import com.sunyo.wlpt.vehicle.manage.exception.CustomException;
  5 +import com.sunyo.wlpt.vehicle.manage.exception.CustomExceptionType;
  6 +import lombok.Data;
  7 +
  8 +import java.io.Serializable;
  9 +
  10 +/**
  11 + * @author 子诚
  12 + * Description:返回结果封装类
  13 + * 时间:2020/7/01 10:06
  14 + */
  15 +@Data
  16 +public class ResultJson<T> implements Serializable {
  17 +
  18 + private static final long serialVersionUID = 1L;
  19 +
  20 + /**
  21 + * 响应业务状态,默认为200
  22 + */
  23 + private String code;
  24 +
  25 + /**
  26 + * 响应消息
  27 + */
  28 + private String msg;
  29 +
  30 + /**
  31 + * 错误消息内容
  32 + */
  33 + private String error;
  34 +
  35 + /**
  36 + * 数据总条数
  37 + */
  38 + private Integer total;
  39 +
  40 + /**
  41 + * 响应数据
  42 + */
  43 + private T data;
  44 +
  45 + /**
  46 + * JWT令牌
  47 + */
  48 + private String jwtToken;
  49 +
  50 +
  51 + /**
  52 + * 无参,构造方法
  53 + */
  54 + public ResultJson()
  55 + {
  56 + }
  57 +
  58 +
  59 + /**
  60 + * 定义有参构造器
  61 + *
  62 + * @param code 响应状态
  63 + * @param msg 响应消息
  64 + */
  65 + public ResultJson(String code, String msg)
  66 + {
  67 + this.code = code;
  68 + this.msg = msg;
  69 + }
  70 +
  71 + /**
  72 + * 定义有参构造器
  73 + *
  74 + * @param code 响应状态
  75 + * @param msg 响应消息
  76 + * @param data 响应数据
  77 + */
  78 + public ResultJson(String code, String msg, T data)
  79 + {
  80 + this.code = code;
  81 + this.msg = msg;
  82 + this.data = data;
  83 + }
  84 +
  85 + public ResultJson(String code, String msg, T data, Integer total)
  86 + {
  87 + this.code = code;
  88 + this.msg = msg;
  89 + this.data = data;
  90 + this.total = total;
  91 + }
  92 +
  93 + /**
  94 + * 定义静态、成功方法(重载)
  95 + *
  96 + * @return 成功(没有响应数据)
  97 + */
  98 + public static ResultJson success()
  99 + {
  100 + return new ResultJson<>("200", "success");
  101 + }
  102 +
  103 + public static ResultJson success(String msg)
  104 + {
  105 + return new ResultJson<>("200", msg);
  106 + }
  107 +
  108 +
  109 + /**
  110 + * 定义静态、成功方法(重载)
  111 + *
  112 + * @return 成功(响应数据)
  113 + */
  114 + public static ResultJson success(Object data)
  115 + {
  116 + return new ResultJson<>("200", "success", data);
  117 + }
  118 +
  119 + /**
  120 + * 定义静态、成功方法(重载)
  121 + *
  122 + * @return 成功(响应数据)
  123 + */
  124 + public static ResultJson success(String message, Object data)
  125 + {
  126 + return new ResultJson<>("200", message, data);
  127 + }
  128 +
  129 + public static ResultJson success(CustomExceptionType customExceptionType)
  130 + {
  131 + return new ResultJson<>(customExceptionType.getCode(), customExceptionType.getMsg());
  132 + }
  133 +
  134 + public static ResultJson success(CustomExceptionType customExceptionType, Object data)
  135 + {
  136 + return new ResultJson<>(customExceptionType.getCode(), customExceptionType.getMsg(), data);
  137 + }
  138 +
  139 + /**
  140 + * 请求出现异常时的响应数据封装
  141 + *
  142 + * @param e 自定义异常类
  143 + * @return 返回异常信息
  144 + */
  145 + public static ResultJson error(CustomException e)
  146 + {
  147 + ResultJson result = new ResultJson<>();
  148 + result.setCode(e.getCode());
  149 + if (e.getCode() == CustomExceptionType.CLIENT_ERROR.getCode()) {
  150 + result.setMsg(e.getMessage());
  151 + } else if (e.getCode() == CustomExceptionType.SYSTEM_ERROR.getCode()) {
  152 + result.setMsg(e.getMessage() + ";请将该异常发送给管理员");
  153 + } else {
  154 + result.setMsg("系统出现未知异常,请联系管理员!");
  155 + }
  156 + // 可以尝试着做异常信息持久化
  157 + return result;
  158 + }
  159 +
  160 + public static ResultJson error(CustomExceptionType customExceptionType, String errorMessage)
  161 + {
  162 + return new ResultJson<>(customExceptionType.getCode(), errorMessage);
  163 + }
  164 +
  165 + public static ResultJson error(CustomExceptionType customExceptionType)
  166 + {
  167 + return new ResultJson<>(customExceptionType.getCode(), customExceptionType.getMsg());
  168 + }
  169 +
  170 + public static ResultJson error(String code, String msg)
  171 + {
  172 + return new ResultJson<>(code, msg);
  173 + }
  174 +}
  1 +package com.sunyo.wlpt.vehicle.manage.service;
  2 +
  3 +import com.github.pagehelper.PageInfo;
  4 +import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord;
  5 +import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
  6 +
  7 +/**
  8 + * @author 子诚
  9 + * Description:
  10 + * 时间:2020/9/22 17:45
  11 + */
  12 +public interface LandRoadVeRecordService {
  13 +
  14 +
  15 + /**
  16 + * delete by primary key
  17 + *
  18 + * @param id primaryKey
  19 + * @return deleteCount
  20 + */
  21 + ResultJson deleteByPrimaryKey(String id);
  22 +
  23 + /**
  24 + * insert record to table
  25 + *
  26 + * @param record the record
  27 + * @return insert count
  28 + */
  29 + int insert(LandRoadVeRecord record);
  30 +
  31 + /**
  32 + * insert record to table selective
  33 + *
  34 + * @param record the record
  35 + * @return insert count
  36 + */
  37 + ResultJson insertSelective(LandRoadVeRecord record);
  38 +
  39 + /**
  40 + * select by primary key
  41 + *
  42 + * @param id primary key
  43 + * @return object by primary key
  44 + */
  45 + LandRoadVeRecord selectByPrimaryKey(String id);
  46 +
  47 + /**
  48 + * update record selective
  49 + *
  50 + * @param record the updated record
  51 + * @return update count
  52 + */
  53 + ResultJson updateByPrimaryKeySelective(LandRoadVeRecord record);
  54 +
  55 + /**
  56 + * update record
  57 + *
  58 + * @param record the updated record
  59 + * @return update count
  60 + */
  61 + int updateByPrimaryKey(LandRoadVeRecord record);
  62 +
  63 + /**
  64 + * 分页查询车辆信息
  65 + *
  66 + * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
  67 + * @param pageNum 当前页数
  68 + * @param pageSize 每页大小
  69 + * @return 分页数据
  70 + */
  71 + ResultJson selectListByPage(LandRoadVeRecord landRoadVeRecord, Integer pageNum, Integer pageSize);
  72 +
  73 + /**
  74 + * 批量删除车辆信息
  75 + *
  76 + * @param ids 被删除的id,多个以,相隔的字符串
  77 + * @return
  78 + */
  79 + ResultJson batchRemoveByIds(String ids);
  80 +}
  1 +package com.sunyo.wlpt.vehicle.manage.service.impl;
  2 +
  3 +import com.github.pagehelper.PageHelper;
  4 +import com.github.pagehelper.PageInfo;
  5 +import com.sunyo.wlpt.vehicle.manage.common.Common;
  6 +import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
  7 +import com.sunyo.wlpt.vehicle.manage.utils.IdUtils;
  8 +import io.netty.util.internal.StringUtil;
  9 +import org.springframework.stereotype.Service;
  10 +
  11 +import javax.annotation.Resource;
  12 +
  13 +import com.sunyo.wlpt.vehicle.manage.mapper.LandRoadVeRecordMapper;
  14 +import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord;
  15 +import com.sunyo.wlpt.vehicle.manage.service.LandRoadVeRecordService;
  16 +
  17 +import java.util.List;
  18 +
  19 +/**
  20 + * @author 子诚
  21 + * Description:
  22 + * 时间:2020/9/22 17:45
  23 + */
  24 +@Service
  25 +public class LandRoadVeRecordServiceImpl implements LandRoadVeRecordService {
  26 +
  27 + @Resource
  28 + private LandRoadVeRecordMapper landRoadVeRecordMapper;
  29 +
  30 + @Override
  31 + public ResultJson deleteByPrimaryKey(String id)
  32 + {
  33 + return landRoadVeRecordMapper.deleteByPrimaryKey(id) > 0
  34 + ? new ResultJson<>("200", "删除车辆信息,成功!")
  35 + : new ResultJson<>("500", "删除车辆信息,失败!");
  36 + }
  37 +
  38 + /**
  39 + * 批量删除
  40 + *
  41 + * @param ids 被删除的id,多个以,相隔的字符串
  42 + * @return
  43 + */
  44 + @Override
  45 + public ResultJson batchRemoveByIds(String ids)
  46 + {
  47 + String[] idList = ids.split(",");
  48 + return landRoadVeRecordMapper.batchRemoveByIds(idList) > 0
  49 + ? new ResultJson<>("200", "批量删除车辆信息,成功")
  50 + : new ResultJson<>("500", "批量删除车辆信息,失败");
  51 + }
  52 +
  53 + @Override
  54 + public int insert(LandRoadVeRecord record)
  55 + {
  56 + return landRoadVeRecordMapper.insert(record);
  57 + }
  58 +
  59 + /**
  60 + * 新增
  61 + *
  62 + * @param record the record
  63 + * @return
  64 + */
  65 + @Override
  66 + public ResultJson insertSelective(LandRoadVeRecord record)
  67 + {
  68 + ResultJson validateAdd = validate(record);
  69 + if (!Common.RESULT_SUCCESS.equals(validateAdd.getCode())) {
  70 + return validateAdd;
  71 + }
  72 + record.setId(IdUtils.generateId());
  73 + return landRoadVeRecordMapper.insertSelective(record) > 0
  74 + ? new ResultJson<>("200", "添加车辆信息,成功")
  75 + : new ResultJson<>("500", "添加车辆信息,失败");
  76 + }
  77 +
  78 + @Override
  79 + public LandRoadVeRecord selectByPrimaryKey(String id)
  80 + {
  81 + return landRoadVeRecordMapper.selectByPrimaryKey(id);
  82 + }
  83 +
  84 + /**
  85 + * 选择性编辑,By 主键
  86 + *
  87 + * @param record the updated record
  88 + * @return
  89 + */
  90 + @Override
  91 + public ResultJson updateByPrimaryKeySelective(LandRoadVeRecord record)
  92 + {
  93 + ResultJson validateEdit = validate(record);
  94 + if (!Common.RESULT_SUCCESS.equals(validateEdit.getCode())) {
  95 + return validateEdit;
  96 + }
  97 + return landRoadVeRecordMapper.updateByPrimaryKeySelective(record) > 0
  98 + ? new ResultJson<>("200", "编辑车辆信息,成功")
  99 + : new ResultJson<>("500", "编辑车辆信息,失败");
  100 + }
  101 +
  102 + @Override
  103 + public int updateByPrimaryKey(LandRoadVeRecord record)
  104 + {
  105 + return landRoadVeRecordMapper.updateByPrimaryKey(record);
  106 + }
  107 +
  108 + /**
  109 + * 使用 PageHelper 插件,实现分页查询
  110 + *
  111 + * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
  112 + * @param pageNum 当前页数
  113 + * @param pageSize 每页大小
  114 + * @return
  115 + */
  116 + @Override
  117 + public ResultJson selectListByPage(LandRoadVeRecord landRoadVeRecord, Integer pageNum, Integer pageSize)
  118 + {
  119 + PageHelper.startPage(pageNum, pageSize);
  120 + List<LandRoadVeRecord> landRoadVeRecordList = landRoadVeRecordMapper.selectListByPage(landRoadVeRecord);
  121 + PageInfo<LandRoadVeRecord> pageInfo = new PageInfo<>(landRoadVeRecordList);
  122 + return pageInfo.getTotal() >= 0
  123 + ? new ResultJson<>("200", "查询车辆信息列表,成功!", pageInfo)
  124 + : new ResultJson<>("500", "查询车辆信息列表,失败!");
  125 + }
  126 +
  127 + /**
  128 + * 新增 or 编辑
  129 + * 校验,国内车牌号唯一
  130 + *
  131 + * @param landRoadVeRecord {@link LandRoadVeRecord}
  132 + * @return
  133 + */
  134 + private ResultJson validate(LandRoadVeRecord landRoadVeRecord)
  135 + {
  136 + String id = landRoadVeRecord.getId();
  137 + String domesticLisenceNo = landRoadVeRecord.getDomesticLisenceNo();
  138 +
  139 + if (StringUtil.isNullOrEmpty(domesticLisenceNo)) {
  140 + return new ResultJson<>("400", "国内车牌号,不能为空!");
  141 + }
  142 + return StringUtil.isNullOrEmpty(id) ? validateInsert(domesticLisenceNo) : validateEdit(id, domesticLisenceNo);
  143 + }
  144 +
  145 + /**
  146 + * 编辑,检验
  147 + *
  148 + * @param id 主键
  149 + * @param domesticLisenceNo 国内车牌号
  150 + * @return
  151 + */
  152 + private ResultJson validateEdit(String id, String domesticLisenceNo)
  153 + {
  154 + LandRoadVeRecord oldVe = landRoadVeRecordMapper.selectByDomesticLisenceNo(id);
  155 + if (oldVe == null) {
  156 + return new ResultJson<>("400", "该车辆信息不存在");
  157 + }
  158 + if (!domesticLisenceNo.equals(oldVe.getDomesticLisenceNo())) {
  159 + if (landRoadVeRecordMapper.selectByDomesticLisenceNo(domesticLisenceNo) != null) {
  160 + return new ResultJson<>("400", "该车辆信息,已存在");
  161 + }
  162 + }
  163 + return ResultJson.success("校验通过");
  164 + }
  165 +
  166 + /**
  167 + * 新增,校验
  168 + * 国内车牌号,是否存在
  169 + *
  170 + * @param domesticLisenceNo 国内车牌号
  171 + * @return
  172 + */
  173 + private ResultJson validateInsert(String domesticLisenceNo)
  174 + {
  175 + LandRoadVeRecord landRoadVeRecord = landRoadVeRecordMapper.selectByDomesticLisenceNo(domesticLisenceNo);
  176 + if (landRoadVeRecord == null) {
  177 + ResultJson.error("400", "校验失败");
  178 + }
  179 + return ResultJson.success("校验通过");
  180 + }
  181 +}
  1 +package com.sunyo.wlpt.vehicle.manage.utils;
  2 +
  3 +/**
  4 + * @author 子诚
  5 + * Description:生成雪花算法唯一id
  6 + * 时间:2020/7/1 9:26
  7 + */
  8 +public class IdUtils {
  9 + /**
  10 + * 静态工具类
  11 + *
  12 + * @return id
  13 + */
  14 + public static synchronized String generateId() {
  15 + IdWorker idWorker = new IdWorker();
  16 + long nextId = idWorker.nextId();
  17 + String id = String.valueOf(nextId);
  18 + return id;
  19 + }
  20 +
  21 + public static void main(String[] args) {
  22 + System.out.println(com.sunyo.wlpt.vehicle.manage.utils.IdUtils.generateId());
  23 + System.out.println(com.sunyo.wlpt.vehicle.manage.utils.IdUtils.generateId().length());
  24 + }
  25 +}
  1 +package com.sunyo.wlpt.vehicle.manage.utils;
  2 +
  3 +import java.lang.management.ManagementFactory;
  4 +import java.net.InetAddress;
  5 +import java.net.NetworkInterface;
  6 +
  7 +/**
  8 + * @author 子诚
  9 + * Description:雪花算法生成唯一ID
  10 + * 时间:2020/6/30 19:19
  11 + */
  12 +public final class IdWorker {
  13 +
  14 + /**
  15 + * 时间起始标记点,作为基准,一般取系统的最近时间(一旦确定不能变动)
  16 + */
  17 + private final static long TWEPOCH = 1288834974657L;
  18 +
  19 + /**
  20 + * 机器标识位数
  21 + */
  22 + private final static long WORKER_ID_BITS = 5L;
  23 +
  24 + /**
  25 + * 数据中心标识位数
  26 + */
  27 + private final static long DATA_CENTER_ID_BITS = 5L;
  28 +
  29 + /**
  30 + * 机器ID最大值
  31 + */
  32 + private final static long MAX_WORKER_ID = ~(-1L << WORKER_ID_BITS);
  33 +
  34 + /**
  35 + * 数据中心ID最大值
  36 + */
  37 + private final static long MAX_DATA_CENTER_ID = ~(-1L << DATA_CENTER_ID_BITS);
  38 +
  39 + /**
  40 + * 毫秒内自增位
  41 + */
  42 + private final static long SEQUENCE_BITS = 12L;
  43 +
  44 + /**
  45 + * 机器ID偏左移12位
  46 + */
  47 + private final static long WORKER_ID_SHIFT = SEQUENCE_BITS;
  48 +
  49 + /**
  50 + * 数据中心ID左移17位
  51 + */
  52 + private final static long DATA_CENTER_ID_SHIFT = SEQUENCE_BITS + WORKER_ID_BITS;
  53 +
  54 + /**
  55 + * 时间毫秒左移22位
  56 + */
  57 + private final static long TIME_STAMP_LEFT_SHIFT = SEQUENCE_BITS + WORKER_ID_BITS + DATA_CENTER_ID_BITS;
  58 +
  59 + private final static long SEQUENCE_MASK = ~(-1L << SEQUENCE_BITS);
  60 +
  61 + /**
  62 + * 上次生产id时间戳
  63 + */
  64 + private static long LAST_TIME_STAMP = -1L;
  65 +
  66 + /**
  67 + * 0,并发控制
  68 + */
  69 + private long sequence = 0L;
  70 +
  71 + private final long workerId;
  72 +
  73 + /**
  74 + * 数据标识id部分
  75 + */
  76 + private final long DATA_CENTER_ID;
  77 +
  78 + public IdWorker() {
  79 + this.DATA_CENTER_ID = getDatacenterId(MAX_DATA_CENTER_ID);
  80 + this.workerId = getMaxWorkerId(DATA_CENTER_ID, MAX_WORKER_ID);
  81 + }
  82 +
  83 + public IdWorker(long workerId, long datacenterId) {
  84 + if (workerId > MAX_WORKER_ID || workerId < 0) {
  85 + throw new IllegalArgumentException(String.format("id不能大于最大值 %d 或者小于 0", MAX_WORKER_ID));
  86 + }
  87 + if (datacenterId > MAX_DATA_CENTER_ID || datacenterId < 0) {
  88 + throw new IllegalArgumentException(String.format("数据中心id不能大于最大值 %d 或者小于 0", MAX_DATA_CENTER_ID));
  89 + }
  90 + this.workerId = workerId;
  91 + this.DATA_CENTER_ID = datacenterId;
  92 + }
  93 +
  94 + /**
  95 + * 获取下一个ID
  96 + *
  97 + * @return id
  98 + */
  99 + public synchronized long nextId() {
  100 + long timestamp = timeGen();
  101 + if (timestamp < LAST_TIME_STAMP) {
  102 + throw new RuntimeException(String.format("时间生成异常 %d", LAST_TIME_STAMP - timestamp));
  103 + }
  104 +
  105 + if (LAST_TIME_STAMP == timestamp) {
  106 + // 当前毫秒内,则+1
  107 + sequence = (sequence + 1) & SEQUENCE_MASK;
  108 + if (sequence == 0) {
  109 + // 当前毫秒内计数满了,则等待下一秒
  110 + timestamp = tilNextMillis(LAST_TIME_STAMP);
  111 + }
  112 + } else {
  113 + sequence = 0L;
  114 + }
  115 + LAST_TIME_STAMP = timestamp;
  116 + // ID偏移组合生成最终的ID,并返回ID
  117 +
  118 + return ((timestamp - TWEPOCH) << TIME_STAMP_LEFT_SHIFT)
  119 + | (DATA_CENTER_ID << DATA_CENTER_ID_SHIFT)
  120 + | (workerId << WORKER_ID_SHIFT) | sequence;
  121 + }
  122 +
  123 + private long tilNextMillis(final long lastTimestamp) {
  124 + long timestamp = this.timeGen();
  125 + while (timestamp <= lastTimestamp) {
  126 + timestamp = this.timeGen();
  127 + }
  128 + return timestamp;
  129 + }
  130 +
  131 + private long timeGen() {
  132 + return System.currentTimeMillis();
  133 + }
  134 +
  135 + /**
  136 + * <p>
  137 + * 获取 maxWorkerId
  138 + * </p>
  139 + */
  140 + private static long getMaxWorkerId(long dataCenterId, long maxWorkerId) {
  141 + StringBuilder mpid = new StringBuilder();
  142 + mpid.append(dataCenterId);
  143 + String name = ManagementFactory.getRuntimeMXBean().getName();
  144 + if (!name.isEmpty()) {
  145 + /*
  146 + * GET jvmPid
  147 + */
  148 + mpid.append(name.split("@")[0]);
  149 + }
  150 + /*
  151 + * MAC + PID 的 hashcode 获取16个低位
  152 + */
  153 + return (mpid.toString().hashCode() & 0xffff) % (maxWorkerId + 1);
  154 + }
  155 +
  156 + /**
  157 + * <p>
  158 + * 数据标识id部分
  159 + * </p>
  160 + */
  161 + private static long getDatacenterId(long maxDatacenterId) {
  162 + long id = 0L;
  163 + try {
  164 + InetAddress ip = InetAddress.getLocalHost();
  165 + NetworkInterface network = NetworkInterface.getByInetAddress(ip);
  166 + if (network == null) {
  167 + id = 1L;
  168 + } else {
  169 + byte[] mac = network.getHardwareAddress();
  170 + id = ((0x000000FF & (long) mac[mac.length - 1])
  171 + | (0x0000FF00 & (((long) mac[mac.length - 2]) << 8))) >> 6;
  172 + id = id % (maxDatacenterId + 1);
  173 + }
  174 + } catch (Exception e) {
  175 + System.out.println(" getDatacenterId: " + e.getMessage());
  176 + }
  177 + return id;
  178 + }
  179 +
  180 + /**
  181 + * 静态工具类
  182 + *
  183 + * @return id
  184 +
  185 + public static synchronized String generateId() {
  186 + String id = String.valueOf(new IdWorker().nextId());
  187 + return id;
  188 + }
  189 + */
  190 + /**
  191 + * 测试
  192 +
  193 + public static void main(String[] args) {
  194 + System.out.println("当前时间戳:" + System.currentTimeMillis());
  195 + for (int i = 0; i < 10; i++) {
  196 + //生成唯一雪花id
  197 + String id = IdWorker.generateId();
  198 + System.out.println("第" + i + "个:" + id + ";长度为:" + id.length());
  199 + }
  200 + }
  201 + */
  202 +}
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.sunyo.wlpt.vehicle.manage.mapper.LandRoadVeRecordMapper">
  4 + <cache type="com.sunyo.wlpt.vehicle.manage.cache.RedisCache"/>
  5 + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord">
  6 + <!--@mbg.generated-->
  7 + <!--@Table land_road_ve_record-->
  8 + <id column="ID" jdbcType="VARCHAR" property="id"/>
  9 + <result column="EPORT_ID" jdbcType="VARCHAR" property="eportId"/>
  10 + <result column="MAIN_PORT" jdbcType="VARCHAR" property="mainPort"/>
  11 + <result column="CO_CODE" jdbcType="VARCHAR" property="coCode"/>
  12 + <result column="VE_TARGET_NO" jdbcType="VARCHAR" property="veTargetNo"/>
  13 + <result column="DOMESTIC_LISENCE_NO" jdbcType="VARCHAR" property="domesticLisenceNo"/>
  14 + <result column="DOMESTIC_LICENSE_COLOR" jdbcType="VARCHAR" property="domesticLicenseColor"/>
  15 + <result column="FOREIGN_LICENSE" jdbcType="VARCHAR" property="foreignLicense"/>
  16 + <result column="VE_REG_PLACE" jdbcType="VARCHAR" property="veRegPlace"/>
  17 + <result column="VE_PROPERTY" jdbcType="VARCHAR" property="veProperty"/>
  18 + <result column="VE_CONVEY_QUA" jdbcType="VARCHAR" property="veConveyQua"/>
  19 + <result column="VE_CARD_NO" jdbcType="VARCHAR" property="veCardNo"/>
  20 + <result column="VE_OWNER_NAME" jdbcType="VARCHAR" property="veOwnerName"/>
  21 + <result column="VE_OWNER_NO" jdbcType="VARCHAR" property="veOwnerNo"/>
  22 + <result column="OWNER_INSIDE_ADDR" jdbcType="VARCHAR" property="ownerInsideAddr"/>
  23 + <result column="OWNER_INSIDE_TEL" jdbcType="VARCHAR" property="ownerInsideTel"/>
  24 + <result column="VE_TYPE" jdbcType="VARCHAR" property="veType"/>
  25 + <result column="BRAND" jdbcType="VARCHAR" property="brand"/>
  26 + <result column="MODEL" jdbcType="VARCHAR" property="model"/>
  27 + <result column="EXHAUST_CAPACITY" jdbcType="VARCHAR" property="exhaustCapacity"/>
  28 + <result column="VE_FACTORY_DATE" jdbcType="DATE" property="veFactoryDate"/>
  29 + <result column="VE_MOTOR_NO" jdbcType="VARCHAR" property="veMotorNo"/>
  30 + <result column="VE_FRAME_NO" jdbcType="VARCHAR" property="veFrameNo"/>
  31 + <result column="VE_TON" jdbcType="VARCHAR" property="veTon"/>
  32 + <result column="SELF_WT" jdbcType="VARCHAR" property="selfWt"/>
  33 + <result column="ALLOW_TOW_TOTAL_WT" jdbcType="VARCHAR" property="allowTowTotalWt"/>
  34 + <result column="CONTAINER_INNER_LENGTH" jdbcType="VARCHAR" property="containerInnerLength"/>
  35 + <result column="CONTAINER_INNER_WIDTH" jdbcType="VARCHAR" property="containerInnerWidth"/>
  36 + <result column="CONTAINER_INNER_HEIGHT" jdbcType="VARCHAR" property="containerInnerHeight"/>
  37 + <result column="OUTER_LENGTH" jdbcType="VARCHAR" property="outerLength"/>
  38 + <result column="OUTER_WIDTH" jdbcType="VARCHAR" property="outerWidth"/>
  39 + <result column="OUTER_HEIGHT" jdbcType="VARCHAR" property="outerHeight"/>
  40 + <result column="VE_BODY_COLOR" jdbcType="VARCHAR" property="veBodyColor"/>
  41 + <result column="OIL_BOX_CAPCITY" jdbcType="VARCHAR" property="oilBoxCapcity"/>
  42 + <result column="ALLOW_VE_IE_PORT" jdbcType="VARCHAR" property="allowVeIePort"/>
  43 + <result column="APPR_NO" jdbcType="VARCHAR" property="apprNo"/>
  44 + <result column="APPR_PERIOD" jdbcType="DATE" property="apprPeriod"/>
  45 + <result column="CURR_APPLY_BUSSINESS" jdbcType="VARCHAR" property="currApplyBussiness"/>
  46 + <result column="FRONT_45C_PIC" jdbcType="VARCHAR" property="front45cPic"/>
  47 + <result column="BACK_45C_PIC" jdbcType="VARCHAR" property="back45cPic"/>
  48 + <result column="OIL_BOX_PIC" jdbcType="VARCHAR" property="oilBoxPic"/>
  49 + <result column="VE_BOTTOM_PIC" jdbcType="VARCHAR" property="veBottomPic"/>
  50 + <result column="MEMO" jdbcType="VARCHAR" property="memo"/>
  51 + <result column="PROPOSER" jdbcType="VARCHAR" property="proposer"/>
  52 + <result column="PROPOSE_TIME" jdbcType="TIMESTAMP" property="proposeTime"/>
  53 + <result column="VE_CLASS_FLAG" jdbcType="VARCHAR" property="veClassFlag"/>
  54 + <result column="OPERATION_TYPE" jdbcType="VARCHAR" property="operationType"/>
  55 + <result column="TRAILER_LICENSE_NO" jdbcType="VARCHAR" property="trailerLicenseNo"/>
  56 + <result column="TRAILER_FRAME_NO" jdbcType="VARCHAR" property="trailerFrameNo"/>
  57 + <result column="APPRO_NO_PIC" jdbcType="VARCHAR" property="approNoPic"/>
  58 + <result column="VE_FRAME_NO_PIC" jdbcType="VARCHAR" property="veFrameNoPic"/>
  59 + <result column="MOTOR_NO_PIC" jdbcType="VARCHAR" property="motorNoPic"/>
  60 + <result column="FOREIGN_LICENSE_PIC" jdbcType="VARCHAR" property="foreignLicensePic"/>
  61 + <result column="NATIONALITY" jdbcType="VARCHAR" property="nationality"/>
  62 + <result column="RETURNMESSAGE" jdbcType="VARCHAR" property="returnmessage"/>
  63 + <result column="BARCODE" jdbcType="VARCHAR" property="barcode"/>
  64 + <result column="CREATE_BY" jdbcType="VARCHAR" property="createBy"/>
  65 + <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
  66 + <result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy"/>
  67 + <result column="UPDATE_DATE" jdbcType="TIMESTAMP" property="updateDate"/>
  68 + <result column="VE_FREE_TIME" jdbcType="TIMESTAMP" property="veFreeTime"/>
  69 + <result column="VE_PRIORITY" jdbcType="INTEGER" property="vePriority"/>
  70 + <result column="VE_STATE" jdbcType="VARCHAR" property="veState"/>
  71 + </resultMap>
  72 + <sql id="Base_Column_List">
  73 + <!--@mbg.generated-->
  74 + ID, EPORT_ID, MAIN_PORT, CO_CODE, VE_TARGET_NO, DOMESTIC_LISENCE_NO, DOMESTIC_LICENSE_COLOR,
  75 + FOREIGN_LICENSE, VE_REG_PLACE, VE_PROPERTY, VE_CONVEY_QUA, VE_CARD_NO, VE_OWNER_NAME,
  76 + VE_OWNER_NO, OWNER_INSIDE_ADDR, OWNER_INSIDE_TEL, VE_TYPE, BRAND, MODEL, EXHAUST_CAPACITY,
  77 + VE_FACTORY_DATE, VE_MOTOR_NO, VE_FRAME_NO, VE_TON, SELF_WT, ALLOW_TOW_TOTAL_WT, CONTAINER_INNER_LENGTH,
  78 + CONTAINER_INNER_WIDTH, CONTAINER_INNER_HEIGHT, OUTER_LENGTH, OUTER_WIDTH, OUTER_HEIGHT,
  79 + VE_BODY_COLOR, OIL_BOX_CAPCITY, ALLOW_VE_IE_PORT, APPR_NO, APPR_PERIOD, CURR_APPLY_BUSSINESS,
  80 + FRONT_45C_PIC, BACK_45C_PIC, OIL_BOX_PIC, VE_BOTTOM_PIC, MEMO, PROPOSER, PROPOSE_TIME,
  81 + VE_CLASS_FLAG, OPERATION_TYPE, TRAILER_LICENSE_NO, TRAILER_FRAME_NO, APPRO_NO_PIC,
  82 + VE_FRAME_NO_PIC, MOTOR_NO_PIC, FOREIGN_LICENSE_PIC, NATIONALITY, RETURNMESSAGE, BARCODE,
  83 + CREATE_BY, CREATE_DATE, UPDATE_BY, UPDATE_DATE, VE_FREE_TIME, VE_PRIORITY, VE_STATE
  84 + </sql>
  85 + <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  86 + <!--@mbg.generated-->
  87 + select
  88 + <include refid="Base_Column_List"/>
  89 + from land_road_ve_record
  90 + where ID = #{id,jdbcType=VARCHAR}
  91 + </select>
  92 + <select id="selectByDomesticLisenceNo" parameterType="java.lang.String" resultMap="BaseResultMap">
  93 + select
  94 + <include refid="Base_Column_List"/>
  95 + from land_road_ve_record
  96 + where DOMESTIC_LISENCE_NO = #{domesticLisenceNo,jdbcType=VARCHAR}
  97 +</select>
  98 + <!-- 用于,分页查询 -->
  99 + <select id="selectListByPage" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord" resultMap="BaseResultMap">
  100 + select
  101 + <include refid="Base_Column_List"/>
  102 + from land_road_ve_record
  103 + <where>
  104 + <!-- 国内车牌号 -->
  105 + <if test="domesticLisenceNo != null and domesticLisenceNo != ''">
  106 + DOMESTIC_LISENCE_NO = #{domesticLisenceNo,jdbcType=VARCHAR}
  107 + </if>
  108 + <!-- 车辆类型 -->
  109 + <if test="veType != null and veType != ''">
  110 + AND VE_TYPE = #{veType,jdbcType=VARCHAR}
  111 + </if>
  112 + <!-- 车辆状态 -->
  113 + <if test="veState != null and veState != ''">
  114 + AND VE_STATE = #{veState,jdbcType=VARCHAR}
  115 + </if>
  116 + </where>
  117 + </select>
  118 + <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  119 + <!--@mbg.generated-->
  120 + delete
  121 + from land_road_ve_record
  122 + where ID = #{id,jdbcType=VARCHAR}
  123 + </delete>
  124 +
  125 + <delete id="batchRemoveByIds" parameterType="java.lang.String">
  126 + <!--@mbg.generated-->
  127 + delete
  128 + from land_road_ve_record
  129 + where ID in
  130 + <foreach collection="array" open="(" close=")" separator="," item="id">
  131 + #{id,jdbcType=VARCHAR}
  132 + </foreach>
  133 + </delete>
  134 +
  135 + <insert id="insert" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord">
  136 + <!--@mbg.generated-->
  137 + insert into land_road_ve_record (ID, EPORT_ID, MAIN_PORT,
  138 + CO_CODE, VE_TARGET_NO, DOMESTIC_LISENCE_NO,
  139 + DOMESTIC_LICENSE_COLOR, FOREIGN_LICENSE, VE_REG_PLACE,
  140 + VE_PROPERTY, VE_CONVEY_QUA, VE_CARD_NO,
  141 + VE_OWNER_NAME, VE_OWNER_NO, OWNER_INSIDE_ADDR,
  142 + OWNER_INSIDE_TEL, VE_TYPE, BRAND,
  143 + MODEL, EXHAUST_CAPACITY, VE_FACTORY_DATE,
  144 + VE_MOTOR_NO, VE_FRAME_NO, VE_TON,
  145 + SELF_WT, ALLOW_TOW_TOTAL_WT, CONTAINER_INNER_LENGTH,
  146 + CONTAINER_INNER_WIDTH, CONTAINER_INNER_HEIGHT,
  147 + OUTER_LENGTH, OUTER_WIDTH, OUTER_HEIGHT,
  148 + VE_BODY_COLOR, OIL_BOX_CAPCITY, ALLOW_VE_IE_PORT,
  149 + APPR_NO, APPR_PERIOD, CURR_APPLY_BUSSINESS,
  150 + FRONT_45C_PIC, BACK_45C_PIC, OIL_BOX_PIC,
  151 + VE_BOTTOM_PIC, MEMO, PROPOSER,
  152 + PROPOSE_TIME, VE_CLASS_FLAG, OPERATION_TYPE,
  153 + TRAILER_LICENSE_NO, TRAILER_FRAME_NO, APPRO_NO_PIC,
  154 + VE_FRAME_NO_PIC, MOTOR_NO_PIC, FOREIGN_LICENSE_PIC,
  155 + NATIONALITY, RETURNMESSAGE, BARCODE,
  156 + CREATE_BY, CREATE_DATE, UPDATE_BY,
  157 + UPDATE_DATE, VE_FREE_TIME, VE_PRIORITY,
  158 + VE_STATE)
  159 + values (#{id,jdbcType=VARCHAR}, #{eportId,jdbcType=VARCHAR}, #{mainPort,jdbcType=VARCHAR},
  160 + #{coCode,jdbcType=VARCHAR}, #{veTargetNo,jdbcType=VARCHAR}, #{domesticLisenceNo,jdbcType=VARCHAR},
  161 + #{domesticLicenseColor,jdbcType=VARCHAR}, #{foreignLicense,jdbcType=VARCHAR}, #{veRegPlace,jdbcType=VARCHAR},
  162 + #{veProperty,jdbcType=VARCHAR}, #{veConveyQua,jdbcType=VARCHAR}, #{veCardNo,jdbcType=VARCHAR},
  163 + #{veOwnerName,jdbcType=VARCHAR}, #{veOwnerNo,jdbcType=VARCHAR}, #{ownerInsideAddr,jdbcType=VARCHAR},
  164 + #{ownerInsideTel,jdbcType=VARCHAR}, #{veType,jdbcType=VARCHAR}, #{brand,jdbcType=VARCHAR},
  165 + #{model,jdbcType=VARCHAR}, #{exhaustCapacity,jdbcType=VARCHAR}, #{veFactoryDate,jdbcType=DATE},
  166 + #{veMotorNo,jdbcType=VARCHAR}, #{veFrameNo,jdbcType=VARCHAR}, #{veTon,jdbcType=VARCHAR},
  167 + #{selfWt,jdbcType=VARCHAR}, #{allowTowTotalWt,jdbcType=VARCHAR}, #{containerInnerLength,jdbcType=VARCHAR},
  168 + #{containerInnerWidth,jdbcType=VARCHAR}, #{containerInnerHeight,jdbcType=VARCHAR},
  169 + #{outerLength,jdbcType=VARCHAR}, #{outerWidth,jdbcType=VARCHAR}, #{outerHeight,jdbcType=VARCHAR},
  170 + #{veBodyColor,jdbcType=VARCHAR}, #{oilBoxCapcity,jdbcType=VARCHAR}, #{allowVeIePort,jdbcType=VARCHAR},
  171 + #{apprNo,jdbcType=VARCHAR}, #{apprPeriod,jdbcType=DATE}, #{currApplyBussiness,jdbcType=VARCHAR},
  172 + #{front45cPic,jdbcType=VARCHAR}, #{back45cPic,jdbcType=VARCHAR}, #{oilBoxPic,jdbcType=VARCHAR},
  173 + #{veBottomPic,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR}, #{proposer,jdbcType=VARCHAR},
  174 + #{proposeTime,jdbcType=TIMESTAMP}, #{veClassFlag,jdbcType=VARCHAR}, #{operationType,jdbcType=VARCHAR},
  175 + #{trailerLicenseNo,jdbcType=VARCHAR}, #{trailerFrameNo,jdbcType=VARCHAR}, #{approNoPic,jdbcType=VARCHAR},
  176 + #{veFrameNoPic,jdbcType=VARCHAR}, #{motorNoPic,jdbcType=VARCHAR}, #{foreignLicensePic,jdbcType=VARCHAR},
  177 + #{nationality,jdbcType=VARCHAR}, #{returnmessage,jdbcType=VARCHAR}, #{barcode,jdbcType=VARCHAR},
  178 + #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
  179 + #{updateDate,jdbcType=TIMESTAMP}, #{veFreeTime,jdbcType=TIMESTAMP}, #{vePriority,jdbcType=INTEGER},
  180 + #{veState,jdbcType=VARCHAR})
  181 + </insert>
  182 + <insert id="insertSelective" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord">
  183 + <!--@mbg.generated-->
  184 + insert into land_road_ve_record
  185 + <trim prefix="(" suffix=")" suffixOverrides=",">
  186 + <if test="id != null">
  187 + ID,
  188 + </if>
  189 + <if test="eportId != null">
  190 + EPORT_ID,
  191 + </if>
  192 + <if test="mainPort != null">
  193 + MAIN_PORT,
  194 + </if>
  195 + <if test="coCode != null">
  196 + CO_CODE,
  197 + </if>
  198 + <if test="veTargetNo != null">
  199 + VE_TARGET_NO,
  200 + </if>
  201 + <if test="domesticLisenceNo != null">
  202 + DOMESTIC_LISENCE_NO,
  203 + </if>
  204 + <if test="domesticLicenseColor != null">
  205 + DOMESTIC_LICENSE_COLOR,
  206 + </if>
  207 + <if test="foreignLicense != null">
  208 + FOREIGN_LICENSE,
  209 + </if>
  210 + <if test="veRegPlace != null">
  211 + VE_REG_PLACE,
  212 + </if>
  213 + <if test="veProperty != null">
  214 + VE_PROPERTY,
  215 + </if>
  216 + <if test="veConveyQua != null">
  217 + VE_CONVEY_QUA,
  218 + </if>
  219 + <if test="veCardNo != null">
  220 + VE_CARD_NO,
  221 + </if>
  222 + <if test="veOwnerName != null">
  223 + VE_OWNER_NAME,
  224 + </if>
  225 + <if test="veOwnerNo != null">
  226 + VE_OWNER_NO,
  227 + </if>
  228 + <if test="ownerInsideAddr != null">
  229 + OWNER_INSIDE_ADDR,
  230 + </if>
  231 + <if test="ownerInsideTel != null">
  232 + OWNER_INSIDE_TEL,
  233 + </if>
  234 + <if test="veType != null">
  235 + VE_TYPE,
  236 + </if>
  237 + <if test="brand != null">
  238 + BRAND,
  239 + </if>
  240 + <if test="model != null">
  241 + MODEL,
  242 + </if>
  243 + <if test="exhaustCapacity != null">
  244 + EXHAUST_CAPACITY,
  245 + </if>
  246 + <if test="veFactoryDate != null">
  247 + VE_FACTORY_DATE,
  248 + </if>
  249 + <if test="veMotorNo != null">
  250 + VE_MOTOR_NO,
  251 + </if>
  252 + <if test="veFrameNo != null">
  253 + VE_FRAME_NO,
  254 + </if>
  255 + <if test="veTon != null">
  256 + VE_TON,
  257 + </if>
  258 + <if test="selfWt != null">
  259 + SELF_WT,
  260 + </if>
  261 + <if test="allowTowTotalWt != null">
  262 + ALLOW_TOW_TOTAL_WT,
  263 + </if>
  264 + <if test="containerInnerLength != null">
  265 + CONTAINER_INNER_LENGTH,
  266 + </if>
  267 + <if test="containerInnerWidth != null">
  268 + CONTAINER_INNER_WIDTH,
  269 + </if>
  270 + <if test="containerInnerHeight != null">
  271 + CONTAINER_INNER_HEIGHT,
  272 + </if>
  273 + <if test="outerLength != null">
  274 + OUTER_LENGTH,
  275 + </if>
  276 + <if test="outerWidth != null">
  277 + OUTER_WIDTH,
  278 + </if>
  279 + <if test="outerHeight != null">
  280 + OUTER_HEIGHT,
  281 + </if>
  282 + <if test="veBodyColor != null">
  283 + VE_BODY_COLOR,
  284 + </if>
  285 + <if test="oilBoxCapcity != null">
  286 + OIL_BOX_CAPCITY,
  287 + </if>
  288 + <if test="allowVeIePort != null">
  289 + ALLOW_VE_IE_PORT,
  290 + </if>
  291 + <if test="apprNo != null">
  292 + APPR_NO,
  293 + </if>
  294 + <if test="apprPeriod != null">
  295 + APPR_PERIOD,
  296 + </if>
  297 + <if test="currApplyBussiness != null">
  298 + CURR_APPLY_BUSSINESS,
  299 + </if>
  300 + <if test="front45cPic != null">
  301 + FRONT_45C_PIC,
  302 + </if>
  303 + <if test="back45cPic != null">
  304 + BACK_45C_PIC,
  305 + </if>
  306 + <if test="oilBoxPic != null">
  307 + OIL_BOX_PIC,
  308 + </if>
  309 + <if test="veBottomPic != null">
  310 + VE_BOTTOM_PIC,
  311 + </if>
  312 + <if test="memo != null">
  313 + MEMO,
  314 + </if>
  315 + <if test="proposer != null">
  316 + PROPOSER,
  317 + </if>
  318 + <if test="proposeTime != null">
  319 + PROPOSE_TIME,
  320 + </if>
  321 + <if test="veClassFlag != null">
  322 + VE_CLASS_FLAG,
  323 + </if>
  324 + <if test="operationType != null">
  325 + OPERATION_TYPE,
  326 + </if>
  327 + <if test="trailerLicenseNo != null">
  328 + TRAILER_LICENSE_NO,
  329 + </if>
  330 + <if test="trailerFrameNo != null">
  331 + TRAILER_FRAME_NO,
  332 + </if>
  333 + <if test="approNoPic != null">
  334 + APPRO_NO_PIC,
  335 + </if>
  336 + <if test="veFrameNoPic != null">
  337 + VE_FRAME_NO_PIC,
  338 + </if>
  339 + <if test="motorNoPic != null">
  340 + MOTOR_NO_PIC,
  341 + </if>
  342 + <if test="foreignLicensePic != null">
  343 + FOREIGN_LICENSE_PIC,
  344 + </if>
  345 + <if test="nationality != null">
  346 + NATIONALITY,
  347 + </if>
  348 + <if test="returnmessage != null">
  349 + RETURNMESSAGE,
  350 + </if>
  351 + <if test="barcode != null">
  352 + BARCODE,
  353 + </if>
  354 + <if test="createBy != null">
  355 + CREATE_BY,
  356 + </if>
  357 + <if test="createDate != null">
  358 + CREATE_DATE,
  359 + </if>
  360 + <if test="updateBy != null">
  361 + UPDATE_BY,
  362 + </if>
  363 + <if test="updateDate != null">
  364 + UPDATE_DATE,
  365 + </if>
  366 + <if test="veFreeTime != null">
  367 + VE_FREE_TIME,
  368 + </if>
  369 + <if test="vePriority != null">
  370 + VE_PRIORITY,
  371 + </if>
  372 + <if test="veState != null">
  373 + VE_STATE,
  374 + </if>
  375 + </trim>
  376 + <trim prefix="values (" suffix=")" suffixOverrides=",">
  377 + <if test="id != null">
  378 + #{id,jdbcType=VARCHAR},
  379 + </if>
  380 + <if test="eportId != null">
  381 + #{eportId,jdbcType=VARCHAR},
  382 + </if>
  383 + <if test="mainPort != null">
  384 + #{mainPort,jdbcType=VARCHAR},
  385 + </if>
  386 + <if test="coCode != null">
  387 + #{coCode,jdbcType=VARCHAR},
  388 + </if>
  389 + <if test="veTargetNo != null">
  390 + #{veTargetNo,jdbcType=VARCHAR},
  391 + </if>
  392 + <if test="domesticLisenceNo != null">
  393 + #{domesticLisenceNo,jdbcType=VARCHAR},
  394 + </if>
  395 + <if test="domesticLicenseColor != null">
  396 + #{domesticLicenseColor,jdbcType=VARCHAR},
  397 + </if>
  398 + <if test="foreignLicense != null">
  399 + #{foreignLicense,jdbcType=VARCHAR},
  400 + </if>
  401 + <if test="veRegPlace != null">
  402 + #{veRegPlace,jdbcType=VARCHAR},
  403 + </if>
  404 + <if test="veProperty != null">
  405 + #{veProperty,jdbcType=VARCHAR},
  406 + </if>
  407 + <if test="veConveyQua != null">
  408 + #{veConveyQua,jdbcType=VARCHAR},
  409 + </if>
  410 + <if test="veCardNo != null">
  411 + #{veCardNo,jdbcType=VARCHAR},
  412 + </if>
  413 + <if test="veOwnerName != null">
  414 + #{veOwnerName,jdbcType=VARCHAR},
  415 + </if>
  416 + <if test="veOwnerNo != null">
  417 + #{veOwnerNo,jdbcType=VARCHAR},
  418 + </if>
  419 + <if test="ownerInsideAddr != null">
  420 + #{ownerInsideAddr,jdbcType=VARCHAR},
  421 + </if>
  422 + <if test="ownerInsideTel != null">
  423 + #{ownerInsideTel,jdbcType=VARCHAR},
  424 + </if>
  425 + <if test="veType != null">
  426 + #{veType,jdbcType=VARCHAR},
  427 + </if>
  428 + <if test="brand != null">
  429 + #{brand,jdbcType=VARCHAR},
  430 + </if>
  431 + <if test="model != null">
  432 + #{model,jdbcType=VARCHAR},
  433 + </if>
  434 + <if test="exhaustCapacity != null">
  435 + #{exhaustCapacity,jdbcType=VARCHAR},
  436 + </if>
  437 + <if test="veFactoryDate != null">
  438 + #{veFactoryDate,jdbcType=DATE},
  439 + </if>
  440 + <if test="veMotorNo != null">
  441 + #{veMotorNo,jdbcType=VARCHAR},
  442 + </if>
  443 + <if test="veFrameNo != null">
  444 + #{veFrameNo,jdbcType=VARCHAR},
  445 + </if>
  446 + <if test="veTon != null">
  447 + #{veTon,jdbcType=VARCHAR},
  448 + </if>
  449 + <if test="selfWt != null">
  450 + #{selfWt,jdbcType=VARCHAR},
  451 + </if>
  452 + <if test="allowTowTotalWt != null">
  453 + #{allowTowTotalWt,jdbcType=VARCHAR},
  454 + </if>
  455 + <if test="containerInnerLength != null">
  456 + #{containerInnerLength,jdbcType=VARCHAR},
  457 + </if>
  458 + <if test="containerInnerWidth != null">
  459 + #{containerInnerWidth,jdbcType=VARCHAR},
  460 + </if>
  461 + <if test="containerInnerHeight != null">
  462 + #{containerInnerHeight,jdbcType=VARCHAR},
  463 + </if>
  464 + <if test="outerLength != null">
  465 + #{outerLength,jdbcType=VARCHAR},
  466 + </if>
  467 + <if test="outerWidth != null">
  468 + #{outerWidth,jdbcType=VARCHAR},
  469 + </if>
  470 + <if test="outerHeight != null">
  471 + #{outerHeight,jdbcType=VARCHAR},
  472 + </if>
  473 + <if test="veBodyColor != null">
  474 + #{veBodyColor,jdbcType=VARCHAR},
  475 + </if>
  476 + <if test="oilBoxCapcity != null">
  477 + #{oilBoxCapcity,jdbcType=VARCHAR},
  478 + </if>
  479 + <if test="allowVeIePort != null">
  480 + #{allowVeIePort,jdbcType=VARCHAR},
  481 + </if>
  482 + <if test="apprNo != null">
  483 + #{apprNo,jdbcType=VARCHAR},
  484 + </if>
  485 + <if test="apprPeriod != null">
  486 + #{apprPeriod,jdbcType=DATE},
  487 + </if>
  488 + <if test="currApplyBussiness != null">
  489 + #{currApplyBussiness,jdbcType=VARCHAR},
  490 + </if>
  491 + <if test="front45cPic != null">
  492 + #{front45cPic,jdbcType=VARCHAR},
  493 + </if>
  494 + <if test="back45cPic != null">
  495 + #{back45cPic,jdbcType=VARCHAR},
  496 + </if>
  497 + <if test="oilBoxPic != null">
  498 + #{oilBoxPic,jdbcType=VARCHAR},
  499 + </if>
  500 + <if test="veBottomPic != null">
  501 + #{veBottomPic,jdbcType=VARCHAR},
  502 + </if>
  503 + <if test="memo != null">
  504 + #{memo,jdbcType=VARCHAR},
  505 + </if>
  506 + <if test="proposer != null">
  507 + #{proposer,jdbcType=VARCHAR},
  508 + </if>
  509 + <if test="proposeTime != null">
  510 + #{proposeTime,jdbcType=TIMESTAMP},
  511 + </if>
  512 + <if test="veClassFlag != null">
  513 + #{veClassFlag,jdbcType=VARCHAR},
  514 + </if>
  515 + <if test="operationType != null">
  516 + #{operationType,jdbcType=VARCHAR},
  517 + </if>
  518 + <if test="trailerLicenseNo != null">
  519 + #{trailerLicenseNo,jdbcType=VARCHAR},
  520 + </if>
  521 + <if test="trailerFrameNo != null">
  522 + #{trailerFrameNo,jdbcType=VARCHAR},
  523 + </if>
  524 + <if test="approNoPic != null">
  525 + #{approNoPic,jdbcType=VARCHAR},
  526 + </if>
  527 + <if test="veFrameNoPic != null">
  528 + #{veFrameNoPic,jdbcType=VARCHAR},
  529 + </if>
  530 + <if test="motorNoPic != null">
  531 + #{motorNoPic,jdbcType=VARCHAR},
  532 + </if>
  533 + <if test="foreignLicensePic != null">
  534 + #{foreignLicensePic,jdbcType=VARCHAR},
  535 + </if>
  536 + <if test="nationality != null">
  537 + #{nationality,jdbcType=VARCHAR},
  538 + </if>
  539 + <if test="returnmessage != null">
  540 + #{returnmessage,jdbcType=VARCHAR},
  541 + </if>
  542 + <if test="barcode != null">
  543 + #{barcode,jdbcType=VARCHAR},
  544 + </if>
  545 + <if test="createBy != null">
  546 + #{createBy,jdbcType=VARCHAR},
  547 + </if>
  548 + <if test="createDate != null">
  549 + #{createDate,jdbcType=TIMESTAMP},
  550 + </if>
  551 + <if test="updateBy != null">
  552 + #{updateBy,jdbcType=VARCHAR},
  553 + </if>
  554 + <if test="updateDate != null">
  555 + #{updateDate,jdbcType=TIMESTAMP},
  556 + </if>
  557 + <if test="veFreeTime != null">
  558 + #{veFreeTime,jdbcType=TIMESTAMP},
  559 + </if>
  560 + <if test="vePriority != null">
  561 + #{vePriority,jdbcType=INTEGER},
  562 + </if>
  563 + <if test="veState != null">
  564 + #{veState,jdbcType=VARCHAR},
  565 + </if>
  566 + </trim>
  567 + </insert>
  568 + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord">
  569 + <!--@mbg.generated-->
  570 + update land_road_ve_record
  571 + <set>
  572 + <if test="eportId != null">
  573 + EPORT_ID = #{eportId,jdbcType=VARCHAR},
  574 + </if>
  575 + <if test="mainPort != null">
  576 + MAIN_PORT = #{mainPort,jdbcType=VARCHAR},
  577 + </if>
  578 + <if test="coCode != null">
  579 + CO_CODE = #{coCode,jdbcType=VARCHAR},
  580 + </if>
  581 + <if test="veTargetNo != null">
  582 + VE_TARGET_NO = #{veTargetNo,jdbcType=VARCHAR},
  583 + </if>
  584 + <if test="domesticLisenceNo != null">
  585 + DOMESTIC_LISENCE_NO = #{domesticLisenceNo,jdbcType=VARCHAR},
  586 + </if>
  587 + <if test="domesticLicenseColor != null">
  588 + DOMESTIC_LICENSE_COLOR = #{domesticLicenseColor,jdbcType=VARCHAR},
  589 + </if>
  590 + <if test="foreignLicense != null">
  591 + FOREIGN_LICENSE = #{foreignLicense,jdbcType=VARCHAR},
  592 + </if>
  593 + <if test="veRegPlace != null">
  594 + VE_REG_PLACE = #{veRegPlace,jdbcType=VARCHAR},
  595 + </if>
  596 + <if test="veProperty != null">
  597 + VE_PROPERTY = #{veProperty,jdbcType=VARCHAR},
  598 + </if>
  599 + <if test="veConveyQua != null">
  600 + VE_CONVEY_QUA = #{veConveyQua,jdbcType=VARCHAR},
  601 + </if>
  602 + <if test="veCardNo != null">
  603 + VE_CARD_NO = #{veCardNo,jdbcType=VARCHAR},
  604 + </if>
  605 + <if test="veOwnerName != null">
  606 + VE_OWNER_NAME = #{veOwnerName,jdbcType=VARCHAR},
  607 + </if>
  608 + <if test="veOwnerNo != null">
  609 + VE_OWNER_NO = #{veOwnerNo,jdbcType=VARCHAR},
  610 + </if>
  611 + <if test="ownerInsideAddr != null">
  612 + OWNER_INSIDE_ADDR = #{ownerInsideAddr,jdbcType=VARCHAR},
  613 + </if>
  614 + <if test="ownerInsideTel != null">
  615 + OWNER_INSIDE_TEL = #{ownerInsideTel,jdbcType=VARCHAR},
  616 + </if>
  617 + <if test="veType != null">
  618 + VE_TYPE = #{veType,jdbcType=VARCHAR},
  619 + </if>
  620 + <if test="brand != null">
  621 + BRAND = #{brand,jdbcType=VARCHAR},
  622 + </if>
  623 + <if test="model != null">
  624 + MODEL = #{model,jdbcType=VARCHAR},
  625 + </if>
  626 + <if test="exhaustCapacity != null">
  627 + EXHAUST_CAPACITY = #{exhaustCapacity,jdbcType=VARCHAR},
  628 + </if>
  629 + <if test="veFactoryDate != null">
  630 + VE_FACTORY_DATE = #{veFactoryDate,jdbcType=DATE},
  631 + </if>
  632 + <if test="veMotorNo != null">
  633 + VE_MOTOR_NO = #{veMotorNo,jdbcType=VARCHAR},
  634 + </if>
  635 + <if test="veFrameNo != null">
  636 + VE_FRAME_NO = #{veFrameNo,jdbcType=VARCHAR},
  637 + </if>
  638 + <if test="veTon != null">
  639 + VE_TON = #{veTon,jdbcType=VARCHAR},
  640 + </if>
  641 + <if test="selfWt != null">
  642 + SELF_WT = #{selfWt,jdbcType=VARCHAR},
  643 + </if>
  644 + <if test="allowTowTotalWt != null">
  645 + ALLOW_TOW_TOTAL_WT = #{allowTowTotalWt,jdbcType=VARCHAR},
  646 + </if>
  647 + <if test="containerInnerLength != null">
  648 + CONTAINER_INNER_LENGTH = #{containerInnerLength,jdbcType=VARCHAR},
  649 + </if>
  650 + <if test="containerInnerWidth != null">
  651 + CONTAINER_INNER_WIDTH = #{containerInnerWidth,jdbcType=VARCHAR},
  652 + </if>
  653 + <if test="containerInnerHeight != null">
  654 + CONTAINER_INNER_HEIGHT = #{containerInnerHeight,jdbcType=VARCHAR},
  655 + </if>
  656 + <if test="outerLength != null">
  657 + OUTER_LENGTH = #{outerLength,jdbcType=VARCHAR},
  658 + </if>
  659 + <if test="outerWidth != null">
  660 + OUTER_WIDTH = #{outerWidth,jdbcType=VARCHAR},
  661 + </if>
  662 + <if test="outerHeight != null">
  663 + OUTER_HEIGHT = #{outerHeight,jdbcType=VARCHAR},
  664 + </if>
  665 + <if test="veBodyColor != null">
  666 + VE_BODY_COLOR = #{veBodyColor,jdbcType=VARCHAR},
  667 + </if>
  668 + <if test="oilBoxCapcity != null">
  669 + OIL_BOX_CAPCITY = #{oilBoxCapcity,jdbcType=VARCHAR},
  670 + </if>
  671 + <if test="allowVeIePort != null">
  672 + ALLOW_VE_IE_PORT = #{allowVeIePort,jdbcType=VARCHAR},
  673 + </if>
  674 + <if test="apprNo != null">
  675 + APPR_NO = #{apprNo,jdbcType=VARCHAR},
  676 + </if>
  677 + <if test="apprPeriod != null">
  678 + APPR_PERIOD = #{apprPeriod,jdbcType=DATE},
  679 + </if>
  680 + <if test="currApplyBussiness != null">
  681 + CURR_APPLY_BUSSINESS = #{currApplyBussiness,jdbcType=VARCHAR},
  682 + </if>
  683 + <if test="front45cPic != null">
  684 + FRONT_45C_PIC = #{front45cPic,jdbcType=VARCHAR},
  685 + </if>
  686 + <if test="back45cPic != null">
  687 + BACK_45C_PIC = #{back45cPic,jdbcType=VARCHAR},
  688 + </if>
  689 + <if test="oilBoxPic != null">
  690 + OIL_BOX_PIC = #{oilBoxPic,jdbcType=VARCHAR},
  691 + </if>
  692 + <if test="veBottomPic != null">
  693 + VE_BOTTOM_PIC = #{veBottomPic,jdbcType=VARCHAR},
  694 + </if>
  695 + <if test="memo != null">
  696 + MEMO = #{memo,jdbcType=VARCHAR},
  697 + </if>
  698 + <if test="proposer != null">
  699 + PROPOSER = #{proposer,jdbcType=VARCHAR},
  700 + </if>
  701 + <if test="proposeTime != null">
  702 + PROPOSE_TIME = #{proposeTime,jdbcType=TIMESTAMP},
  703 + </if>
  704 + <if test="veClassFlag != null">
  705 + VE_CLASS_FLAG = #{veClassFlag,jdbcType=VARCHAR},
  706 + </if>
  707 + <if test="operationType != null">
  708 + OPERATION_TYPE = #{operationType,jdbcType=VARCHAR},
  709 + </if>
  710 + <if test="trailerLicenseNo != null">
  711 + TRAILER_LICENSE_NO = #{trailerLicenseNo,jdbcType=VARCHAR},
  712 + </if>
  713 + <if test="trailerFrameNo != null">
  714 + TRAILER_FRAME_NO = #{trailerFrameNo,jdbcType=VARCHAR},
  715 + </if>
  716 + <if test="approNoPic != null">
  717 + APPRO_NO_PIC = #{approNoPic,jdbcType=VARCHAR},
  718 + </if>
  719 + <if test="veFrameNoPic != null">
  720 + VE_FRAME_NO_PIC = #{veFrameNoPic,jdbcType=VARCHAR},
  721 + </if>
  722 + <if test="motorNoPic != null">
  723 + MOTOR_NO_PIC = #{motorNoPic,jdbcType=VARCHAR},
  724 + </if>
  725 + <if test="foreignLicensePic != null">
  726 + FOREIGN_LICENSE_PIC = #{foreignLicensePic,jdbcType=VARCHAR},
  727 + </if>
  728 + <if test="nationality != null">
  729 + NATIONALITY = #{nationality,jdbcType=VARCHAR},
  730 + </if>
  731 + <if test="returnmessage != null">
  732 + RETURNMESSAGE = #{returnmessage,jdbcType=VARCHAR},
  733 + </if>
  734 + <if test="barcode != null">
  735 + BARCODE = #{barcode,jdbcType=VARCHAR},
  736 + </if>
  737 + <if test="createBy != null">
  738 + CREATE_BY = #{createBy,jdbcType=VARCHAR},
  739 + </if>
  740 + <if test="createDate != null">
  741 + CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
  742 + </if>
  743 + <if test="updateBy != null">
  744 + UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
  745 + </if>
  746 + <if test="updateDate != null">
  747 + UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP},
  748 + </if>
  749 + <if test="veFreeTime != null">
  750 + VE_FREE_TIME = #{veFreeTime,jdbcType=TIMESTAMP},
  751 + </if>
  752 + <if test="vePriority != null">
  753 + VE_PRIORITY = #{vePriority,jdbcType=INTEGER},
  754 + </if>
  755 + <if test="veState != null">
  756 + VE_STATE = #{veState,jdbcType=VARCHAR},
  757 + </if>
  758 + </set>
  759 + where ID = #{id,jdbcType=VARCHAR}
  760 + </update>
  761 + <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord">
  762 + <!--@mbg.generated-->
  763 + update land_road_ve_record
  764 + set EPORT_ID = #{eportId,jdbcType=VARCHAR},
  765 + MAIN_PORT = #{mainPort,jdbcType=VARCHAR},
  766 + CO_CODE = #{coCode,jdbcType=VARCHAR},
  767 + VE_TARGET_NO = #{veTargetNo,jdbcType=VARCHAR},
  768 + DOMESTIC_LISENCE_NO = #{domesticLisenceNo,jdbcType=VARCHAR},
  769 + DOMESTIC_LICENSE_COLOR = #{domesticLicenseColor,jdbcType=VARCHAR},
  770 + FOREIGN_LICENSE = #{foreignLicense,jdbcType=VARCHAR},
  771 + VE_REG_PLACE = #{veRegPlace,jdbcType=VARCHAR},
  772 + VE_PROPERTY = #{veProperty,jdbcType=VARCHAR},
  773 + VE_CONVEY_QUA = #{veConveyQua,jdbcType=VARCHAR},
  774 + VE_CARD_NO = #{veCardNo,jdbcType=VARCHAR},
  775 + VE_OWNER_NAME = #{veOwnerName,jdbcType=VARCHAR},
  776 + VE_OWNER_NO = #{veOwnerNo,jdbcType=VARCHAR},
  777 + OWNER_INSIDE_ADDR = #{ownerInsideAddr,jdbcType=VARCHAR},
  778 + OWNER_INSIDE_TEL = #{ownerInsideTel,jdbcType=VARCHAR},
  779 + VE_TYPE = #{veType,jdbcType=VARCHAR},
  780 + BRAND = #{brand,jdbcType=VARCHAR},
  781 + MODEL = #{model,jdbcType=VARCHAR},
  782 + EXHAUST_CAPACITY = #{exhaustCapacity,jdbcType=VARCHAR},
  783 + VE_FACTORY_DATE = #{veFactoryDate,jdbcType=DATE},
  784 + VE_MOTOR_NO = #{veMotorNo,jdbcType=VARCHAR},
  785 + VE_FRAME_NO = #{veFrameNo,jdbcType=VARCHAR},
  786 + VE_TON = #{veTon,jdbcType=VARCHAR},
  787 + SELF_WT = #{selfWt,jdbcType=VARCHAR},
  788 + ALLOW_TOW_TOTAL_WT = #{allowTowTotalWt,jdbcType=VARCHAR},
  789 + CONTAINER_INNER_LENGTH = #{containerInnerLength,jdbcType=VARCHAR},
  790 + CONTAINER_INNER_WIDTH = #{containerInnerWidth,jdbcType=VARCHAR},
  791 + CONTAINER_INNER_HEIGHT = #{containerInnerHeight,jdbcType=VARCHAR},
  792 + OUTER_LENGTH = #{outerLength,jdbcType=VARCHAR},
  793 + OUTER_WIDTH = #{outerWidth,jdbcType=VARCHAR},
  794 + OUTER_HEIGHT = #{outerHeight,jdbcType=VARCHAR},
  795 + VE_BODY_COLOR = #{veBodyColor,jdbcType=VARCHAR},
  796 + OIL_BOX_CAPCITY = #{oilBoxCapcity,jdbcType=VARCHAR},
  797 + ALLOW_VE_IE_PORT = #{allowVeIePort,jdbcType=VARCHAR},
  798 + APPR_NO = #{apprNo,jdbcType=VARCHAR},
  799 + APPR_PERIOD = #{apprPeriod,jdbcType=DATE},
  800 + CURR_APPLY_BUSSINESS = #{currApplyBussiness,jdbcType=VARCHAR},
  801 + FRONT_45C_PIC = #{front45cPic,jdbcType=VARCHAR},
  802 + BACK_45C_PIC = #{back45cPic,jdbcType=VARCHAR},
  803 + OIL_BOX_PIC = #{oilBoxPic,jdbcType=VARCHAR},
  804 + VE_BOTTOM_PIC = #{veBottomPic,jdbcType=VARCHAR},
  805 + MEMO = #{memo,jdbcType=VARCHAR},
  806 + PROPOSER = #{proposer,jdbcType=VARCHAR},
  807 + PROPOSE_TIME = #{proposeTime,jdbcType=TIMESTAMP},
  808 + VE_CLASS_FLAG = #{veClassFlag,jdbcType=VARCHAR},
  809 + OPERATION_TYPE = #{operationType,jdbcType=VARCHAR},
  810 + TRAILER_LICENSE_NO = #{trailerLicenseNo,jdbcType=VARCHAR},
  811 + TRAILER_FRAME_NO = #{trailerFrameNo,jdbcType=VARCHAR},
  812 + APPRO_NO_PIC = #{approNoPic,jdbcType=VARCHAR},
  813 + VE_FRAME_NO_PIC = #{veFrameNoPic,jdbcType=VARCHAR},
  814 + MOTOR_NO_PIC = #{motorNoPic,jdbcType=VARCHAR},
  815 + FOREIGN_LICENSE_PIC = #{foreignLicensePic,jdbcType=VARCHAR},
  816 + NATIONALITY = #{nationality,jdbcType=VARCHAR},
  817 + RETURNMESSAGE = #{returnmessage,jdbcType=VARCHAR},
  818 + BARCODE = #{barcode,jdbcType=VARCHAR},
  819 + CREATE_BY = #{createBy,jdbcType=VARCHAR},
  820 + CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
  821 + UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
  822 + UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP},
  823 + VE_FREE_TIME = #{veFreeTime,jdbcType=TIMESTAMP},
  824 + VE_PRIORITY = #{vePriority,jdbcType=INTEGER},
  825 + VE_STATE = #{veState,jdbcType=VARCHAR}
  826 + where ID = #{id,jdbcType=VARCHAR}
  827 + </update>
  828 +</mapper>