1. 在运营区外X秒后断电
This commit is contained in:
parent
f9086a50ea
commit
d9e8887a60
|
@ -32,6 +32,10 @@ import javax.annotation.Resource;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
|
import java.security.InvalidKeyException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接收硬件参数
|
* 接收硬件参数
|
||||||
|
@ -66,6 +70,9 @@ public class ReceiveController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IEtOrderService etOrderService;
|
private IEtOrderService etOrderService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ScheduledExecutorService scheduledExecutorService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能描述:第三方平台数据接收。<p>
|
* 功能描述:第三方平台数据接收。<p>
|
||||||
|
@ -125,133 +132,162 @@ public class ReceiveController {
|
||||||
lat = new BigDecimal(doubles[0]).setScale(4, RoundingMode.HALF_UP);
|
lat = new BigDecimal(doubles[0]).setScale(4, RoundingMode.HALF_UP);
|
||||||
lon = new BigDecimal(doubles[1]).setScale(4, RoundingMode.HALF_UP);
|
lon = new BigDecimal(doubles[1]).setScale(4, RoundingMode.HALF_UP);
|
||||||
log.info("转换后的GCJ02经纬度:" + lon + "---" + lat);
|
log.info("转换后的GCJ02经纬度:" + lon + "---" + lat);
|
||||||
device.setLatitude(lat.toString());
|
if(BigDecimal.ZERO.compareTo(lon) != 0 && BigDecimal.ZERO.compareTo(lat) != 0){
|
||||||
device.setLongitude(lon.toString());
|
device.setLatitude(lat.toString());
|
||||||
Integer bat = value.getBat();
|
device.setLongitude(lon.toString());
|
||||||
BigDecimal divide = new BigDecimal(bat).divide(new BigDecimal(10));
|
Integer bat = value.getBat();
|
||||||
log.info("保存电压:" + divide);
|
BigDecimal divide = new BigDecimal(bat).divide(new BigDecimal(10));
|
||||||
device.setVoltage(divide.toString());//电压
|
log.info("保存电压:" + divide);
|
||||||
// 根据电压计算续航里程
|
device.setVoltage(divide.toString());//电压
|
||||||
EtModel model = etModelService.selectEtModelByModelId(device.getModelId());
|
// 根据电压计算续航里程
|
||||||
Integer remainingMileage = CommonUtil.getRemainingMileage(device.getVoltage(), model.getFullVoltage(), model.getLowVoltage(), model.getFullEndurance());
|
EtModel model = etModelService.selectEtModelByModelId(device.getModelId());
|
||||||
Integer electricQuantity = CommonUtil.getElectricQuantity(device.getVoltage(), model.getFullVoltage(), model.getLowVoltage());//电量百分百
|
Integer remainingMileage = CommonUtil.getRemainingMileage(device.getVoltage(), model.getFullVoltage(), model.getLowVoltage(), model.getFullEndurance());
|
||||||
device.setRemainingMileage(remainingMileage);
|
Integer electricQuantity = CommonUtil.getElectricQuantity(device.getVoltage(), model.getFullVoltage(), model.getLowVoltage());//电量百分百
|
||||||
device.setRemainingPower(electricQuantity.toString());
|
device.setRemainingMileage(remainingMileage);
|
||||||
int i = asDeviceService.updateAsDeviceBySn(device);
|
device.setRemainingPower(electricQuantity.toString());
|
||||||
if(i>0){
|
int i = asDeviceService.updateAsDeviceBySn(device);
|
||||||
log.info("更新定位成功==========================>" +logEntry.getDevName());
|
if(i>0){
|
||||||
/** 2. 判断是否在禁行区内
|
log.info("更新定位成功==========================>" +logEntry.getDevName());
|
||||||
* 如果在, 根据配置‘禁行区内断电配置’进行断电
|
/** 2. 判断是否在禁行区内
|
||||||
**/
|
* 如果在, 根据配置‘禁行区内断电配置’进行断电
|
||||||
boolean noRidingArea = asDeviceService.isNoRidingArea(device.getSn(), device.getAreaId());
|
**/
|
||||||
if(noRidingArea){
|
boolean noRidingArea = asDeviceService.isNoRidingArea(device.getSn(), device.getAreaId());
|
||||||
String noRidingOutage = area.getNoRidingOutage();
|
if(noRidingArea){
|
||||||
//发送播报指令
|
String noRidingOutage = area.getNoRidingOutage();
|
||||||
asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_PLAY3,"禁行区内播报");
|
//发送播报指令
|
||||||
if(noRidingOutage.equals("1")){//禁行区内断电
|
asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_PLAY3,"禁行区内播报");
|
||||||
//发送断电命令
|
if(noRidingOutage.equals("1") && !device.getIsAreaOutOutage().equals("1")){//禁行区内断电
|
||||||
asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_QLOSE,"禁行区内断电");
|
//x秒后发送断电命令
|
||||||
log.info("禁行区内发送断电命令:" +logEntry.getDevName());
|
scheduledExecutorService.schedule(() -> {
|
||||||
|
try {
|
||||||
|
asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_QLOSE,"超出营运区断电");
|
||||||
|
device.setIsAreaOutOutage("0");
|
||||||
|
asDeviceService.updateAsDevice(device);
|
||||||
|
log.info("禁行区内发送断电命令:" +logEntry.getDevName());
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (NoSuchAlgorithmException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvalidKeyException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}, area.getOutage(), TimeUnit.SECONDS);
|
||||||
|
device.setIsAreaOutOutage("1");
|
||||||
|
asDeviceService.updateAsDevice(device);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
/** 3.超出运营区外断电*/
|
||||||
/** 3.超出运营区外断电*/
|
boolean isAreaZone = asDeviceService.isAreaZone(device.getSn(), area);
|
||||||
boolean isAreaZone = asDeviceService.isAreaZone(device.getSn(), area);
|
if(isAreaZone){
|
||||||
if(isAreaZone){
|
String areaOutOutage = area.getAreaOutOutage();
|
||||||
String areaOutOutage = area.getAreaOutOutage();
|
//发送超出营运区播报指令
|
||||||
//发送超出营运区播报指令
|
asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_PLAY3,"超出营运区播报");
|
||||||
asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_PLAY3,"超出营运区播报");
|
if(areaOutOutage.equals("1") && !device.getIsAreaOutOutage().equals("1")){//超出营运区断电
|
||||||
if(areaOutOutage.equals("1")){//超出营运区断电
|
//x秒后发送断电命令
|
||||||
//发送断电命令
|
scheduledExecutorService.schedule(() -> {
|
||||||
asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_QLOSE,"超出营运区断电");
|
try {
|
||||||
log.info("超出营运区发送断电命令:" +logEntry.getDevName());
|
asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_QLOSE,"超出营运区断电");
|
||||||
|
device.setIsAreaOutOutage("0");
|
||||||
|
asDeviceService.updateAsDevice(device);
|
||||||
|
log.info("超出营运区发送断电命令:" +logEntry.getDevName());
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (NoSuchAlgorithmException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvalidKeyException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}, area.getOutage(), TimeUnit.SECONDS);
|
||||||
|
device.setIsAreaOutOutage("1");
|
||||||
|
asDeviceService.updateAsDevice(device);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
/** 4.行程线路添加,更新订单中的trip_route字段 */
|
||||||
/** 4.行程线路添加,更新订单中的trip_route字段 */
|
Integer status = value.getStatus();
|
||||||
Integer status = value.getStatus();
|
if(status == 1){//上电运行
|
||||||
if(status == 1){//上电运行
|
log.info("上电运行:" +logEntry.getDevName());
|
||||||
log.info("上电运行:" +logEntry.getDevName());
|
if(BigDecimal.ZERO.compareTo(lon) != 0 && BigDecimal.ZERO.compareTo(lat) != 0){
|
||||||
if(BigDecimal.ZERO.compareTo(lon) != 0 && BigDecimal.ZERO.compareTo(lat) != 0){
|
//获取当前正在骑行中的订单
|
||||||
//获取当前正在骑行中的订单
|
EtOrder etOrder = etOrderService.getCurrentOrder(device.getSn());
|
||||||
EtOrder etOrder = etOrderService.getCurrentOrder(device.getSn());
|
if(ObjectUtil.isNotNull(etOrder)){
|
||||||
if(ObjectUtil.isNotNull(etOrder)){
|
JSONArray jsonArray;
|
||||||
JSONArray jsonArray;
|
if(StrUtil.isNotBlank(etOrder.getTripRouteStr())){
|
||||||
if(StrUtil.isNotBlank(etOrder.getTripRouteStr())){
|
jsonArray = JSON.parseArray(etOrder.getTripRouteStr());
|
||||||
jsonArray = JSON.parseArray(etOrder.getTripRouteStr());
|
}else{
|
||||||
}else{
|
jsonArray = new JSONArray();
|
||||||
jsonArray = new JSONArray();
|
}
|
||||||
}
|
JSONArray newPoint = new JSONArray();
|
||||||
JSONArray newPoint = new JSONArray();
|
newPoint.add(lon);
|
||||||
newPoint.add(lon);
|
newPoint.add(lat);
|
||||||
newPoint.add(lat);
|
|
||||||
|
|
||||||
// 优化轨迹,如果获取到的定位与最后一个定位相同,则不添加
|
// 优化轨迹,如果获取到的定位与最后一个定位相同,则不添加
|
||||||
if(jsonArray.size() > 0){
|
if(jsonArray.size() > 0){
|
||||||
JSONArray lastPoint = (JSONArray) jsonArray.get(jsonArray.size() - 1);
|
JSONArray lastPoint = (JSONArray) jsonArray.get(jsonArray.size() - 1);
|
||||||
if(lastPoint.get(0).equals(lon) && lastPoint.get(1).equals(lat)){
|
if(lastPoint.get(0).equals(lon) && lastPoint.get(1).equals(lat)){
|
||||||
log.info("获取到的定位与最后一个定位相同,不添加线路");
|
log.info("获取到的定位与最后一个定位相同,不添加线路");
|
||||||
|
}else{
|
||||||
|
jsonArray.add(newPoint);
|
||||||
|
jsonArray.toJSONString();
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
jsonArray.add(newPoint);
|
jsonArray.add(newPoint);
|
||||||
jsonArray.toJSONString();
|
jsonArray.toJSONString();
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
jsonArray.add(newPoint);
|
|
||||||
jsonArray.toJSONString();
|
|
||||||
}
|
|
||||||
|
|
||||||
log.info("更新行程jsonArray:" +jsonArray.toJSONString());
|
log.info("更新行程jsonArray:" +jsonArray.toJSONString());
|
||||||
etOrder.setTripRouteStr(jsonArray.toJSONString());
|
etOrder.setTripRouteStr(jsonArray.toJSONString());
|
||||||
Geometry geometry = GeoUtils.toGeometryByLinearRing(jsonArray.toJSONString());
|
Geometry geometry = GeoUtils.toGeometryByLinearRing(jsonArray.toJSONString());
|
||||||
String wkt = GeoUtils.wkt(geometry);
|
String wkt = GeoUtils.wkt(geometry);
|
||||||
etOrder.setTripRoute(wkt);
|
etOrder.setTripRoute(wkt);
|
||||||
int updateEtOrder = etOrderService.updateEtOrder(etOrder);
|
int updateEtOrder = etOrderService.updateEtOrder(etOrder);
|
||||||
if (updateEtOrder > 0) {
|
if (updateEtOrder > 0) {
|
||||||
log.info("更新行程线路成功==========================>" +logEntry.getDevName());
|
log.info("更新行程线路成功==========================>" +logEntry.getDevName());
|
||||||
}else{
|
}else{
|
||||||
log.info("更新行程线路失败==========================>" +logEntry.getDevName());
|
log.info("更新行程线路失败==========================>" +logEntry.getDevName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
/** 5.低于电量(%)不得骑行,声音播报 */
|
||||||
/** 5.低于电量(%)不得骑行,声音播报 */
|
if(electricQuantity <= model.getLowBatteryReminder()){
|
||||||
if(electricQuantity <= model.getLowBatteryReminder()){
|
//发送低电量播报指令
|
||||||
//发送低电量播报指令
|
|
||||||
// asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_PLAY6,"低电量播报");
|
// asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_PLAY6,"低电量播报");
|
||||||
log.info("低电量播报:" +logEntry.getDevName());
|
log.info("低电量播报:" +logEntry.getDevName());
|
||||||
}
|
|
||||||
/** 6.低电量 生成换电工单*/
|
|
||||||
Integer replacementOrder = area.getAutoReplacementOrder();
|
|
||||||
Boolean aBoolean = etAdminOrderService.checkOrderUnique(device.getSn());
|
|
||||||
if (Integer.parseInt(device.getRemainingPower()) < replacementOrder && !aBoolean) {
|
|
||||||
/** 生成换电工单 */
|
|
||||||
EtAdminOrder adminOrder = new EtAdminOrder();
|
|
||||||
adminOrder.setDeviceMac(device.getMac());
|
|
||||||
adminOrder.setSn(device.getSn());
|
|
||||||
adminOrder.setBeforeElectric(Integer.parseInt(device.getRemainingPower()));
|
|
||||||
adminOrder.setOrderNo(IdUtils.randomUUID2());
|
|
||||||
adminOrder.setStatus(ServiceConstants.REPLACEMENT_ELECTRICITY_STATUS_UNDER_WAY);
|
|
||||||
adminOrder.setIsEffective(ServiceConstants.REPLACEMENT_ELECTRICITY_IS_EFFECTIVE_YES);
|
|
||||||
SysUser sysUser = sysUserService.selectUserByUserName("wx");//获取用户名为“wx”的维修人员
|
|
||||||
adminOrder.setAdminId(sysUser.getUserId());
|
|
||||||
adminOrder.setAdminName(sysUser.getUserName());
|
|
||||||
adminOrder.setLatitude(device.getLatitude());
|
|
||||||
adminOrder.setLongitude(device.getLongitude());
|
|
||||||
adminOrder.setType("2");
|
|
||||||
String location = device.getLongitude() + ","+device.getLatitude();
|
|
||||||
adminOrder.setAddress(CommonUtil.getAddressByGeo(location));
|
|
||||||
int i1 = etAdminOrderService.insertEtAdminOrder(adminOrder);
|
|
||||||
if (i1 > 0) {
|
|
||||||
log.info("生成换电工单成功");
|
|
||||||
}else{
|
|
||||||
throw new ServiceException("生成换电工单失败");
|
|
||||||
}
|
}
|
||||||
/** 改变车辆状态 */
|
/** 6.低电量 生成换电工单*/
|
||||||
device.setStatus(ServiceConstants.VEHICLE_STATUS_IN_OFFLINE);
|
Integer replacementOrder = area.getAutoReplacementOrder();
|
||||||
if (asDeviceService.updateAsDevice(device) > 0) {
|
Boolean aBoolean = etAdminOrderService.checkOrderUnique(device.getSn());
|
||||||
log.info("车辆状态改成换电中");
|
if (Integer.parseInt(device.getRemainingPower()) < replacementOrder && !aBoolean) {
|
||||||
}else{
|
/** 生成换电工单 */
|
||||||
throw new ServiceException("车辆状态更新失败");
|
EtAdminOrder adminOrder = new EtAdminOrder();
|
||||||
|
adminOrder.setDeviceMac(device.getMac());
|
||||||
|
adminOrder.setSn(device.getSn());
|
||||||
|
adminOrder.setBeforeElectric(Integer.parseInt(device.getRemainingPower()));
|
||||||
|
adminOrder.setOrderNo(IdUtils.randomUUID2());
|
||||||
|
adminOrder.setStatus(ServiceConstants.REPLACEMENT_ELECTRICITY_STATUS_UNDER_WAY);
|
||||||
|
adminOrder.setIsEffective(ServiceConstants.REPLACEMENT_ELECTRICITY_IS_EFFECTIVE_YES);
|
||||||
|
SysUser sysUser = sysUserService.selectUserByUserName("wx");//获取用户名为“wx”的维修人员
|
||||||
|
adminOrder.setAdminId(sysUser.getUserId());
|
||||||
|
adminOrder.setAdminName(sysUser.getUserName());
|
||||||
|
adminOrder.setLatitude(device.getLatitude());
|
||||||
|
adminOrder.setLongitude(device.getLongitude());
|
||||||
|
adminOrder.setType("2");
|
||||||
|
String location = device.getLongitude() + ","+device.getLatitude();
|
||||||
|
adminOrder.setAddress(CommonUtil.getAddressByGeo(location));
|
||||||
|
int i1 = etAdminOrderService.insertEtAdminOrder(adminOrder);
|
||||||
|
if (i1 > 0) {
|
||||||
|
log.info("生成换电工单成功");
|
||||||
|
}else{
|
||||||
|
throw new ServiceException("生成换电工单失败");
|
||||||
|
}
|
||||||
|
/** 改变车辆状态 */
|
||||||
|
device.setStatus(ServiceConstants.VEHICLE_STATUS_IN_OFFLINE);
|
||||||
|
if (asDeviceService.updateAsDevice(device) > 0) {
|
||||||
|
log.info("车辆状态改成换电中");
|
||||||
|
}else{
|
||||||
|
throw new ServiceException("车辆状态更新失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// /** TODO 7.运营边界判断 几米判断? 3 播报运营边界 play2@ 是否靠近运营区边界*/
|
// /** TODO 7.运营边界判断 几米判断? 3 播报运营边界 play2@ 是否靠近运营区边界*/
|
||||||
// boolean isCloseToTheBoundary = asDeviceService.isCloseToTheBoundary(device.getSn(), area);
|
// boolean isCloseToTheBoundary = asDeviceService.isCloseToTheBoundary(device.getSn(), area);
|
||||||
// if(isCloseToTheBoundary){
|
// if(isCloseToTheBoundary){
|
||||||
|
@ -259,8 +295,9 @@ public class ReceiveController {
|
||||||
// asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_PLAY2,"靠近营运边界播报");
|
// asDeviceService.sendCommand(device.getMac(), Token.getToken(),IotConstants.COMMAND_PLAY2,"靠近营运边界播报");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
log.info("更新定位失败:" +logEntry.getDevName());
|
log.info("更新定位失败:" +logEntry.getDevName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
log.info("未找到车辆对象:" +logEntry.getDevName());
|
log.info("未找到车辆对象:" +logEntry.getDevName());
|
||||||
|
|
|
@ -136,6 +136,9 @@ public class AsDevice implements Serializable{
|
||||||
/** 车牌号 */
|
/** 车牌号 */
|
||||||
private String vehicleNum;
|
private String vehicleNum;
|
||||||
|
|
||||||
|
/** 是否发送过断电指令 */
|
||||||
|
private String isAreaOutOutage;
|
||||||
|
|
||||||
/** 正在进行中的订单 */
|
/** 正在进行中的订单 */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<EtOrder> etOrders;
|
private List<EtOrder> etOrders;
|
||||||
|
|
|
@ -29,10 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="qrcode" column="qrcode" />
|
<result property="qrcode" column="qrcode" />
|
||||||
<result property="longitude" column="longitude" />
|
<result property="longitude" column="longitude" />
|
||||||
<result property="latitude" column="latitude" />
|
<result property="latitude" column="latitude" />
|
||||||
|
<result property="isAreaOutOutage" column="is_area_out_outage" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectAsDeviceVo">
|
<sql id="selectAsDeviceVo">
|
||||||
select device_id, picture, device_name, mac, sn, model_id, vehicle_num, area_id, activation_time, online_status, create_by, create_time, update_by, update_time, last_time, remark, status, lock_status, location, remaining_power, voltage, qrcode, longitude, latitude from et_device
|
select device_id, picture, device_name, mac, sn, model_id, vehicle_num, area_id, activation_time, online_status, create_by, create_time, update_by, update_time, last_time, remark, status, lock_status, location, remaining_power, voltage, qrcode, longitude, latitude, is_area_out_outage from et_device
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectAsDeviceList" parameterType="AsDevice" resultMap="AsDeviceResult">
|
<select id="selectAsDeviceList" parameterType="AsDevice" resultMap="AsDeviceResult">
|
||||||
|
@ -124,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="qrcode != null">qrcode,</if>
|
<if test="qrcode != null">qrcode,</if>
|
||||||
<if test="longitude != null">longitude,</if>
|
<if test="longitude != null">longitude,</if>
|
||||||
<if test="latitude != null">latitude,</if>
|
<if test="latitude != null">latitude,</if>
|
||||||
|
<if test="isAreaOutOutage != null">is_area_out_outage,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="picture != null">#{picture},</if>
|
<if test="picture != null">#{picture},</if>
|
||||||
|
@ -149,6 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="qrcode != null">#{qrcode},</if>
|
<if test="qrcode != null">#{qrcode},</if>
|
||||||
<if test="longitude != null">#{longitude},</if>
|
<if test="longitude != null">#{longitude},</if>
|
||||||
<if test="latitude != null">#{latitude},</if>
|
<if test="latitude != null">#{latitude},</if>
|
||||||
|
<if test="isAreaOutOutage != null">#{isAreaOutOutage},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -178,6 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="qrcode != null">qrcode = #{qrcode},</if>
|
<if test="qrcode != null">qrcode = #{qrcode},</if>
|
||||||
<if test="longitude != null">longitude = #{longitude},</if>
|
<if test="longitude != null">longitude = #{longitude},</if>
|
||||||
<if test="latitude != null">latitude = #{latitude},</if>
|
<if test="latitude != null">latitude = #{latitude},</if>
|
||||||
|
<if test="isAreaOutOutage != null">is_area_out_outage = #{isAreaOutOutage},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where device_id = #{deviceId}
|
where device_id = #{deviceId}
|
||||||
</update>
|
</update>
|
||||||
|
@ -208,6 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="qrcode != null">qrcode = #{qrcode},</if>
|
<if test="qrcode != null">qrcode = #{qrcode},</if>
|
||||||
<if test="longitude != null">longitude = #{longitude},</if>
|
<if test="longitude != null">longitude = #{longitude},</if>
|
||||||
<if test="latitude != null">latitude = #{latitude},</if>
|
<if test="latitude != null">latitude = #{latitude},</if>
|
||||||
|
<if test="is_area_out_outage != null">is_area_out_outage = #{is_area_out_outage},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where sn = #{sn}
|
where sn = #{sn}
|
||||||
</update>
|
</update>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user