Commit 634fdf81 authored by 纪泽龙's avatar 纪泽龙
parents d9527a17 75784834
......@@ -21,6 +21,11 @@ public class TDetectorUserVillageSafetyDeviceInfoVo {
*/
private String userType;
/**
* 燃气类型(0-天然气,1-液化气)
*/
private String gasType;
/**
* 燃气用户名称
*/
......
......@@ -273,9 +273,11 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
// 先过滤掉 没有经纬度的
List<TDetectorUserVillageSafetyDeviceInfoVo> collect5 = value1.stream().filter(item -> item.getUserLatitude() != null && item.getUserLongitude() != null).collect(Collectors.toList());
// 再过滤掉没有 天然气类型的
List<TDetectorUserVillageSafetyDeviceInfoVo> collect6 = collect5.stream().filter(item -> item.getGasType() != null).collect(Collectors.toList());
// 过滤掉 没有装置的
List<TDetectorUserVillageSafetyDeviceInfoVo> collect2 = collect5.stream().filter(item -> item.getGasUserSafetyDeviceId() == null).collect(Collectors.toList());
List<TDetectorUserVillageSafetyDeviceInfoVo> collect2 = collect6.stream().filter(item -> item.getGasUserSafetyDeviceId() == null).collect(Collectors.toList());
// 没有装置的 直接 封装用户数据
if (collect2.size() > 0) {
......@@ -287,6 +289,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
userListItem.put("phone",tDetectorUserVillageSafetyDeviceInfoVo.getPhone());
userListItem.put("address",tDetectorUserVillageSafetyDeviceInfoVo.getAddress());
userListItem.put("longitude",tDetectorUserVillageSafetyDeviceInfoVo.getUserLongitude());
userListItem.put("gasType",tDetectorUserVillageSafetyDeviceInfoVo.getGasType());
userListItem.put("latitude",tDetectorUserVillageSafetyDeviceInfoVo.getUserLatitude());
if ("2".equals(tDetectorUserVillageSafetyDeviceInfoVo.getUserType())) {
userListItem.put("iconType","61");
......@@ -299,7 +302,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
}
// 过滤掉 有装置的
List<TDetectorUserVillageSafetyDeviceInfoVo> collect3 = collect5.stream().filter(item -> item.getGasUserSafetyDeviceId() != null).collect(Collectors.toList());
List<TDetectorUserVillageSafetyDeviceInfoVo> collect3 = collect6.stream().filter(item -> item.getGasUserSafetyDeviceId() != null).collect(Collectors.toList());
if (collect3.size() > 0) {
......@@ -316,6 +319,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
userListItem.put("address",value2.get(0).getAddress() == null ? "" : value2.get(0).getAddress());
userListItem.put("longitude",value2.get(0).getUserLongitude() == null ? "" : value2.get(0).getUserLongitude());
userListItem.put("latitude",value2.get(0).getUserLatitude() == null ? "" : value2.get(0).getUserLatitude());
userListItem.put("gasType",value2.get(0).getGasType() == null ? "" : value2.get(0).getGasType());
if (value2.get(0).getUserType() != null && "2".equals(value2.get(0).getUserType())) {
userListItem.put("iconType","61");
} else if (value2.get(0).getUserType() != null && "4".equals(value2.get(0).getUserType())) {
......@@ -341,7 +345,6 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
safetyDeviceMapList.add(safetyDeviceMapItem);
}
}
}
}
}
......
......@@ -309,11 +309,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
dUser.longitude as userLongitude,
dUser.latitude as userLatitude,
dUser.user_type as userType,
dUser.gas_type as gasType,
userVillage.f_village_id as villageId,
userVillage.f_village_name as villageName,
userVillage.longitude,
userVillage.latitude,
region.f_name AS regionName ,
region.f_name AS regionName,
safetyDeviceInfo.f_gasUser_safety_device_id as gasUserSafetyDeviceId,
safetyDeviceInfo.f_iot_no as iotNo,
safetyDeviceInfo.f_device_name as deviceName,
......
......@@ -589,6 +589,10 @@ export default {
{ required: true, message: "请输入地址", trigger: "blur" },
// { min: 0, max: 30, message: "长度30位", trigger: "blur" },
],
gasType: [
{ required: true, message: "请选择燃气类型", trigger: "blur" },
// { min: 0, max: 30, message: "长度30位", trigger: "blur" },
],
},
//关联设备下级数据 表单校验
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment