作者 王勇

驾驶员管理,初次提交

package com.sunyo.wlpt.vehicle.manage.controller;
import com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord;
import com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord;
import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord;
import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
import com.sunyo.wlpt.vehicle.manage.service.LandRoadDrRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @author 子诚
* Description:驾驶员信息,控制器
* 时间:2020/9/24 15:57
*/
@Api(tags = "驾驶员信息,控制器")
@CrossOrigin
@RequestMapping("driver")
@RestController
public class DriverController {
@Resource
private LandRoadDrRecordService landRoadDrRecordService;
/**
* 分页查询
*
* @param drName 驾驶员姓名
* @param quaId 驾车资格编号
* @param pageNum 当前页数
* @param pageSize 每页大小
* @return
*/
@ApiOperation(value = "驾驶员信息,分页查询")
@GetMapping("/page")
public ResultJson selectListByPage(
@RequestParam(value = "drName", required = false) String drName,
@RequestParam(value = "quaId", required = false) String quaId,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize)
{
LandRoadDrRecord landRoadDrRecord = LandRoadDrRecord.builder()
.drName(drName).quaId(quaId)
.build();
return landRoadDrRecordService.selectListByPage(landRoadDrRecord, pageNum, pageSize);
}
/**
* 删除
* 条件:id
*
* @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
* @return
*/
@ApiOperation(value = "驾驶员信息,删除")
@DeleteMapping("/delete")
public ResultJson deleteDriver(@RequestBody LandRoadDrRecord landRoadDrRecord)
{
return landRoadDrRecordService.deleteByPrimaryKey(landRoadDrRecord.getId());
}
/**
* 批量删除
* 条件:{id: id1,id2...}
*
* @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
* @return
*/
@ApiOperation(value = "驾驶员信息,批量删除")
@DeleteMapping("/batchRemove")
public ResultJson batchRemoveDriver(@RequestBody LandRoadDrRecord landRoadDrRecord)
{
String id = landRoadDrRecord.getId();
return id.contains(",") ? landRoadDrRecordService.batchRemoveByIds(id)
: landRoadDrRecordService.deleteByPrimaryKey(id);
}
/**
* 新增
*
* @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
* @return 成功 or 失败
*/
@ApiOperation(value = "驾驶员信息,增加")
@PostMapping("/insert")
public ResultJson insertDriver(@RequestBody LandRoadDrRecord landRoadDrRecord)
{
return landRoadDrRecordService.insertSelective(landRoadDrRecord);
}
/**
* 修改 or 编辑
*
* @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
* @return
*/
@ApiOperation(value = "驾驶员信息,编辑")
@PutMapping("/update")
public ResultJson updateLandRoadVeRecord(@RequestBody LandRoadDrRecord landRoadDrRecord)
{
return landRoadDrRecordService.updateByPrimaryKeySelective(landRoadDrRecord);
}
}
... ...
package com.sunyo.wlpt.vehicle.manage.controller;
import com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord;
import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord;
import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
import com.sunyo.wlpt.vehicle.manage.service.LandRoadTrailerRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @author 子诚
* Description:挂车管理,控制器
* Description:挂车信息,控制器
* 时间:2020/9/23 15:25
*/
@Api(tags = "挂车信息,控制器")
@CrossOrigin
@RequestMapping("trailer")
@RestController
public class LandRoadTrailerRecordController {
public class TrailerController {
@Resource
private LandRoadTrailerRecordService landRoadTrailerRecordService;
... ... @@ -29,6 +31,7 @@ public class LandRoadTrailerRecordController {
* @param pageSize 每页大小
* @return
*/
@ApiOperation(value = "挂车信息,分页查询")
@GetMapping("/page")
public ResultJson selectListByPage(
@RequestParam(value = "trailerLicenseNo", required = false) String trailerLicenseNo,
... ... @@ -45,6 +48,7 @@ public class LandRoadTrailerRecordController {
* @param landRoadTrailerRecord 挂车信息 {@link LandRoadTrailerRecord}
* @return 成功 or 失败
*/
@ApiOperation(value = "挂车信息,编辑")
@PutMapping("/update")
public ResultJson updateTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord)
{
... ... @@ -57,6 +61,7 @@ public class LandRoadTrailerRecordController {
* @param landRoadTrailerRecord 挂车信息 {@link LandRoadTrailerRecord}
* @return 成功 or 失败
*/
@ApiOperation(value = "挂车信息,增加")
@PostMapping("/insert")
public ResultJson insertTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord)
{
... ... @@ -70,6 +75,7 @@ public class LandRoadTrailerRecordController {
* @param landRoadTrailerRecord 挂车信息 {@link LandRoadTrailerRecord}
* @return
*/
@ApiOperation(value = "挂车信息,删除")
@DeleteMapping("/delete")
public ResultJson deleteTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord)
{
... ... @@ -83,6 +89,7 @@ public class LandRoadTrailerRecordController {
* @param landRoadTrailerRecord 车辆信息 {@link LandRoadTrailerRecord}
* @return
*/
@ApiOperation(value = "挂车信息,批量删除")
@DeleteMapping("/batchRemove")
public ResultJson batchRemoveTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord)
{
... ...
package com.sunyo.wlpt.vehicle.manage.controller;
import com.github.pagehelper.PageInfo;
import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord;
import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
import com.sunyo.wlpt.vehicle.manage.service.LandRoadVeRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @author 子诚
* Description:车辆管理,控制器
* Description:车辆信息,控制器
* 时间:2020/9/22 17:58
*/
@Api(tags = "车辆信息,控制器")
@CrossOrigin
@RequestMapping("vehicle")
@RestController
public class LandRoadVeRecordController {
public class VehicleController {
@Resource
LandRoadVeRecordService landRoadVeRecordService;
... ... @@ -31,6 +33,7 @@ public class LandRoadVeRecordController {
* @param pageSize 每页大小
* @return
*/
@ApiOperation(value = "车辆信息,分页查询")
@GetMapping("/page")
public ResultJson selectListByPage(
@RequestParam(value = "domesticLisenceNo", required = false) String domesticLisenceNo,
... ... @@ -54,6 +57,7 @@ public class LandRoadVeRecordController {
* @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
* @return
*/
@ApiOperation(value = "车辆信息,删除")
@DeleteMapping("/delete")
public ResultJson deleteLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
{
... ... @@ -67,6 +71,7 @@ public class LandRoadVeRecordController {
* @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
* @return
*/
@ApiOperation(value = "车辆信息,批量删除")
@DeleteMapping("/batchRemove")
public ResultJson batchRemoveLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
{
... ... @@ -82,6 +87,7 @@ public class LandRoadVeRecordController {
* @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
* @return
*/
@ApiOperation(value = "车辆信息,增加")
@PostMapping("/insert")
public ResultJson insertLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
{
... ... @@ -94,6 +100,7 @@ public class LandRoadVeRecordController {
* @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
* @return
*/
@ApiOperation(value = "车辆信息,编辑")
@PutMapping("/update")
public ResultJson updateLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
{
... ...
package com.sunyo.wlpt.vehicle.manage.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author 子诚
* Description:驾驶员信息
* 时间:2020/9/24 15:53
*/
@ApiModel("驾驶员信息")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class LandRoadDrRecord implements Serializable {
private static final long serialVersionUID = -7806543717958892315L;
@ApiModelProperty(value = "")
private String id;
/**
* 电子口岸报文ID(电子口岸与海关数据传输使用,企业无需填写)
*/
@ApiModelProperty(value = "电子口岸报文ID(电子口岸与海关数据传输使用,企业无需填写)")
private String eportId;
/**
* 主管海关代码
*/
@ApiModelProperty(value = "主管海关代码")
private String mainPort;
/**
* 驾驶员姓名
*/
@ApiModelProperty(value = "驾驶员姓名")
private String drName;
/**
* 身份证号/护照号
*/
@ApiModelProperty(value = "身份证号/护照号,")
private String idCard;
/**
* 籍贯
*/
@ApiModelProperty(value = "籍贯")
private String drNative;
/**
* 性别
*/
@ApiModelProperty(value = "性别")
private String gender;
/**
* 出生日期
*/
@ApiModelProperty(value = "出生日期")
private Date birthday;
/**
* 居住地址
*/
@ApiModelProperty(value = "居住地址")
private String liveAddr;
/**
* 最新更新申请业务类型
*/
@ApiModelProperty(value = "最新更新申请业务类型")
private String currApplyBussiness;
/**
* 申请人
*/
@ApiModelProperty(value = "申请人")
private String proposer;
/**
* 申请时间
*/
@ApiModelProperty(value = "申请时间")
private Date proposeTime;
/**
* 驾驶员分类:1.经营性进出境公路运输工具驾驶员;2.经营性来往港澳公路运输工具驾驶员;3.非经营性进出境交通工具驾驶员;4.非经营性来往港澳公路交通工具驾驶员。
*/
@ApiModelProperty(value = "驾驶员分类:1.经营性进出境公路运输工具驾驶员;2.经营性来往港澳公路运输工具驾驶员;3.非经营性进出境交通工具驾驶员;4.非经营性来往港澳公路交通工具驾驶员。")
private String drClassFlag;
/**
* 数据操作类型
*/
@ApiModelProperty(value = "数据操作类型")
private String operationType;
/**
* 驾驶员照片
*/
@ApiModelProperty(value = "驾驶员照片")
private String drPic;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String memo;
/**
* 驾车资格申请电子口岸预录入号ID(电子口岸与海关数据传输使用,企业无需填写)
*/
@ApiModelProperty(value = "驾车资格申请电子口岸预录入号ID(电子口岸与海关数据传输使用,企业无需填写)")
private String roadDrQuaInfo;
/**
* 驾车资格编号
*/
@ApiModelProperty(value = "驾车资格编号")
private String quaId;
/**
* 驾车资格:1.经营性来往港澳公路运输工具驾驶资格;2.经营性进出境公路运输工具驾驶资格;3.境内公路承运海关监管货物运输工具驾驶资格;4.非经营性来往港澳公路交通工具驾驶资格;5.非经营性进出境公路交通工具驾驶资格。
*/
@ApiModelProperty(value = "驾车资格:1.经营性来往港澳公路运输工具驾驶资格;2.经营性进出境公路运输工具驾驶资格;3.境内公路承运海关监管货物运输工具驾驶资格;4.非经营性来往港澳公路交通工具驾驶资格;5.非经营性进出境公路交通工具驾驶资格。")
private String drQua;
/**
* 批文编号(N)
*/
@ApiModelProperty(value = "批文编号(N)")
private String apprNo;
/**
* 数据操作类型
*/
@ApiModelProperty(value = "数据操作类型")
private String operationTypeInfo;
/**
* 国籍
*/
@ApiModelProperty(value = "国籍")
private String nationality;
@ApiModelProperty(value = "")
private Date apprPeriod;
/**
* 所在企业代码
*/
@ApiModelProperty(value = "所在企业代码")
private String coCode;
/**
* 回执内容
*/
@ApiModelProperty(value = "回执内容")
private String returnmessage;
@ApiModelProperty(value = "创建者")
private String createBy;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private String updateBy;
@ApiModelProperty(value = "修改时间")
private Date updateDate;
}
\ No newline at end of file
... ...
package com.sunyo.wlpt.vehicle.manage.mapper;
import com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord;
import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/9/24 15:53
*/
@Mapper
public interface LandRoadDrRecordMapper {
/**
* delete by primary key
*
* @param id primaryKey
* @return deleteCount
*/
int deleteByPrimaryKey(String id);
/**
* 批量删除
*
* @param idList id数组
* @return
*/
int batchRemoveByIds(String[] idList);
/**
* insert record to table
*
* @param record the record
* @return insert count
*/
int insert(LandRoadDrRecord record);
/**
* insert record to table selective
*
* @param record the record
* @return insert count
*/
int insertSelective(LandRoadDrRecord record);
/**
* select by primary key
*
* @param id primary key
* @return object by primary key
*/
LandRoadDrRecord selectByPrimaryKey(String id);
/**
* update record selective
*
* @param record the updated record
* @return update count
*/
int updateByPrimaryKeySelective(LandRoadDrRecord record);
/**
* update record
*
* @param record the updated record
* @return update count
*/
int updateByPrimaryKey(LandRoadDrRecord record);
/**
* 用于分页查询
* 条件:驾驶员姓名、驾车资格编号
*
* @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
* @return
*/
List<LandRoadDrRecord> selectListByPage(LandRoadDrRecord landRoadDrRecord);
/**
* 查询,根据驾车资格编号
* 用于校验。驾车资格编号是否唯一
*
* @param quaId 驾车资格编号
* @return
*/
List<LandRoadDrRecord> selectByQuaId(@Param("quaId") String quaId);
}
\ No newline at end of file
... ...
package com.sunyo.wlpt.vehicle.manage.service;
import com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord;
import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
/**
* @author 子诚
* Description:
* 时间:2020/9/24 15:53
*/
public interface LandRoadDrRecordService {
/**
* delete by primary key
*
* @param id primaryKey
* @return deleteCount
*/
ResultJson deleteByPrimaryKey(String id);
/**
* insert record to table
*
* @param record the record
* @return insert count
*/
int insert(LandRoadDrRecord record);
/**
* insert record to table selective
*
* @param record the record
* @return insert count
*/
ResultJson insertSelective(LandRoadDrRecord record);
/**
* select by primary key
*
* @param id primary key
* @return object by primary key
*/
LandRoadDrRecord selectByPrimaryKey(String id);
/**
* update record selective
*
* @param record the updated record
* @return update count
*/
ResultJson updateByPrimaryKeySelective(LandRoadDrRecord record);
/**
* update record
*
* @param record the updated record
* @return update count
*/
int updateByPrimaryKey(LandRoadDrRecord record);
/**
* 分页查询
*
* @param landRoadDrRecord 驾驶员信息
* @param pageNum 当前页数
* @param pageSize 每页大小
* @return
*/
ResultJson selectListByPage(LandRoadDrRecord landRoadDrRecord, Integer pageNum, Integer pageSize);
/**
* 批量删除驾驶员信息
*
* @param ids 被删除的id,多个以,相隔的字符串
* @return
*/
ResultJson batchRemoveByIds(String ids);
}
... ...
package com.sunyo.wlpt.vehicle.manage.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sunyo.wlpt.vehicle.manage.common.Common;
import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
import com.sunyo.wlpt.vehicle.manage.utils.IdUtils;
import io.netty.util.internal.StringUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.sunyo.wlpt.vehicle.manage.mapper.LandRoadDrRecordMapper;
import com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord;
import com.sunyo.wlpt.vehicle.manage.service.LandRoadDrRecordService;
import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/9/24 15:53
*/
@Service
public class LandRoadDrRecordServiceImpl implements LandRoadDrRecordService {
@Resource
private LandRoadDrRecordMapper landRoadDrRecordMapper;
/**
* 删除
*
* @param id primaryKey
* @return
*/
@Override
public ResultJson deleteByPrimaryKey(String id)
{
return landRoadDrRecordMapper.deleteByPrimaryKey(id) > 0
? ResultJson.success("200", "删除驾驶员信息,成功")
: ResultJson.error("500", "删除驾驶员信息,失败");
}
/**
* 批量删除
*
* @param ids 被删除的id,多个以,相隔的字符串
* @return
*/
@Override
public ResultJson batchRemoveByIds(String ids)
{
String[] idList = ids.split(",");
return landRoadDrRecordMapper.batchRemoveByIds(idList) > 0
? ResultJson.success("200", "批量删除驾驶员信息,成功")
: ResultJson.error("500", "批量删除驾驶员信息,失败");
}
@Override
public int insert(LandRoadDrRecord record)
{
return landRoadDrRecordMapper.insert(record);
}
/**
* 新增,选择性
*
* @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
* @return
*/
@Override
public ResultJson insertSelective(LandRoadDrRecord landRoadDrRecord)
{
ResultJson validate = validate(landRoadDrRecord);
if (!Common.RESULT_SUCCESS.equals(validate.getCode())) {
return validate;
}
landRoadDrRecord.setId(IdUtils.generateId());
return landRoadDrRecordMapper.insertSelective(landRoadDrRecord) > 0
? ResultJson.success("200", "新增驾驶员信息,成功")
: ResultJson.error("500", "新增驾驶员信息,失败");
}
@Override
public LandRoadDrRecord selectByPrimaryKey(String id)
{
return landRoadDrRecordMapper.selectByPrimaryKey(id);
}
/**
* 编辑,选择性
*
* @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
* @return
*/
@Override
public ResultJson updateByPrimaryKeySelective(LandRoadDrRecord landRoadDrRecord)
{
ResultJson validate = validate(landRoadDrRecord);
if (!Common.RESULT_SUCCESS.equals(validate.getCode())) {
return validate;
}
return landRoadDrRecordMapper.updateByPrimaryKeySelective(landRoadDrRecord) > 0
? ResultJson.success("200", "编辑驾驶员信息,成功")
: ResultJson.error("500", "编辑驾驶员信息,失败");
}
@Override
public int updateByPrimaryKey(LandRoadDrRecord record)
{
return landRoadDrRecordMapper.updateByPrimaryKey(record);
}
/**
* 分页查询
*
* @param landRoadDrRecord 驾驶员信息
* @param pageNum 当前页数
* @param pageSize 每页大小
* @return
*/
@Override
public ResultJson selectListByPage(LandRoadDrRecord landRoadDrRecord, Integer pageNum, Integer pageSize)
{
PageHelper.startPage(pageNum, pageSize);
List<LandRoadDrRecord> driverList = landRoadDrRecordMapper.selectListByPage(landRoadDrRecord);
PageInfo<LandRoadDrRecord> pageInfo = new PageInfo<>(driverList);
return pageInfo.getTotal() >= 0
? ResultJson.success("200", "查询驾驶员信息列表,成功!", pageInfo)
: ResultJson.error("500", "查询驾驶员信息列表,失败!");
}
/**
* 新增 or 编辑
* 校验,驾车资格编号,是否唯一
*
* @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
* @return
*/
private ResultJson validate(LandRoadDrRecord landRoadDrRecord)
{
String id = landRoadDrRecord.getId();
String quaId = landRoadDrRecord.getQuaId();
if (StringUtil.isNullOrEmpty(quaId)) {
return ResultJson.error("400", "驾车资格编号,不能为空!");
}
return StringUtil.isNullOrEmpty(id) ? validateInsert(quaId) : validateEdit(id, quaId);
}
/**
* 校验,编辑时,驾车资格编号的唯一性
*
* @param id 主键
* @param quaId 驾车资格编号
* @return
*/
private ResultJson validateEdit(String id, String quaId)
{
LandRoadDrRecord oldInfo = landRoadDrRecordMapper.selectByPrimaryKey(id);
if (oldInfo == null) {
return ResultJson.error("400", "该驾驶员信息不存在,请仔细检查");
}
if (!quaId.equals(oldInfo.getQuaId())) {
if (landRoadDrRecordMapper.selectByQuaId(quaId).size() > 0) {
return ResultJson.error("400", "该驾车资格编号,已存在");
}
}
return ResultJson.success("校验通过");
}
/**
* 校验,增加时,驾车资格编号的唯一性
*
* @param quaId 驾车资格编号
* @return
*/
private ResultJson validateInsert(String quaId)
{
return landRoadDrRecordMapper.selectByQuaId(quaId).size() > 0
? ResultJson.error("400", "该驾车资格编号,已存在")
: ResultJson.success("校验通过");
}
}
... ...
<?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.sunyo.wlpt.vehicle.manage.mapper.LandRoadDrRecordMapper">
<resultMap id="BaseResultMap" type="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord">
<!--@mbg.generated-->
<!--@Table land_road_dr_record-->
<id column="ID" jdbcType="VARCHAR" property="id"/>
<result column="EPORT_ID" jdbcType="VARCHAR" property="eportId"/>
<result column="MAIN_PORT" jdbcType="VARCHAR" property="mainPort"/>
<result column="DR_NAME" jdbcType="VARCHAR" property="drName"/>
<result column="ID_CARD" jdbcType="VARCHAR" property="idCard"/>
<result column="DR_NATIVE" jdbcType="VARCHAR" property="drNative"/>
<result column="GENDER" jdbcType="VARCHAR" property="gender"/>
<result column="BIRTHDAY" jdbcType="DATE" property="birthday"/>
<result column="LIVE_ADDR" jdbcType="VARCHAR" property="liveAddr"/>
<result column="CURR_APPLY_BUSSINESS" jdbcType="VARCHAR" property="currApplyBussiness"/>
<result column="PROPOSER" jdbcType="VARCHAR" property="proposer"/>
<result column="PROPOSE_TIME" jdbcType="TIMESTAMP" property="proposeTime"/>
<result column="DR_CLASS_FLAG" jdbcType="VARCHAR" property="drClassFlag"/>
<result column="OPERATION_TYPE" jdbcType="VARCHAR" property="operationType"/>
<result column="DR_PIC" jdbcType="VARCHAR" property="drPic"/>
<result column="MEMO" jdbcType="VARCHAR" property="memo"/>
<result column="ROAD_DR_QUA_INFO" jdbcType="VARCHAR" property="roadDrQuaInfo"/>
<result column="QUA_ID" jdbcType="VARCHAR" property="quaId"/>
<result column="DR_QUA" jdbcType="VARCHAR" property="drQua"/>
<result column="APPR_NO" jdbcType="VARCHAR" property="apprNo"/>
<result column="OPERATION_TYPE_INFO" jdbcType="VARCHAR" property="operationTypeInfo"/>
<result column="NATIONALITY" jdbcType="VARCHAR" property="nationality"/>
<result column="APPR_PERIOD" jdbcType="DATE" property="apprPeriod"/>
<result column="CO_CODE" jdbcType="VARCHAR" property="coCode"/>
<result column="RETURNMESSAGE" jdbcType="VARCHAR" property="returnmessage"/>
<result column="CREATE_BY" jdbcType="VARCHAR" property="createBy"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy"/>
<result column="UPDATE_DATE" jdbcType="TIMESTAMP" property="updateDate"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
ID, EPORT_ID, MAIN_PORT, DR_NAME, ID_CARD, DR_NATIVE, GENDER, BIRTHDAY, LIVE_ADDR,
CURR_APPLY_BUSSINESS, PROPOSER, PROPOSE_TIME, DR_CLASS_FLAG, OPERATION_TYPE, DR_PIC,
MEMO, ROAD_DR_QUA_INFO, QUA_ID, DR_QUA, APPR_NO, OPERATION_TYPE_INFO, NATIONALITY,
APPR_PERIOD, CO_CODE, RETURNMESSAGE, CREATE_BY, CREATE_DATE, UPDATE_BY, UPDATE_DATE
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List"/>
from land_road_dr_record
where ID = #{id,jdbcType=VARCHAR}
</select>
<!-- 该查询用于分页查询 -->
<select id="selectListByPage" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from land_road_dr_record
<where>
<!-- 驾驶员姓名 -->
<if test="drName != null and drName != ''">
DR_NAME = #{drName,jdbcType=VARCHAR}
</if>
<!-- 驾车资格编号 -->
<if test="quaId != null and quaId != ''">
AND QUA_ID = #{quaId,jdbcType=VARCHAR}
</if>
</where>
</select>
<!-- 查询,根据驾车资格编号 -->
<select id="selectByQuaId" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from land_road_dr_record
where QUA_ID = #{quaId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
<!--@mbg.generated-->
delete
from land_road_dr_record
where ID = #{id,jdbcType=VARCHAR}
</delete>
<delete id="batchRemoveByIds" parameterType="java.lang.String">
delete
from land_road_dr_record
where ID in
<foreach collection="array" open="(" close=")" separator="," item="id">
#{id,jdbcType=VARCHAR}
</foreach>
</delete>
<insert id="insert" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord">
<!--@mbg.generated-->
insert into land_road_dr_record (ID, EPORT_ID, MAIN_PORT,
DR_NAME, ID_CARD, DR_NATIVE,
GENDER, BIRTHDAY, LIVE_ADDR,
CURR_APPLY_BUSSINESS, PROPOSER, PROPOSE_TIME,
DR_CLASS_FLAG, OPERATION_TYPE, DR_PIC,
MEMO, ROAD_DR_QUA_INFO, QUA_ID,
DR_QUA, APPR_NO, OPERATION_TYPE_INFO,
NATIONALITY, APPR_PERIOD, CO_CODE,
RETURNMESSAGE, CREATE_BY, CREATE_DATE,
UPDATE_BY, UPDATE_DATE)
values (#{id,jdbcType=VARCHAR}, #{eportId,jdbcType=VARCHAR}, #{mainPort,jdbcType=VARCHAR},
#{drName,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, #{drNative,jdbcType=VARCHAR},
#{gender,jdbcType=VARCHAR}, #{birthday,jdbcType=DATE}, #{liveAddr,jdbcType=VARCHAR},
#{currApplyBussiness,jdbcType=VARCHAR}, #{proposer,jdbcType=VARCHAR}, #{proposeTime,jdbcType=TIMESTAMP},
#{drClassFlag,jdbcType=VARCHAR}, #{operationType,jdbcType=VARCHAR}, #{drPic,jdbcType=VARCHAR},
#{memo,jdbcType=VARCHAR}, #{roadDrQuaInfo,jdbcType=VARCHAR}, #{quaId,jdbcType=VARCHAR},
#{drQua,jdbcType=VARCHAR}, #{apprNo,jdbcType=VARCHAR}, #{operationTypeInfo,jdbcType=VARCHAR},
#{nationality,jdbcType=VARCHAR}, #{apprPeriod,jdbcType=DATE}, #{coCode,jdbcType=VARCHAR},
#{returnmessage,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateDate,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord">
<!--@mbg.generated-->
insert into land_road_dr_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="eportId != null">
EPORT_ID,
</if>
<if test="mainPort != null">
MAIN_PORT,
</if>
<if test="drName != null">
DR_NAME,
</if>
<if test="idCard != null">
ID_CARD,
</if>
<if test="drNative != null">
DR_NATIVE,
</if>
<if test="gender != null">
GENDER,
</if>
<if test="birthday != null">
BIRTHDAY,
</if>
<if test="liveAddr != null">
LIVE_ADDR,
</if>
<if test="currApplyBussiness != null">
CURR_APPLY_BUSSINESS,
</if>
<if test="proposer != null">
PROPOSER,
</if>
<if test="proposeTime != null">
PROPOSE_TIME,
</if>
<if test="drClassFlag != null">
DR_CLASS_FLAG,
</if>
<if test="operationType != null">
OPERATION_TYPE,
</if>
<if test="drPic != null">
DR_PIC,
</if>
<if test="memo != null">
MEMO,
</if>
<if test="roadDrQuaInfo != null">
ROAD_DR_QUA_INFO,
</if>
<if test="quaId != null">
QUA_ID,
</if>
<if test="drQua != null">
DR_QUA,
</if>
<if test="apprNo != null">
APPR_NO,
</if>
<if test="operationTypeInfo != null">
OPERATION_TYPE_INFO,
</if>
<if test="nationality != null">
NATIONALITY,
</if>
<if test="apprPeriod != null">
APPR_PERIOD,
</if>
<if test="coCode != null">
CO_CODE,
</if>
<if test="returnmessage != null">
RETURNMESSAGE,
</if>
<if test="createBy != null">
CREATE_BY,
</if>
<if test="createDate != null">
CREATE_DATE,
</if>
<if test="updateBy != null">
UPDATE_BY,
</if>
<if test="updateDate != null">
UPDATE_DATE,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="eportId != null">
#{eportId,jdbcType=VARCHAR},
</if>
<if test="mainPort != null">
#{mainPort,jdbcType=VARCHAR},
</if>
<if test="drName != null">
#{drName,jdbcType=VARCHAR},
</if>
<if test="idCard != null">
#{idCard,jdbcType=VARCHAR},
</if>
<if test="drNative != null">
#{drNative,jdbcType=VARCHAR},
</if>
<if test="gender != null">
#{gender,jdbcType=VARCHAR},
</if>
<if test="birthday != null">
#{birthday,jdbcType=DATE},
</if>
<if test="liveAddr != null">
#{liveAddr,jdbcType=VARCHAR},
</if>
<if test="currApplyBussiness != null">
#{currApplyBussiness,jdbcType=VARCHAR},
</if>
<if test="proposer != null">
#{proposer,jdbcType=VARCHAR},
</if>
<if test="proposeTime != null">
#{proposeTime,jdbcType=TIMESTAMP},
</if>
<if test="drClassFlag != null">
#{drClassFlag,jdbcType=VARCHAR},
</if>
<if test="operationType != null">
#{operationType,jdbcType=VARCHAR},
</if>
<if test="drPic != null">
#{drPic,jdbcType=VARCHAR},
</if>
<if test="memo != null">
#{memo,jdbcType=VARCHAR},
</if>
<if test="roadDrQuaInfo != null">
#{roadDrQuaInfo,jdbcType=VARCHAR},
</if>
<if test="quaId != null">
#{quaId,jdbcType=VARCHAR},
</if>
<if test="drQua != null">
#{drQua,jdbcType=VARCHAR},
</if>
<if test="apprNo != null">
#{apprNo,jdbcType=VARCHAR},
</if>
<if test="operationTypeInfo != null">
#{operationTypeInfo,jdbcType=VARCHAR},
</if>
<if test="nationality != null">
#{nationality,jdbcType=VARCHAR},
</if>
<if test="apprPeriod != null">
#{apprPeriod,jdbcType=DATE},
</if>
<if test="coCode != null">
#{coCode,jdbcType=VARCHAR},
</if>
<if test="returnmessage != null">
#{returnmessage,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createDate != null">
#{createDate,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateDate != null">
#{updateDate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord">
<!--@mbg.generated-->
update land_road_dr_record
<set>
<if test="eportId != null">
EPORT_ID = #{eportId,jdbcType=VARCHAR},
</if>
<if test="mainPort != null">
MAIN_PORT = #{mainPort,jdbcType=VARCHAR},
</if>
<if test="drName != null">
DR_NAME = #{drName,jdbcType=VARCHAR},
</if>
<if test="idCard != null">
ID_CARD = #{idCard,jdbcType=VARCHAR},
</if>
<if test="drNative != null">
DR_NATIVE = #{drNative,jdbcType=VARCHAR},
</if>
<if test="gender != null">
GENDER = #{gender,jdbcType=VARCHAR},
</if>
<if test="birthday != null">
BIRTHDAY = #{birthday,jdbcType=DATE},
</if>
<if test="liveAddr != null">
LIVE_ADDR = #{liveAddr,jdbcType=VARCHAR},
</if>
<if test="currApplyBussiness != null">
CURR_APPLY_BUSSINESS = #{currApplyBussiness,jdbcType=VARCHAR},
</if>
<if test="proposer != null">
PROPOSER = #{proposer,jdbcType=VARCHAR},
</if>
<if test="proposeTime != null">
PROPOSE_TIME = #{proposeTime,jdbcType=TIMESTAMP},
</if>
<if test="drClassFlag != null">
DR_CLASS_FLAG = #{drClassFlag,jdbcType=VARCHAR},
</if>
<if test="operationType != null">
OPERATION_TYPE = #{operationType,jdbcType=VARCHAR},
</if>
<if test="drPic != null">
DR_PIC = #{drPic,jdbcType=VARCHAR},
</if>
<if test="memo != null">
MEMO = #{memo,jdbcType=VARCHAR},
</if>
<if test="roadDrQuaInfo != null">
ROAD_DR_QUA_INFO = #{roadDrQuaInfo,jdbcType=VARCHAR},
</if>
<if test="quaId != null">
QUA_ID = #{quaId,jdbcType=VARCHAR},
</if>
<if test="drQua != null">
DR_QUA = #{drQua,jdbcType=VARCHAR},
</if>
<if test="apprNo != null">
APPR_NO = #{apprNo,jdbcType=VARCHAR},
</if>
<if test="operationTypeInfo != null">
OPERATION_TYPE_INFO = #{operationTypeInfo,jdbcType=VARCHAR},
</if>
<if test="nationality != null">
NATIONALITY = #{nationality,jdbcType=VARCHAR},
</if>
<if test="apprPeriod != null">
APPR_PERIOD = #{apprPeriod,jdbcType=DATE},
</if>
<if test="coCode != null">
CO_CODE = #{coCode,jdbcType=VARCHAR},
</if>
<if test="returnmessage != null">
RETURNMESSAGE = #{returnmessage,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
CREATE_BY = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createDate != null">
CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateDate != null">
UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord">
<!--@mbg.generated-->
update land_road_dr_record
set EPORT_ID = #{eportId,jdbcType=VARCHAR},
MAIN_PORT = #{mainPort,jdbcType=VARCHAR},
DR_NAME = #{drName,jdbcType=VARCHAR},
ID_CARD = #{idCard,jdbcType=VARCHAR},
DR_NATIVE = #{drNative,jdbcType=VARCHAR},
GENDER = #{gender,jdbcType=VARCHAR},
BIRTHDAY = #{birthday,jdbcType=DATE},
LIVE_ADDR = #{liveAddr,jdbcType=VARCHAR},
CURR_APPLY_BUSSINESS = #{currApplyBussiness,jdbcType=VARCHAR},
PROPOSER = #{proposer,jdbcType=VARCHAR},
PROPOSE_TIME = #{proposeTime,jdbcType=TIMESTAMP},
DR_CLASS_FLAG = #{drClassFlag,jdbcType=VARCHAR},
OPERATION_TYPE = #{operationType,jdbcType=VARCHAR},
DR_PIC = #{drPic,jdbcType=VARCHAR},
MEMO = #{memo,jdbcType=VARCHAR},
ROAD_DR_QUA_INFO = #{roadDrQuaInfo,jdbcType=VARCHAR},
QUA_ID = #{quaId,jdbcType=VARCHAR},
DR_QUA = #{drQua,jdbcType=VARCHAR},
APPR_NO = #{apprNo,jdbcType=VARCHAR},
OPERATION_TYPE_INFO = #{operationTypeInfo,jdbcType=VARCHAR},
NATIONALITY = #{nationality,jdbcType=VARCHAR},
APPR_PERIOD = #{apprPeriod,jdbcType=DATE},
CO_CODE = #{coCode,jdbcType=VARCHAR},
RETURNMESSAGE = #{returnmessage,jdbcType=VARCHAR},
CREATE_BY = #{createBy,jdbcType=VARCHAR},
CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
... ...