Commit bbf19039 by 刘宇峰

围栏、设备

1 parent 7ba4f9c7
......@@ -6,8 +6,6 @@ import cn.com.glsx.admin.modules.service.ElectricFenceService;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.core.web.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -32,9 +30,6 @@ public class ElectricFenceController {
@SysLog("新增围栏")
@PostMapping(value = "/add")
@ApiOperation(value = "新增围栏")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "fenceName", value = "fenceName", required = true, dataType = "cn.com.glsx.admin.modules.model.ElectricFenceBO", paramType = "body")
// })
public R add(@RequestBody @Validated ElectricFenceBO fenceBO) throws Exception {
electricFenceService.addFence(fenceBO);
return R.ok();
......@@ -60,9 +55,9 @@ public class ElectricFenceController {
* @param fenceId
* @return
*/
@GetMapping(value = "/info/{fenceId}")
@GetMapping(value = "/info")
@ApiOperation(value = "查看围栏详情")
public R info(@PathVariable("fenceId") Long fenceId) {
public R info(@RequestParam("fenceId") Long fenceId) {
ElectricFenceDetailsDTO detailsDTO = electricFenceService.getInfoById(fenceId);
return R.ok().data(detailsDTO);
}
......
......@@ -5,6 +5,7 @@ import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;
@Data
@Table(name = "t_device")
......@@ -65,6 +66,12 @@ public class Device extends BaseEntity {
* 激活状态:0未激活,1激活
*/
@Column(name = "activate_status")
private Byte activateStatus;
private Integer activateStatus;
/**
* 激活时间
*/
@Column(name = "activate_time")
private Date activateTime;
}
\ No newline at end of file
package cn.com.glsx.admin.modules.entity;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
......@@ -12,6 +14,7 @@ import static javax.persistence.GenerationType.IDENTITY;
* 作者: Yanglinlong
* 日期: 2021/5/6 17:01
*/
@Data
@Table(name = "d_electric_fence_drive")
public class ElectricFenceDrive implements Serializable {
@Id
......@@ -22,7 +25,7 @@ public class ElectricFenceDrive implements Serializable {
private String sn;
@Column(name = "fence_id")
private Integer fenceId;
private Long fenceId;
@Column(name = "sve_system_id")
private Integer sveSystemId;
......@@ -33,11 +36,11 @@ public class ElectricFenceDrive implements Serializable {
@Column(name = "percent")
private Integer percent;
@Column(name = "create_time")
private Date createTime;
@Column(name = "created_date", length = 19, updatable = false)
private Date createdDate;
@Column(name = "update_time")
private Date updateTime;
@Column(name = "updated_date", length = 19)
private Date updatedDate;
@Transient
private String shopCode;
......@@ -45,83 +48,4 @@ public class ElectricFenceDrive implements Serializable {
@Transient
private String shopName;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public Integer getFenceId() {
return fenceId;
}
public void setFenceId(Integer fenceId) {
this.fenceId = fenceId;
}
public Integer getSveSystemId() {
return sveSystemId;
}
public void setSveSystemId(Integer sveSystemId) {
this.sveSystemId = sveSystemId;
}
public Integer getJourneyTime() {
return journeyTime;
}
public void setJourneyTime(Integer journeyTime) {
this.journeyTime = journeyTime;
}
public Integer getPercent() {
return percent;
}
public void setPercent(Integer percent) {
this.percent = percent;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getShopCode() {
return shopCode;
}
public void setShopCode(String shopCode) {
this.shopCode = shopCode;
}
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
}
......@@ -18,77 +18,9 @@ public class Workorder extends BaseEntity {
private String orderNo;
/**
* 车主姓名
*/
@Column(name = "owner_name")
private String ownerName;
/**
* 车主性别
*/
@Column(name = "owner_sex")
private String ownerSex;
/**
* 车主联系方式
*/
@Column(name = "owner_tel")
private String ownerTel;
/**
* 车辆品牌id
*/
@Column(name = "brand_id")
private Integer brandId;
/**
* 车辆系别id
*/
@Column(name = "series_id")
private Integer seriesId;
/**
* 车辆型号id
*/
@Column(name = "model_id")
private Integer modelId;
/**
* 车架号
*/
private String vin;
/**
* 车牌
*/
@Column(name = "license_plate")
private String licensePlate;
/**
* 发动机
*/
private String engine;
/**
* 排量
*/
private String displacement;
/**
* 里程
*/
private String mileage;
/**
* 购车时间
*/
@Column(name = "buy_date")
private Date buyDate;
/**
* 车辆说明
* 工单来源
*/
private String description;
private String source;
/**
* 到期时间
......@@ -120,11 +52,6 @@ public class Workorder extends BaseEntity {
private String remark;
/**
* 工单来源
*/
private String source;
/**
* 验证激活状态 0默认,1:通过,2 不通过
*/
@Column(name = "validate_status")
......
<?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="cn.com.glsx.admin.modules.mapper.DeviceMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.admin.modules.entity.Device">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="sn" jdbcType="VARCHAR" property="sn" />
<result column="imsi" jdbcType="VARCHAR" property="imsi" />
<result column="iccid" jdbcType="VARCHAR" property="iccid" />
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="sim" jdbcType="VARCHAR" property="sim" />
<result column="check_code" jdbcType="VARCHAR" property="checkCode" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="manufacturer" jdbcType="VARCHAR" property="manufacturer" />
<result column="model_id" jdbcType="INTEGER" property="modelId" />
<result column="model_name" jdbcType="VARCHAR" property="modelName" />
<result column="version" jdbcType="VARCHAR" property="version" />
<result column="activate_status" jdbcType="TINYINT" property="activateStatus" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
<result column="created_by" jdbcType="INTEGER" property="createdBy" />
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate" />
<result column="updated_by" jdbcType="INTEGER" property="updatedBy" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, `name`, sn, imsi, iccid, imei, sim, check_code, `type`, manufacturer, model_id,
model_name, version, activate_status, del_flag, created_date, created_by, updated_date,
updated_by
</sql>
<resultMap id="BaseResultMap" type="cn.com.glsx.admin.modules.entity.Device">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="sn" jdbcType="VARCHAR" property="sn"/>
<result column="imsi" jdbcType="VARCHAR" property="imsi"/>
<result column="iccid" jdbcType="VARCHAR" property="iccid"/>
<result column="imei" jdbcType="VARCHAR" property="imei"/>
<result column="sim" jdbcType="VARCHAR" property="sim"/>
<result column="check_code" jdbcType="VARCHAR" property="checkCode"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="manufacturer" jdbcType="VARCHAR" property="manufacturer"/>
<result column="model_id" jdbcType="INTEGER" property="modelId"/>
<result column="model_name" jdbcType="VARCHAR" property="modelName"/>
<result column="version" jdbcType="VARCHAR" property="version"/>
<result column="activate_status" jdbcType="TINYINT" property="activateStatus"/>
<result column="activate_time" jdbcType="TIMESTAMP" property="activateTime"/>
<result column="del_flag" jdbcType="TINYINT" property="delFlag"/>
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate"/>
<result column="created_by" jdbcType="INTEGER" property="createdBy"/>
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate"/>
<result column="updated_by" jdbcType="INTEGER" property="updatedBy"/>
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, `name`, sn, imsi, iccid, imei, sim, check_code, `type`, manufacturer, model_id,
model_name, version, activate_status, activate_time, del_flag, created_date, created_by, updated_date,
updated_by
</sql>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.glsx.admin.modules.mapper.WorkorderMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.admin.modules.entity.Workorder">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
<result column="owner_name" jdbcType="VARCHAR" property="ownerName" />
<result column="owner_sex" jdbcType="VARCHAR" property="ownerSex" />
<result column="owner_tel" jdbcType="VARCHAR" property="ownerTel" />
<result column="brand_id" jdbcType="INTEGER" property="brandId" />
<result column="series_id" jdbcType="INTEGER" property="seriesId" />
<result column="model_id" jdbcType="INTEGER" property="modelId" />
<result column="vin" jdbcType="VARCHAR" property="vin" />
<result column="license_plate" jdbcType="VARCHAR" property="licensePlate" />
<result column="engine" jdbcType="VARCHAR" property="engine" />
<result column="displacement" jdbcType="VARCHAR" property="displacement" />
<result column="mileage" jdbcType="VARCHAR" property="mileage" />
<result column="buy_date" jdbcType="DATE" property="buyDate" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="expire_time" jdbcType="TIMESTAMP" property="expireTime" />
<result column="shop_contactor" jdbcType="VARCHAR" property="shopContactor" />
<result column="shop_tel" jdbcType="VARCHAR" property="shopTel" />
<result column="install_date" jdbcType="DATE" property="installDate" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="source" jdbcType="VARCHAR" property="source" />
<result column="validate_status" jdbcType="TINYINT" property="validateStatus" />
<result column="validate_info" jdbcType="VARCHAR" property="validateInfo" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
<result column="created_by" jdbcType="INTEGER" property="createdBy" />
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate" />
<result column="updated_by" jdbcType="INTEGER" property="updatedBy" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, order_no, owner_name, owner_sex, owner_tel, brand_id, series_id, model_id, vin,
license_plate, engine, displacement, mileage, buy_date, description, expire_time,
shop_contactor, shop_tel, install_date, remark, `source`, validate_status, validate_info,
del_flag, created_date, created_by, updated_date, updated_by
</sql>
<resultMap id="BaseResultMap" type="cn.com.glsx.admin.modules.entity.Workorder">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="order_no" jdbcType="VARCHAR" property="orderNo"/>
<result column="source" jdbcType="VARCHAR" property="source"/>
<result column="expire_time" jdbcType="TIMESTAMP" property="expireTime"/>
<result column="shop_contactor" jdbcType="VARCHAR" property="shopContactor"/>
<result column="shop_tel" jdbcType="VARCHAR" property="shopTel"/>
<result column="install_date" jdbcType="DATE" property="installDate"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="validate_status" jdbcType="TINYINT" property="validateStatus"/>
<result column="validate_info" jdbcType="VARCHAR" property="validateInfo"/>
<result column="del_flag" jdbcType="TINYINT" property="delFlag"/>
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate"/>
<result column="created_by" jdbcType="INTEGER" property="createdBy"/>
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate"/>
<result column="updated_by" jdbcType="INTEGER" property="updatedBy"/>
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, `source`, expire_time, shop_contactor, shop_tel, install_date, remark, validate_status, validate_info,
del_flag, created_date, created_by, updated_date, updated_by
</sql>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!