Compare commits
No commits in common. "541d99d8983663137760a029f085c9dcdc347538" and "4f581ee30a25c668ce824d07fd1294f95dfc4aac" have entirely different histories.
541d99d898
...
4f581ee30a
|
@ -9,7 +9,6 @@ import com.muyu.common.log.annotation.Log;
|
||||||
import com.muyu.common.log.enums.BusinessType;
|
import com.muyu.common.log.enums.BusinessType;
|
||||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
import com.muyu.domain.AddService;
|
import com.muyu.domain.AddService;
|
||||||
import com.muyu.many.domain.MessageData;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -96,6 +95,4 @@ public class AddServiceController extends BaseController
|
||||||
{
|
{
|
||||||
return toAjax(addServiceService.deleteAddServiceByIds(ids));
|
return toAjax(addServiceService.deleteAddServiceByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.muyu.authentication.service.IEnterpriseService;
|
import com.muyu.authentication.service.IEnterpriseService;
|
||||||
import com.muyu.domain.vo.EnterpriseReq;
|
import com.muyu.domain.vo.EnterpriseReq;
|
||||||
import com.muyu.many.domain.MessageData;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.muyu.common.log.annotation.Log;
|
import com.muyu.common.log.annotation.Log;
|
||||||
|
@ -126,11 +125,4 @@ public class EnterpriseController extends BaseController
|
||||||
enterpriseService.list()
|
enterpriseService.list()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/redisList/{vin}")
|
|
||||||
public Result<MessageData> redisList(@PathVariable String vin){
|
|
||||||
return Result.success(
|
|
||||||
enterpriseService.redisList(vin)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.muyu.authentication.service;
|
package com.muyu.authentication.service;
|
||||||
|
|
||||||
import com.muyu.domain.AddService;
|
import com.muyu.domain.AddService;
|
||||||
import com.muyu.many.domain.MessageData;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -60,5 +59,4 @@ public interface IAddServiceService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteAddServiceById(Long id);
|
public int deleteAddServiceById(Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import java.util.List;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.Enterprise;
|
import com.muyu.domain.Enterprise;
|
||||||
import com.muyu.domain.vo.EnterpriseReq;
|
import com.muyu.domain.vo.EnterpriseReq;
|
||||||
import com.muyu.many.domain.MessageData;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业Service接口
|
* 企业Service接口
|
||||||
|
@ -69,5 +68,4 @@ public interface IEnterpriseService extends IService<Enterprise>
|
||||||
|
|
||||||
String enterpriseUpdateId(Long id);
|
String enterpriseUpdateId(Long id);
|
||||||
|
|
||||||
MessageData redisList(String vin);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
package com.muyu.authentication.service.impl;
|
package com.muyu.authentication.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.muyu.authentication.mapper.AddServiceMapper;
|
import com.muyu.authentication.mapper.AddServiceMapper;
|
||||||
import com.muyu.authentication.service.IAddServiceService;
|
import com.muyu.authentication.service.IAddServiceService;
|
||||||
import com.muyu.common.core.utils.DateUtils;
|
import com.muyu.common.core.utils.DateUtils;
|
||||||
import com.muyu.domain.AddService;
|
import com.muyu.domain.AddService;
|
||||||
import com.muyu.many.domain.MessageData;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -96,8 +93,4 @@ public class AddServiceServiceImpl implements IAddServiceService
|
||||||
{
|
{
|
||||||
return addServiceMapper.deleteAddServiceById(id);
|
return addServiceMapper.deleteAddServiceById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private StringRedisTemplate redisTemplate;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,12 +18,10 @@ import com.muyu.common.core.utils.DateUtils;
|
||||||
import com.muyu.common.system.domain.SysUser;
|
import com.muyu.common.system.domain.SysUser;
|
||||||
import com.muyu.common.system.remote.RemoteUserService;
|
import com.muyu.common.system.remote.RemoteUserService;
|
||||||
import com.muyu.domain.vo.EnterpriseReq;
|
import com.muyu.domain.vo.EnterpriseReq;
|
||||||
import com.muyu.many.domain.MessageData;
|
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.muyu.domain.Enterprise;
|
import com.muyu.domain.Enterprise;
|
||||||
import com.muyu.authentication.service.IEnterpriseService;
|
import com.muyu.authentication.service.IEnterpriseService;
|
||||||
|
@ -238,13 +236,4 @@ public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper,Enterpri
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private StringRedisTemplate redisTemplate;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public MessageData redisList(String vin) {
|
|
||||||
String index = redisTemplate.opsForList().index(vin, -1);
|
|
||||||
return JSON.parseObject(index, MessageData.class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,209 +0,0 @@
|
||||||
package com.muyu.many.domain;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 报文对象 MessageData
|
|
||||||
*
|
|
||||||
* @author Yangle
|
|
||||||
* Date 2024/6/7 17:15
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@SuperBuilder
|
|
||||||
public class MessageData {
|
|
||||||
/**
|
|
||||||
*vin
|
|
||||||
*/
|
|
||||||
private String vin;
|
|
||||||
/**
|
|
||||||
*时间戳
|
|
||||||
*/
|
|
||||||
private String timestamp;
|
|
||||||
/**
|
|
||||||
*经度
|
|
||||||
*/
|
|
||||||
private String longitude;
|
|
||||||
/**
|
|
||||||
*维度
|
|
||||||
*/
|
|
||||||
private String latitude;
|
|
||||||
/**
|
|
||||||
*车速
|
|
||||||
*/
|
|
||||||
private String speed;
|
|
||||||
/**
|
|
||||||
*总里程
|
|
||||||
*/
|
|
||||||
private String mileage;
|
|
||||||
/**
|
|
||||||
*总电压
|
|
||||||
*/
|
|
||||||
private String dischargeVoltage;
|
|
||||||
/**
|
|
||||||
*总电流
|
|
||||||
*/
|
|
||||||
private String dischargeCurrent;
|
|
||||||
/**
|
|
||||||
*绝缘电阻
|
|
||||||
*/
|
|
||||||
private String insulationResistance;
|
|
||||||
/**
|
|
||||||
*档位
|
|
||||||
*/
|
|
||||||
private String gear;
|
|
||||||
/**
|
|
||||||
*加速踏板行程值
|
|
||||||
*/
|
|
||||||
private String accelerationPedal;
|
|
||||||
/**
|
|
||||||
*制动踏板行程值
|
|
||||||
*/
|
|
||||||
private String brakePedal;
|
|
||||||
/**
|
|
||||||
*燃料消耗率
|
|
||||||
*/
|
|
||||||
private String fuelConsumption;
|
|
||||||
/**
|
|
||||||
*电机控制器温度
|
|
||||||
*/
|
|
||||||
private String motorControllerTemperature;
|
|
||||||
/**
|
|
||||||
*电机转速
|
|
||||||
*/
|
|
||||||
private String motorSpeed;
|
|
||||||
/**
|
|
||||||
*电机转矩
|
|
||||||
*/
|
|
||||||
private String motorTorque;
|
|
||||||
/**
|
|
||||||
*电机温度
|
|
||||||
*/
|
|
||||||
private String motorTemperature;
|
|
||||||
/**
|
|
||||||
*电机电压
|
|
||||||
*/
|
|
||||||
private String motorVoltage;
|
|
||||||
/**
|
|
||||||
*电机电流
|
|
||||||
*/
|
|
||||||
private String motorCurrent;
|
|
||||||
/**
|
|
||||||
*动力电池剩余电量SOC
|
|
||||||
*/
|
|
||||||
private String powerBattery;
|
|
||||||
/**
|
|
||||||
*当前状态允许的最大反馈功率
|
|
||||||
*/
|
|
||||||
private String maxFeedbackPower;
|
|
||||||
/**
|
|
||||||
*当前状态允许最大放电功率
|
|
||||||
*/
|
|
||||||
private String maxDischargePower;
|
|
||||||
/**
|
|
||||||
*BMS自检计数器
|
|
||||||
*/
|
|
||||||
private String bmsSelfCheck;
|
|
||||||
/**
|
|
||||||
*动力电池充放电电流
|
|
||||||
*/
|
|
||||||
private String powerBatteryCurrent;
|
|
||||||
/**
|
|
||||||
*动力电池负载端总电压V3
|
|
||||||
*/
|
|
||||||
private String powerBatteryV3;
|
|
||||||
/**
|
|
||||||
*单次最大电压
|
|
||||||
*/
|
|
||||||
private String maxVoltage;
|
|
||||||
/**
|
|
||||||
*单体电池最低电压
|
|
||||||
*/
|
|
||||||
private String minVoltage;
|
|
||||||
/**
|
|
||||||
*单体电池最高温度
|
|
||||||
*/
|
|
||||||
private String maxTemperature;
|
|
||||||
/**
|
|
||||||
*单体电池最低温度
|
|
||||||
*/
|
|
||||||
private String minTemperature;
|
|
||||||
/**
|
|
||||||
*动力电池可用容量
|
|
||||||
*/
|
|
||||||
private String availableCapacity;
|
|
||||||
/**
|
|
||||||
*车辆状态
|
|
||||||
*/
|
|
||||||
private String vehicleStatus;
|
|
||||||
/**
|
|
||||||
*充电状态
|
|
||||||
*/
|
|
||||||
private String chargeStatus;
|
|
||||||
/**
|
|
||||||
*运行状态
|
|
||||||
*/
|
|
||||||
private String runStatus;
|
|
||||||
/**
|
|
||||||
*SOC
|
|
||||||
*/
|
|
||||||
private String soc;
|
|
||||||
/**
|
|
||||||
*可充电储能装置工作状态
|
|
||||||
*/
|
|
||||||
private String chargeWorkStatus;
|
|
||||||
/**
|
|
||||||
*驱动电机状态
|
|
||||||
*/
|
|
||||||
private String driveMotorStatus;
|
|
||||||
/**
|
|
||||||
*定位是否有效
|
|
||||||
*/
|
|
||||||
private String location;
|
|
||||||
/**
|
|
||||||
*EAS
|
|
||||||
*/
|
|
||||||
private String eas;
|
|
||||||
/**
|
|
||||||
*PTC
|
|
||||||
*/
|
|
||||||
private String ptc;
|
|
||||||
/**
|
|
||||||
*EPS
|
|
||||||
*/
|
|
||||||
private String eps;
|
|
||||||
/**
|
|
||||||
*ABS
|
|
||||||
*/
|
|
||||||
private String abs;
|
|
||||||
/**
|
|
||||||
*MCU
|
|
||||||
*/
|
|
||||||
private String mcu;
|
|
||||||
/**
|
|
||||||
*动力电池加热状态
|
|
||||||
*/
|
|
||||||
private String powerBatteryHeating;
|
|
||||||
/**
|
|
||||||
*动力电池当前状态
|
|
||||||
*/
|
|
||||||
private String powerBatteryCurrentStatus;
|
|
||||||
/**
|
|
||||||
*动力电池保温状态
|
|
||||||
*/
|
|
||||||
private String powerBatteryHeat;
|
|
||||||
/**
|
|
||||||
*DCDC
|
|
||||||
*/
|
|
||||||
private String dcdc;
|
|
||||||
/**
|
|
||||||
*CHG
|
|
||||||
*/
|
|
||||||
private String chg;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
package com.muyu.many.domain.vo;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 经纬度信息
|
|
||||||
*
|
|
||||||
* @ClassName FenceReq
|
|
||||||
* @Author AnNan.Wang
|
|
||||||
* @Date 2024/6/18 10:36
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@SuperBuilder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class FenceReq {
|
|
||||||
private Long id;
|
|
||||||
private List<Locations> locationsList;
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
package com.muyu.many.domain.vo;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 经纬度信息
|
|
||||||
*
|
|
||||||
* @ClassName Locations
|
|
||||||
* @Author AnNan.Wang
|
|
||||||
* @Date 2024/6/18 10:55
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@SuperBuilder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class Locations {
|
|
||||||
private String Q;
|
|
||||||
private String R;
|
|
||||||
private String lat;
|
|
||||||
private String lng;
|
|
||||||
}
|
|
|
@ -8,14 +8,10 @@ import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.many.domain.Fence;
|
import com.muyu.many.domain.Fence;
|
||||||
import com.muyu.many.domain.MessageData;
|
|
||||||
import com.muyu.many.domain.req.FenceEditReq;
|
import com.muyu.many.domain.req.FenceEditReq;
|
||||||
import com.muyu.many.domain.req.FenceQueryReq;
|
import com.muyu.many.domain.req.FenceQueryReq;
|
||||||
import com.muyu.many.domain.req.FenceSaveReq;
|
import com.muyu.many.domain.req.FenceSaveReq;
|
||||||
import com.muyu.many.domain.vo.FenceReq;
|
|
||||||
import com.muyu.many.domain.vo.Locations;
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import lombok.extern.log4j.Log4j2;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
|
@ -33,7 +29,6 @@ import com.muyu.common.log.enums.BusinessType;
|
||||||
@Api(tags = "电子围栏")
|
@Api(tags = "电子围栏")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/fence")
|
@RequestMapping("/fence")
|
||||||
@Log4j2
|
|
||||||
public class FenceController extends BaseController {
|
public class FenceController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private FenceService fenceService;
|
private FenceService fenceService;
|
||||||
|
@ -111,10 +106,4 @@ public class FenceController extends BaseController {
|
||||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||||
return toAjax(b);
|
return toAjax(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/IdAdd")
|
|
||||||
public Result<String> IdAdd(@RequestBody FenceReq fenceReq){
|
|
||||||
log.info(fenceReq);
|
|
||||||
return fenceService.IdAdd(fenceReq);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
package com.muyu.authentication.service;
|
package com.muyu.authentication.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.common.core.domain.Result;
|
|
||||||
import com.muyu.many.domain.Fence;
|
import com.muyu.many.domain.Fence;
|
||||||
import com.muyu.many.domain.MessageData;
|
|
||||||
import com.muyu.many.domain.vo.FenceReq;
|
|
||||||
import com.muyu.many.domain.vo.Locations;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -24,8 +20,4 @@ public interface FenceService extends IService<Fence> {
|
||||||
*/
|
*/
|
||||||
public List<Fence> list(Fence fence);
|
public List<Fence> list(Fence fence);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Result<String> IdAdd(FenceReq fenceReq);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,14 @@
|
||||||
package com.muyu.authentication.service.impl;
|
package com.muyu.authentication.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.authentication.mapper.FenceMapper;
|
import com.muyu.authentication.mapper.FenceMapper;
|
||||||
import com.muyu.authentication.service.FenceService;
|
import com.muyu.authentication.service.FenceService;
|
||||||
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||||
import com.muyu.common.core.domain.Result;
|
|
||||||
import com.muyu.common.core.utils.ObjUtils;
|
import com.muyu.common.core.utils.ObjUtils;
|
||||||
import com.muyu.many.domain.Fence;
|
import com.muyu.many.domain.Fence;
|
||||||
import com.muyu.many.domain.MessageData;
|
|
||||||
import com.muyu.many.domain.vo.FenceReq;
|
|
||||||
import com.muyu.many.domain.vo.Locations;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.ListOperations;
|
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -78,16 +70,4 @@ public class FenceServiceImpl extends ServiceImpl<FenceMapper, Fence> implements
|
||||||
|
|
||||||
return list(queryWrapper);
|
return list(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result<String> IdAdd(FenceReq fenceReq) {
|
|
||||||
boolean b = this.updateById(
|
|
||||||
Fence.builder()
|
|
||||||
.id(fenceReq.getId())
|
|
||||||
.longitudeAndLatitude(String.valueOf(fenceReq.getLocationsList()))
|
|
||||||
.build()
|
|
||||||
);
|
|
||||||
return Result.success(b ? "修改成功" : "修改失败");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue