Browse Source

修改问题

logistics
ma 4 years ago
parent
commit
232dc68e35
  1. 10
      logistics/src/main/java/com/ccsens/logistics/Util/Constant.java
  2. 35
      logistics/src/main/java/com/ccsens/logistics/api/CarIdentificationController.java
  3. 51
      logistics/src/main/java/com/ccsens/logistics/bean/dto/CarIdentificationDto.java
  4. 2
      logistics/src/main/java/com/ccsens/logistics/bean/dto/CarRecordDto.java
  5. 49
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsCarRecord.java
  6. 270
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsCarRecordExample.java
  7. 20
      logistics/src/main/java/com/ccsens/logistics/bean/vo/CarIdentificationVo.java
  8. 80
      logistics/src/main/java/com/ccsens/logistics/service/CarIdentificationService.java
  9. 20
      logistics/src/main/java/com/ccsens/logistics/service/ICarIdentificationService.java
  10. 3
      logistics/src/main/resources/application-dev.yml
  11. 3
      logistics/src/main/resources/application-prod.yml
  12. 3
      logistics/src/main/resources/application-test.yml
  13. 4
      logistics/src/main/resources/application.yml
  14. 82
      logistics/src/main/resources/mapper_raw/LogisticsCarRecordMapper.xml

10
logistics/src/main/java/com/ccsens/logistics/Util/Constant.java

@ -32,4 +32,14 @@ public class Constant {
* 无水
*/
public static final String NO_WATER = "无水";
//车辆识别摄像头相关
/**
* 心跳
*/
public static final String HEART_BEAT = "heartbeat";
/**
* 在线获取数据
*/
public static final String ONLINE = "online";
}

35
logistics/src/main/java/com/ccsens/logistics/api/CarIdentificationController.java

@ -0,0 +1,35 @@
package com.ccsens.logistics.api;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.logistics.service.ICarIdentificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
* @author
*/
@Slf4j
@Api(tags = "车辆识别摄像头相关")
@RestController
@RequestMapping("/carIdentification")
public class CarIdentificationController {
@Resource
private ICarIdentificationService carIdentificationService;
@ApiOperation(value = "车辆识别摄像头数据对接", notes = "mz:车辆识别摄像头数据对接")
@RequestMapping(value = "/addCarRecord", method = RequestMethod.POST ,produces = {"application/json;charset=UTF-8"})
public JSONObject addCarRecord(HttpServletResponse httpServletResponse, @RequestParam Map<String, String> param) {
log.info("车辆识别摄像头数据对接:{}",param);
JSONObject jsonObject = carIdentificationService.addCarInformation(httpServletResponse, param);
log.info("车辆识别摄像头数据对接:{}",jsonObject);
return jsonObject;
}
}

51
logistics/src/main/java/com/ccsens/logistics/bean/dto/CarIdentificationDto.java

@ -0,0 +1,51 @@
package com.ccsens.logistics.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author
*/
@Data
public class CarIdentificationDto {
@Data
@ApiModel("车辆识别摄像头提供的信息")
public static class AddCarInformation{
@ApiModelProperty("online 表示正常在线传输结果,offline表示断网续传结果")
private String type;
@ApiModelProperty("协议模式")
private Integer mode;
@ApiModelProperty("车牌号码")
private String plate_num;
@ApiModelProperty("车牌底色")
private String plate_color;
@ApiModelProperty("虚假车牌信息,true为真牌,false为假牌")
private Boolean plate_val;
@ApiModelProperty("置信度,范围:0-28")
private Integer confidence;
@ApiModelProperty("车辆品牌")
private String car_logo;
@ApiModelProperty("车辆颜色")
private String car_color;
@ApiModelProperty("车辆类型")
private String vehicle_type;
@ApiModelProperty("车牌识别时间,时间戳:秒")
private Long start_time;
@ApiModelProperty("车场id")
private String park_id;
@ApiModelProperty("相机ip")
private String cam_ip;
@ApiModelProperty("出入口类型:in表示入口,out表示出口")
private String vdc_type;
@ApiModelProperty("是否白名单车辆:true表示白名单,false表示非白名单")
private String is_whitelist;
@ApiModelProperty("video 表示视频触发,hwtriger 表示地感触发swtriger 表示软触发")
private String triger_type;
@ApiModelProperty("全景图,BASE64 编码")
private String picture;
@ApiModelProperty("车牌特写图")
private String closeup_pic;
}
}

