|
@@ -48,22 +48,13 @@ public class TaskService {
|
|
|
|
|
|
public void getNormalPicture() {
|
|
|
String address = storeAddress;
|
|
|
- List<SysDictData> dataList = DictUtils.getDictCache("shot_switch");
|
|
|
- if(CollectionUtils.isEmpty(dataList) || Objects.isNull(dataList.get(0))){
|
|
|
- dataList = iSysDictTypeService.selectDictDataByType("shot_switch");
|
|
|
- DictUtils.setDictCache("shot_switch",dataList);
|
|
|
- }
|
|
|
List<SysDictData> addressDataList = DictUtils.getDictCache("shot_address");
|
|
|
if(CollectionUtils.isEmpty(addressDataList) || Objects.isNull(addressDataList.get(0))){
|
|
|
addressDataList = iSysDictTypeService.selectDictDataByType("shot_address");
|
|
|
DictUtils.setDictCache("shot_address",addressDataList);
|
|
|
}
|
|
|
- if(!CollectionUtils.isEmpty(dataList) && Objects.nonNull(dataList.get(0))){
|
|
|
- if (Boolean.parseBoolean(dataList.get(0).getDictLabel())) {
|
|
|
- if(!CollectionUtils.isEmpty(addressDataList) && Objects.nonNull(addressDataList.get(0))){
|
|
|
- address = addressDataList.get(0).getDictLabel();
|
|
|
- }
|
|
|
- }
|
|
|
+ if(!CollectionUtils.isEmpty(addressDataList) && Objects.nonNull(addressDataList.get(0))){
|
|
|
+ address = addressDataList.get(0).getDictLabel();
|
|
|
}
|
|
|
boolean isHasKeyNormal = redisService.hasKey(Constants.NORMAL_SET);
|
|
|
if(!isHasKeyNormal){
|
|
@@ -101,22 +92,13 @@ public class TaskService {
|
|
|
|
|
|
public void getAlarmPicture() {
|
|
|
String address = storeAddress;
|
|
|
- List<SysDictData> dataList = DictUtils.getDictCache("shot_switch");
|
|
|
- if(CollectionUtils.isEmpty(dataList) || Objects.isNull(dataList.get(0))){
|
|
|
- dataList = iSysDictTypeService.selectDictDataByType("shot_switch");
|
|
|
- DictUtils.setDictCache("shot_switch",dataList);
|
|
|
- }
|
|
|
List<SysDictData> addressDataList = DictUtils.getDictCache("shot_address");
|
|
|
if(CollectionUtils.isEmpty(addressDataList) || Objects.isNull(addressDataList.get(0))){
|
|
|
addressDataList = iSysDictTypeService.selectDictDataByType("shot_address");
|
|
|
DictUtils.setDictCache("shot_address",addressDataList);
|
|
|
}
|
|
|
- if(!CollectionUtils.isEmpty(dataList) && Objects.nonNull(dataList.get(0))){
|
|
|
- if (Boolean.parseBoolean(dataList.get(0).getDictLabel())) {
|
|
|
- if(!CollectionUtils.isEmpty(addressDataList) && Objects.nonNull(addressDataList.get(0))){
|
|
|
- address = addressDataList.get(0).getDictLabel();
|
|
|
- }
|
|
|
- }
|
|
|
+ if(!CollectionUtils.isEmpty(addressDataList) && Objects.nonNull(addressDataList.get(0))){
|
|
|
+ address = addressDataList.get(0).getDictLabel();
|
|
|
}
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
boolean isHasKeyAlarm = redisService.hasKey(Constants.ALARM_SET);
|