|
@@ -42,6 +42,7 @@ public class ShotPictureExecutors {
|
|
@Async
|
|
@Async
|
|
@Scheduled(fixedRate = 60000)
|
|
@Scheduled(fixedRate = 60000)
|
|
public synchronized void handleNormalPicture() {
|
|
public synchronized void handleNormalPicture() {
|
|
|
|
+ String address = storeAddress;
|
|
List<SysDictData> dataList = DictUtils.getDictCache("shot_switch");
|
|
List<SysDictData> dataList = DictUtils.getDictCache("shot_switch");
|
|
if(CollectionUtils.isEmpty(dataList) || Objects.isNull(dataList.get(0))){
|
|
if(CollectionUtils.isEmpty(dataList) || Objects.isNull(dataList.get(0))){
|
|
dataList = iSysDictTypeService.selectDictDataByType("shot_switch");
|
|
dataList = iSysDictTypeService.selectDictDataByType("shot_switch");
|
|
@@ -52,12 +53,11 @@ public class ShotPictureExecutors {
|
|
addressDataList = iSysDictTypeService.selectDictDataByType("shot_address");
|
|
addressDataList = iSysDictTypeService.selectDictDataByType("shot_address");
|
|
DictUtils.setDictCache("shot_address",addressDataList);
|
|
DictUtils.setDictCache("shot_address",addressDataList);
|
|
}
|
|
}
|
|
- String address = addressDataList.get(0).getDictLabel();
|
|
|
|
try {
|
|
try {
|
|
if(!CollectionUtils.isEmpty(dataList) && Objects.nonNull(dataList.get(0))){
|
|
if(!CollectionUtils.isEmpty(dataList) && Objects.nonNull(dataList.get(0))){
|
|
if (Boolean.parseBoolean(dataList.get(0).getDictLabel())) {
|
|
if (Boolean.parseBoolean(dataList.get(0).getDictLabel())) {
|
|
if(CollectionUtils.isEmpty(addressDataList) || Objects.isNull(addressDataList.get(0))){
|
|
if(CollectionUtils.isEmpty(addressDataList) || Objects.isNull(addressDataList.get(0))){
|
|
- address = storeAddress;
|
|
|
|
|
|
+ address = addressDataList.get(0).getDictLabel();
|
|
}
|
|
}
|
|
taskService.getNormalPicture(address);
|
|
taskService.getNormalPicture(address);
|
|
}
|
|
}
|
|
@@ -74,6 +74,7 @@ public class ShotPictureExecutors {
|
|
@Async
|
|
@Async
|
|
@Scheduled(fixedRate = 500)
|
|
@Scheduled(fixedRate = 500)
|
|
public synchronized void handleAlarmPicture() {
|
|
public synchronized void handleAlarmPicture() {
|
|
|
|
+ String address = storeAddress;
|
|
List<SysDictData> dataList = DictUtils.getDictCache("shot_switch");
|
|
List<SysDictData> dataList = DictUtils.getDictCache("shot_switch");
|
|
if(CollectionUtils.isEmpty(dataList) || Objects.isNull(dataList.get(0))){
|
|
if(CollectionUtils.isEmpty(dataList) || Objects.isNull(dataList.get(0))){
|
|
dataList = iSysDictTypeService.selectDictDataByType("shot_switch");
|
|
dataList = iSysDictTypeService.selectDictDataByType("shot_switch");
|
|
@@ -84,12 +85,11 @@ public class ShotPictureExecutors {
|
|
addressDataList = iSysDictTypeService.selectDictDataByType("shot_address");
|
|
addressDataList = iSysDictTypeService.selectDictDataByType("shot_address");
|
|
DictUtils.setDictCache("shot_address",addressDataList);
|
|
DictUtils.setDictCache("shot_address",addressDataList);
|
|
}
|
|
}
|
|
- String address = addressDataList.get(0).getDictLabel();
|
|
|
|
try {
|
|
try {
|
|
if(!CollectionUtils.isEmpty(dataList) && Objects.nonNull(dataList.get(0))){
|
|
if(!CollectionUtils.isEmpty(dataList) && Objects.nonNull(dataList.get(0))){
|
|
if (Boolean.parseBoolean(dataList.get(0).getDictLabel())) {
|
|
if (Boolean.parseBoolean(dataList.get(0).getDictLabel())) {
|
|
if(CollectionUtils.isEmpty(addressDataList) || Objects.isNull(addressDataList.get(0))){
|
|
if(CollectionUtils.isEmpty(addressDataList) || Objects.isNull(addressDataList.get(0))){
|
|
- address = storeAddress;
|
|
|
|
|
|
+ address = addressDataList.get(0).getDictLabel();
|
|
}
|
|
}
|
|
taskService.getAlarmPicture(address);
|
|
taskService.getAlarmPicture(address);
|
|
}
|
|
}
|