2
logistics/src/main/java/com/ccsens/logistics/bean/dto/CarRecordDto.java

@ -16,7 +16,7 @@ public class CarRecordDto {
@ApiModelProperty("记录时间")
private Long recordTime;
@ApiModelProperty("车型(0-小型车,1-中型车,2-大型车)")
private Byte carType;
private String carType;
@ApiModelProperty("进出类型(0-进,1-出)")
private Byte inOut;
@ApiModelProperty("车牌号")

49
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsCarRecord.java

@ -6,11 +6,11 @@ import java.util.Date;
public class LogisticsCarRecord implements Serializable {
private Long id;
private Byte carType;
private String carType;
private String licensePlate;
private Byte plateType;
private String plateType;
private String filesId;
@ -20,6 +20,12 @@ public class LogisticsCarRecord implements Serializable {
private String carBrand;
private String picture;
private String closeupPic;
private String camId;
private Long warehouseId;
private Long recordTime;
@ -40,12 +46,12 @@ public class LogisticsCarRecord implements Serializable {
this.id = id;
}
public Byte getCarType() {
public String getCarType() {
return carType;
}
public void setCarType(Byte carType) {
this.carType = carType;
public void setCarType(String carType) {
this.carType = carType == null ? null : carType.trim();
}
public String getLicensePlate() {
@ -56,12 +62,12 @@ public class LogisticsCarRecord implements Serializable {
this.licensePlate = licensePlate == null ? null : licensePlate.trim();
}
public Byte getPlateType() {
public String getPlateType() {
return plateType;
}
public void setPlateType(Byte plateType) {
this.plateType = plateType;
public void setPlateType(String plateType) {
this.plateType = plateType == null ? null : plateType.trim();
}
public String getFilesId() {
@ -96,6 +102,30 @@ public class LogisticsCarRecord implements Serializable {
this.carBrand = carBrand == null ? null : carBrand.trim();
}
public String getPicture() {
return picture;
}
public void setPicture(String picture) {
this.picture = picture == null ? null : picture.trim();
}
public String getCloseupPic() {
return closeupPic;
}
public void setCloseupPic(String closeupPic) {
this.closeupPic = closeupPic == null ? null : closeupPic.trim();
}
public String getCamId() {
return camId;
}
public void setCamId(String camId) {
this.camId = camId == null ? null : camId.trim();
}
public Long getWarehouseId() {
return warehouseId;
}
@ -150,6 +180,9 @@ public class LogisticsCarRecord implements Serializable {
sb.append(", carWeight=").append(carWeight);
sb.append(", inOut=").append(inOut);
sb.append(", carBrand=").append(carBrand);
sb.append(", picture=").append(picture);
sb.append(", closeupPic=").append(closeupPic);
sb.append(", camId=").append(camId);
sb.append(", warehouseId=").append(warehouseId);
sb.append(", recordTime=").append(recordTime);
sb.append(", createdAt=").append(createdAt);

270
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsCarRecordExample.java

@ -175,52 +175,62 @@ public class LogisticsCarRecordExample {
return (Criteria) this;
}
public Criteria andCarTypeEqualTo(Byte value) {
public Criteria andCarTypeEqualTo(String value) {
addCriterion("car_type =", value, "carType");
return (Criteria) this;
}
public Criteria andCarTypeNotEqualTo(Byte value) {
public Criteria andCarTypeNotEqualTo(String value) {
addCriterion("car_type <>", value, "carType");
return (Criteria) this;
}
public Criteria andCarTypeGreaterThan(Byte value) {
public Criteria andCarTypeGreaterThan(String value) {
addCriterion("car_type >", value, "carType");
return (Criteria) this;
}
public Criteria andCarTypeGreaterThanOrEqualTo(Byte value) {
public Criteria andCarTypeGreaterThanOrEqualTo(String value) {
addCriterion("car_type >=", value, "carType");
return (Criteria) this;
}
public Criteria andCarTypeLessThan(Byte value) {
public Criteria andCarTypeLessThan(String value) {
addCriterion("car_type <", value, "carType");
return (Criteria) this;
}
public Criteria andCarTypeLessThanOrEqualTo(Byte value) {
public Criteria andCarTypeLessThanOrEqualTo(String value) {
addCriterion("car_type <=", value, "carType");
return (Criteria) this;
}
public Criteria andCarTypeIn(List<Byte> values) {
public Criteria andCarTypeLike(String value) {
addCriterion("car_type like", value, "carType");
return (Criteria) this;
}
public Criteria andCarTypeNotLike(String value) {
addCriterion("car_type not like", value, "carType");
return (Criteria) this;
}
public Criteria andCarTypeIn(List<String> values) {
addCriterion("car_type in", values, "carType");
return (Criteria) this;
}
public Criteria andCarTypeNotIn(List<Byte> values) {
public Criteria andCarTypeNotIn(List<String> values) {
addCriterion("car_type not in", values, "carType");
return (Criteria) this;
}
public Criteria andCarTypeBetween(Byte value1, Byte value2) {
public Criteria andCarTypeBetween(String value1, String value2) {
addCriterion("car_type between", value1, value2, "carType");
return (Criteria) this;
}
public Criteria andCarTypeNotBetween(Byte value1, Byte value2) {
public Criteria andCarTypeNotBetween(String value1, String value2) {
addCriterion("car_type not between", value1, value2, "carType");
return (Criteria) this;
}
@ -305,52 +315,62 @@ public class LogisticsCarRecordExample {
return (Criteria) this;
}
public Criteria andPlateTypeEqualTo(Byte value) {
public Criteria andPlateTypeEqualTo(String value) {
addCriterion("plate_type =", value, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeNotEqualTo(Byte value) {
public Criteria andPlateTypeNotEqualTo(String value) {
addCriterion("plate_type <>", value, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeGreaterThan(Byte value) {
public Criteria andPlateTypeGreaterThan(String value) {
addCriterion("plate_type >", value, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeGreaterThanOrEqualTo(Byte value) {
public Criteria andPlateTypeGreaterThanOrEqualTo(String value) {
addCriterion("plate_type >=", value, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeLessThan(Byte value) {
public Criteria andPlateTypeLessThan(String value) {
addCriterion("plate_type <", value, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeLessThanOrEqualTo(Byte value) {
public Criteria andPlateTypeLessThanOrEqualTo(String value) {
addCriterion("plate_type <=", value, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeIn(List<Byte> values) {
public Criteria andPlateTypeLike(String value) {
addCriterion("plate_type like", value, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeNotLike(String value) {
addCriterion("plate_type not like", value, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeIn(List<String> values) {
addCriterion("plate_type in", values, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeNotIn(List<Byte> values) {
public Criteria andPlateTypeNotIn(List<String> values) {
addCriterion("plate_type not in", values, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeBetween(Byte value1, Byte value2) {
public Criteria andPlateTypeBetween(String value1, String value2) {
addCriterion("plate_type between", value1, value2, "plateType");
return (Criteria) this;
}
public Criteria andPlateTypeNotBetween(Byte value1, Byte value2) {
public Criteria andPlateTypeNotBetween(String value1, String value2) {
addCriterion("plate_type not between", value1, value2, "plateType");
return (Criteria) this;
}
@ -615,6 +635,216 @@ public class LogisticsCarRecordExample {
return (Criteria) this;
}
public Criteria andPictureIsNull() {
addCriterion("picture is null");
return (Criteria) this;
}
public Criteria andPictureIsNotNull() {
addCriterion("picture is not null");
return (Criteria) this;
}
public Criteria andPictureEqualTo(String value) {
addCriterion("picture =", value, "picture");
return (Criteria) this;
}
public Criteria andPictureNotEqualTo(String value) {
addCriterion("picture <>", value, "picture");
return (Criteria) this;
}
public Criteria andPictureGreaterThan(String value) {
addCriterion("picture >", value, "picture");
return (Criteria) this;
}
public Criteria andPictureGreaterThanOrEqualTo(String value) {
addCriterion("picture >=", value, "picture");
return (Criteria) this;
}
public Criteria andPictureLessThan(String value) {
addCriterion("picture <", value, "picture");
return (Criteria) this;
}
public Criteria andPictureLessThanOrEqualTo(String value) {
addCriterion("picture <=", value, "picture");
return (Criteria) this;
}
public Criteria andPictureLike(String value) {
addCriterion("picture like", value, "picture");
return (Criteria) this;
}
public Criteria andPictureNotLike(String value) {
addCriterion("picture not like", value, "picture");
return (Criteria) this;
}
public Criteria andPictureIn(List<String> values) {
addCriterion("picture in", values, "picture");
return (Criteria) this;
}
public Criteria andPictureNotIn(List<String> values) {
addCriterion("picture not in", values, "picture");
return (Criteria) this;
}
public Criteria andPictureBetween(String value1, String value2) {
addCriterion("picture between", value1, value2, "picture");
return (Criteria) this;
}
public Criteria andPictureNotBetween(String value1, String value2) {
addCriterion("picture not between", value1, value2, "picture");
return (Criteria) this;
}
public Criteria andCloseupPicIsNull() {
addCriterion("closeup_pic is null");
return (Criteria) this;
}
public Criteria andCloseupPicIsNotNull() {
addCriterion("closeup_pic is not null");
return (Criteria) this;
}
public Criteria andCloseupPicEqualTo(String value) {
addCriterion("closeup_pic =", value, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicNotEqualTo(String value) {
addCriterion("closeup_pic <>", value, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicGreaterThan(String value) {
addCriterion("closeup_pic >", value, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicGreaterThanOrEqualTo(String value) {
addCriterion("closeup_pic >=", value, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicLessThan(String value) {
addCriterion("closeup_pic <", value, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicLessThanOrEqualTo(String value) {
addCriterion("closeup_pic <=", value, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicLike(String value) {
addCriterion("closeup_pic like", value, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicNotLike(String value) {
addCriterion("closeup_pic not like", value, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicIn(List<String> values) {
addCriterion("closeup_pic in", values, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicNotIn(List<String> values) {
addCriterion("closeup_pic not in", values, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicBetween(String value1, String value2) {
addCriterion("closeup_pic between", value1, value2, "closeupPic");
return (Criteria) this;
}
public Criteria andCloseupPicNotBetween(String value1, String value2) {
addCriterion("closeup_pic not between", value1, value2, "closeupPic");
return (Criteria) this;
}
public Criteria andCamIdIsNull() {
addCriterion("cam_id is null");
return (Criteria) this;
}
public Criteria andCamIdIsNotNull() {
addCriterion("cam_id is not null");
return (Criteria) this;
}
public Criteria andCamIdEqualTo(String value) {
addCriterion("cam_id =", value, "camId");
return (Criteria) this;
}
public Criteria andCamIdNotEqualTo(String value) {
addCriterion("cam_id <>", value, "camId");
return (Criteria) this;
}
public Criteria andCamIdGreaterThan(String value) {
addCriterion("cam_id >", value, "camId");
return (Criteria) this;
}
public Criteria andCamIdGreaterThanOrEqualTo(String value) {
addCriterion("cam_id >=", value, "camId");
return (Criteria) this;
}
public Criteria andCamIdLessThan(String value) {
addCriterion("cam_id <", value, "camId");
return (Criteria) this;
}
public Criteria andCamIdLessThanOrEqualTo(String value) {
addCriterion("cam_id <=", value, "camId");
return (Criteria) this;
}
public Criteria andCamIdLike(String value) {
addCriterion("cam_id like", value, "camId");
return (Criteria) this;
}
public Criteria andCamIdNotLike(String value) {
addCriterion("cam_id not like", value, "camId");
return (Criteria) this;
}
public Criteria andCamIdIn(List<String> values) {
addCriterion("cam_id in", values, "camId");
return (Criteria) this;
}
public Criteria andCamIdNotIn(List<String> values) {
addCriterion("cam_id not in", values, "camId");
return (Criteria) this;
}
public Criteria andCamIdBetween(String value1, String value2) {
addCriterion("cam_id between", value1, value2, "camId");
return (Criteria) this;
}
public Criteria andCamIdNotBetween(String value1, String value2) {
addCriterion("cam_id not between", value1, value2, "camId");
return (Criteria) this;
}
public Criteria andWarehouseIdIsNull() {
addCriterion("warehouse_id is null");
return (Criteria) this;

20
logistics/src/main/java/com/ccsens/logistics/bean/vo/CarIdentificationVo.java

@ -0,0 +1,20 @@
package com.ccsens.logistics.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author
*/
@Data
public class CarIdentificationVo {
@Data
@ApiModel(value = "手动添加车辆记录")
public static class Answer{
@ApiModelProperty("分组id")
private String error_num;
@ApiModelProperty("分组名称")
private String error_str;
}
}

80
logistics/src/main/java/com/ccsens/logistics/service/CarIdentificationService.java

@ -0,0 +1,80 @@
package com.ccsens.logistics.service;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Snowflake;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.logistics.bean.dto.CarIdentificationDto;
import com.ccsens.logistics.Util.Constant;
import com.ccsens.logistics.bean.po.LogisticsCarRecord;
import com.ccsens.logistics.persist.dao.LogisticsCarRecordDao;
import com.ccsens.util.Base64FileUtil;
import com.ccsens.util.PropUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
* @author
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
public class CarIdentificationService implements ICarIdentificationService{
@Resource
private LogisticsCarRecordDao carRecordDao;
@Resource
private Snowflake snowflake;
@Override
public JSONObject addCarInformation(HttpServletResponse httpServletResponse, Map<String, String> param) {
try {
System.out.println(param.get("type"));
JSONObject jsonObject = new JSONObject();
switch (param.get("type")){
case Constant.HEART_BEAT:
jsonObject.put("error_num","0");
jsonObject.put("error_str","无");
//设置响应头
httpServletResponse.addHeader("Content-Length",String.valueOf(jsonObject.toJSONString().getBytes().length));
return jsonObject;
case Constant.ONLINE:
LogisticsCarRecord carRecord = new LogisticsCarRecord();
carRecord.setId(snowflake.nextId());
carRecord.setInOut("in".equals(param.get("vdc_type"))?(byte)0:(byte)1);
carRecord.setCarType(param.get("vehicle_type"));
carRecord.setLicensePlate(param.get("plate_num"));
carRecord.setPlateType(param.get("plate_color"));
carRecord.setCamId(param.get("cam_id"));
carRecord.setRecordTime(Long.parseLong(param.get("start_time"))*1000);
String pictureBase64 = param.get("picture");
String newPictureBase64 = pictureBase64.replace(".", "=").replace("_", "/").replace("-", "+");
String pictureUrl = Base64FileUtil.base64ToFile("data:image/png;base64,"+newPictureBase64,PropUtil.path, "/file/" + DateUtil.today() + "/");
carRecord.setPicture(pictureUrl);
carRecordDao.insertSelective(carRecord);
jsonObject.put("error_num","0");
jsonObject.put("error_str","无");
//设置响应头
httpServletResponse.addHeader("Content-Length",String.valueOf(jsonObject.toJSONString().getBytes().length));
return jsonObject;
default:
break;
}
return new JSONObject();
}catch (Exception e){
log.info("车辆识别获取异常异常",e);
}
return null;
}
}

20
logistics/src/main/java/com/ccsens/logistics/service/ICarIdentificationService.java

@ -0,0 +1,20 @@
package com.ccsens.logistics.service;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
* @author
*/
public interface ICarIdentificationService {
/**
* 车辆识别摄像头返回数据
* @param httpServletResponse 响应
* @param param 摄像头返回参数
* @return 响应的json
*/
JSONObject addCarInformation(HttpServletResponse httpServletResponse, Map<String, String> param);
}

3
logistics/src/main/resources/application-dev.yml

@ -2,6 +2,9 @@ server:
port: 7170
servlet:
context-path:
#车辆识别摄像头请求数据过大,设置jetty,默认2m,现为9m
jetty:
max-http-post-size: 9000000
spring:
application:
name: logistics

3
logistics/src/main/resources/application-prod.yml

@ -2,6 +2,9 @@ server:
port: 7170
servlet:
context-path:
#车辆识别摄像头请求数据过大,设置jetty,默认2m,现为9m
jetty:
max-http-post-size: 9000000
spring:
application:
name: logistics

3
logistics/src/main/resources/application-test.yml

@ -2,6 +2,9 @@ server:
port: 7170
servlet:
context-path:
#车辆识别摄像头请求数据过大,设置jetty,默认2m,现为9m
jetty:
max-http-post-size: 9000000
spring:
application:
name: logistics

4
logistics/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring:
profiles:
active: prod
include: common,util-prod
active: dev
include: common,util-dev

82
logistics/src/main/resources/mapper_raw/LogisticsCarRecordMapper.xml

@ -3,13 +3,16 @@
<mapper namespace="com.ccsens.logistics.persist.mapper.LogisticsCarRecordMapper">
<resultMap id="BaseResultMap" type="com.ccsens.logistics.bean.po.LogisticsCarRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="car_type" jdbcType="TINYINT" property="carType" />
<result column="car_type" jdbcType="VARCHAR" property="carType" />
<result column="license_plate" jdbcType="VARCHAR" property="licensePlate" />
<result column="plate_type" jdbcType="TINYINT" property="plateType" />
<result column="plate_type" jdbcType="VARCHAR" property="plateType" />
<result column="files_id" jdbcType="VARCHAR" property="filesId" />
<result column="car_weight" jdbcType="BIGINT" property="carWeight" />
<result column="in_out" jdbcType="TINYINT" property="inOut" />
<result column="car_brand" jdbcType="VARCHAR" property="carBrand" />
<result column="picture" jdbcType="VARCHAR" property="picture" />
<result column="closeup_pic" jdbcType="VARCHAR" property="closeupPic" />
<result column="cam_id" jdbcType="VARCHAR" property="camId" />
<result column="warehouse_id" jdbcType="BIGINT" property="warehouseId" />
<result column="record_time" jdbcType="BIGINT" property="recordTime" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
@ -76,7 +79,8 @@
</sql>
<sql id="Base_Column_List">
id, car_type, license_plate, plate_type, files_id, car_weight, in_out, car_brand,
warehouse_id, record_time, created_at, updated_at, rec_status
picture, closeup_pic, cam_id, warehouse_id, record_time, created_at, updated_at,
rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsCarRecordExample" resultMap="BaseResultMap">
select
@ -111,12 +115,14 @@
<insert id="insert" parameterType="com.ccsens.logistics.bean.po.LogisticsCarRecord">
insert into t_logistics_car_record (id, car_type, license_plate,
plate_type, files_id, car_weight,
in_out, car_brand, warehouse_id,
in_out, car_brand, picture,
closeup_pic, cam_id, warehouse_id,
record_time, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{carType,jdbcType=TINYINT}, #{licensePlate,jdbcType=VARCHAR},
#{plateType,jdbcType=TINYINT}, #{filesId,jdbcType=VARCHAR}, #{carWeight,jdbcType=BIGINT},
#{inOut,jdbcType=TINYINT}, #{carBrand,jdbcType=VARCHAR}, #{warehouseId,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{carType,jdbcType=VARCHAR}, #{licensePlate,jdbcType=VARCHAR},
#{plateType,jdbcType=VARCHAR}, #{filesId,jdbcType=VARCHAR}, #{carWeight,jdbcType=BIGINT},
#{inOut,jdbcType=TINYINT}, #{carBrand,jdbcType=VARCHAR}, #{picture,jdbcType=VARCHAR},
#{closeupPic,jdbcType=VARCHAR}, #{camId,jdbcType=VARCHAR}, #{warehouseId,jdbcType=BIGINT},
#{recordTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
@ -147,6 +153,15 @@
<if test="carBrand != null">
car_brand,
</if>
<if test="picture != null">
picture,
</if>
<if test="closeupPic != null">
closeup_pic,
</if>
<if test="camId != null">
cam_id,
</if>
<if test="warehouseId != null">
warehouse_id,
</if>
@ -168,13 +183,13 @@
#{id,jdbcType=BIGINT},
</if>
<if test="carType != null">
#{carType,jdbcType=TINYINT},
#{carType,jdbcType=VARCHAR},
</if>
<if test="licensePlate != null">
#{licensePlate,jdbcType=VARCHAR},
</if>
<if test="plateType != null">
#{plateType,jdbcType=TINYINT},
#{plateType,jdbcType=VARCHAR},
</if>
<if test="filesId != null">
#{filesId,jdbcType=VARCHAR},
@ -188,6 +203,15 @@
<if test="carBrand != null">
#{carBrand,jdbcType=VARCHAR},
</if>
<if test="picture != null">
#{picture,jdbcType=VARCHAR},
</if>
<if test="closeupPic != null">
#{closeupPic,jdbcType=VARCHAR},
</if>
<if test="camId != null">
#{camId,jdbcType=VARCHAR},
</if>
<if test="warehouseId != null">
#{warehouseId,jdbcType=BIGINT},
</if>
@ -218,13 +242,13 @@
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.carType != null">
car_type = #{record.carType,jdbcType=TINYINT},
car_type = #{record.carType,jdbcType=VARCHAR},
</if>
<if test="record.licensePlate != null">
license_plate = #{record.licensePlate,jdbcType=VARCHAR},
</if>
<if test="record.plateType != null">
plate_type = #{record.plateType,jdbcType=TINYINT},
plate_type = #{record.plateType,jdbcType=VARCHAR},
</if>
<if test="record.filesId != null">
files_id = #{record.filesId,jdbcType=VARCHAR},
@ -238,6 +262,15 @@
<if test="record.carBrand != null">
car_brand = #{record.carBrand,jdbcType=VARCHAR},
</if>
<if test="record.picture != null">
picture = #{record.picture,jdbcType=VARCHAR},
</if>
<if test="record.closeupPic != null">
closeup_pic = #{record.closeupPic,jdbcType=VARCHAR},
</if>
<if test="record.camId != null">
cam_id = #{record.camId,jdbcType=VARCHAR},
</if>
<if test="record.warehouseId != null">
warehouse_id = #{record.warehouseId,jdbcType=BIGINT},
</if>
@ -261,13 +294,16 @@
<update id="updateByExample" parameterType="map">
update t_logistics_car_record
set id = #{record.id,jdbcType=BIGINT},
car_type = #{record.carType,jdbcType=TINYINT},
car_type = #{record.carType,jdbcType=VARCHAR},
license_plate = #{record.licensePlate,jdbcType=VARCHAR},
plate_type = #{record.plateType,jdbcType=TINYINT},
plate_type = #{record.plateType,jdbcType=VARCHAR},
files_id = #{record.filesId,jdbcType=VARCHAR},
car_weight = #{record.carWeight,jdbcType=BIGINT},
in_out = #{record.inOut,jdbcType=TINYINT},
car_brand = #{record.carBrand,jdbcType=VARCHAR},
picture = #{record.picture,jdbcType=VARCHAR},
closeup_pic = #{record.closeupPic,jdbcType=VARCHAR},
cam_id = #{record.camId,jdbcType=VARCHAR},
warehouse_id = #{record.warehouseId,jdbcType=BIGINT},
record_time = #{record.recordTime,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -281,13 +317,13 @@
update t_logistics_car_record
<set>
<if test="carType != null">
car_type = #{carType,jdbcType=TINYINT},
car_type = #{carType,jdbcType=VARCHAR},
</if>
<if test="licensePlate != null">
license_plate = #{licensePlate,jdbcType=VARCHAR},
</if>
<if test="plateType != null">
plate_type = #{plateType,jdbcType=TINYINT},
plate_type = #{plateType,jdbcType=VARCHAR},
</if>
<if test="filesId != null">
files_id = #{filesId,jdbcType=VARCHAR},
@ -301,6 +337,15 @@
<if test="carBrand != null">
car_brand = #{carBrand,jdbcType=VARCHAR},
</if>
<if test="picture != null">
picture = #{picture,jdbcType=VARCHAR},
</if>
<if test="closeupPic != null">
closeup_pic = #{closeupPic,jdbcType=VARCHAR},
</if>
<if test="camId != null">
cam_id = #{camId,jdbcType=VARCHAR},
</if>
<if test="warehouseId != null">
warehouse_id = #{warehouseId,jdbcType=BIGINT},
</if>
@ -321,13 +366,16 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.logistics.bean.po.LogisticsCarRecord">
update t_logistics_car_record
set car_type = #{carType,jdbcType=TINYINT},
set car_type = #{carType,jdbcType=VARCHAR},
license_plate = #{licensePlate,jdbcType=VARCHAR},
plate_type = #{plateType,jdbcType=TINYINT},
plate_type = #{plateType,jdbcType=VARCHAR},
files_id = #{filesId,jdbcType=VARCHAR},
car_weight = #{carWeight,jdbcType=BIGINT},
in_out = #{inOut,jdbcType=TINYINT},
car_brand = #{carBrand,jdbcType=VARCHAR},
picture = #{picture,jdbcType=VARCHAR},
closeup_pic = #{closeupPic,jdbcType=VARCHAR},
cam_id = #{camId,jdbcType=VARCHAR},
warehouse_id = #{warehouseId,jdbcType=BIGINT},
record_time = #{recordTime,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},

Loading…
Cancel
Save