|
@@ -101,7 +101,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
@GetMapping(value = "/subList")
|
|
@GetMapping(value = "/subList")
|
|
|
public ResultData subList(CheckManageBo bo) {
|
|
public ResultData subList(CheckManageBo bo) {
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
bo.setUserIds(users.stream().toArray(Long[]::new));
|
|
bo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -188,7 +188,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
@GetMapping(value = "/subListTop")
|
|
@GetMapping(value = "/subListTop")
|
|
|
public ResultData subListTop(CheckManageBo bo) {
|
|
public ResultData subListTop(CheckManageBo bo) {
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
bo.setUserIds(users.stream().toArray(Long[]::new));
|
|
bo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -386,7 +386,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
public ResultData hazardList(CheckHazardBo hazardBo) {
|
|
public ResultData hazardList(CheckHazardBo hazardBo) {
|
|
|
// 获取数据
|
|
// 获取数据
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -410,7 +410,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
public ResultData hazardListTop(CheckHazardBo hazardBo) {
|
|
public ResultData hazardListTop(CheckHazardBo hazardBo) {
|
|
|
// 获取数据
|
|
// 获取数据
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -486,7 +486,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
@PostMapping(value = "/hazardExport")
|
|
@PostMapping(value = "/hazardExport")
|
|
|
public void hazardExport(HttpServletResponse response, CheckHazardBo hazardBo) throws IOException {
|
|
public void hazardExport(HttpServletResponse response, CheckHazardBo hazardBo) throws IOException {
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -541,7 +541,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
@GetMapping(value = "/contentList")
|
|
@GetMapping(value = "/contentList")
|
|
|
public ResultData contentList(CheckHazardBo hazardBo) {
|
|
public ResultData contentList(CheckHazardBo hazardBo) {
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -562,7 +562,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
@GetMapping(value = "/hazardContentTop")
|
|
@GetMapping(value = "/hazardContentTop")
|
|
|
public ResultData hazardContenttTop(CheckHazardBo hazardBo) {
|
|
public ResultData hazardContenttTop(CheckHazardBo hazardBo) {
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -625,7 +625,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
@PostMapping(value = "/contentExport")
|
|
@PostMapping(value = "/contentExport")
|
|
|
public void contentExport(HttpServletResponse response, CheckHazardBo hazardBo) throws IOException {
|
|
public void contentExport(HttpServletResponse response, CheckHazardBo hazardBo) throws IOException {
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -633,7 +633,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
//查询检查内容危险源总数
|
|
//查询检查内容危险源总数
|
|
|
QueryWrapper<CheckHazard> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<CheckHazard> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.lambda().eq(CheckHazard::getCheckCategory, 2);
|
|
queryWrapper.lambda().eq(CheckHazard::getCheckCategory, 2);
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
queryWrapper.lambda().in(CheckHazard::getCreateBy,users);
|
|
queryWrapper.lambda().in(CheckHazard::getCreateBy,users);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -778,7 +778,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
public ResultData itemsListTitle(CheckHazardBo hazardBo) {
|
|
public ResultData itemsListTitle(CheckHazardBo hazardBo) {
|
|
|
// 获取数据
|
|
// 获取数据
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -848,7 +848,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
@PostMapping(value = "/itemsExport")
|
|
@PostMapping(value = "/itemsExport")
|
|
|
public void itemsExport(HttpServletResponse response, CheckHazardBo hazardBo) throws IOException {
|
|
public void itemsExport(HttpServletResponse response, CheckHazardBo hazardBo) throws IOException {
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
hazardBo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -1434,7 +1434,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
@GetMapping(value = "/groupHazard")
|
|
@GetMapping(value = "/groupHazard")
|
|
|
public TableDataInfo groupHazard(CheckHazardBo bo) {
|
|
public TableDataInfo groupHazard(CheckHazardBo bo) {
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
bo.setUserIds(users.stream().toArray(Long[]::new));
|
|
bo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -1452,7 +1452,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
@GetMapping(value = "/groupSub")
|
|
@GetMapping(value = "/groupSub")
|
|
|
public TableDataInfo groupSub(CheckHazardBo bo) {
|
|
public TableDataInfo groupSub(CheckHazardBo bo) {
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
bo.setUserIds(users.stream().toArray(Long[]::new));
|
|
bo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|
|
@@ -1478,7 +1478,7 @@ public class DataStatisticsController extends AbstractController {
|
|
|
@GetMapping(value = "/hazardSubList")
|
|
@GetMapping(value = "/hazardSubList")
|
|
|
public ResultData hazardSubList(CheckHazardBo bo) {
|
|
public ResultData hazardSubList(CheckHazardBo bo) {
|
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
List<Long> users = DataPermissionAspect.threadLocal.get();
|
|
|
- if(!users.isEmpty()){
|
|
|
|
|
|
|
+ if(users!=null && !users.isEmpty()){
|
|
|
bo.setUserIds(users.stream().toArray(Long[]::new));
|
|
bo.setUserIds(users.stream().toArray(Long[]::new));
|
|
|
DataPermissionAspect.threadLocal.remove();
|
|
DataPermissionAspect.threadLocal.remove();
|
|
|
}
|
|
}
|