Commit 262e7d90 authored by huangcb's avatar huangcb

承运商接口:新增车辆

parent d639ee12
......@@ -128,4 +128,13 @@ public class ErrorMessageComponent {
@Value("${error-message.carrier.account.detail.1001}")
private String carrierAccountDetail1001;
@Value("${error-message.carrier.vehicle.add.1001}")
private String carrierVehicleAdd1001;
@Value("${error-message.carrier.vehicle.add.1002}")
private String carrierVehicleAdd1002;
@Value("${error-message.carrier.vehicle.add.1003}")
private String carrierVehicleAdd1003;
@Value("${error-message.carrier.vehicle.add.1004}")
private String carrierVehicleAdd1004;
}
......@@ -29,7 +29,8 @@ public class DataPermHandler implements TenantHandler {
* 不需要数据权限查询的表
**/
private final List<String> filterTableNames = Arrays.asList(
"goods_owner_info", "goods_owner_audit_history", "goods_owner_delivery_address", "goods_owner_receive_address", "goods_owner_regularly_route"
"goods_owner_info", "goods_owner_audit_history", "goods_owner_delivery_address", "goods_owner_receive_address", "goods_owner_regularly_route",
"vehicle_audit_history", "vehicle_attachment"
);
@Override
......
......@@ -55,7 +55,7 @@ public class CarrierAccountController {
* createTime 2020/04/24 14:49
**/
@PostMapping("/add")
public EResponse createAccountByManage(@RequestBody @Validated(ValidatorInsert.class) CarrierInfoForm form) throws EException {
public EResponse createAccountByPlatform(@RequestBody @Validated(ValidatorInsert.class) CarrierInfoForm form) throws EException {
/****************************** 参数校验 ******************************/
// 承运商为企业
if (CarrierConstants.CARRIER_TYPE_COMPANY.equals(form.getCarrierType())) {
......
package com.esv.freight.customer.module.carrier.form;
import com.esv.freight.customer.common.validator.groups.ValidatorDetail;
import com.esv.freight.customer.common.validator.groups.ValidatorInsert;
import com.esv.freight.customer.common.validator.groups.ValidatorUpdate;
import lombok.Data;
......
package com.esv.freight.customer.module.vehicle;
/**
* @description:
* @project: freight-customer-service
* @name: com.esv.freight.customer.module.vehicle.VehicleConstants
* @author: 黄朝斌
* @email: huangchaobin@esvtek.com
* @createTime: 2020/04/26 14:46
* @version:1.0
*/
public class VehicleConstants {
/**
* 车辆创建来源:1-平台创建、2-自行注册
**/
public static final String VEHICLE_SOURCE_TYPE_PLATFORM = "1";
public static final String VEHICLE_SOURCE_TYPE_REGISTER = "2";
/**
* 车辆状态:1-正常、2-停用
**/
public static final String VEHICLE_ACCOUNT_STATUS_UNBLOCK = "1";
public static final String VEHICLE_ACCOUNT_STATUS_BLOCK = "2";
/**
* 车辆审核状态:0-待审核、1-审核成功,2-审核失败,APP自行注册需要平台审核
**/
public static final Integer VEHICLE_AUDIT_STATUS_UNAUDITED = 0;
public static final Integer VEHICLE_AUDIT_STATUS_SUCCESS = 1;
public static final Integer VEHICLE_AUDIT_STATUS_FAILURE = 2;
}
package com.esv.freight.customer.module.vehicle.controller;
import com.alibaba.fastjson.JSONObject;
import com.esv.freight.customer.common.exception.EException;
import com.esv.freight.customer.common.response.ECode;
import com.esv.freight.customer.common.response.EResponse;
import com.esv.freight.customer.common.validator.groups.ValidatorInsert;
import com.esv.freight.customer.module.vehicle.form.VehicleInfoForm;
import com.esv.freight.customer.module.vehicle.service.VehicleService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
/**
* @description: 承运商车辆Controller
* @project: freight-customer-service
* @name: com.esv.freight.customer.module.vehicle.controller.VehicleController
* @author: 黄朝斌
* @email: huangchaobin@esvtek.com
* @createTime: 2020/04/26 15:11
* @version:1.0
*/
@Slf4j
@RestController
@RequestMapping("/carrier/vehicle")
@Validated
public class VehicleController {
private VehicleService vehicleService;
@Autowired
public VehicleController(VehicleService vehicleService) {
this.vehicleService = vehicleService;
}
/**
* description 新增车辆
* param [form]
* return com.esv.freight.customer.common.response.EResponse
* author Administrator
* createTime 2020/04/26 15:17
**/
@PostMapping("/add")
public EResponse insertVehicleByPlatform(@RequestBody @Validated(ValidatorInsert.class) VehicleInfoForm form) throws EException {
/****************************** 参数校验 ******************************/
// 总质量/整备质量不能同时为空
if (null == form.getTotalMass() && null == form.getUnladenMass()) {
throw new EException(ECode.PARAM_ERROR.code(), "参数totalMass|unladenMass不能同时为空");
}
// 道路运输证号,4.5吨及以下普货车辆可以为空
BigDecimal bigDecimal4_5 = new BigDecimal("4.5");
if (-1 == bigDecimal4_5.compareTo(form.getLoadCapacity()) && StringUtils.isBlank(form.getRoadCertificateNumber())) {
throw new EException(ECode.PARAM_ERROR.code(), "4.5顿以上载重的车辆,道路运输证号不能为空");
}
/****************************** 参数校验 ******************************/
Long id = vehicleService.insertVehicle(form);
JSONObject data = new JSONObject();
data.put("id", id);
return EResponse.ok(data);
}
}
package com.esv.freight.customer.module.vehicle.dao;
import com.esv.freight.customer.module.vehicle.entity.AttachmentEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 车辆附件表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-04-26 11:21:07
*/
@Mapper
public interface AttachmentDao extends BaseMapper<AttachmentEntity> {
}
package com.esv.freight.customer.module.vehicle.dao;
import com.esv.freight.customer.module.vehicle.entity.VehicleAuditHistoryEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 车辆审核历史表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-04-26 11:21:07
*/
@Mapper
public interface VehicleAuditHistoryDao extends BaseMapper<VehicleAuditHistoryEntity> {
}
package com.esv.freight.customer.module.vehicle.dao;
import com.esv.freight.customer.module.vehicle.entity.VehicleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 车辆表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-04-26 11:21:07
*/
@Mapper
public interface VehicleDao extends BaseMapper<VehicleEntity> {
}
package com.esv.freight.customer.module.vehicle.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 车辆附件表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-04-26 11:21:07
*/
@Data
@TableName("vehicle_attachment")
public class AttachmentEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId
private Long id;
/**
* 承运商ID
*/
private Long carrierId;
/**
* 车辆ID
*/
private Long vehicleId;
/**
* 车头照片URL
*/
private String vehicleHeadUrl;
/**
* 人车合照URL
*/
private String vehicleHeadPersonUrl;
/**
* 行驶证正面URL
*/
private String vehicleLicenseFrontUrl;
/**
* 行驶证背面URL
*/
private String vehicleLicenseBackUrl;
/**
* 道路运输证正面URL
*/
private String roadCertificateFrontUrl;
/**
* 挂靠声明URL
*/
private String attachedStatementUrl;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String createUser;
/**
* 修改者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateUser;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
}
package com.esv.freight.customer.module.vehicle.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 车辆审核历史表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-04-26 11:21:07
*/
@Data
@TableName("vehicle_audit_history")
public class VehicleAuditHistoryEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId
private Long id;
/**
* 承运商ID
*/
private Long carrierId;
/**
* 车辆id
*/
private Long vehicleId;
/**
* 审核状态(字典表):0-待审核、1-审核成功,2-审核失败
*/
private Integer auditStatus;
/**
* 备注
*/
private String remark;
/**
* 操作者
*/
private String operateUser;
/**
* 操作时间
*/
private Date operateTime;
}
package com.esv.freight.customer.module.vehicle.entity;
import com.baomidou.mybatisplus.annotation.*;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 车辆表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-04-26 11:21:07
*/
@Data
@TableName("vehicle")
public class VehicleEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId
private Long id;
/**
* 租户ID
*/
@TableField(fill = FieldFill.INSERT)
private Long tenantId;
/**
* 部门ID
*/
@TableField(fill = FieldFill.INSERT)
private Long departmentId;
/**
* 承运商帐号ID
*/
private Long carrierId;
/**
* 车牌号
*/
private String licenseNumber;
/**
* 车辆状态:1-正常、2-停用
*/
private String vehicleStatus;
/**
* 审核状态(字典表):0-待审核、1-审核成功,2-审核失败
*/
private Integer auditStatus;
/**
* 入网状态:字典表
*/
private Integer netInStatus;
/**
* 入网时间
*/
private String netInDate;
/**
* 牌照类型(字典表):1-大型汽车号牌、2-小型汽车号牌、3-其他号牌
*/
private Integer licenseType;
/**
* 车牌颜色(字典表):1-蓝色、2-黄色、3-黑色、4-白色、5-绿色、6-农黄色、7-农绿色、8-黄绿色、9-渐变绿、0-其他
*/
private Integer licenseColor;
/**
* 车辆类型(字典表)
*/
private Integer vehicleType;
/**
* 车辆长度(单位毫米)
*/
private Integer vehicleLength;
/**
* 车辆宽度(单位毫米)
*/
private Integer vehicleWidth;
/**
* 车辆高度(单位毫米)
*/
private Integer vehicleHeight;
/**
* 车辆所属(字典表):1-自有车、2-外协车
*/
private Integer vehicleBelong;
/**
* 年审日期
*/
private String yearAuditDate;
/**
* 能源类型(字典表):1-汽油、2-柴油、3-电、4-混合油、5-天然气、6-液化石油气、7-甲醇、8-乙醇、9-太阳能、10-混合动力、99-其他
*/
private Integer energyType;
/**
* 行驶证档案编号
*/
private String vehicleLicenseNumber;
/**
* 核定载质量(吨)
*/
private BigDecimal loadCapacity;
/**
* 总质量(吨)
*/
private BigDecimal totalMass;
/**
* 整备质量(吨)
*/
private BigDecimal unladenMass;
/**
* 车辆所有人
*/
private String vehicleOwner;
/**
* 车辆所有人代码:企业-统一社会信用代码,个人-身份证号码
*/
private String vehicleOwnerCode;
/**
* 使用性质
*/
private String useNature;
/**
* 注册日期
*/
private String registerDate;
/**
* 车辆识别代码
*/
private String vin;
/**
* 品牌型号
*/
private String brandModel;
/**
* 发动机号
*/
private String engineNumber;
/**
* 发证日期
*/
private String vehicleLicenseIssuedDate;
/**
* 检验有效期至
*/
private String vehicleLicenseExpireDate;
/**
* 发证机关
*/
private String vehicleLicenseIssueDepartment;
/**
* 道路运输证号
*/
private String roadCertificateNumber;
/**
* 经营许可证号
*/
private String businessLicenseNumber;
/**
* 经营许可证有效期至
*/
private String businessLicenseExpireDate;
/**
* 车籍地-省份代码
*/
private String vehicleProvinceCode;
/**
* 车籍地-市代码
*/
private String vehicleCityCode;
/**
* 车籍地-区县代码
*/
private String vehicleDistrictCode;
/**
* 是否开通ETC:1-已开通、2-未开通、3-未知
*/
private String etc;
/**
* 上报状态(字典表):0-未上报、1-上报成功、2-上报失败
*/
private Integer uploadState;
/**
* 上报时间
*/
private String uploadTime;
/**
* 删除标识:0-未删除,1-已删除
*/
@TableLogic
private Boolean deleted;
/**
* 创建来源:1-平台创建、2-司机创建
*/
private String sourceType;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String createUser;
/**
* 修改者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateUser;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
}
package com.esv.freight.customer.module.vehicle.form;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* @description:
* @project: freight-customer-service
* @name: com.esv.freight.customer.module.vehicle.form.VehicleQueryForm
* @author: 黄朝斌
* @email: huangchaobin@esvtek.com
* @createTime: 2020/04/26 14:35
* @version:1.0
*/
@Data
public class VehicleQueryForm {
/**
*
*/
private Long id;
/**
* 承运商帐号ID
*/
private Long carrierId;
/**
* 车牌号
*/
private String licenseNumber;
/**
* 行驶证档案编号
*/
private String vehicleLicenseNumber;
/**
* 道路运输证号
*/
private String roadCertificateNumber;
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
}
}
package com.esv.freight.customer.module.vehicle.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.esv.freight.customer.module.vehicle.entity.AttachmentEntity;
/**
* 车辆附件表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-04-26 11:21:07
*/
public interface AttachmentService extends IService<AttachmentEntity> {
}
package com.esv.freight.customer.module.vehicle.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.esv.freight.customer.module.vehicle.entity.VehicleAuditHistoryEntity;
/**
* 车辆审核历史表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-04-26 11:21:07
*/
public interface VehicleAuditHistoryService extends IService<VehicleAuditHistoryEntity> {
}
package com.esv.freight.customer.module.vehicle.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.esv.freight.customer.module.vehicle.entity.VehicleEntity;
import com.esv.freight.customer.module.vehicle.form.VehicleInfoForm;
/**
* 车辆表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-04-26 11:21:07
*/
public interface VehicleService extends IService<VehicleEntity> {
/**
* description 新增车辆
* param [form]
* return java.lang.Long
* author Administrator
* createTime 2020/04/26 14:50
**/
Long insertVehicle(VehicleInfoForm form);
}
package com.esv.freight.customer.module.vehicle.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.esv.freight.customer.module.vehicle.dao.AttachmentDao;
import com.esv.freight.customer.module.vehicle.entity.AttachmentEntity;
import com.esv.freight.customer.module.vehicle.service.AttachmentService;
import org.springframework.stereotype.Service;
@Service("attachmentService")
public class AttachmentServiceImpl extends ServiceImpl<AttachmentDao, AttachmentEntity> implements AttachmentService {
}
\ No newline at end of file
package com.esv.freight.customer.module.vehicle.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.esv.freight.customer.module.vehicle.dao.VehicleAuditHistoryDao;
import com.esv.freight.customer.module.vehicle.entity.VehicleAuditHistoryEntity;
import com.esv.freight.customer.module.vehicle.service.VehicleAuditHistoryService;
import org.springframework.stereotype.Service;
@Service("vehicleAuditHistoryService")
public class VehicleAuditHistoryServiceImpl extends ServiceImpl<VehicleAuditHistoryDao, VehicleAuditHistoryEntity> implements VehicleAuditHistoryService {
}
\ No newline at end of file
package com.esv.freight.customer.module.vehicle.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.esv.freight.customer.common.component.ErrorMessageComponent;
import com.esv.freight.customer.common.exception.EException;
import com.esv.freight.customer.common.util.ReqUtils;
import com.esv.freight.customer.module.carrier.entity.CarrierAccountEntity;
import com.esv.freight.customer.module.carrier.service.CarrierAccountService;
import com.esv.freight.customer.module.vehicle.VehicleConstants;
import com.esv.freight.customer.module.vehicle.dao.VehicleDao;
import com.esv.freight.customer.module.vehicle.entity.AttachmentEntity;
import com.esv.freight.customer.module.vehicle.entity.VehicleAuditHistoryEntity;
import com.esv.freight.customer.module.vehicle.entity.VehicleEntity;
import com.esv.freight.customer.module.vehicle.form.VehicleInfoForm;
import com.esv.freight.customer.module.vehicle.service.AttachmentService;
import com.esv.freight.customer.module.vehicle.service.VehicleAuditHistoryService;
import com.esv.freight.customer.module.vehicle.service.VehicleService;
import com.esv.gateway.common.GatewayHeaders;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service("vehicleService")
public class VehicleServiceImpl extends ServiceImpl<VehicleDao, VehicleEntity> implements VehicleService {
private ErrorMessageComponent errorMessageComponent;
private CarrierAccountService carrierAccountService;
private AttachmentService attachmentService;
private VehicleAuditHistoryService vehicleAuditHistoryService;
@Autowired
public VehicleServiceImpl(ErrorMessageComponent errorMessageComponent, CarrierAccountService carrierAccountService,
AttachmentService attachmentService, VehicleAuditHistoryService vehicleAuditHistoryService) {
this.errorMessageComponent = errorMessageComponent;
this.carrierAccountService = carrierAccountService;
this.attachmentService = attachmentService;
this.vehicleAuditHistoryService = vehicleAuditHistoryService;
}
@Override
@Transactional(rollbackFor = Exception.class)
public Long insertVehicle(VehicleInfoForm form) {
// 1:校验
// 1.1校验承运商ID是否有效
CarrierAccountEntity carrierAccountEntity = this.carrierAccountService.getBaseMapper().selectById(form.getCarrierId());
if (null == carrierAccountEntity) {
throw new EException(1001, errorMessageComponent.getCarrierVehicleAdd1001());
}
// 1.2校验车牌号是否存在
int count = this.baseMapper.selectCount(new QueryWrapper<VehicleEntity>().lambda().eq(VehicleEntity::getLicenseNumber, form.getLicenseNumber()));
if (0 < count) {
throw new EException(1002, errorMessageComponent.getCarrierVehicleAdd1002());
}
// 1.3校验行驶证档案编号是否存在
count = this.baseMapper.selectCount(new QueryWrapper<VehicleEntity>().lambda().eq(VehicleEntity::getVehicleLicenseNumber, form.getVehicleLicenseNumber()));
if (0 < count) {
throw new EException(1003, errorMessageComponent.getCarrierVehicleAdd1003());
}
// 1.4校验道路运输证号是否存在
count = this.baseMapper.selectCount(new QueryWrapper<VehicleEntity>().lambda().eq(VehicleEntity::getRoadCertificateNumber, form.getRoadCertificateNumber()));
if (0 < count) {
throw new EException(1004, errorMessageComponent.getCarrierVehicleAdd1004());
}
// 2:新增车辆
VehicleEntity vehicleEntity = new VehicleEntity();
BeanUtils.copyProperties(form, vehicleEntity);
vehicleEntity.setVehicleStatus(VehicleConstants.VEHICLE_ACCOUNT_STATUS_UNBLOCK);
vehicleEntity.setAuditStatus(VehicleConstants.VEHICLE_AUDIT_STATUS_SUCCESS);
vehicleEntity.setSourceType(VehicleConstants.VEHICLE_SOURCE_TYPE_PLATFORM);
this.baseMapper.insert(vehicleEntity);
Long vehicleId = vehicleEntity.getId();
// 3:新增车辆附件
AttachmentEntity attachmentEntity = new AttachmentEntity();
BeanUtils.copyProperties(form, attachmentEntity);
attachmentEntity.setCarrierId(form.getCarrierId());
attachmentEntity.setVehicleId(vehicleId);
this.attachmentService.getBaseMapper().insert(attachmentEntity);
// 4:新增审核记录
VehicleAuditHistoryEntity vehicleAuditHistoryEntity = new VehicleAuditHistoryEntity();
vehicleAuditHistoryEntity.setCarrierId(form.getCarrierId());
vehicleAuditHistoryEntity.setVehicleId(vehicleId);
vehicleAuditHistoryEntity.setAuditStatus(VehicleConstants.VEHICLE_AUDIT_STATUS_SUCCESS);
vehicleAuditHistoryEntity.setRemark("平台创建自动审核");
vehicleAuditHistoryEntity.setOperateUser(ReqUtils.getRequestHeader(GatewayHeaders.USER_ACCOUNT));
this.vehicleAuditHistoryService.getBaseMapper().insert(vehicleAuditHistoryEntity);
return vehicleId;
}
}
\ No newline at end of file
......@@ -119,4 +119,10 @@ error-message:
1003: 统一社会信用代码已存在
1004: 承运商名称已存在
detail:
1001: 无效的帐号ID
\ No newline at end of file
1001: 无效的帐号ID
vehicle:
add:
1001: 无效的承运商ID
1002: 车牌号已存在
1003: 行驶证档案编号已存在
1004: 道路运输证号已存在
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.esv.freight.customer.module.vehicle.dao.AttachmentDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.esv.freight.customer.module.vehicle.entity.AttachmentEntity" id="attachmentMap">
<result property="id" column="id"/>
<result property="carrierId" column="carrier_id"/>
<result property="vehicleId" column="vehicle_id"/>
<result property="vehicleHeadUrl" column="vehicle_head_url"/>
<result property="vehicleHeadPersonUrl" column="vehicle_head_person_url"/>
<result property="vehicleLicenseFrontUrl" column="vehicle_license_front_url"/>
<result property="vehicleLicenseBackUrl" column="vehicle_license_back_url"/>
<result property="roadCertificateFrontUrl" column="road_certificate_front_url"/>
<result property="attachedStatementUrl" column="attached_statement_url"/>
<result property="createUser" column="create_user"/>
<result property="updateUser" column="update_user"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.esv.freight.customer.module.vehicle.dao.VehicleAuditHistoryDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.esv.freight.customer.module.vehicle.entity.VehicleAuditHistoryEntity" id="auditHistoryMap">
<result property="id" column="id"/>
<result property="carrierId" column="carrier_id"/>
<result property="vehicleId" column="vehicle_id"/>
<result property="auditStatus" column="audit_status"/>
<result property="remark" column="remark"/>
<result property="operateUser" column="operate_user"/>
<result property="operateTime" column="operate_time"/>
</resultMap>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.esv.freight.customer.module.vehicle.dao.VehicleDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.esv.freight.customer.module.vehicle.entity.VehicleEntity" id="vehicleMap">
<result property="id" column="id"/>
<result property="tenantId" column="tenant_id"/>
<result property="departmentId" column="department_id"/>
<result property="carrierId" column="carrier_id"/>
<result property="licenseNumber" column="license_number"/>
<result property="vehicleStatus" column="vehicle_status"/>
<result property="auditStatus" column="audit_status"/>
<result property="netInStatus" column="net_in_status"/>
<result property="netInDate" column="net_in_date"/>
<result property="licenseType" column="license_type"/>
<result property="licenseColor" column="license_color"/>
<result property="vehicleType" column="vehicle_type"/>
<result property="vehicleLength" column="vehicle_length"/>
<result property="vehicleWidth" column="vehicle_width"/>
<result property="vehicleHeight" column="vehicle_height"/>
<result property="vehicleBelong" column="vehicle_belong"/>
<result property="yearAuditDate" column="year_audit_date"/>
<result property="energyType" column="energy_type"/>
<result property="vehicleLicenseNumber" column="vehicle_license_number"/>
<result property="loadCapacity" column="load_capacity"/>
<result property="totalMass" column="total_mass"/>
<result property="unladenMass" column="unladen_mass"/>
<result property="vehicleOwner" column="vehicle_owner"/>
<result property="vehicleOwnerCode" column="vehicle_owner_code"/>
<result property="useNature" column="use_nature"/>
<result property="registerDate" column="register_date"/>
<result property="vin" column="vin"/>
<result property="brandModel" column="brand_model"/>
<result property="engineNumber" column="engine_number"/>
<result property="vehicleLicenseIssuedDate" column="vehicle_license_issued_date"/>
<result property="vehicleLicenseExpireDate" column="vehicle_license_expire_date"/>
<result property="vehicleLicenseIssueDepartment" column="vehicle_license__issue_department"/>
<result property="roadCertificateNumber" column="road_certificate_number"/>
<result property="businessLicenseNumber" column="business_license_number"/>
<result property="businessLicenseExpireDate" column="business_license_expire_date"/>
<result property="vehicleProvinceCode" column="vehicle_province_code"/>
<result property="vehicleCityCode" column="vehicle_city_code"/>
<result property="vehicleDistrictCode" column="vehicle_district_code"/>
<result property="etc" column="etc"/>
<result property="uploadState" column="upload_state"/>
<result property="uploadTime" column="upload_time"/>
<result property="deleted" column="deleted"/>
<result property="sourceType" column="source_type"/>
<result property="createUser" column="create_user"/>
<result property="updateUser" column="update_user"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment