|
@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.yihu.iot.dao.dict.IotSystemDictDao;
|
|
import com.yihu.iot.dao.dict.IotSystemDictDao;
|
|
import com.yihu.iot.dao.equipment.IotEquipmentDetailDao;
|
|
import com.yihu.iot.dao.equipment.IotEquipmentDetailDao;
|
|
|
|
import com.yihu.iot.dao.statistics.IotStatisticsCommonDao;
|
|
import com.yihu.iot.service.analyzer.WlyyIotTzDict;
|
|
import com.yihu.iot.service.analyzer.WlyyIotTzDict;
|
|
import com.yihu.iot.service.analyzer.WlyyIotTzDictDao;
|
|
import com.yihu.iot.service.analyzer.WlyyIotTzDictDao;
|
|
import com.yihu.iot.service.common.MyJdbcTemplate;
|
|
import com.yihu.iot.service.common.MyJdbcTemplate;
|
|
@ -16,6 +17,7 @@ import com.yihu.iot.util.conceal.ConcealUtil;
|
|
import com.yihu.iot.util.excel.HibenateUtils;
|
|
import com.yihu.iot.util.excel.HibenateUtils;
|
|
import com.yihu.jw.entity.iot.dict.IotSystemDictDO;
|
|
import com.yihu.jw.entity.iot.dict.IotSystemDictDO;
|
|
import com.yihu.jw.entity.iot.equipment.IotEquipmentDetailDO;
|
|
import com.yihu.jw.entity.iot.equipment.IotEquipmentDetailDO;
|
|
|
|
import com.yihu.jw.entity.iot.statistics.IotStatisticsCommonDO;
|
|
import com.yihu.jw.entity.iot.statistics.IotStatisticsRealtimeDO;
|
|
import com.yihu.jw.entity.iot.statistics.IotStatisticsRealtimeDO;
|
|
import com.yihu.jw.entity.util.AesEncryptUtils;
|
|
import com.yihu.jw.entity.util.AesEncryptUtils;
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
@ -83,6 +85,8 @@ public class MonitorPlatformService {
|
|
private JdbcTemplate jdbcTemplate;
|
|
private JdbcTemplate jdbcTemplate;
|
|
@Autowired
|
|
@Autowired
|
|
private WlyyIotTzDictDao wlyyIotTzDictDao;
|
|
private WlyyIotTzDictDao wlyyIotTzDictDao;
|
|
|
|
@Autowired
|
|
|
|
private IotStatisticsCommonDao iotStatisticsCommonDao;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取位置信息
|
|
* 获取位置信息
|
|
@ -1244,6 +1248,32 @@ public class MonitorPlatformService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//入驻设备管理
|
|
|
|
public JSONObject onboardingDeviceManagement(String parentType){
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
//设备库存、使用中、总备案、物联率、失联率
|
|
|
|
public List<Map<String,Object>> getEquipmentStock(){
|
|
|
|
List<Map<String,Object>> result = new ArrayList<>();
|
|
|
|
try {
|
|
|
|
String sql = "SELECT name,type,total,useing,stock from iot_statistics_stock WHERE parent_type = '0' and town = '350200'";
|
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
|
return list;
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 谁设备库存、使用中、总备案、物联率、失联率
|
|
* 谁设备库存、使用中、总备案、物联率、失联率
|
|
*
|
|
*
|
|
@ -1459,6 +1489,21 @@ public class MonitorPlatformService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//设备组合方式和设备网络传输
|
|
|
|
public JSONObject combinationMethodAndWeb(){
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
IotStatisticsCommonDO iotStatisticsCommonDO1 = iotStatisticsCommonDao.findOne("Combination_method1");
|
|
|
|
IotStatisticsCommonDO iotStatisticsCommonDO2 = iotStatisticsCommonDao.findOne("Combination_method2");
|
|
|
|
|
|
|
|
JSONObject Combination_method1 = JSONObject.parseObject(iotStatisticsCommonDO1.getContent());
|
|
|
|
JSONObject Combination_method2 = JSONObject.parseObject(iotStatisticsCommonDO2.getContent());
|
|
|
|
json.put("Combination_method1",Combination_method1);//设备组合方式
|
|
|
|
json.put("Combination_method2",Combination_method2);//设备网络传输
|
|
|
|
return json;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getRange(int first, int second, int i) {
|
|
public String getRange(int first, int second, int i) {
|
|
if (second == 0 && first > 0) {
|
|
if (second == 0 && first > 0) {
|
|
return "100";
|
|
return "100";
|