Commit 17c4fc7e by 向延琳

Merge branch 'v1.6.0' of http://192.168.3.233:8090/eshiled-new/ne-shield-trialdr…

…ive-admin into v1.6.0
2 parents d1f08d9f 5bedadb9
...@@ -23,6 +23,7 @@ import com.glsx.biz.common.base.entity.CarBrandSelected; ...@@ -23,6 +23,7 @@ import com.glsx.biz.common.base.entity.CarBrandSelected;
import com.glsx.biz.common.base.entity.Carbrand; import com.glsx.biz.common.base.entity.Carbrand;
import com.glsx.biz.common.base.entity.Carseries; import com.glsx.biz.common.base.entity.Carseries;
import com.glsx.biz.common.base.entity.Cartype; import com.glsx.biz.common.base.entity.Cartype;
import com.glsx.plat.common.annotation.NoResubmit;
import com.glsx.plat.common.annotation.SysLog; import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType; import com.glsx.plat.common.enums.OperateType;
import com.glsx.plat.common.utils.DateUtils; import com.glsx.plat.common.utils.DateUtils;
...@@ -370,8 +371,9 @@ public class VehicleController { ...@@ -370,8 +371,9 @@ public class VehicleController {
return R.ok(sn + "设备验证通过").data(true); return R.ok(sn + "设备验证通过").data(true);
} }
@NoResubmit
@ApiOperation(value = "新增车辆信息") @ApiOperation(value = "新增车辆信息")
@SysLog(module = "车辆管理", value = "新增试驾车辆", action = OperateType.ADD) @SysLog(module = "车辆管理", value = "新增车辆信息", action = OperateType.ADD)
@PostMapping("/vehicleinfo/save") @PostMapping("/vehicleinfo/save")
public R saveVehicleInfo(@RequestBody @Validated(ValidateGroups.Insert.class) VehicleInfoVo vehicleInfoVo) { public R saveVehicleInfo(@RequestBody @Validated(ValidateGroups.Insert.class) VehicleInfoVo vehicleInfoVo) {
// 校验设备号 // 校验设备号
...@@ -412,6 +414,7 @@ public class VehicleController { ...@@ -412,6 +414,7 @@ public class VehicleController {
return R.ok(); return R.ok();
} }
@NoResubmit
@ApiOperation(value = "编辑车辆信息") @ApiOperation(value = "编辑车辆信息")
@SysLog(module = "车辆管理", value = "编辑车辆信息", action = OperateType.EDIT) @SysLog(module = "车辆管理", value = "编辑车辆信息", action = OperateType.EDIT)
@PostMapping("/vehicleinfo/update") @PostMapping("/vehicleinfo/update")
......
...@@ -36,7 +36,6 @@ public class RemoteFeignDeviceService { ...@@ -36,7 +36,6 @@ public class RemoteFeignDeviceService {
* @return * @return
*/ */
public Map<String, DeviceStatusModel> listDeviceStatusBySns(Collection<String> sns) { public Map<String, DeviceStatusModel> listDeviceStatusBySns(Collection<String> sns) {
log.info("调用监控服务获取设备在线和离线的状态===" + JSONUtil.toJsonStr(sns));
R<List<DeviceStatusModel>> listDeviceStatusBySnsR = deviceFeignService.listDeviceStatusBySns(new DeviceStatusRequest(sns)); R<List<DeviceStatusModel>> listDeviceStatusBySnsR = deviceFeignService.listDeviceStatusBySns(new DeviceStatusRequest(sns));
List<DeviceStatusModel> listDeviceStatusBySnsDataList = listDeviceStatusBySnsR.getDataList(new TypeToken<List<DeviceStatusModel>>() { List<DeviceStatusModel> listDeviceStatusBySnsDataList = listDeviceStatusBySnsR.getDataList(new TypeToken<List<DeviceStatusModel>>() {
}.getType()); }.getType());
...@@ -55,7 +54,6 @@ public class RemoteFeignDeviceService { ...@@ -55,7 +54,6 @@ public class RemoteFeignDeviceService {
* @return * @return
*/ */
public Map<String, DeviceStatusModel> getDeviceStatusBySns(Map<String, Integer> snsMap) { public Map<String, DeviceStatusModel> getDeviceStatusBySns(Map<String, Integer> snsMap) {
log.info("调用监控服务获取设备在线和离线的状态===" + JSONUtil.toJsonStr(snsMap));
R<List<DeviceStatusModel>> listDeviceStatusBySnsR = deviceFeignService.listDeviceStatusBySnsMap(new DeviceStatusRequest(snsMap)); R<List<DeviceStatusModel>> listDeviceStatusBySnsR = deviceFeignService.listDeviceStatusBySnsMap(new DeviceStatusRequest(snsMap));
List<DeviceStatusModel> deviceStatusList = listDeviceStatusBySnsR.getDataList(new TypeToken<List<DeviceStatusModel>>() { List<DeviceStatusModel> deviceStatusList = listDeviceStatusBySnsR.getDataList(new TypeToken<List<DeviceStatusModel>>() {
}.getType()); }.getType());
......
...@@ -1145,6 +1145,7 @@ public class VehicleService extends AbstractCommonService { ...@@ -1145,6 +1145,7 @@ public class VehicleService extends AbstractCommonService {
} }
//organizationApiService.drawReportOrganization(vehicleInfoList); //organizationApiService.drawReportOrganization(vehicleInfoList);
return vehicleInfoList; return vehicleInfoList;
} }
...@@ -1159,7 +1160,11 @@ public class VehicleService extends AbstractCommonService { ...@@ -1159,7 +1160,11 @@ public class VehicleService extends AbstractCommonService {
if (Constants.ADJ_FREQ_CATCHING == freqType) { if (Constants.ADJ_FREQ_CATCHING == freqType) {
//追车模式 //追车模式
model.setFrequency(model.getCatchingTimer() + "分钟/点"); model.setFrequency(model.getCatchingTimer() + "分钟/点");
model.setFreTotal(model.getDiffMinuteTime() / Integer.parseInt(model.getCatchingTimer())); if (model.getDiffMinuteTime() != null) {
model.setFreTotal(model.getDiffMinuteTime() / Integer.parseInt(model.getCatchingTimer()));
} else {
model.setFreTotal(0);
}
model.setFreqTypeStr("追车模式"); model.setFreqTypeStr("追车模式");
} else if (Constants.ADJ_FREQ_TIMER == freqType) { } else if (Constants.ADJ_FREQ_TIMER == freqType) {
//闹钟模式 //闹钟模式
...@@ -1186,12 +1191,12 @@ public class VehicleService extends AbstractCommonService { ...@@ -1186,12 +1191,12 @@ public class VehicleService extends AbstractCommonService {
//设置设备上点总个数 //设置设备上点总个数
R totalCountR = deviceFeignService.getDevicesTotalCount(model.getSn()); R totalCountR = deviceFeignService.getDevicesTotalCount(model.getSn());
log.info("totalCountR===" + JSON.toJSONString(totalCountR));
if (totalCountR != null && totalCountR.isSuccess()) { if (totalCountR != null && totalCountR.isSuccess()) {
model.setDevicePointTotal((Integer) totalCountR.getData()); model.setDevicePointTotal((Integer) totalCountR.getData());
} }
// 将剩余电量后面增加% // 将剩余电量后面增加%
model.setBatteryLevel(model.getBatteryLevel() + "%"); model.setBatteryLevel(model.getBatteryLevel() == null ? "--" : (model.getBatteryLevel() + "%"));
} }
} }
...@@ -1236,7 +1241,7 @@ public class VehicleService extends AbstractCommonService { ...@@ -1236,7 +1241,7 @@ public class VehicleService extends AbstractCommonService {
VehicleInfoVo vehicleInfoVo = new VehicleInfoVo(); VehicleInfoVo vehicleInfoVo = new VehicleInfoVo();
BeanUtils.copyProperties(vehicle, vehicleInfoVo); BeanUtils.copyProperties(vehicle, vehicleInfoVo);
// 设置组织ID 其实是用户ID // 设置组织ID 其实是用户ID
vehicleInfoVo.setOrganizationId(OrgVehicleTreeIdTag.VEHICLE.getTag() + vehicle.getCreatedBy()); vehicleInfoVo.setOrganizationId(OrgVehicleTreeIdTag.USER.getTag() + vehicle.getCreatedBy());
User user = userApiService.getUserById(vehicle.getCreatedBy()); User user = userApiService.getUserById(vehicle.getCreatedBy());
if (user != null) { if (user != null) {
vehicleInfoVo.setOrganizationName(user.getUsername()); vehicleInfoVo.setOrganizationName(user.getUsername());
...@@ -1677,7 +1682,11 @@ public class VehicleService extends AbstractCommonService { ...@@ -1677,7 +1682,11 @@ public class VehicleService extends AbstractCommonService {
if (Constants.ADJ_FREQ_CATCHING == freqType) { if (Constants.ADJ_FREQ_CATCHING == freqType) {
//追车模式 //追车模式
model.setFrequency(model.getCatchingTimer() + "分钟/点"); model.setFrequency(model.getCatchingTimer() + "分钟/点");
model.setFreTotal(model.getDiffMinuteTime() / Integer.parseInt(model.getCatchingTimer())); if (model.getDiffMinuteTime() != null) {
model.setFreTotal(model.getDiffMinuteTime() / Integer.parseInt(model.getCatchingTimer()));
} else {
model.setFreTotal(0);
}
model.setFreqTypeStr("追车模式"); model.setFreqTypeStr("追车模式");
} else if (Constants.ADJ_FREQ_TIMER == freqType) { } else if (Constants.ADJ_FREQ_TIMER == freqType) {
//闹钟模式 //闹钟模式
...@@ -1702,9 +1711,10 @@ public class VehicleService extends AbstractCommonService { ...@@ -1702,9 +1711,10 @@ public class VehicleService extends AbstractCommonService {
model.setFreqTypeStr("初始化模式"); model.setFreqTypeStr("初始化模式");
} }
model.setBatteryLevel(model.getBatteryLevel() == null ? "--" : (model.getBatteryLevel()));
// 设置设备上点总个数 // 设置设备上点总个数
R totalCountR = deviceFeignService.getDevicesTotalCount(sn); R totalCountR = deviceFeignService.getDevicesTotalCount(sn);
log.info("totalCountR===" + JSON.toJSONString(totalCountR));
if (totalCountR != null && totalCountR.isSuccess()) { if (totalCountR != null && totalCountR.isSuccess()) {
model.setDevicePointTotal((Integer) totalCountR.getData()); model.setDevicePointTotal((Integer) totalCountR.getData());
} }
......
...@@ -585,6 +585,7 @@ ...@@ -585,6 +585,7 @@
ddf.timer AS timer, ddf.timer AS timer,
ddf.`week` AS `week`, ddf.`week` AS `week`,
ddf.week_timer AS weekTimer, ddf.week_timer AS weekTimer,
tu.username creator,
tu.username, tu.username,
tu.account operation tu.account operation
from t_vehicle tv from t_vehicle tv
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!