作者 王勇

驾驶员管理,初次提交

  1 +package com.sunyo.wlpt.vehicle.manage.controller;
  2 +
  3 +import com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord;
  4 +import com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord;
  5 +import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord;
  6 +import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
  7 +import com.sunyo.wlpt.vehicle.manage.service.LandRoadDrRecordService;
  8 +import io.swagger.annotations.Api;
  9 +import io.swagger.annotations.ApiOperation;
  10 +import org.springframework.web.bind.annotation.*;
  11 +
  12 +import javax.annotation.Resource;
  13 +
  14 +/**
  15 + * @author 子诚
  16 + * Description:驾驶员信息,控制器
  17 + * 时间:2020/9/24 15:57
  18 + */
  19 +@Api(tags = "驾驶员信息,控制器")
  20 +@CrossOrigin
  21 +@RequestMapping("driver")
  22 +@RestController
  23 +public class DriverController {
  24 + @Resource
  25 + private LandRoadDrRecordService landRoadDrRecordService;
  26 +
  27 + /**
  28 + * 分页查询
  29 + *
  30 + * @param drName 驾驶员姓名
  31 + * @param quaId 驾车资格编号
  32 + * @param pageNum 当前页数
  33 + * @param pageSize 每页大小
  34 + * @return
  35 + */
  36 + @ApiOperation(value = "驾驶员信息,分页查询")
  37 + @GetMapping("/page")
  38 + public ResultJson selectListByPage(
  39 + @RequestParam(value = "drName", required = false) String drName,
  40 + @RequestParam(value = "quaId", required = false) String quaId,
  41 + @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
  42 + @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize)
  43 + {
  44 + LandRoadDrRecord landRoadDrRecord = LandRoadDrRecord.builder()
  45 + .drName(drName).quaId(quaId)
  46 + .build();
  47 + return landRoadDrRecordService.selectListByPage(landRoadDrRecord, pageNum, pageSize);
  48 + }
  49 +
  50 + /**
  51 + * 删除
  52 + * 条件:id
  53 + *
  54 + * @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
  55 + * @return
  56 + */
  57 + @ApiOperation(value = "驾驶员信息,删除")
  58 + @DeleteMapping("/delete")
  59 + public ResultJson deleteDriver(@RequestBody LandRoadDrRecord landRoadDrRecord)
  60 + {
  61 + return landRoadDrRecordService.deleteByPrimaryKey(landRoadDrRecord.getId());
  62 + }
  63 +
  64 + /**
  65 + * 批量删除
  66 + * 条件:{id: id1,id2...}
  67 + *
  68 + * @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
  69 + * @return
  70 + */
  71 + @ApiOperation(value = "驾驶员信息,批量删除")
  72 + @DeleteMapping("/batchRemove")
  73 + public ResultJson batchRemoveDriver(@RequestBody LandRoadDrRecord landRoadDrRecord)
  74 + {
  75 + String id = landRoadDrRecord.getId();
  76 + return id.contains(",") ? landRoadDrRecordService.batchRemoveByIds(id)
  77 + : landRoadDrRecordService.deleteByPrimaryKey(id);
  78 + }
  79 +
  80 + /**
  81 + * 新增
  82 + *
  83 + * @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
  84 + * @return 成功 or 失败
  85 + */
  86 + @ApiOperation(value = "驾驶员信息,增加")
  87 + @PostMapping("/insert")
  88 + public ResultJson insertDriver(@RequestBody LandRoadDrRecord landRoadDrRecord)
  89 + {
  90 + return landRoadDrRecordService.insertSelective(landRoadDrRecord);
  91 + }
  92 +
  93 + /**
  94 + * 修改 or 编辑
  95 + *
  96 + * @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
  97 + * @return
  98 + */
  99 + @ApiOperation(value = "驾驶员信息,编辑")
  100 + @PutMapping("/update")
  101 + public ResultJson updateLandRoadVeRecord(@RequestBody LandRoadDrRecord landRoadDrRecord)
  102 + {
  103 + return landRoadDrRecordService.updateByPrimaryKeySelective(landRoadDrRecord);
  104 + }
  105 +}
1 package com.sunyo.wlpt.vehicle.manage.controller; 1 package com.sunyo.wlpt.vehicle.manage.controller;
2 2
3 import com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord; 3 import com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord;
4 -import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord;  
5 import com.sunyo.wlpt.vehicle.manage.response.ResultJson; 4 import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
6 import com.sunyo.wlpt.vehicle.manage.service.LandRoadTrailerRecordService; 5 import com.sunyo.wlpt.vehicle.manage.service.LandRoadTrailerRecordService;
  6 +import io.swagger.annotations.Api;
  7 +import io.swagger.annotations.ApiOperation;
7 import org.springframework.web.bind.annotation.*; 8 import org.springframework.web.bind.annotation.*;
8 9
9 import javax.annotation.Resource; 10 import javax.annotation.Resource;
10 11
11 /** 12 /**
12 * @author 子诚 13 * @author 子诚
13 - * Description:挂车管理,控制器 14 + * Description:挂车信息,控制器
14 * 时间:2020/9/23 15:25 15 * 时间:2020/9/23 15:25
15 */ 16 */
  17 +@Api(tags = "挂车信息,控制器")
16 @CrossOrigin 18 @CrossOrigin
17 @RequestMapping("trailer") 19 @RequestMapping("trailer")
18 @RestController 20 @RestController
19 -public class LandRoadTrailerRecordController { 21 +public class TrailerController {
20 22
21 @Resource 23 @Resource
22 private LandRoadTrailerRecordService landRoadTrailerRecordService; 24 private LandRoadTrailerRecordService landRoadTrailerRecordService;
@@ -29,6 +31,7 @@ public class LandRoadTrailerRecordController { @@ -29,6 +31,7 @@ public class LandRoadTrailerRecordController {
29 * @param pageSize 每页大小 31 * @param pageSize 每页大小
30 * @return 32 * @return
31 */ 33 */
  34 + @ApiOperation(value = "挂车信息,分页查询")
32 @GetMapping("/page") 35 @GetMapping("/page")
33 public ResultJson selectListByPage( 36 public ResultJson selectListByPage(
34 @RequestParam(value = "trailerLicenseNo", required = false) String trailerLicenseNo, 37 @RequestParam(value = "trailerLicenseNo", required = false) String trailerLicenseNo,
@@ -45,6 +48,7 @@ public class LandRoadTrailerRecordController { @@ -45,6 +48,7 @@ public class LandRoadTrailerRecordController {
45 * @param landRoadTrailerRecord 挂车信息 {@link LandRoadTrailerRecord} 48 * @param landRoadTrailerRecord 挂车信息 {@link LandRoadTrailerRecord}
46 * @return 成功 or 失败 49 * @return 成功 or 失败
47 */ 50 */
  51 + @ApiOperation(value = "挂车信息,编辑")
48 @PutMapping("/update") 52 @PutMapping("/update")
49 public ResultJson updateTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord) 53 public ResultJson updateTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord)
50 { 54 {
@@ -57,6 +61,7 @@ public class LandRoadTrailerRecordController { @@ -57,6 +61,7 @@ public class LandRoadTrailerRecordController {
57 * @param landRoadTrailerRecord 挂车信息 {@link LandRoadTrailerRecord} 61 * @param landRoadTrailerRecord 挂车信息 {@link LandRoadTrailerRecord}
58 * @return 成功 or 失败 62 * @return 成功 or 失败
59 */ 63 */
  64 + @ApiOperation(value = "挂车信息,增加")
60 @PostMapping("/insert") 65 @PostMapping("/insert")
61 public ResultJson insertTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord) 66 public ResultJson insertTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord)
62 { 67 {
@@ -70,6 +75,7 @@ public class LandRoadTrailerRecordController { @@ -70,6 +75,7 @@ public class LandRoadTrailerRecordController {
70 * @param landRoadTrailerRecord 挂车信息 {@link LandRoadTrailerRecord} 75 * @param landRoadTrailerRecord 挂车信息 {@link LandRoadTrailerRecord}
71 * @return 76 * @return
72 */ 77 */
  78 + @ApiOperation(value = "挂车信息,删除")
73 @DeleteMapping("/delete") 79 @DeleteMapping("/delete")
74 public ResultJson deleteTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord) 80 public ResultJson deleteTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord)
75 { 81 {
@@ -83,6 +89,7 @@ public class LandRoadTrailerRecordController { @@ -83,6 +89,7 @@ public class LandRoadTrailerRecordController {
83 * @param landRoadTrailerRecord 车辆信息 {@link LandRoadTrailerRecord} 89 * @param landRoadTrailerRecord 车辆信息 {@link LandRoadTrailerRecord}
84 * @return 90 * @return
85 */ 91 */
  92 + @ApiOperation(value = "挂车信息,批量删除")
86 @DeleteMapping("/batchRemove") 93 @DeleteMapping("/batchRemove")
87 public ResultJson batchRemoveTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord) 94 public ResultJson batchRemoveTrailer(@RequestBody LandRoadTrailerRecord landRoadTrailerRecord)
88 { 95 {
1 package com.sunyo.wlpt.vehicle.manage.controller; 1 package com.sunyo.wlpt.vehicle.manage.controller;
2 2
3 -import com.github.pagehelper.PageInfo;  
4 import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord; 3 import com.sunyo.wlpt.vehicle.manage.domain.LandRoadVeRecord;
5 import com.sunyo.wlpt.vehicle.manage.response.ResultJson; 4 import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
6 import com.sunyo.wlpt.vehicle.manage.service.LandRoadVeRecordService; 5 import com.sunyo.wlpt.vehicle.manage.service.LandRoadVeRecordService;
  6 +import io.swagger.annotations.Api;
  7 +import io.swagger.annotations.ApiOperation;
7 import org.springframework.web.bind.annotation.*; 8 import org.springframework.web.bind.annotation.*;
8 9
9 import javax.annotation.Resource; 10 import javax.annotation.Resource;
10 11
11 /** 12 /**
12 * @author 子诚 13 * @author 子诚
13 - * Description:车辆管理,控制器 14 + * Description:车辆信息,控制器
14 * 时间:2020/9/22 17:58 15 * 时间:2020/9/22 17:58
15 */ 16 */
  17 +@Api(tags = "车辆信息,控制器")
16 @CrossOrigin 18 @CrossOrigin
17 @RequestMapping("vehicle") 19 @RequestMapping("vehicle")
18 @RestController 20 @RestController
19 -public class LandRoadVeRecordController { 21 +public class VehicleController {
20 22
21 @Resource 23 @Resource
22 LandRoadVeRecordService landRoadVeRecordService; 24 LandRoadVeRecordService landRoadVeRecordService;
@@ -31,6 +33,7 @@ public class LandRoadVeRecordController { @@ -31,6 +33,7 @@ public class LandRoadVeRecordController {
31 * @param pageSize 每页大小 33 * @param pageSize 每页大小
32 * @return 34 * @return
33 */ 35 */
  36 + @ApiOperation(value = "车辆信息,分页查询")
34 @GetMapping("/page") 37 @GetMapping("/page")
35 public ResultJson selectListByPage( 38 public ResultJson selectListByPage(
36 @RequestParam(value = "domesticLisenceNo", required = false) String domesticLisenceNo, 39 @RequestParam(value = "domesticLisenceNo", required = false) String domesticLisenceNo,
@@ -54,6 +57,7 @@ public class LandRoadVeRecordController { @@ -54,6 +57,7 @@ public class LandRoadVeRecordController {
54 * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord} 57 * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
55 * @return 58 * @return
56 */ 59 */
  60 + @ApiOperation(value = "车辆信息,删除")
57 @DeleteMapping("/delete") 61 @DeleteMapping("/delete")
58 public ResultJson deleteLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord) 62 public ResultJson deleteLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
59 { 63 {
@@ -67,6 +71,7 @@ public class LandRoadVeRecordController { @@ -67,6 +71,7 @@ public class LandRoadVeRecordController {
67 * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord} 71 * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
68 * @return 72 * @return
69 */ 73 */
  74 + @ApiOperation(value = "车辆信息,批量删除")
70 @DeleteMapping("/batchRemove") 75 @DeleteMapping("/batchRemove")
71 public ResultJson batchRemoveLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord) 76 public ResultJson batchRemoveLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
72 { 77 {
@@ -82,6 +87,7 @@ public class LandRoadVeRecordController { @@ -82,6 +87,7 @@ public class LandRoadVeRecordController {
82 * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord} 87 * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
83 * @return 88 * @return
84 */ 89 */
  90 + @ApiOperation(value = "车辆信息,增加")
85 @PostMapping("/insert") 91 @PostMapping("/insert")
86 public ResultJson insertLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord) 92 public ResultJson insertLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
87 { 93 {
@@ -94,6 +100,7 @@ public class LandRoadVeRecordController { @@ -94,6 +100,7 @@ public class LandRoadVeRecordController {
94 * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord} 100 * @param landRoadVeRecord 车辆信息 {@link LandRoadVeRecord}
95 * @return 101 * @return
96 */ 102 */
  103 + @ApiOperation(value = "车辆信息,编辑")
97 @PutMapping("/update") 104 @PutMapping("/update")
98 public ResultJson updateLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord) 105 public ResultJson updateLandRoadVeRecord(@RequestBody LandRoadVeRecord landRoadVeRecord)
99 { 106 {
  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/24 15:53
  18 + */
  19 +@ApiModel("驾驶员信息")
  20 +@Data
  21 +@Builder
  22 +@AllArgsConstructor
  23 +@NoArgsConstructor
  24 +public class LandRoadDrRecord implements Serializable {
  25 +
  26 + private static final long serialVersionUID = -7806543717958892315L;
  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 drName;
  48 +
  49 + /**
  50 + * 身份证号/护照号
  51 + */
  52 + @ApiModelProperty(value = "身份证号/护照号,")
  53 + private String idCard;
  54 +
  55 + /**
  56 + * 籍贯
  57 + */
  58 + @ApiModelProperty(value = "籍贯")
  59 + private String drNative;
  60 +
  61 + /**
  62 + * 性别
  63 + */
  64 + @ApiModelProperty(value = "性别")
  65 + private String gender;
  66 +
  67 + /**
  68 + * 出生日期
  69 + */
  70 + @ApiModelProperty(value = "出生日期")
  71 + private Date birthday;
  72 +
  73 + /**
  74 + * 居住地址
  75 + */
  76 + @ApiModelProperty(value = "居住地址")
  77 + private String liveAddr;
  78 +
  79 + /**
  80 + * 最新更新申请业务类型
  81 + */
  82 + @ApiModelProperty(value = "最新更新申请业务类型")
  83 + private String currApplyBussiness;
  84 +
  85 + /**
  86 + * 申请人
  87 + */
  88 + @ApiModelProperty(value = "申请人")
  89 + private String proposer;
  90 +
  91 + /**
  92 + * 申请时间
  93 + */
  94 + @ApiModelProperty(value = "申请时间")
  95 + private Date proposeTime;
  96 +
  97 + /**
  98 + * 驾驶员分类:1.经营性进出境公路运输工具驾驶员;2.经营性来往港澳公路运输工具驾驶员;3.非经营性进出境交通工具驾驶员;4.非经营性来往港澳公路交通工具驾驶员。
  99 + */
  100 + @ApiModelProperty(value = "驾驶员分类:1.经营性进出境公路运输工具驾驶员;2.经营性来往港澳公路运输工具驾驶员;3.非经营性进出境交通工具驾驶员;4.非经营性来往港澳公路交通工具驾驶员。")
  101 + private String drClassFlag;
  102 +
  103 + /**
  104 + * 数据操作类型
  105 + */
  106 + @ApiModelProperty(value = "数据操作类型")
  107 + private String operationType;
  108 +
  109 + /**
  110 + * 驾驶员照片
  111 + */
  112 + @ApiModelProperty(value = "驾驶员照片")
  113 + private String drPic;
  114 +
  115 + /**
  116 + * 备注
  117 + */
  118 + @ApiModelProperty(value = "备注")
  119 + private String memo;
  120 +
  121 + /**
  122 + * 驾车资格申请电子口岸预录入号ID(电子口岸与海关数据传输使用,企业无需填写)
  123 + */
  124 + @ApiModelProperty(value = "驾车资格申请电子口岸预录入号ID(电子口岸与海关数据传输使用,企业无需填写)")
  125 + private String roadDrQuaInfo;
  126 +
  127 + /**
  128 + * 驾车资格编号
  129 + */
  130 + @ApiModelProperty(value = "驾车资格编号")
  131 + private String quaId;
  132 +
  133 + /**
  134 + * 驾车资格:1.经营性来往港澳公路运输工具驾驶资格;2.经营性进出境公路运输工具驾驶资格;3.境内公路承运海关监管货物运输工具驾驶资格;4.非经营性来往港澳公路交通工具驾驶资格;5.非经营性进出境公路交通工具驾驶资格。
  135 + */
  136 + @ApiModelProperty(value = "驾车资格:1.经营性来往港澳公路运输工具驾驶资格;2.经营性进出境公路运输工具驾驶资格;3.境内公路承运海关监管货物运输工具驾驶资格;4.非经营性来往港澳公路交通工具驾驶资格;5.非经营性进出境公路交通工具驾驶资格。")
  137 + private String drQua;
  138 +
  139 + /**
  140 + * 批文编号(N)
  141 + */
  142 + @ApiModelProperty(value = "批文编号(N)")
  143 + private String apprNo;
  144 +
  145 + /**
  146 + * 数据操作类型
  147 + */
  148 + @ApiModelProperty(value = "数据操作类型")
  149 + private String operationTypeInfo;
  150 +
  151 + /**
  152 + * 国籍
  153 + */
  154 + @ApiModelProperty(value = "国籍")
  155 + private String nationality;
  156 +
  157 + @ApiModelProperty(value = "")
  158 + private Date apprPeriod;
  159 +
  160 + /**
  161 + * 所在企业代码
  162 + */
  163 + @ApiModelProperty(value = "所在企业代码")
  164 + private String coCode;
  165 +
  166 + /**
  167 + * 回执内容
  168 + */
  169 + @ApiModelProperty(value = "回执内容")
  170 + private String returnmessage;
  171 +
  172 + @ApiModelProperty(value = "创建者")
  173 + private String createBy;
  174 +
  175 + @ApiModelProperty(value = "创建时间")
  176 + private Date createDate;
  177 +
  178 + @ApiModelProperty(value = "更新者")
  179 + private String updateBy;
  180 +
  181 + @ApiModelProperty(value = "修改时间")
  182 + private Date updateDate;
  183 +}
  1 +package com.sunyo.wlpt.vehicle.manage.mapper;
  2 +
  3 +import com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord;
  4 +import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
  5 +import org.apache.ibatis.annotations.Mapper;
  6 +import org.apache.ibatis.annotations.Param;
  7 +
  8 +import java.util.Collection;
  9 +import java.util.List;
  10 +
  11 +/**
  12 + * @author 子诚
  13 + * Description:
  14 + * 时间:2020/9/24 15:53
  15 + */
  16 +@Mapper
  17 +public interface LandRoadDrRecordMapper {
  18 + /**
  19 + * delete by primary key
  20 + *
  21 + * @param id primaryKey
  22 + * @return deleteCount
  23 + */
  24 + int deleteByPrimaryKey(String id);
  25 +
  26 + /**
  27 + * 批量删除
  28 + *
  29 + * @param idList id数组
  30 + * @return
  31 + */
  32 + int batchRemoveByIds(String[] idList);
  33 +
  34 + /**
  35 + * insert record to table
  36 + *
  37 + * @param record the record
  38 + * @return insert count
  39 + */
  40 + int insert(LandRoadDrRecord record);
  41 +
  42 + /**
  43 + * insert record to table selective
  44 + *
  45 + * @param record the record
  46 + * @return insert count
  47 + */
  48 + int insertSelective(LandRoadDrRecord record);
  49 +
  50 + /**
  51 + * select by primary key
  52 + *
  53 + * @param id primary key
  54 + * @return object by primary key
  55 + */
  56 + LandRoadDrRecord selectByPrimaryKey(String id);
  57 +
  58 + /**
  59 + * update record selective
  60 + *
  61 + * @param record the updated record
  62 + * @return update count
  63 + */
  64 + int updateByPrimaryKeySelective(LandRoadDrRecord record);
  65 +
  66 + /**
  67 + * update record
  68 + *
  69 + * @param record the updated record
  70 + * @return update count
  71 + */
  72 + int updateByPrimaryKey(LandRoadDrRecord record);
  73 +
  74 + /**
  75 + * 用于分页查询
  76 + * 条件:驾驶员姓名、驾车资格编号
  77 + *
  78 + * @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
  79 + * @return
  80 + */
  81 + List<LandRoadDrRecord> selectListByPage(LandRoadDrRecord landRoadDrRecord);
  82 +
  83 + /**
  84 + * 查询,根据驾车资格编号
  85 + * 用于校验。驾车资格编号是否唯一
  86 + *
  87 + * @param quaId 驾车资格编号
  88 + * @return
  89 + */
  90 + List<LandRoadDrRecord> selectByQuaId(@Param("quaId") String quaId);
  91 +}
  1 +package com.sunyo.wlpt.vehicle.manage.service;
  2 +
  3 +import com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord;
  4 +import com.sunyo.wlpt.vehicle.manage.response.ResultJson;
  5 +
  6 +/**
  7 + * @author 子诚
  8 + * Description:
  9 + * 时间:2020/9/24 15:53
  10 + */
  11 +public interface LandRoadDrRecordService {
  12 +
  13 + /**
  14 + * delete by primary key
  15 + *
  16 + * @param id primaryKey
  17 + * @return deleteCount
  18 + */
  19 + ResultJson deleteByPrimaryKey(String id);
  20 +
  21 + /**
  22 + * insert record to table
  23 + *
  24 + * @param record the record
  25 + * @return insert count
  26 + */
  27 + int insert(LandRoadDrRecord record);
  28 +
  29 + /**
  30 + * insert record to table selective
  31 + *
  32 + * @param record the record
  33 + * @return insert count
  34 + */
  35 + ResultJson insertSelective(LandRoadDrRecord record);
  36 +
  37 + /**
  38 + * select by primary key
  39 + *
  40 + * @param id primary key
  41 + * @return object by primary key
  42 + */
  43 + LandRoadDrRecord selectByPrimaryKey(String id);
  44 +
  45 + /**
  46 + * update record selective
  47 + *
  48 + * @param record the updated record
  49 + * @return update count
  50 + */
  51 + ResultJson updateByPrimaryKeySelective(LandRoadDrRecord record);
  52 +
  53 + /**
  54 + * update record
  55 + *
  56 + * @param record the updated record
  57 + * @return update count
  58 + */
  59 + int updateByPrimaryKey(LandRoadDrRecord record);
  60 +
  61 + /**
  62 + * 分页查询
  63 + *
  64 + * @param landRoadDrRecord 驾驶员信息
  65 + * @param pageNum 当前页数
  66 + * @param pageSize 每页大小
  67 + * @return
  68 + */
  69 + ResultJson selectListByPage(LandRoadDrRecord landRoadDrRecord, Integer pageNum, Integer pageSize);
  70 +
  71 + /**
  72 + * 批量删除驾驶员信息
  73 + *
  74 + * @param ids 被删除的id,多个以,相隔的字符串
  75 + * @return
  76 + */
  77 + ResultJson batchRemoveByIds(String ids);
  78 +}
  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.LandRoadDrRecordMapper;
  14 +import com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord;
  15 +import com.sunyo.wlpt.vehicle.manage.service.LandRoadDrRecordService;
  16 +
  17 +import java.util.List;
  18 +
  19 +/**
  20 + * @author 子诚
  21 + * Description:
  22 + * 时间:2020/9/24 15:53
  23 + */
  24 +@Service
  25 +public class LandRoadDrRecordServiceImpl implements LandRoadDrRecordService {
  26 +
  27 + @Resource
  28 + private LandRoadDrRecordMapper landRoadDrRecordMapper;
  29 +
  30 + /**
  31 + * 删除
  32 + *
  33 + * @param id primaryKey
  34 + * @return
  35 + */
  36 + @Override
  37 + public ResultJson deleteByPrimaryKey(String id)
  38 + {
  39 + return landRoadDrRecordMapper.deleteByPrimaryKey(id) > 0
  40 + ? ResultJson.success("200", "删除驾驶员信息,成功")
  41 + : ResultJson.error("500", "删除驾驶员信息,失败");
  42 + }
  43 +
  44 + /**
  45 + * 批量删除
  46 + *
  47 + * @param ids 被删除的id,多个以,相隔的字符串
  48 + * @return
  49 + */
  50 + @Override
  51 + public ResultJson batchRemoveByIds(String ids)
  52 + {
  53 + String[] idList = ids.split(",");
  54 + return landRoadDrRecordMapper.batchRemoveByIds(idList) > 0
  55 + ? ResultJson.success("200", "批量删除驾驶员信息,成功")
  56 + : ResultJson.error("500", "批量删除驾驶员信息,失败");
  57 + }
  58 +
  59 + @Override
  60 + public int insert(LandRoadDrRecord record)
  61 + {
  62 + return landRoadDrRecordMapper.insert(record);
  63 + }
  64 +
  65 + /**
  66 + * 新增,选择性
  67 + *
  68 + * @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
  69 + * @return
  70 + */
  71 + @Override
  72 + public ResultJson insertSelective(LandRoadDrRecord landRoadDrRecord)
  73 + {
  74 + ResultJson validate = validate(landRoadDrRecord);
  75 + if (!Common.RESULT_SUCCESS.equals(validate.getCode())) {
  76 + return validate;
  77 + }
  78 +
  79 + landRoadDrRecord.setId(IdUtils.generateId());
  80 + return landRoadDrRecordMapper.insertSelective(landRoadDrRecord) > 0
  81 + ? ResultJson.success("200", "新增驾驶员信息,成功")
  82 + : ResultJson.error("500", "新增驾驶员信息,失败");
  83 + }
  84 +
  85 + @Override
  86 + public LandRoadDrRecord selectByPrimaryKey(String id)
  87 + {
  88 + return landRoadDrRecordMapper.selectByPrimaryKey(id);
  89 + }
  90 +
  91 + /**
  92 + * 编辑,选择性
  93 + *
  94 + * @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
  95 + * @return
  96 + */
  97 + @Override
  98 + public ResultJson updateByPrimaryKeySelective(LandRoadDrRecord landRoadDrRecord)
  99 + {
  100 + ResultJson validate = validate(landRoadDrRecord);
  101 + if (!Common.RESULT_SUCCESS.equals(validate.getCode())) {
  102 + return validate;
  103 + }
  104 +
  105 + return landRoadDrRecordMapper.updateByPrimaryKeySelective(landRoadDrRecord) > 0
  106 + ? ResultJson.success("200", "编辑驾驶员信息,成功")
  107 + : ResultJson.error("500", "编辑驾驶员信息,失败");
  108 + }
  109 +
  110 + @Override
  111 + public int updateByPrimaryKey(LandRoadDrRecord record)
  112 + {
  113 + return landRoadDrRecordMapper.updateByPrimaryKey(record);
  114 + }
  115 +
  116 + /**
  117 + * 分页查询
  118 + *
  119 + * @param landRoadDrRecord 驾驶员信息
  120 + * @param pageNum 当前页数
  121 + * @param pageSize 每页大小
  122 + * @return
  123 + */
  124 + @Override
  125 + public ResultJson selectListByPage(LandRoadDrRecord landRoadDrRecord, Integer pageNum, Integer pageSize)
  126 + {
  127 + PageHelper.startPage(pageNum, pageSize);
  128 + List<LandRoadDrRecord> driverList = landRoadDrRecordMapper.selectListByPage(landRoadDrRecord);
  129 + PageInfo<LandRoadDrRecord> pageInfo = new PageInfo<>(driverList);
  130 + return pageInfo.getTotal() >= 0
  131 + ? ResultJson.success("200", "查询驾驶员信息列表,成功!", pageInfo)
  132 + : ResultJson.error("500", "查询驾驶员信息列表,失败!");
  133 + }
  134 +
  135 + /**
  136 + * 新增 or 编辑
  137 + * 校验,驾车资格编号,是否唯一
  138 + *
  139 + * @param landRoadDrRecord 驾驶员信息 {@link LandRoadDrRecord}
  140 + * @return
  141 + */
  142 + private ResultJson validate(LandRoadDrRecord landRoadDrRecord)
  143 + {
  144 + String id = landRoadDrRecord.getId();
  145 + String quaId = landRoadDrRecord.getQuaId();
  146 +
  147 + if (StringUtil.isNullOrEmpty(quaId)) {
  148 + return ResultJson.error("400", "驾车资格编号,不能为空!");
  149 + }
  150 + return StringUtil.isNullOrEmpty(id) ? validateInsert(quaId) : validateEdit(id, quaId);
  151 + }
  152 +
  153 + /**
  154 + * 校验,编辑时,驾车资格编号的唯一性
  155 + *
  156 + * @param id 主键
  157 + * @param quaId 驾车资格编号
  158 + * @return
  159 + */
  160 + private ResultJson validateEdit(String id, String quaId)
  161 + {
  162 + LandRoadDrRecord oldInfo = landRoadDrRecordMapper.selectByPrimaryKey(id);
  163 + if (oldInfo == null) {
  164 + return ResultJson.error("400", "该驾驶员信息不存在,请仔细检查");
  165 + }
  166 + if (!quaId.equals(oldInfo.getQuaId())) {
  167 + if (landRoadDrRecordMapper.selectByQuaId(quaId).size() > 0) {
  168 + return ResultJson.error("400", "该驾车资格编号,已存在");
  169 + }
  170 + }
  171 + return ResultJson.success("校验通过");
  172 + }
  173 +
  174 + /**
  175 + * 校验,增加时,驾车资格编号的唯一性
  176 + *
  177 + * @param quaId 驾车资格编号
  178 + * @return
  179 + */
  180 + private ResultJson validateInsert(String quaId)
  181 + {
  182 + return landRoadDrRecordMapper.selectByQuaId(quaId).size() > 0
  183 + ? ResultJson.error("400", "该驾车资格编号,已存在")
  184 + : ResultJson.success("校验通过");
  185 + }
  186 +
  187 +}
  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.LandRoadDrRecordMapper">
  4 + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord">
  5 + <!--@mbg.generated-->
  6 + <!--@Table land_road_dr_record-->
  7 + <id column="ID" jdbcType="VARCHAR" property="id"/>
  8 + <result column="EPORT_ID" jdbcType="VARCHAR" property="eportId"/>
  9 + <result column="MAIN_PORT" jdbcType="VARCHAR" property="mainPort"/>
  10 + <result column="DR_NAME" jdbcType="VARCHAR" property="drName"/>
  11 + <result column="ID_CARD" jdbcType="VARCHAR" property="idCard"/>
  12 + <result column="DR_NATIVE" jdbcType="VARCHAR" property="drNative"/>
  13 + <result column="GENDER" jdbcType="VARCHAR" property="gender"/>
  14 + <result column="BIRTHDAY" jdbcType="DATE" property="birthday"/>
  15 + <result column="LIVE_ADDR" jdbcType="VARCHAR" property="liveAddr"/>
  16 + <result column="CURR_APPLY_BUSSINESS" jdbcType="VARCHAR" property="currApplyBussiness"/>
  17 + <result column="PROPOSER" jdbcType="VARCHAR" property="proposer"/>
  18 + <result column="PROPOSE_TIME" jdbcType="TIMESTAMP" property="proposeTime"/>
  19 + <result column="DR_CLASS_FLAG" jdbcType="VARCHAR" property="drClassFlag"/>
  20 + <result column="OPERATION_TYPE" jdbcType="VARCHAR" property="operationType"/>
  21 + <result column="DR_PIC" jdbcType="VARCHAR" property="drPic"/>
  22 + <result column="MEMO" jdbcType="VARCHAR" property="memo"/>
  23 + <result column="ROAD_DR_QUA_INFO" jdbcType="VARCHAR" property="roadDrQuaInfo"/>
  24 + <result column="QUA_ID" jdbcType="VARCHAR" property="quaId"/>
  25 + <result column="DR_QUA" jdbcType="VARCHAR" property="drQua"/>
  26 + <result column="APPR_NO" jdbcType="VARCHAR" property="apprNo"/>
  27 + <result column="OPERATION_TYPE_INFO" jdbcType="VARCHAR" property="operationTypeInfo"/>
  28 + <result column="NATIONALITY" jdbcType="VARCHAR" property="nationality"/>
  29 + <result column="APPR_PERIOD" jdbcType="DATE" property="apprPeriod"/>
  30 + <result column="CO_CODE" jdbcType="VARCHAR" property="coCode"/>
  31 + <result column="RETURNMESSAGE" jdbcType="VARCHAR" property="returnmessage"/>
  32 + <result column="CREATE_BY" jdbcType="VARCHAR" property="createBy"/>
  33 + <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
  34 + <result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy"/>
  35 + <result column="UPDATE_DATE" jdbcType="TIMESTAMP" property="updateDate"/>
  36 + </resultMap>
  37 + <sql id="Base_Column_List">
  38 + <!--@mbg.generated-->
  39 + ID, EPORT_ID, MAIN_PORT, DR_NAME, ID_CARD, DR_NATIVE, GENDER, BIRTHDAY, LIVE_ADDR,
  40 + CURR_APPLY_BUSSINESS, PROPOSER, PROPOSE_TIME, DR_CLASS_FLAG, OPERATION_TYPE, DR_PIC,
  41 + MEMO, ROAD_DR_QUA_INFO, QUA_ID, DR_QUA, APPR_NO, OPERATION_TYPE_INFO, NATIONALITY,
  42 + APPR_PERIOD, CO_CODE, RETURNMESSAGE, CREATE_BY, CREATE_DATE, UPDATE_BY, UPDATE_DATE
  43 + </sql>
  44 + <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  45 + <!--@mbg.generated-->
  46 + select
  47 + <include refid="Base_Column_List"/>
  48 + from land_road_dr_record
  49 + where ID = #{id,jdbcType=VARCHAR}
  50 + </select>
  51 +
  52 + <!-- 该查询用于分页查询 -->
  53 + <select id="selectListByPage" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord" resultMap="BaseResultMap">
  54 + select
  55 + <include refid="Base_Column_List"/>
  56 + from land_road_dr_record
  57 + <where>
  58 + <!-- 驾驶员姓名 -->
  59 + <if test="drName != null and drName != ''">
  60 + DR_NAME = #{drName,jdbcType=VARCHAR}
  61 + </if>
  62 + <!-- 驾车资格编号 -->
  63 + <if test="quaId != null and quaId != ''">
  64 + AND QUA_ID = #{quaId,jdbcType=VARCHAR}
  65 + </if>
  66 + </where>
  67 + </select>
  68 +
  69 + <!-- 查询,根据驾车资格编号 -->
  70 + <select id="selectByQuaId" parameterType="java.lang.String" resultMap="BaseResultMap">
  71 + select
  72 + <include refid="Base_Column_List"/>
  73 + from land_road_dr_record
  74 + where QUA_ID = #{quaId,jdbcType=VARCHAR}
  75 + </select>
  76 +
  77 + <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  78 + <!--@mbg.generated-->
  79 + delete
  80 + from land_road_dr_record
  81 + where ID = #{id,jdbcType=VARCHAR}
  82 + </delete>
  83 +
  84 + <delete id="batchRemoveByIds" parameterType="java.lang.String">
  85 + delete
  86 + from land_road_dr_record
  87 + where ID in
  88 + <foreach collection="array" open="(" close=")" separator="," item="id">
  89 + #{id,jdbcType=VARCHAR}
  90 + </foreach>
  91 + </delete>
  92 + <insert id="insert" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord">
  93 + <!--@mbg.generated-->
  94 + insert into land_road_dr_record (ID, EPORT_ID, MAIN_PORT,
  95 + DR_NAME, ID_CARD, DR_NATIVE,
  96 + GENDER, BIRTHDAY, LIVE_ADDR,
  97 + CURR_APPLY_BUSSINESS, PROPOSER, PROPOSE_TIME,
  98 + DR_CLASS_FLAG, OPERATION_TYPE, DR_PIC,
  99 + MEMO, ROAD_DR_QUA_INFO, QUA_ID,
  100 + DR_QUA, APPR_NO, OPERATION_TYPE_INFO,
  101 + NATIONALITY, APPR_PERIOD, CO_CODE,
  102 + RETURNMESSAGE, CREATE_BY, CREATE_DATE,
  103 + UPDATE_BY, UPDATE_DATE)
  104 + values (#{id,jdbcType=VARCHAR}, #{eportId,jdbcType=VARCHAR}, #{mainPort,jdbcType=VARCHAR},
  105 + #{drName,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, #{drNative,jdbcType=VARCHAR},
  106 + #{gender,jdbcType=VARCHAR}, #{birthday,jdbcType=DATE}, #{liveAddr,jdbcType=VARCHAR},
  107 + #{currApplyBussiness,jdbcType=VARCHAR}, #{proposer,jdbcType=VARCHAR}, #{proposeTime,jdbcType=TIMESTAMP},
  108 + #{drClassFlag,jdbcType=VARCHAR}, #{operationType,jdbcType=VARCHAR}, #{drPic,jdbcType=VARCHAR},
  109 + #{memo,jdbcType=VARCHAR}, #{roadDrQuaInfo,jdbcType=VARCHAR}, #{quaId,jdbcType=VARCHAR},
  110 + #{drQua,jdbcType=VARCHAR}, #{apprNo,jdbcType=VARCHAR}, #{operationTypeInfo,jdbcType=VARCHAR},
  111 + #{nationality,jdbcType=VARCHAR}, #{apprPeriod,jdbcType=DATE}, #{coCode,jdbcType=VARCHAR},
  112 + #{returnmessage,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP},
  113 + #{updateBy,jdbcType=VARCHAR}, #{updateDate,jdbcType=TIMESTAMP})
  114 + </insert>
  115 + <insert id="insertSelective" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord">
  116 + <!--@mbg.generated-->
  117 + insert into land_road_dr_record
  118 + <trim prefix="(" suffix=")" suffixOverrides=",">
  119 + <if test="id != null">
  120 + ID,
  121 + </if>
  122 + <if test="eportId != null">
  123 + EPORT_ID,
  124 + </if>
  125 + <if test="mainPort != null">
  126 + MAIN_PORT,
  127 + </if>
  128 + <if test="drName != null">
  129 + DR_NAME,
  130 + </if>
  131 + <if test="idCard != null">
  132 + ID_CARD,
  133 + </if>
  134 + <if test="drNative != null">
  135 + DR_NATIVE,
  136 + </if>
  137 + <if test="gender != null">
  138 + GENDER,
  139 + </if>
  140 + <if test="birthday != null">
  141 + BIRTHDAY,
  142 + </if>
  143 + <if test="liveAddr != null">
  144 + LIVE_ADDR,
  145 + </if>
  146 + <if test="currApplyBussiness != null">
  147 + CURR_APPLY_BUSSINESS,
  148 + </if>
  149 + <if test="proposer != null">
  150 + PROPOSER,
  151 + </if>
  152 + <if test="proposeTime != null">
  153 + PROPOSE_TIME,
  154 + </if>
  155 + <if test="drClassFlag != null">
  156 + DR_CLASS_FLAG,
  157 + </if>
  158 + <if test="operationType != null">
  159 + OPERATION_TYPE,
  160 + </if>
  161 + <if test="drPic != null">
  162 + DR_PIC,
  163 + </if>
  164 + <if test="memo != null">
  165 + MEMO,
  166 + </if>
  167 + <if test="roadDrQuaInfo != null">
  168 + ROAD_DR_QUA_INFO,
  169 + </if>
  170 + <if test="quaId != null">
  171 + QUA_ID,
  172 + </if>
  173 + <if test="drQua != null">
  174 + DR_QUA,
  175 + </if>
  176 + <if test="apprNo != null">
  177 + APPR_NO,
  178 + </if>
  179 + <if test="operationTypeInfo != null">
  180 + OPERATION_TYPE_INFO,
  181 + </if>
  182 + <if test="nationality != null">
  183 + NATIONALITY,
  184 + </if>
  185 + <if test="apprPeriod != null">
  186 + APPR_PERIOD,
  187 + </if>
  188 + <if test="coCode != null">
  189 + CO_CODE,
  190 + </if>
  191 + <if test="returnmessage != null">
  192 + RETURNMESSAGE,
  193 + </if>
  194 + <if test="createBy != null">
  195 + CREATE_BY,
  196 + </if>
  197 + <if test="createDate != null">
  198 + CREATE_DATE,
  199 + </if>
  200 + <if test="updateBy != null">
  201 + UPDATE_BY,
  202 + </if>
  203 + <if test="updateDate != null">
  204 + UPDATE_DATE,
  205 + </if>
  206 + </trim>
  207 + <trim prefix="values (" suffix=")" suffixOverrides=",">
  208 + <if test="id != null">
  209 + #{id,jdbcType=VARCHAR},
  210 + </if>
  211 + <if test="eportId != null">
  212 + #{eportId,jdbcType=VARCHAR},
  213 + </if>
  214 + <if test="mainPort != null">
  215 + #{mainPort,jdbcType=VARCHAR},
  216 + </if>
  217 + <if test="drName != null">
  218 + #{drName,jdbcType=VARCHAR},
  219 + </if>
  220 + <if test="idCard != null">
  221 + #{idCard,jdbcType=VARCHAR},
  222 + </if>
  223 + <if test="drNative != null">
  224 + #{drNative,jdbcType=VARCHAR},
  225 + </if>
  226 + <if test="gender != null">
  227 + #{gender,jdbcType=VARCHAR},
  228 + </if>
  229 + <if test="birthday != null">
  230 + #{birthday,jdbcType=DATE},
  231 + </if>
  232 + <if test="liveAddr != null">
  233 + #{liveAddr,jdbcType=VARCHAR},
  234 + </if>
  235 + <if test="currApplyBussiness != null">
  236 + #{currApplyBussiness,jdbcType=VARCHAR},
  237 + </if>
  238 + <if test="proposer != null">
  239 + #{proposer,jdbcType=VARCHAR},
  240 + </if>
  241 + <if test="proposeTime != null">
  242 + #{proposeTime,jdbcType=TIMESTAMP},
  243 + </if>
  244 + <if test="drClassFlag != null">
  245 + #{drClassFlag,jdbcType=VARCHAR},
  246 + </if>
  247 + <if test="operationType != null">
  248 + #{operationType,jdbcType=VARCHAR},
  249 + </if>
  250 + <if test="drPic != null">
  251 + #{drPic,jdbcType=VARCHAR},
  252 + </if>
  253 + <if test="memo != null">
  254 + #{memo,jdbcType=VARCHAR},
  255 + </if>
  256 + <if test="roadDrQuaInfo != null">
  257 + #{roadDrQuaInfo,jdbcType=VARCHAR},
  258 + </if>
  259 + <if test="quaId != null">
  260 + #{quaId,jdbcType=VARCHAR},
  261 + </if>
  262 + <if test="drQua != null">
  263 + #{drQua,jdbcType=VARCHAR},
  264 + </if>
  265 + <if test="apprNo != null">
  266 + #{apprNo,jdbcType=VARCHAR},
  267 + </if>
  268 + <if test="operationTypeInfo != null">
  269 + #{operationTypeInfo,jdbcType=VARCHAR},
  270 + </if>
  271 + <if test="nationality != null">
  272 + #{nationality,jdbcType=VARCHAR},
  273 + </if>
  274 + <if test="apprPeriod != null">
  275 + #{apprPeriod,jdbcType=DATE},
  276 + </if>
  277 + <if test="coCode != null">
  278 + #{coCode,jdbcType=VARCHAR},
  279 + </if>
  280 + <if test="returnmessage != null">
  281 + #{returnmessage,jdbcType=VARCHAR},
  282 + </if>
  283 + <if test="createBy != null">
  284 + #{createBy,jdbcType=VARCHAR},
  285 + </if>
  286 + <if test="createDate != null">
  287 + #{createDate,jdbcType=TIMESTAMP},
  288 + </if>
  289 + <if test="updateBy != null">
  290 + #{updateBy,jdbcType=VARCHAR},
  291 + </if>
  292 + <if test="updateDate != null">
  293 + #{updateDate,jdbcType=TIMESTAMP},
  294 + </if>
  295 + </trim>
  296 + </insert>
  297 + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord">
  298 + <!--@mbg.generated-->
  299 + update land_road_dr_record
  300 + <set>
  301 + <if test="eportId != null">
  302 + EPORT_ID = #{eportId,jdbcType=VARCHAR},
  303 + </if>
  304 + <if test="mainPort != null">
  305 + MAIN_PORT = #{mainPort,jdbcType=VARCHAR},
  306 + </if>
  307 + <if test="drName != null">
  308 + DR_NAME = #{drName,jdbcType=VARCHAR},
  309 + </if>
  310 + <if test="idCard != null">
  311 + ID_CARD = #{idCard,jdbcType=VARCHAR},
  312 + </if>
  313 + <if test="drNative != null">
  314 + DR_NATIVE = #{drNative,jdbcType=VARCHAR},
  315 + </if>
  316 + <if test="gender != null">
  317 + GENDER = #{gender,jdbcType=VARCHAR},
  318 + </if>
  319 + <if test="birthday != null">
  320 + BIRTHDAY = #{birthday,jdbcType=DATE},
  321 + </if>
  322 + <if test="liveAddr != null">
  323 + LIVE_ADDR = #{liveAddr,jdbcType=VARCHAR},
  324 + </if>
  325 + <if test="currApplyBussiness != null">
  326 + CURR_APPLY_BUSSINESS = #{currApplyBussiness,jdbcType=VARCHAR},
  327 + </if>
  328 + <if test="proposer != null">
  329 + PROPOSER = #{proposer,jdbcType=VARCHAR},
  330 + </if>
  331 + <if test="proposeTime != null">
  332 + PROPOSE_TIME = #{proposeTime,jdbcType=TIMESTAMP},
  333 + </if>
  334 + <if test="drClassFlag != null">
  335 + DR_CLASS_FLAG = #{drClassFlag,jdbcType=VARCHAR},
  336 + </if>
  337 + <if test="operationType != null">
  338 + OPERATION_TYPE = #{operationType,jdbcType=VARCHAR},
  339 + </if>
  340 + <if test="drPic != null">
  341 + DR_PIC = #{drPic,jdbcType=VARCHAR},
  342 + </if>
  343 + <if test="memo != null">
  344 + MEMO = #{memo,jdbcType=VARCHAR},
  345 + </if>
  346 + <if test="roadDrQuaInfo != null">
  347 + ROAD_DR_QUA_INFO = #{roadDrQuaInfo,jdbcType=VARCHAR},
  348 + </if>
  349 + <if test="quaId != null">
  350 + QUA_ID = #{quaId,jdbcType=VARCHAR},
  351 + </if>
  352 + <if test="drQua != null">
  353 + DR_QUA = #{drQua,jdbcType=VARCHAR},
  354 + </if>
  355 + <if test="apprNo != null">
  356 + APPR_NO = #{apprNo,jdbcType=VARCHAR},
  357 + </if>
  358 + <if test="operationTypeInfo != null">
  359 + OPERATION_TYPE_INFO = #{operationTypeInfo,jdbcType=VARCHAR},
  360 + </if>
  361 + <if test="nationality != null">
  362 + NATIONALITY = #{nationality,jdbcType=VARCHAR},
  363 + </if>
  364 + <if test="apprPeriod != null">
  365 + APPR_PERIOD = #{apprPeriod,jdbcType=DATE},
  366 + </if>
  367 + <if test="coCode != null">
  368 + CO_CODE = #{coCode,jdbcType=VARCHAR},
  369 + </if>
  370 + <if test="returnmessage != null">
  371 + RETURNMESSAGE = #{returnmessage,jdbcType=VARCHAR},
  372 + </if>
  373 + <if test="createBy != null">
  374 + CREATE_BY = #{createBy,jdbcType=VARCHAR},
  375 + </if>
  376 + <if test="createDate != null">
  377 + CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
  378 + </if>
  379 + <if test="updateBy != null">
  380 + UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
  381 + </if>
  382 + <if test="updateDate != null">
  383 + UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP},
  384 + </if>
  385 + </set>
  386 + where ID = #{id,jdbcType=VARCHAR}
  387 + </update>
  388 + <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadDrRecord">
  389 + <!--@mbg.generated-->
  390 + update land_road_dr_record
  391 + set EPORT_ID = #{eportId,jdbcType=VARCHAR},
  392 + MAIN_PORT = #{mainPort,jdbcType=VARCHAR},
  393 + DR_NAME = #{drName,jdbcType=VARCHAR},
  394 + ID_CARD = #{idCard,jdbcType=VARCHAR},
  395 + DR_NATIVE = #{drNative,jdbcType=VARCHAR},
  396 + GENDER = #{gender,jdbcType=VARCHAR},
  397 + BIRTHDAY = #{birthday,jdbcType=DATE},
  398 + LIVE_ADDR = #{liveAddr,jdbcType=VARCHAR},
  399 + CURR_APPLY_BUSSINESS = #{currApplyBussiness,jdbcType=VARCHAR},
  400 + PROPOSER = #{proposer,jdbcType=VARCHAR},
  401 + PROPOSE_TIME = #{proposeTime,jdbcType=TIMESTAMP},
  402 + DR_CLASS_FLAG = #{drClassFlag,jdbcType=VARCHAR},
  403 + OPERATION_TYPE = #{operationType,jdbcType=VARCHAR},
  404 + DR_PIC = #{drPic,jdbcType=VARCHAR},
  405 + MEMO = #{memo,jdbcType=VARCHAR},
  406 + ROAD_DR_QUA_INFO = #{roadDrQuaInfo,jdbcType=VARCHAR},
  407 + QUA_ID = #{quaId,jdbcType=VARCHAR},
  408 + DR_QUA = #{drQua,jdbcType=VARCHAR},
  409 + APPR_NO = #{apprNo,jdbcType=VARCHAR},
  410 + OPERATION_TYPE_INFO = #{operationTypeInfo,jdbcType=VARCHAR},
  411 + NATIONALITY = #{nationality,jdbcType=VARCHAR},
  412 + APPR_PERIOD = #{apprPeriod,jdbcType=DATE},
  413 + CO_CODE = #{coCode,jdbcType=VARCHAR},
  414 + RETURNMESSAGE = #{returnmessage,jdbcType=VARCHAR},
  415 + CREATE_BY = #{createBy,jdbcType=VARCHAR},
  416 + CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
  417 + UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
  418 + UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP}
  419 + where ID = #{id,jdbcType=VARCHAR}
  420 + </update>
  421 +</mapper>