From ac79b8967371e3690a5e11b4aa245da5c6bb45a3 Mon Sep 17 00:00:00 2001
From: duhl <1558016038@qq.com>
Date: Fri, 27 Mar 2020 09:39:30 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=8F=90=E4=BA=A4?=
=?UTF-8?q?=EF=BC=8C=E5=AE=8C=E6=88=90=E8=BD=A6=E7=89=8C=E8=BD=A6=E8=BE=86?=
=?UTF-8?q?=E7=BB=B4=E6=8A=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 3 +-
ruoyi-admin/pom.xml | 13 +-
.../controller/system/SysUserController.java | 1 +
.../tyre/BaseCarbrandController.java | 165 ++++++++++++++++++
.../src/main/resources/application-druid.yml | 6 +-
.../src/main/resources/application.yml | 2 +-
.../templates/tyre/carbrand/add.html | 77 ++++++++
.../templates/tyre/carbrand/carbrand.html | 121 +++++++++++++
.../templates/tyre/carbrand/edit.html | 78 +++++++++
.../ruoyi/common/constant/TyreConstants.java | 10 ++
.../src/main/resources/generator.yml | 4 +-
.../com/ruoyi/quartz/mapper/SysJobMapper.java | 2 +
.../ruoyi/quartz/service/ISysJobService.java | 1 +
ruoyi-tyre/pom.xml | 20 +++
.../com/ruoyi/tyre/domain/BaseCarbrand.java | 136 +++++++++++++++
.../ruoyi/tyre/mapper/BaseCarbrandMapper.java | 68 ++++++++
.../tyre/service/IBaseCarbrandService.java | 68 ++++++++
.../service/impl/BaseCarbrandServiceImpl.java | 116 ++++++++++++
.../mapper/tyre/BaseCarbrandMapper.xml | 93 ++++++++++
19 files changed, 976 insertions(+), 8 deletions(-)
create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/tyre/BaseCarbrandController.java
create mode 100644 ruoyi-admin/src/main/resources/templates/tyre/carbrand/add.html
create mode 100644 ruoyi-admin/src/main/resources/templates/tyre/carbrand/carbrand.html
create mode 100644 ruoyi-admin/src/main/resources/templates/tyre/carbrand/edit.html
create mode 100644 ruoyi-common/src/main/java/com/ruoyi/common/constant/TyreConstants.java
create mode 100644 ruoyi-tyre/pom.xml
create mode 100644 ruoyi-tyre/src/main/java/com/ruoyi/tyre/domain/BaseCarbrand.java
create mode 100644 ruoyi-tyre/src/main/java/com/ruoyi/tyre/mapper/BaseCarbrandMapper.java
create mode 100644 ruoyi-tyre/src/main/java/com/ruoyi/tyre/service/IBaseCarbrandService.java
create mode 100644 ruoyi-tyre/src/main/java/com/ruoyi/tyre/service/impl/BaseCarbrandServiceImpl.java
create mode 100644 ruoyi-tyre/src/main/resources/mapper/tyre/BaseCarbrandMapper.xml
diff --git a/pom.xml b/pom.xml
index 428c592..378b49d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -213,7 +213,8 @@
ruoyi-quartz
ruoyi-generator
ruoyi-common
-
+ ruoyi-tyre
+
pom
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index 1f96b76..3571a54 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -72,7 +72,18 @@
com.ruoyi
ruoyi-generator
-
+
+ com.ruoyi
+ ruoyi-system
+ 4.1.0
+
+
+ com.ruoyi
+ ruoyi-tyre
+ 4.1.0
+ compile
+
+
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
index 2a6175b..f3c0164 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -224,6 +224,7 @@ public class SysUserController extends BaseController
@ResponseBody
public String checkLoginNameUnique(SysUser user)
{
+
return userService.checkLoginNameUnique(user.getLoginName());
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tyre/BaseCarbrandController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tyre/BaseCarbrandController.java
new file mode 100644
index 0000000..84f2844
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tyre/BaseCarbrandController.java
@@ -0,0 +1,165 @@
+package com.ruoyi.web.controller.tyre;
+
+import java.util.Date;
+import java.util.List;
+
+import com.ruoyi.common.constant.TyreConstants;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.framework.util.ShiroUtils;
+import com.ruoyi.system.domain.SysUser;
+import javafx.scene.layout.BackgroundRepeat;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.tyre.domain.BaseCarbrand;
+import com.ruoyi.tyre.service.IBaseCarbrandService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 品牌Controller
+ *
+ * @author dhl
+ * @date 2020-03-26
+ */
+@Controller
+@RequestMapping("/tyre/carbrand")
+public class BaseCarbrandController extends BaseController
+{
+ private String prefix = "tyre/carbrand";
+
+ @Autowired
+ private IBaseCarbrandService baseCarbrandService;
+
+ @RequiresPermissions("tyre:carbrand:view")
+ @GetMapping()
+ public String carbrand()
+ {
+ return prefix + "/carbrand";
+ }
+
+ /**
+ * 查询品牌列表
+ */
+ @RequiresPermissions("tyre:carbrand:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(BaseCarbrand baseCarbrand)
+ {
+ startPage();
+ List list = baseCarbrandService.selectBaseCarbrandList(baseCarbrand);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出品牌列表
+ */
+ @RequiresPermissions("tyre:carbrand:export")
+ @Log(title = "品牌", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(BaseCarbrand baseCarbrand)
+ {
+ List list = baseCarbrandService.selectBaseCarbrandList(baseCarbrand);
+ ExcelUtil util = new ExcelUtil(BaseCarbrand.class);
+ return util.exportExcel(list, "carbrand");
+ }
+
+ /**
+ * 新增品牌
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存品牌
+ */
+ @RequiresPermissions("tyre:carbrand:add")
+ @Log(title = "品牌", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(BaseCarbrand baseCarbrand)
+ {
+ if(StringUtils.isBlank(baseCarbrand.getBranno())){
+ //车牌号为空,给提示
+ return error("车牌号不能为空");
+ }
+ if (TyreConstants.BRANNO_NOT_UNIQUE.equals(baseCarbrandService.checkBrannoUnique(baseCarbrand)))
+ {
+ return error("新增车牌号码'" + baseCarbrand.getBranno() + "'失败,车牌号码已存在");
+ }
+ baseCarbrand.setRecorderid(ShiroUtils.getLoginName());//记录人信息
+ baseCarbrand.setRecordtime(new Date());
+ return toAjax(baseCarbrandService.insertBaseCarbrand(baseCarbrand));
+ }
+
+ /**
+ * 修改品牌
+ */
+ @GetMapping("/edit/{objid}")
+ public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
+ {
+ BaseCarbrand baseCarbrand = baseCarbrandService.selectBaseCarbrandById(objid);
+ mmap.put("baseCarbrand", baseCarbrand);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存品牌
+ */
+ @RequiresPermissions("tyre:carbrand:edit")
+ @Log(title = "品牌", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(BaseCarbrand baseCarbrand)
+ {
+ if(StringUtils.isBlank(baseCarbrand.getBranno())){
+ //车牌号为空,给提示
+ return error("车牌号不能为空");
+ }
+ if (TyreConstants.BRANNO_NOT_UNIQUE.equals(baseCarbrandService.checkBrannoUnique(baseCarbrand)))
+ {
+ return error("修改车牌号码'" + baseCarbrand.getBranno() + "'失败,车牌号码已存在");
+ }
+ baseCarbrand.setRecorderid(ShiroUtils.getLoginName());//记录人信息
+ baseCarbrand.setRecordtime(new Date());
+ return toAjax(baseCarbrandService.updateBaseCarbrand(baseCarbrand));
+ }
+
+ /**
+ * 删除品牌
+ */
+ @RequiresPermissions("tyre:carbrand:remove")
+ @Log(title = "品牌", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(baseCarbrandService.deleteBaseCarbrandByIds(ids));
+ }
+
+ /**
+ * 校验车牌号码
+ */
+ @PostMapping("/checkBrannoUnique")
+ @ResponseBody
+ public String checkBrannoUnique(BaseCarbrand baseCarbrand)
+ {
+ return baseCarbrandService.checkBrannoUnique(baseCarbrand);
+ }
+
+}
diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index 048541f..f3e3421 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -6,9 +6,9 @@ spring:
druid:
# 主库数据源
master:
- url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=ry
+ url: jdbc:sqlserver://47.96.6.167:1433;SelectMethod=cursor;DatabaseName=TyreDB
username: sa
- password: 123456
+ password: haiwei@123
# 从库数据源
slave:
# 从数据源开关/默认关闭
@@ -21,7 +21,7 @@ spring:
# 最小连接池数量
minIdle: 10
# 最大连接池数量
- maxActive: 20
+ maxActive: 30
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 6d21cc2..a27473d 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -16,7 +16,7 @@ ruoyi:
# 开发环境配置
server:
# 服务器的HTTP端口,默认为80
- port: 80
+ port: 8090
servlet:
# 应用的访问路径
context-path: /
diff --git a/ruoyi-admin/src/main/resources/templates/tyre/carbrand/add.html b/ruoyi-admin/src/main/resources/templates/tyre/carbrand/add.html
new file mode 100644
index 0000000..ad033ae
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/tyre/carbrand/add.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/templates/tyre/carbrand/carbrand.html b/ruoyi-admin/src/main/resources/templates/tyre/carbrand/carbrand.html
new file mode 100644
index 0000000..44f73da
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/tyre/carbrand/carbrand.html
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/templates/tyre/carbrand/edit.html b/ruoyi-admin/src/main/resources/templates/tyre/carbrand/edit.html
new file mode 100644
index 0000000..7b2cfc6
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/tyre/carbrand/edit.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/TyreConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/TyreConstants.java
new file mode 100644
index 0000000..fafadfc
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/TyreConstants.java
@@ -0,0 +1,10 @@
+package com.ruoyi.common.constant;
+
+/**
+ * 轮胎车辆等信息常量
+ */
+public class TyreConstants {
+ /** 车牌号码是否唯一的返回结果码 */
+ public final static String BRANNO_UNIQUE = "0";
+ public final static String BRANNO_NOT_UNIQUE = "1";
+}
diff --git a/ruoyi-generator/src/main/resources/generator.yml b/ruoyi-generator/src/main/resources/generator.yml
index 8e3224e..5e0d54b 100644
--- a/ruoyi-generator/src/main/resources/generator.yml
+++ b/ruoyi-generator/src/main/resources/generator.yml
@@ -2,9 +2,9 @@
# 代码生成
gen:
# 作者
- author: ruoyi
+ author: dhl
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
- packageName: com.ruoyi.system
+ packageName: com.ruoyi.tyre
# 自动去除表前缀,默认是false
autoRemovePre: false
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java
index 5207c7a..8cdb827 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java
@@ -64,4 +64,6 @@ public interface SysJobMapper
* @return 结果
*/
public int insertJob(SysJob job);
+
+
}
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobService.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobService.java
index 7856697..1034f30 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobService.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobService.java
@@ -99,4 +99,5 @@ public interface ISysJobService
* @return 结果
*/
public boolean checkCronExpressionIsValid(String cronExpression);
+
}
\ No newline at end of file
diff --git a/ruoyi-tyre/pom.xml b/ruoyi-tyre/pom.xml
new file mode 100644
index 0000000..8d04937
--- /dev/null
+++ b/ruoyi-tyre/pom.xml
@@ -0,0 +1,20 @@
+
+
+
+ ruoyi
+ com.ruoyi
+ 4.1.0
+
+ 4.0.0
+
+ ruoyi-tyre
+
+
+ com.ruoyi
+ ruoyi-system
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-tyre/src/main/java/com/ruoyi/tyre/domain/BaseCarbrand.java b/ruoyi-tyre/src/main/java/com/ruoyi/tyre/domain/BaseCarbrand.java
new file mode 100644
index 0000000..132b5b1
--- /dev/null
+++ b/ruoyi-tyre/src/main/java/com/ruoyi/tyre/domain/BaseCarbrand.java
@@ -0,0 +1,136 @@
+package com.ruoyi.tyre.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+import java.util.Date;
+
+/**
+ * 车辆车牌对象 base_carbrand
+ *
+ * @author dhl
+ * @date 2020-03-26
+ */
+public class BaseCarbrand extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 车牌ID */
+ private Long objid;
+
+ /** 车牌号码 */
+ @Excel(name = "车牌号码")
+ private String branno;
+
+ /** 车辆类型 */
+ @Excel(name = "车辆类型")
+ private String cartype;
+
+ /** 记录人 */
+ @Excel(name = "记录人")
+ private String recorderid;
+
+ /** 删除标志 */
+ @Excel(name = "删除标志")
+ private String deleteflag;
+
+ /** 记录时间 */
+ @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date recordtime;
+
+ /** 备注 */
+ @Excel(name = "备注")
+ private String remark;
+
+ public String getRemark() {
+ return remark;
+ }
+
+ public void setRemark(String remark) {
+ this.remark = remark;
+ }
+
+ public void setObjid(Long objid)
+ {
+ this.objid = objid;
+ }
+
+ public Long getObjid()
+ {
+ return objid;
+ }
+
+ public void setBranno(String branno)
+ {
+ this.branno = branno;
+ }
+
+ @NotBlank(message = "车牌号不能为空")
+ @Size(min = 0, max = 30, message = "车牌号长度不能超过30个字符")
+ public String getBranno()
+ {
+ return branno;
+ }
+
+ public void setCartype(String cartype)
+ {
+ this.cartype = cartype;
+ }
+
+ public String getCartype()
+ {
+ return cartype;
+ }
+
+ public String getRecorderid() {
+ return recorderid;
+ }
+
+ public void setRecorderid(String recorderid) {
+ this.recorderid = recorderid;
+ }
+
+ public void setDeleteflag(String deleteflag)
+ {
+ this.deleteflag = deleteflag;
+ }
+
+ public String getDeleteflag()
+ {
+ return deleteflag;
+ }
+
+ public void setRecordtime(Date recordtime)
+ {
+ this.recordtime = recordtime;
+ }
+
+ public Date getRecordtime()
+ {
+ return recordtime;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+
+ .append("objid", getObjid())
+
+ .append("branno", getBranno())
+
+ .append("cartype", getCartype())
+
+ .append("recorderid", getRecorderid())
+
+ .append("deleteflag", getDeleteflag())
+
+ .append("remark", getRemark())
+
+ .append("recordtime", getRecordtime())
+ .toString();
+ }
+}
diff --git a/ruoyi-tyre/src/main/java/com/ruoyi/tyre/mapper/BaseCarbrandMapper.java b/ruoyi-tyre/src/main/java/com/ruoyi/tyre/mapper/BaseCarbrandMapper.java
new file mode 100644
index 0000000..ae4be28
--- /dev/null
+++ b/ruoyi-tyre/src/main/java/com/ruoyi/tyre/mapper/BaseCarbrandMapper.java
@@ -0,0 +1,68 @@
+package com.ruoyi.tyre.mapper;
+
+import com.ruoyi.tyre.domain.BaseCarbrand;
+import java.util.List;
+
+/**
+ * 车牌Mapper接口
+ *
+ * @author dhl
+ * @date 2020-03-26
+ */
+public interface BaseCarbrandMapper
+{
+ /**
+ * 查询车牌
+ *
+ * @param objid 车牌ID
+ * @return 车牌
+ */
+ public BaseCarbrand selectBaseCarbrandById(Long objid);
+
+ /**
+ * 查询车牌列表
+ *
+ * @param baseCarbrand 车牌
+ * @return 车牌集合
+ */
+ public List selectBaseCarbrandList(BaseCarbrand baseCarbrand);
+
+ /**
+ * 新增车牌
+ *
+ * @param baseCarbrand 车牌
+ * @return 结果
+ */
+ public int insertBaseCarbrand(BaseCarbrand baseCarbrand);
+
+ /**
+ * 修改车牌
+ *
+ * @param baseCarbrand 车牌
+ * @return 结果
+ */
+ public int updateBaseCarbrand(BaseCarbrand baseCarbrand);
+
+ /**
+ * 删除车牌
+ *
+ * @param objid 车牌ID
+ * @return 结果
+ */
+ public int deleteBaseCarbrandById(Long objid);
+
+ /**
+ * 批量删除车牌
+ *
+ * @param objids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteBaseCarbrandByIds(String[] objids);
+
+ /**
+ * 校验车牌号码是否唯一
+ * @param branno
+ * @return
+ */
+ public BaseCarbrand checkBrannoUnique(String branno);
+}
diff --git a/ruoyi-tyre/src/main/java/com/ruoyi/tyre/service/IBaseCarbrandService.java b/ruoyi-tyre/src/main/java/com/ruoyi/tyre/service/IBaseCarbrandService.java
new file mode 100644
index 0000000..ac51ab9
--- /dev/null
+++ b/ruoyi-tyre/src/main/java/com/ruoyi/tyre/service/IBaseCarbrandService.java
@@ -0,0 +1,68 @@
+package com.ruoyi.tyre.service;
+
+import com.ruoyi.tyre.domain.BaseCarbrand;
+import java.util.List;
+
+/**
+ *车牌Service接口
+ *
+ * @author dhl
+ * @date 2020-03-26
+ */
+public interface IBaseCarbrandService
+{
+ /**
+ * 查询品牌
+ *
+ * @param objid车牌ID
+ * @return车牌
+ */
+ public BaseCarbrand selectBaseCarbrandById(Long objid);
+
+ /**
+ * 查询品牌列表
+ *
+ * @param baseCarbrand车牌
+ * @return车牌集合
+ */
+ public List selectBaseCarbrandList(BaseCarbrand baseCarbrand);
+
+ /**
+ * 新增品牌
+ *
+ * @param baseCarbrand车牌
+ * @return 结果
+ */
+ public int insertBaseCarbrand(BaseCarbrand baseCarbrand);
+
+ /**
+ * 修改品牌
+ *
+ * @param baseCarbrand车牌
+ * @return 结果
+ */
+ public int updateBaseCarbrand(BaseCarbrand baseCarbrand);
+
+ /**
+ * 批量删除品牌
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteBaseCarbrandByIds(String ids);
+
+ /**
+ * 删除品牌信息
+ *
+ * @param objid车牌ID
+ * @return 结果
+ */
+ public int deleteBaseCarbrandById(Long objid);
+
+ /**
+ * 校验车牌号码是否存在
+ * @param branno
+ * @return
+ */
+ String checkBrannoUnique(BaseCarbrand branno);
+}
diff --git a/ruoyi-tyre/src/main/java/com/ruoyi/tyre/service/impl/BaseCarbrandServiceImpl.java b/ruoyi-tyre/src/main/java/com/ruoyi/tyre/service/impl/BaseCarbrandServiceImpl.java
new file mode 100644
index 0000000..311960b
--- /dev/null
+++ b/ruoyi-tyre/src/main/java/com/ruoyi/tyre/service/impl/BaseCarbrandServiceImpl.java
@@ -0,0 +1,116 @@
+package com.ruoyi.tyre.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.common.constant.TyreConstants;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.SysPost;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.tyre.mapper.BaseCarbrandMapper;
+import com.ruoyi.tyre.domain.BaseCarbrand;
+import com.ruoyi.tyre.service.IBaseCarbrandService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 车牌Service业务层处理
+ *
+ * @author dhl
+ * @date 2020-03-26
+ */
+@Service
+public class BaseCarbrandServiceImpl implements IBaseCarbrandService
+{
+ @Autowired
+ private BaseCarbrandMapper baseCarbrandMapper;
+
+ /**
+ * 查询车牌
+ *
+ * @param objid 车牌ID
+ * @return 车牌
+ */
+ @Override
+ public BaseCarbrand selectBaseCarbrandById(Long objid)
+ {
+ return baseCarbrandMapper.selectBaseCarbrandById(objid);
+ }
+
+ /**
+ * 查询车牌列表
+ *
+ * @param baseCarbrand 车牌
+ * @return 车牌
+ */
+ @Override
+ public List selectBaseCarbrandList(BaseCarbrand baseCarbrand)
+ {
+ return baseCarbrandMapper.selectBaseCarbrandList(baseCarbrand);
+ }
+
+ /**
+ * 新增车牌
+ *
+ * @param baseCarbrand 车牌
+ * @return 结果
+ */
+ @Override
+ public int insertBaseCarbrand(BaseCarbrand baseCarbrand)
+ {
+ return baseCarbrandMapper.insertBaseCarbrand(baseCarbrand);
+ }
+
+ /**
+ * 修改车牌
+ *
+ * @param baseCarbrand 车牌
+ * @return 结果
+ */
+ @Override
+ public int updateBaseCarbrand(BaseCarbrand baseCarbrand)
+ {
+ return baseCarbrandMapper.updateBaseCarbrand(baseCarbrand);
+ }
+
+ /**
+ * 删除车牌对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteBaseCarbrandByIds(String ids)
+ {
+ return baseCarbrandMapper.deleteBaseCarbrandByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 校验车牌号码是否唯一
+ * @param branno
+ * @return
+ */
+ @Override
+ public String checkBrannoUnique(BaseCarbrand branno) {
+
+ Long objId = StringUtils.isNull(branno.getObjid()) ? -1L : branno.getObjid();
+ BaseCarbrand info=baseCarbrandMapper.checkBrannoUnique(branno.getBranno());
+ if (StringUtils.isNotNull(info) && info.getObjid().longValue() != objId.longValue())
+ {
+ return TyreConstants.BRANNO_NOT_UNIQUE;//不唯一:1
+ }
+ return TyreConstants.BRANNO_UNIQUE;//唯一:0
+
+ }
+
+ /**
+ * 删除车牌信息
+ *
+ * @param objid 车牌ID
+ * @return 结果
+ */
+ public int deleteBaseCarbrandById(Long objid)
+ {
+ return baseCarbrandMapper.deleteBaseCarbrandById(objid);
+ }
+}
diff --git a/ruoyi-tyre/src/main/resources/mapper/tyre/BaseCarbrandMapper.xml b/ruoyi-tyre/src/main/resources/mapper/tyre/BaseCarbrandMapper.xml
new file mode 100644
index 0000000..c1c0f56
--- /dev/null
+++ b/ruoyi-tyre/src/main/resources/mapper/tyre/BaseCarbrandMapper.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select ObjId, BranNo, CarType, RecorderID, DeleteFlag, Remark, RecordTime from base_carbrand
+
+
+
+
+
+
+
+ insert into base_carbrand
+
+ ObjId,
+ BranNo,
+ CarType,
+ RecorderID,
+ DeleteFlag,
+ Remark,
+ RecordTime,
+
+
+ #{objid},
+ #{branno},
+ #{cartype},
+ #{recorderid},
+ #{deleteflag},
+ #{remark},
+ #{recordtime},
+
+
+
+
+ update base_carbrand
+
+ BranNo = #{branno},
+ CarType = #{cartype},
+ RecorderID = #{recorderid},
+ DeleteFlag = #{deleteflag},
+ Remark = #{remark},
+ RecordTime = #{recordtime},
+
+ where ObjId = #{objid}
+
+
+
+ delete from base_carbrand where ObjId = #{objid}
+
+
+
+ delete from base_carbrand where ObjId in
+
+ #{objid}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file