Browse Source

#历史告警查询

zhongwei
yang_shj 1 year ago
parent
commit
cd454e78e1
  1. 5
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java
  2. 9
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java
  3. 10
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java

5
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java

@ -421,9 +421,12 @@ public class EmInfoController extends BladeController {
return R.data(em_infoService.hkVideoDevices(deptId));
}
@GetMapping("/select")
@ApiOperationSupport(order = 13)
@ApiOperation(value = "下拉框设备查询")
@ApiOperation(value = "下拉框设备查询" +
"" +
"")
public R<List<EmInfoEntity>> select(@RequestParam(value = "deptId",required = false) Long deptId) {
return R.data(em_infoService.select(deptId));
}

9
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java

@ -968,7 +968,7 @@ public class EmInfoServiceImpl extends BaseServiceImpl<EmInfoMapper, EmInfoEntit
@Override
public List<EmInfoEntity> hkVideoDevices(Long deptId) {
QueryWrapper<EmInfoEntity> queryWrapper= new QueryWrapper<>();
queryWrapper.lambda().eq(EmInfoEntity::getEmType,4);
queryWrapper.lambda().eq(EmInfoEntity::getEmType,6);
if(ObjectUtil.isNotEmpty(deptId)){
queryWrapper.lambda().eq(EmInfoEntity::getDepartment,deptId);
}
@ -1002,10 +1002,13 @@ public class EmInfoServiceImpl extends BaseServiceImpl<EmInfoMapper, EmInfoEntit
@Override
public List<EmInfoEntity> select(Long deptId) {
if(ObjectUtil.isEmpty(deptId)){
return this.list();
return this.list(Wrappers.<EmInfoEntity>lambdaQuery()
.in(EmInfoEntity::getEmType, "2"));
}
return this.list(Wrappers.<EmInfoEntity>lambdaQuery()
.eq(EmInfoEntity::getDepartment,deptId));
.eq(EmInfoEntity::getDepartment,deptId)
.eq(EmInfoEntity::getEmType, "2")
);
}
}

10
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java

@ -20,9 +20,11 @@ import org.apache.commons.collections4.MapUtils;
import org.springblade.core.tool.utils.*;
import org.springframework.stereotype.Service;
import java.lang.reflect.Array;
import java.time.LocalDateTime;
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* @author ysj
@ -81,7 +83,7 @@ public class AlarmTabulateServiceImpl implements AlarmTabulateService {
return page;
}
Map<String,Object> data = result.getData();
page.setTotal((Long) data.get("total"));
page.setTotal(Long.parseLong(data.get("total").toString()));
page.setRecords((List<Object>) data.get("data"));
return page;
}
@ -100,7 +102,7 @@ public class AlarmTabulateServiceImpl implements AlarmTabulateService {
return page;
}
Map<String,Object> data = result.getData();
page.setTotal((Long) data.get("total"));
page.setTotal(Long.parseLong(data.get("total").toString()));
page.setRecords((List<Object>) data.get("data"));
return page;
}

Loading…
Cancel
Save