|
@@ -1,7 +1,7 @@
|
|
|
/**
|
|
/**
|
|
|
* Copyright 2019 DH
|
|
* Copyright 2019 DH
|
|
|
* All right reserved.
|
|
* All right reserved.
|
|
|
- * 项目名称: 大恒泰山系统
|
|
|
|
|
|
|
+ * 项目名称: 运维系统
|
|
|
* 创建日期:2022/8/27
|
|
* 创建日期:2022/8/27
|
|
|
*/
|
|
*/
|
|
|
package org.springblade.modules.business.home.controller;
|
|
package org.springblade.modules.business.home.controller;
|
|
@@ -21,9 +21,12 @@ import org.springblade.core.tool.utils.ConcurrentDateFormat;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.enums.OrderCloseEnum;
|
|
import org.springblade.enums.OrderCloseEnum;
|
|
|
import org.springblade.enums.OrderConfirmEnum;
|
|
import org.springblade.enums.OrderConfirmEnum;
|
|
|
-import org.springblade.enums.WarnKindEnum;
|
|
|
|
|
import org.springblade.modules.baseinfo.org.entity.DeptRegionEntity;
|
|
import org.springblade.modules.baseinfo.org.entity.DeptRegionEntity;
|
|
|
import org.springblade.modules.baseinfo.org.service.IDeptRegionService;
|
|
import org.springblade.modules.baseinfo.org.service.IDeptRegionService;
|
|
|
|
|
+import org.springblade.modules.baseinfo.region.entity.RegionInfoEntity;
|
|
|
|
|
+import org.springblade.modules.baseinfo.region.entity.RegionTreeNodeEntity;
|
|
|
|
|
+import org.springblade.modules.baseinfo.region.service.IBaseInfoRegionService;
|
|
|
|
|
+import org.springblade.modules.baseinfo.rtu.dto.RtuInfoDTO;
|
|
|
import org.springblade.modules.baseinfo.rtu.service.IRtuBaseInfoService;
|
|
import org.springblade.modules.baseinfo.rtu.service.IRtuBaseInfoService;
|
|
|
import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
|
|
import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
|
|
|
import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
|
|
import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
|
|
@@ -33,39 +36,29 @@ import org.springblade.modules.business.check.order.service.IRtuCheckOrderServic
|
|
|
import org.springblade.modules.business.check.order.vo.CheckOrderInfoVO;
|
|
import org.springblade.modules.business.check.order.vo.CheckOrderInfoVO;
|
|
|
import org.springblade.modules.business.check.process.dto.OrderProcessInfoDTO;
|
|
import org.springblade.modules.business.check.process.dto.OrderProcessInfoDTO;
|
|
|
import org.springblade.modules.business.check.process.service.IRtuOrderProcessService;
|
|
import org.springblade.modules.business.check.process.service.IRtuOrderProcessService;
|
|
|
-import org.springblade.modules.business.check.process.vo.OrderProcessInfoVO;
|
|
|
|
|
-import org.springblade.modules.business.check.process.wrapper.RtuOrderProcessWrapper;
|
|
|
|
|
import org.springblade.modules.business.data.dto.RtuDataGroundDTO;
|
|
import org.springblade.modules.business.data.dto.RtuDataGroundDTO;
|
|
|
import org.springblade.modules.business.data.dto.RtuDataRainDTO;
|
|
import org.springblade.modules.business.data.dto.RtuDataRainDTO;
|
|
|
import org.springblade.modules.business.data.dto.RtuDataRiverDTO;
|
|
import org.springblade.modules.business.data.dto.RtuDataRiverDTO;
|
|
|
import org.springblade.modules.business.data.service.IRtuDataGroundService;
|
|
import org.springblade.modules.business.data.service.IRtuDataGroundService;
|
|
|
import org.springblade.modules.business.data.service.IRtuDataRainService;
|
|
import org.springblade.modules.business.data.service.IRtuDataRainService;
|
|
|
import org.springblade.modules.business.data.service.IRtuDataRiverService;
|
|
import org.springblade.modules.business.data.service.IRtuDataRiverService;
|
|
|
-import org.springblade.modules.business.equipment.inspection.base.dto.EquipmentInspectionInfoDTO;
|
|
|
|
|
-import org.springblade.modules.business.equipment.inspection.base.vo.OrgEquipmentInspectionStatisticsVO;
|
|
|
|
|
import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
|
|
import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
|
|
|
import org.springblade.modules.business.equipment.inspection.plan.service.IEquipmentInspectionPlanService;
|
|
import org.springblade.modules.business.equipment.inspection.plan.service.IEquipmentInspectionPlanService;
|
|
|
import org.springblade.modules.business.equipment.inspection.report.dto.EquipmentInspectionReportDTO;
|
|
import org.springblade.modules.business.equipment.inspection.report.dto.EquipmentInspectionReportDTO;
|
|
|
import org.springblade.modules.business.equipment.inspection.report.service.IEquipmentInspectionReportService;
|
|
import org.springblade.modules.business.equipment.inspection.report.service.IEquipmentInspectionReportService;
|
|
|
-import org.springblade.modules.business.equipment.inspection.report.vo.EquipmentInspectionReportVO;
|
|
|
|
|
-import org.springblade.modules.business.equipment.inspection.report.wrapper.EquipmentInspectionReportWrapper;
|
|
|
|
|
import org.springblade.modules.business.home.VO.*;
|
|
import org.springblade.modules.business.home.VO.*;
|
|
|
import org.springblade.modules.business.notice.dto.NoticeDTO;
|
|
import org.springblade.modules.business.notice.dto.NoticeDTO;
|
|
|
import org.springblade.modules.business.notice.entity.NoticeViewEntity;
|
|
import org.springblade.modules.business.notice.entity.NoticeViewEntity;
|
|
|
import org.springblade.modules.business.notice.service.INoticeService;
|
|
import org.springblade.modules.business.notice.service.INoticeService;
|
|
|
import org.springblade.modules.business.notice.service.INoticeViewService;
|
|
import org.springblade.modules.business.notice.service.INoticeViewService;
|
|
|
import org.springblade.modules.business.warning.dto.RtuWarningInfoDTO;
|
|
import org.springblade.modules.business.warning.dto.RtuWarningInfoDTO;
|
|
|
-import org.springblade.modules.business.warning.entity.RtuWarningInfoEntity;
|
|
|
|
|
import org.springblade.modules.business.warning.service.IRtuWarningService;
|
|
import org.springblade.modules.business.warning.service.IRtuWarningService;
|
|
|
-import org.springblade.modules.business.warning.vo.RtuWarningInfoVO;
|
|
|
|
|
-import org.springblade.modules.business.warning.wrapper.RtuWarningWrapper;
|
|
|
|
|
import org.springblade.modules.system.entity.Dept;
|
|
import org.springblade.modules.system.entity.Dept;
|
|
|
import org.springblade.modules.system.service.IDeptService;
|
|
import org.springblade.modules.system.service.IDeptService;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
-import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
import java.time.Duration;
|
|
import java.time.Duration;
|
|
@@ -100,45 +93,61 @@ public class HomeController {
|
|
|
private final IRtuDataRainService rainService;
|
|
private final IRtuDataRainService rainService;
|
|
|
private final IRtuDataRiverService riverService;
|
|
private final IRtuDataRiverService riverService;
|
|
|
private final IRtuDataGroundService groundService;
|
|
private final IRtuDataGroundService groundService;
|
|
|
- @Resource
|
|
|
|
|
- private RedisTemplate redisTemplate;
|
|
|
|
|
|
|
+ private final IBaseInfoRegionService regionService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@GetMapping("/real/info")
|
|
@GetMapping("/real/info")
|
|
|
@ApiOperationSupport(order = 1)
|
|
@ApiOperationSupport(order = 1)
|
|
|
@ApiOperation(value = "详情")
|
|
@ApiOperation(value = "详情")
|
|
|
public R<HomeInfoVO> detail() {
|
|
public R<HomeInfoVO> detail() {
|
|
|
- //HashOperations<String, String, String> opsHash = redisTemplate.opsForHash();
|
|
|
|
|
BladeUser user = AuthUtil.getUser();
|
|
BladeUser user = AuthUtil.getUser();
|
|
|
String adCode = null;
|
|
String adCode = null;
|
|
|
|
|
+ int excludeCode=0;
|
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
|
- adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
|
|
|
|
|
+ adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
|
LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
|
|
LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
|
|
|
- deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
|
|
|
|
|
deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
|
|
deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
|
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
|
if (deptRegionEntity != null) {
|
|
if (deptRegionEntity != null) {
|
|
|
adCode = deptRegionEntity.getAdcd();
|
|
adCode = deptRegionEntity.getAdcd();
|
|
|
|
|
+ LambdaQueryWrapper<RegionInfoEntity> regionWrapper = Wrappers.<RegionInfoEntity>query().lambda();
|
|
|
|
|
+ regionWrapper.eq(RegionInfoEntity::getAdcd, deptRegionEntity.getAdcd());
|
|
|
|
|
+ RegionInfoEntity regionInfoEntity= this.regionService.getOne(regionWrapper);
|
|
|
|
|
+ if (regionInfoEntity.getParentCode().equals(BusinessConstant.REGION_NM_ADCODE)){
|
|
|
|
|
+ excludeCode=1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (null == adCode) {
|
|
|
|
|
- log.error("adcd is null********************");
|
|
|
|
|
- return R.status(true);
|
|
|
|
|
- }
|
|
|
|
|
HomeInfoVO infoVO = new HomeInfoVO();
|
|
HomeInfoVO infoVO = new HomeInfoVO();
|
|
|
//测站数量
|
|
//测站数量
|
|
|
- long rtuCount = rtuBaseInfoService.rtuCount(adCode);
|
|
|
|
|
|
|
+ RtuInfoDTO rtuInfoDTO=new RtuInfoDTO();
|
|
|
|
|
+ if (null != adCode) {
|
|
|
|
|
+ rtuInfoDTO.setAdCode(adCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ rtuInfoDTO.setExcludeCode(excludeCode);
|
|
|
|
|
+ long rtuCount = rtuBaseInfoService.rtuCount(rtuInfoDTO);
|
|
|
infoVO.setRtus(rtuCount);
|
|
infoVO.setRtus(rtuCount);
|
|
|
//预警中的测站数量
|
|
//预警中的测站数量
|
|
|
RtuWarningInfoDTO warningInfoDTO = new RtuWarningInfoDTO();
|
|
RtuWarningInfoDTO warningInfoDTO = new RtuWarningInfoDTO();
|
|
|
- warningInfoDTO.setAdCode(adCode);
|
|
|
|
|
|
|
+ if (null != adCode) {
|
|
|
|
|
+ warningInfoDTO.setAdCode(adCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ warningInfoDTO.setExcludeCode(excludeCode);
|
|
|
long warningRtuCount = rtuWarningService.warningRtuCount(warningInfoDTO);
|
|
long warningRtuCount = rtuWarningService.warningRtuCount(warningInfoDTO);
|
|
|
infoVO.setWarningRtus(warningRtuCount);
|
|
infoVO.setWarningRtus(warningRtuCount);
|
|
|
|
|
|
|
|
- //任务总数
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 统计维修任务
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
CheckOrderInfoDTO checkOrderInfoDTO = new CheckOrderInfoDTO();
|
|
CheckOrderInfoDTO checkOrderInfoDTO = new CheckOrderInfoDTO();
|
|
|
checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
|
- checkOrderInfoDTO.setAdCode(adCode);
|
|
|
|
|
|
|
+ if (null != adCode) {
|
|
|
|
|
+ checkOrderInfoDTO.setAdCode(adCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ checkOrderInfoDTO.setExcludeCode(excludeCode);
|
|
|
|
|
+ //任务总数
|
|
|
long count = checkOrderService.orderCount(checkOrderInfoDTO);
|
|
long count = checkOrderService.orderCount(checkOrderInfoDTO);
|
|
|
infoVO.setOrderCount(count);
|
|
infoVO.setOrderCount(count);
|
|
|
//未确认任务
|
|
//未确认任务
|
|
@@ -148,16 +157,14 @@ public class HomeController {
|
|
|
|
|
|
|
|
checkOrderInfoDTO.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
|
|
checkOrderInfoDTO.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
|
|
|
checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
|
- if (BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
|
|
|
- checkOrderInfoDTO.setContactUser(user.getUserId());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
|
|
|
+// checkOrderInfoDTO.setContactUser(user.getUserId());
|
|
|
|
|
+// }
|
|
|
count = checkOrderService.orderCount(checkOrderInfoDTO);
|
|
count = checkOrderService.orderCount(checkOrderInfoDTO);
|
|
|
infoVO.setProcessCheckOrderCount(count);
|
|
infoVO.setProcessCheckOrderCount(count);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
checkOrderInfoDTO.setOrderConfirm(OrderConfirmEnum.ACTIVE_CREATE.getCode());
|
|
checkOrderInfoDTO.setOrderConfirm(OrderConfirmEnum.ACTIVE_CREATE.getCode());
|
|
|
checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
|
- checkOrderInfoDTO.setAdCode(adCode);
|
|
|
|
|
List<CheckOrderInfoVO> orderList = checkOrderService.allOrders(checkOrderInfoDTO);
|
|
List<CheckOrderInfoVO> orderList = checkOrderService.allOrders(checkOrderInfoDTO);
|
|
|
if (null != orderList && orderList.size() > 0) {
|
|
if (null != orderList && orderList.size() > 0) {
|
|
|
long delayTime = 120;
|
|
long delayTime = 120;
|
|
@@ -184,6 +191,28 @@ public class HomeController {
|
|
|
infoVO.setDelayComfireOrders(0L);
|
|
infoVO.setDelayComfireOrders(0L);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ OrderProcessInfoDTO processInfoDTO = new OrderProcessInfoDTO();
|
|
|
|
|
+ if (null != adCode) {
|
|
|
|
|
+ processInfoDTO.setAdCode(adCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ processInfoDTO.setExcludeCode(excludeCode);
|
|
|
|
|
+ Date date = new Date();
|
|
|
|
|
+ String dtText = Func.formatDateTime(date);
|
|
|
|
|
+ processInfoDTO.setCreateTime(Func.parse(dtText, ConcurrentDateFormat.of("yyyy-MM-dd")));
|
|
|
|
|
+ count = rtuOrderProcessService.todayProcessCount(processInfoDTO);
|
|
|
|
|
+ infoVO.setTodayOrderProcessCount("" + count);
|
|
|
|
|
+
|
|
|
|
|
+ //我的任务
|
|
|
|
|
+ LambdaQueryWrapper<CheckOrderInfoEntity> orderWrapper = Wrappers.<CheckOrderInfoEntity>query().lambda();
|
|
|
|
|
+ orderWrapper.eq(CheckOrderInfoEntity::getContactUser, user.getUserId());
|
|
|
|
|
+ orderWrapper.eq(CheckOrderInfoEntity::getOrderConfirm, OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
|
|
|
|
|
+ orderWrapper.eq(CheckOrderInfoEntity::getOrderClose, OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
|
|
|
+ count = checkOrderService.count(orderWrapper);
|
|
|
|
|
+ infoVO.setMyOrderCount(count);
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 统计巡检信息
|
|
|
|
|
+ */
|
|
|
infoVO.setEquipmentInspectionCount(infoVO.getRtus());
|
|
infoVO.setEquipmentInspectionCount(infoVO.getRtus());
|
|
|
EquipmentInspectionReportDTO inspectionReportDTO = new EquipmentInspectionReportDTO();
|
|
EquipmentInspectionReportDTO inspectionReportDTO = new EquipmentInspectionReportDTO();
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
Calendar calendar = Calendar.getInstance();
|
|
@@ -197,7 +226,10 @@ public class HomeController {
|
|
|
calendar.add(Calendar.YEAR, 1);
|
|
calendar.add(Calendar.YEAR, 1);
|
|
|
inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
|
|
inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
|
|
|
inspectionReportDTO.setRainSeasonKind(1);
|
|
inspectionReportDTO.setRainSeasonKind(1);
|
|
|
- inspectionReportDTO.setAdCode(adCode);
|
|
|
|
|
|
|
+ if (null != adCode) {
|
|
|
|
|
+ inspectionReportDTO.setAdCode(adCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ inspectionReportDTO.setExcludeCode(excludeCode);
|
|
|
count = inspectionReportService.equipmentInspectionReportCount(inspectionReportDTO);
|
|
count = inspectionReportService.equipmentInspectionReportCount(inspectionReportDTO);
|
|
|
infoVO.setEquipmentInspectionBeforeRainReports(count);
|
|
infoVO.setEquipmentInspectionBeforeRainReports(count);
|
|
|
inspectionReportDTO.setRainSeasonKind(2);
|
|
inspectionReportDTO.setRainSeasonKind(2);
|
|
@@ -294,6 +326,21 @@ public class HomeController {
|
|
|
infoVO.setEquipmentInspectionRainCount(infoVO.getEquipmentInspectionCount() - infoVO.getEquipmentInspectionRainSecondReports());
|
|
infoVO.setEquipmentInspectionRainCount(infoVO.getEquipmentInspectionCount() - infoVO.getEquipmentInspectionRainSecondReports());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ inspectionReportDTO = new EquipmentInspectionReportDTO();
|
|
|
|
|
+ if (null != adCode) {
|
|
|
|
|
+ inspectionReportDTO.setAdCode(adCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ inspectionReportDTO.setExcludeCode(excludeCode);
|
|
|
|
|
+ date = new Date();
|
|
|
|
|
+ dtText = Func.formatDateTime(date);
|
|
|
|
|
+ inspectionReportDTO.setCreateTime(Func.parse(dtText, ConcurrentDateFormat.of("yyyy-MM-dd")));
|
|
|
|
|
+ count = equipmentInspectionReportService.todayReportCount(inspectionReportDTO);
|
|
|
|
|
+ infoVO.setTodayIinspectionReportCount("" + count);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 统计通知信息
|
|
|
|
|
+ */
|
|
|
LambdaQueryWrapper<NoticeViewEntity> noticewrapper = Wrappers.<NoticeViewEntity>query().lambda();
|
|
LambdaQueryWrapper<NoticeViewEntity> noticewrapper = Wrappers.<NoticeViewEntity>query().lambda();
|
|
|
noticewrapper.eq(NoticeViewEntity::getCreateUser, user.getUserId());
|
|
noticewrapper.eq(NoticeViewEntity::getCreateUser, user.getUserId());
|
|
|
noticewrapper.eq(NoticeViewEntity::getIsDeleted, 0);
|
|
noticewrapper.eq(NoticeViewEntity::getIsDeleted, 0);
|
|
@@ -321,30 +368,6 @@ public class HomeController {
|
|
|
infoVO.setNewNoticeCount(0L);
|
|
infoVO.setNewNoticeCount(0L);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- OrderProcessInfoDTO processInfoDTO = new OrderProcessInfoDTO();
|
|
|
|
|
- processInfoDTO.setAdCode(adCode);
|
|
|
|
|
- Date date = new Date();
|
|
|
|
|
- String dt = Func.formatDateTime(date);
|
|
|
|
|
- processInfoDTO.setCreateTime(Func.parse(dt, ConcurrentDateFormat.of("yyyy-MM-dd")));
|
|
|
|
|
- count = rtuOrderProcessService.todayProcessCount(processInfoDTO);
|
|
|
|
|
- infoVO.setTodayOrderProcessCount("" + count);
|
|
|
|
|
-
|
|
|
|
|
- inspectionReportDTO = new EquipmentInspectionReportDTO();
|
|
|
|
|
- inspectionReportDTO.setAdCode(adCode);
|
|
|
|
|
- date = new Date();
|
|
|
|
|
- dt = Func.formatDateTime(date);
|
|
|
|
|
- inspectionReportDTO.setCreateTime(Func.parse(dt, ConcurrentDateFormat.of("yyyy-MM-dd")));
|
|
|
|
|
- count = equipmentInspectionReportService.todayReportCount(inspectionReportDTO);
|
|
|
|
|
- infoVO.setTodayIinspectionReportCount("" + count);
|
|
|
|
|
-
|
|
|
|
|
- //我的任务
|
|
|
|
|
- LambdaQueryWrapper<CheckOrderInfoEntity> orderWrapper = Wrappers.<CheckOrderInfoEntity>query().lambda();
|
|
|
|
|
- orderWrapper.eq(CheckOrderInfoEntity::getContactUser, user.getUserId());
|
|
|
|
|
- orderWrapper.eq(CheckOrderInfoEntity::getOrderConfirm, OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
|
|
|
|
|
- orderWrapper.eq(CheckOrderInfoEntity::getOrderClose, OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
|
|
|
- orderWrapper.eq(CheckOrderInfoEntity::getIsDeleted, 0);
|
|
|
|
|
- count = checkOrderService.count(orderWrapper);
|
|
|
|
|
- infoVO.setMyOrderCount(count);
|
|
|
|
|
return R.data(infoVO);
|
|
return R.data(infoVO);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -354,6 +377,7 @@ public class HomeController {
|
|
|
public R<RtuStatusCountInfoVO> rtuStatusCountInfo() {
|
|
public R<RtuStatusCountInfoVO> rtuStatusCountInfo() {
|
|
|
BladeUser user = AuthUtil.getUser();
|
|
BladeUser user = AuthUtil.getUser();
|
|
|
String adCode = null;
|
|
String adCode = null;
|
|
|
|
|
+ int excludeCode=0;
|
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
|
adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
@@ -363,22 +387,32 @@ public class HomeController {
|
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
|
if (deptRegionEntity != null) {
|
|
if (deptRegionEntity != null) {
|
|
|
adCode = deptRegionEntity.getAdcd();
|
|
adCode = deptRegionEntity.getAdcd();
|
|
|
|
|
+ LambdaQueryWrapper<RegionInfoEntity> regionWrapper = Wrappers.<RegionInfoEntity>query().lambda();
|
|
|
|
|
+ regionWrapper.eq(RegionInfoEntity::getAdcd, deptRegionEntity.getAdcd());
|
|
|
|
|
+ RegionInfoEntity regionInfoEntity= this.regionService.getOne(regionWrapper);
|
|
|
|
|
+ if (regionInfoEntity.getParentCode().equals(BusinessConstant.REGION_NM_ADCODE)){
|
|
|
|
|
+ excludeCode=1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (null == adCode) {
|
|
if (null == adCode) {
|
|
|
- log.error("adcd is null********************");
|
|
|
|
|
return R.status(false);
|
|
return R.status(false);
|
|
|
}
|
|
}
|
|
|
RtuStatusCountInfoVO infoVO = new RtuStatusCountInfoVO();
|
|
RtuStatusCountInfoVO infoVO = new RtuStatusCountInfoVO();
|
|
|
//测站数量
|
|
//测站数量
|
|
|
- long count = rtuBaseInfoService.rtuCount(adCode);
|
|
|
|
|
|
|
+ RtuInfoDTO rtuInfoDTO=new RtuInfoDTO();
|
|
|
|
|
+ rtuInfoDTO.setAdCode(adCode);
|
|
|
|
|
+ rtuInfoDTO.setExcludeCode(excludeCode);
|
|
|
|
|
+ long count = rtuBaseInfoService.rtuCount(rtuInfoDTO);
|
|
|
infoVO.setRtus(count);
|
|
infoVO.setRtus(count);
|
|
|
RtuWarningInfoDTO warningInfoDTO = new RtuWarningInfoDTO();
|
|
RtuWarningInfoDTO warningInfoDTO = new RtuWarningInfoDTO();
|
|
|
warningInfoDTO.setAdCode(adCode);
|
|
warningInfoDTO.setAdCode(adCode);
|
|
|
|
|
+ warningInfoDTO.setExcludeCode(excludeCode);
|
|
|
count = rtuWarningService.warningRtuCount(warningInfoDTO);
|
|
count = rtuWarningService.warningRtuCount(warningInfoDTO);
|
|
|
infoVO.setWarningRtus(count);
|
|
infoVO.setWarningRtus(count);
|
|
|
RtuWarningInfoDTO rtuWarningInfoDTO = new RtuWarningInfoDTO();
|
|
RtuWarningInfoDTO rtuWarningInfoDTO = new RtuWarningInfoDTO();
|
|
|
rtuWarningInfoDTO.setAdCode(adCode);
|
|
rtuWarningInfoDTO.setAdCode(adCode);
|
|
|
|
|
+ rtuWarningInfoDTO.setExcludeCode(excludeCode);
|
|
|
count = rtuWarningService.warningOfflineRtuCount(rtuWarningInfoDTO);
|
|
count = rtuWarningService.warningOfflineRtuCount(rtuWarningInfoDTO);
|
|
|
infoVO.setOfflineRtus(count);
|
|
infoVO.setOfflineRtus(count);
|
|
|
|
|
|
|
@@ -391,6 +425,7 @@ public class HomeController {
|
|
|
public R<RtuCheckOrderCountInfoVO> rtuCheckOrderCountInfo() {
|
|
public R<RtuCheckOrderCountInfoVO> rtuCheckOrderCountInfo() {
|
|
|
BladeUser user = AuthUtil.getUser();
|
|
BladeUser user = AuthUtil.getUser();
|
|
|
String adCode = null;
|
|
String adCode = null;
|
|
|
|
|
+ int excludeCode=0;
|
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
|
adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
@@ -400,19 +435,23 @@ public class HomeController {
|
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
|
if (deptRegionEntity != null) {
|
|
if (deptRegionEntity != null) {
|
|
|
adCode = deptRegionEntity.getAdcd();
|
|
adCode = deptRegionEntity.getAdcd();
|
|
|
|
|
+ LambdaQueryWrapper<RegionInfoEntity> regionWrapper = Wrappers.<RegionInfoEntity>query().lambda();
|
|
|
|
|
+ regionWrapper.eq(RegionInfoEntity::getAdcd, deptRegionEntity.getAdcd());
|
|
|
|
|
+ RegionInfoEntity regionInfoEntity= this.regionService.getOne(regionWrapper);
|
|
|
|
|
+ if (regionInfoEntity.getParentCode().equals(BusinessConstant.REGION_NM_ADCODE)){
|
|
|
|
|
+ excludeCode=1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (null == adCode) {
|
|
if (null == adCode) {
|
|
|
- log.error("adcd is null********************");
|
|
|
|
|
return R.status(true);
|
|
return R.status(true);
|
|
|
}
|
|
}
|
|
|
RtuCheckOrderCountInfoVO infoVO = new RtuCheckOrderCountInfoVO();
|
|
RtuCheckOrderCountInfoVO infoVO = new RtuCheckOrderCountInfoVO();
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
//任务总数
|
|
//任务总数
|
|
|
CheckOrderInfoDTO checkOrderInfoDTO = new CheckOrderInfoDTO();
|
|
CheckOrderInfoDTO checkOrderInfoDTO = new CheckOrderInfoDTO();
|
|
|
checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
|
checkOrderInfoDTO.setAdCode(adCode);
|
|
checkOrderInfoDTO.setAdCode(adCode);
|
|
|
|
|
+ checkOrderInfoDTO.setExcludeCode(excludeCode);
|
|
|
long count = checkOrderService.orderCount(checkOrderInfoDTO);
|
|
long count = checkOrderService.orderCount(checkOrderInfoDTO);
|
|
|
infoVO.setOrderCount(count);
|
|
infoVO.setOrderCount(count);
|
|
|
//未确认任务
|
|
//未确认任务
|
|
@@ -430,7 +469,7 @@ public class HomeController {
|
|
|
|
|
|
|
|
checkOrderInfoDTO.setOrderConfirm(OrderConfirmEnum.ACTIVE_CREATE.getCode());
|
|
checkOrderInfoDTO.setOrderConfirm(OrderConfirmEnum.ACTIVE_CREATE.getCode());
|
|
|
checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
|
- checkOrderInfoDTO.setAdCode(adCode);
|
|
|
|
|
|
|
+
|
|
|
List<CheckOrderInfoVO> orderList = checkOrderService.allOrders(checkOrderInfoDTO);
|
|
List<CheckOrderInfoVO> orderList = checkOrderService.allOrders(checkOrderInfoDTO);
|
|
|
if (null != orderList && orderList.size() > 0) {
|
|
if (null != orderList && orderList.size() > 0) {
|
|
|
long delayTime = 120;
|
|
long delayTime = 120;
|
|
@@ -462,7 +501,6 @@ public class HomeController {
|
|
|
orderWrapper.eq(CheckOrderInfoEntity::getContactUser, user.getUserId());
|
|
orderWrapper.eq(CheckOrderInfoEntity::getContactUser, user.getUserId());
|
|
|
orderWrapper.eq(CheckOrderInfoEntity::getOrderConfirm, OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
|
|
orderWrapper.eq(CheckOrderInfoEntity::getOrderConfirm, OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
|
|
|
orderWrapper.eq(CheckOrderInfoEntity::getOrderClose, OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
orderWrapper.eq(CheckOrderInfoEntity::getOrderClose, OrderCloseEnum.ACTIVE_OPEN.getCode());
|
|
|
- orderWrapper.eq(CheckOrderInfoEntity::getIsDeleted, 0);
|
|
|
|
|
count = checkOrderService.count(orderWrapper);
|
|
count = checkOrderService.count(orderWrapper);
|
|
|
infoVO.setMyOrderCount(count);
|
|
infoVO.setMyOrderCount(count);
|
|
|
return R.data(infoVO);
|
|
return R.data(infoVO);
|
|
@@ -474,6 +512,7 @@ public class HomeController {
|
|
|
public R<RtuInspectionReportCountInfoVO> rtuInspectionReportCountInfo() {
|
|
public R<RtuInspectionReportCountInfoVO> rtuInspectionReportCountInfo() {
|
|
|
BladeUser user = AuthUtil.getUser();
|
|
BladeUser user = AuthUtil.getUser();
|
|
|
String adCode = null;
|
|
String adCode = null;
|
|
|
|
|
+ int excludeCode=0;
|
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
|
adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
@@ -483,14 +522,23 @@ public class HomeController {
|
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
|
if (deptRegionEntity != null) {
|
|
if (deptRegionEntity != null) {
|
|
|
adCode = deptRegionEntity.getAdcd();
|
|
adCode = deptRegionEntity.getAdcd();
|
|
|
|
|
+ LambdaQueryWrapper<RegionInfoEntity> regionWrapper = Wrappers.<RegionInfoEntity>query().lambda();
|
|
|
|
|
+ regionWrapper.eq(RegionInfoEntity::getAdcd, deptRegionEntity.getAdcd());
|
|
|
|
|
+ RegionInfoEntity regionInfoEntity= this.regionService.getOne(regionWrapper);
|
|
|
|
|
+ if (regionInfoEntity.getParentCode().equals(BusinessConstant.REGION_NM_ADCODE)){
|
|
|
|
|
+ excludeCode=1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (null == adCode) {
|
|
if (null == adCode) {
|
|
|
- log.error("adcd is null********************");
|
|
|
|
|
return R.status(true);
|
|
return R.status(true);
|
|
|
}
|
|
}
|
|
|
|
|
+ RtuInfoDTO rtuInfoDTO=new RtuInfoDTO();
|
|
|
|
|
+ rtuInfoDTO.setAdCode(adCode);
|
|
|
|
|
+ rtuInfoDTO.setExcludeCode(excludeCode);
|
|
|
|
|
+
|
|
|
RtuInspectionReportCountInfoVO infoVO = new RtuInspectionReportCountInfoVO();
|
|
RtuInspectionReportCountInfoVO infoVO = new RtuInspectionReportCountInfoVO();
|
|
|
- long count = rtuBaseInfoService.rtuCount(adCode);
|
|
|
|
|
|
|
+ long count = rtuBaseInfoService.rtuCount(rtuInfoDTO);
|
|
|
infoVO.setEquipmentInspectionCount(count);
|
|
infoVO.setEquipmentInspectionCount(count);
|
|
|
EquipmentInspectionReportDTO inspectionReportDTO = new EquipmentInspectionReportDTO();
|
|
EquipmentInspectionReportDTO inspectionReportDTO = new EquipmentInspectionReportDTO();
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
Calendar calendar = Calendar.getInstance();
|
|
@@ -505,6 +553,7 @@ public class HomeController {
|
|
|
inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
|
|
inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
|
|
|
inspectionReportDTO.setRainSeasonKind(1);
|
|
inspectionReportDTO.setRainSeasonKind(1);
|
|
|
inspectionReportDTO.setAdCode(adCode);
|
|
inspectionReportDTO.setAdCode(adCode);
|
|
|
|
|
+ inspectionReportDTO.setExcludeCode(excludeCode);
|
|
|
count = inspectionReportService.equipmentInspectionReportCount(inspectionReportDTO);
|
|
count = inspectionReportService.equipmentInspectionReportCount(inspectionReportDTO);
|
|
|
infoVO.setEquipmentInspectionBeforeRainReports(count);
|
|
infoVO.setEquipmentInspectionBeforeRainReports(count);
|
|
|
inspectionReportDTO.setRainSeasonKind(2);
|
|
inspectionReportDTO.setRainSeasonKind(2);
|
|
@@ -612,6 +661,7 @@ public class HomeController {
|
|
|
public R<RtuUpDataCountInfoVO> rtuUpCountInfo() {
|
|
public R<RtuUpDataCountInfoVO> rtuUpCountInfo() {
|
|
|
BladeUser user = AuthUtil.getUser();
|
|
BladeUser user = AuthUtil.getUser();
|
|
|
String adCode = null;
|
|
String adCode = null;
|
|
|
|
|
+ int excludeCode=0;
|
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
|
adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
@@ -621,18 +671,26 @@ public class HomeController {
|
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
|
if (deptRegionEntity != null) {
|
|
if (deptRegionEntity != null) {
|
|
|
adCode = deptRegionEntity.getAdcd();
|
|
adCode = deptRegionEntity.getAdcd();
|
|
|
|
|
+ LambdaQueryWrapper<RegionInfoEntity> regionWrapper = Wrappers.<RegionInfoEntity>query().lambda();
|
|
|
|
|
+ regionWrapper.eq(RegionInfoEntity::getAdcd, deptRegionEntity.getAdcd());
|
|
|
|
|
+ RegionInfoEntity regionInfoEntity= this.regionService.getOne(regionWrapper);
|
|
|
|
|
+ if (regionInfoEntity.getParentCode().equals(BusinessConstant.REGION_NM_ADCODE)){
|
|
|
|
|
+ excludeCode=1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (null == adCode) {
|
|
if (null == adCode) {
|
|
|
- log.error("adcd is null********************");
|
|
|
|
|
return R.status(false);
|
|
return R.status(false);
|
|
|
}
|
|
}
|
|
|
|
|
+ RtuInfoDTO dto = new RtuInfoDTO();
|
|
|
|
|
+ dto.setAdCode(adCode);
|
|
|
|
|
+ dto.setExcludeCode(excludeCode);
|
|
|
RtuUpDataCountInfoVO infoVO = new RtuUpDataCountInfoVO();
|
|
RtuUpDataCountInfoVO infoVO = new RtuUpDataCountInfoVO();
|
|
|
- long count = rtuBaseInfoService.rtuRainCount(adCode);
|
|
|
|
|
|
|
+ long count = rtuBaseInfoService.rtuRainCount(dto);
|
|
|
infoVO.setRainRtuCount(count);
|
|
infoVO.setRainRtuCount(count);
|
|
|
- count = rtuBaseInfoService.rtuRiverCount(adCode);
|
|
|
|
|
|
|
+ count = rtuBaseInfoService.rtuRiverCount(dto);
|
|
|
infoVO.setRiverRtuCount(count);
|
|
infoVO.setRiverRtuCount(count);
|
|
|
- count = rtuBaseInfoService.rtuGroundCount(adCode);
|
|
|
|
|
|
|
+ count = rtuBaseInfoService.rtuGroundCount(dto);
|
|
|
infoVO.setGroundRtuCount(count);
|
|
infoVO.setGroundRtuCount(count);
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
|
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
|
@@ -646,18 +704,21 @@ public class HomeController {
|
|
|
rainDTO.setAdCode(adCode);
|
|
rainDTO.setAdCode(adCode);
|
|
|
rainDTO.setBeginTime(beiganTime);
|
|
rainDTO.setBeginTime(beiganTime);
|
|
|
rainDTO.setEndTime(endTime);
|
|
rainDTO.setEndTime(endTime);
|
|
|
|
|
+ rainDTO.setExcludeCode(excludeCode);
|
|
|
count = rainService.rtuUpDataCount(rainDTO);
|
|
count = rainService.rtuUpDataCount(rainDTO);
|
|
|
infoVO.setRainUpDataCount(count);
|
|
infoVO.setRainUpDataCount(count);
|
|
|
RtuDataRiverDTO riverDTO = new RtuDataRiverDTO();
|
|
RtuDataRiverDTO riverDTO = new RtuDataRiverDTO();
|
|
|
riverDTO.setAdCode(adCode);
|
|
riverDTO.setAdCode(adCode);
|
|
|
riverDTO.setBeginTime(beiganTime);
|
|
riverDTO.setBeginTime(beiganTime);
|
|
|
riverDTO.setEndTime(endTime);
|
|
riverDTO.setEndTime(endTime);
|
|
|
|
|
+ riverDTO.setExcludeCode(excludeCode);
|
|
|
count = riverService.rtuUpDataCount(riverDTO);
|
|
count = riverService.rtuUpDataCount(riverDTO);
|
|
|
infoVO.setRiverUpDataCount(count);
|
|
infoVO.setRiverUpDataCount(count);
|
|
|
RtuDataGroundDTO groundDTO = new RtuDataGroundDTO();
|
|
RtuDataGroundDTO groundDTO = new RtuDataGroundDTO();
|
|
|
groundDTO.setAdCode(adCode);
|
|
groundDTO.setAdCode(adCode);
|
|
|
groundDTO.setBeginTime(beiganTime);
|
|
groundDTO.setBeginTime(beiganTime);
|
|
|
groundDTO.setEndTime(endTime);
|
|
groundDTO.setEndTime(endTime);
|
|
|
|
|
+ groundDTO.setExcludeCode(excludeCode);
|
|
|
count = groundService.rtuUpDataCount(groundDTO);
|
|
count = groundService.rtuUpDataCount(groundDTO);
|
|
|
infoVO.setGroundUpDataCount(count);
|
|
infoVO.setGroundUpDataCount(count);
|
|
|
return R.data(infoVO);
|
|
return R.data(infoVO);
|
|
@@ -672,31 +733,8 @@ public class HomeController {
|
|
|
return R.data(null);
|
|
return R.data(null);
|
|
|
}
|
|
}
|
|
|
List<WarnCountInfoVO> list = new LinkedList<>();
|
|
List<WarnCountInfoVO> list = new LinkedList<>();
|
|
|
-// //合计
|
|
|
|
|
-// WarnCountInfoVO sumVo = new WarnCountInfoVO();
|
|
|
|
|
-// sumVo.setDeptId(0L);
|
|
|
|
|
-// sumVo.setAdCity("合计");
|
|
|
|
|
-// //测站数量
|
|
|
|
|
-// Long count = rtuBaseInfoService.rtuCount(BusinessConstant.REGION_NM_ADCODE);
|
|
|
|
|
-// sumVo.setRtus(count.intValue());
|
|
|
|
|
-// //离线数量
|
|
|
|
|
-// RtuWarningInfoDTO dto = new RtuWarningInfoDTO();
|
|
|
|
|
-// dto.setAdCode(BusinessConstant.REGION_NM_ADCODE);
|
|
|
|
|
-// count = rtuWarningService.warningOfflineRtuCount(dto);
|
|
|
|
|
-// sumVo.setWarnOffline(count.intValue());
|
|
|
|
|
-// //小时漏报
|
|
|
|
|
-// count = rtuWarningService.warningHourMissOutRtuCount(dto);
|
|
|
|
|
-// sumVo.setWarnMissOut(count.intValue());
|
|
|
|
|
-// //5分钟延时
|
|
|
|
|
-// count = rtuWarningService.warningMinUpDelayRtuCount(dto);
|
|
|
|
|
-// sumVo.setWarnUpMinDelay(count.intValue());
|
|
|
|
|
-// //小时报延时
|
|
|
|
|
-// count = rtuWarningService.warningHourUpDelayRtuCount(dto);
|
|
|
|
|
-// sumVo.setWarnUpHourDelay(count.intValue());
|
|
|
|
|
-// list.add(sumVo);
|
|
|
|
|
//盟市统计
|
|
//盟市统计
|
|
|
LambdaQueryWrapper<Dept> wrapper = Wrappers.<Dept>query().lambda();
|
|
LambdaQueryWrapper<Dept> wrapper = Wrappers.<Dept>query().lambda();
|
|
|
- wrapper.eq(Dept::getIsDeleted, 0);
|
|
|
|
|
wrapper.eq(Dept::getParentId, Func.toLong(user.getDeptId()));
|
|
wrapper.eq(Dept::getParentId, Func.toLong(user.getDeptId()));
|
|
|
List<Dept> deptList = this.deptService.list(wrapper);
|
|
List<Dept> deptList = this.deptService.list(wrapper);
|
|
|
for (Dept dept : deptList) {
|
|
for (Dept dept : deptList) {
|
|
@@ -704,15 +742,23 @@ public class HomeController {
|
|
|
//盟市名称
|
|
//盟市名称
|
|
|
vo.setDeptId(dept.getId());
|
|
vo.setDeptId(dept.getId());
|
|
|
vo.setAdCity(dept.getDeptName());
|
|
vo.setAdCity(dept.getDeptName());
|
|
|
|
|
+ LambdaQueryWrapper<DeptRegionEntity> deptregionwrapper = Wrappers.<DeptRegionEntity>query().lambda();
|
|
|
|
|
+ deptregionwrapper.eq(DeptRegionEntity::getDeptId,dept.getId());
|
|
|
|
|
+ DeptRegionEntity deptRegionEntity=this.deptRegionService.getOne(deptregionwrapper);
|
|
|
//测站数量
|
|
//测站数量
|
|
|
- LambdaQueryWrapper<DeptRegionEntity> deptLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
|
|
|
|
|
- deptLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
|
|
|
|
|
- deptLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, dept.getId());
|
|
|
|
|
- DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptLambdaQueryWrapper);
|
|
|
|
|
- Long count = rtuBaseInfoService.rtuCount(deptRegionEntity.getAdcd());
|
|
|
|
|
|
|
+ RtuInfoDTO rtuInfoDTO=new RtuInfoDTO();
|
|
|
|
|
+ RegionTreeNodeEntity node = this.regionService.getRegionNode(BusinessConstant.ROLE_ORG_ADMIN, Func.toStr(dept.getId()), deptRegionEntity.getAdcd());
|
|
|
|
|
+ if (null != node) {
|
|
|
|
|
+ rtuInfoDTO.setExcludeCode(node.getExclude());
|
|
|
|
|
+ }
|
|
|
|
|
+ rtuInfoDTO.setAdCode(deptRegionEntity.getAdcd());
|
|
|
|
|
+ Long count = rtuBaseInfoService.rtuCount(rtuInfoDTO);
|
|
|
vo.setRtus(count.intValue());
|
|
vo.setRtus(count.intValue());
|
|
|
//离线数量
|
|
//离线数量
|
|
|
RtuWarningInfoDTO dto = new RtuWarningInfoDTO();
|
|
RtuWarningInfoDTO dto = new RtuWarningInfoDTO();
|
|
|
|
|
+ if (null != node) {
|
|
|
|
|
+ dto.setExcludeCode(node.getExclude());
|
|
|
|
|
+ }
|
|
|
dto.setAdCode(deptRegionEntity.getAdcd());
|
|
dto.setAdCode(deptRegionEntity.getAdcd());
|
|
|
count = rtuWarningService.warningOfflineRtuCount(dto);
|
|
count = rtuWarningService.warningOfflineRtuCount(dto);
|
|
|
vo.setWarnOffline(count.intValue());
|
|
vo.setWarnOffline(count.intValue());
|
|
@@ -736,6 +782,7 @@ public class HomeController {
|
|
|
public R<WarnKindCountInfoVO> rtuWarnKindCountInfo() {
|
|
public R<WarnKindCountInfoVO> rtuWarnKindCountInfo() {
|
|
|
BladeUser user = AuthUtil.getUser();
|
|
BladeUser user = AuthUtil.getUser();
|
|
|
String adCode = null;
|
|
String adCode = null;
|
|
|
|
|
+ int excludeCode=0;
|
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
|
|
|
adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
adCode = BusinessConstant.REGION_NM_ADCODE;
|
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
|
|
@@ -745,15 +792,21 @@ public class HomeController {
|
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
|
|
|
if (deptRegionEntity != null) {
|
|
if (deptRegionEntity != null) {
|
|
|
adCode = deptRegionEntity.getAdcd();
|
|
adCode = deptRegionEntity.getAdcd();
|
|
|
|
|
+ LambdaQueryWrapper<RegionInfoEntity> regionWrapper = Wrappers.<RegionInfoEntity>query().lambda();
|
|
|
|
|
+ regionWrapper.eq(RegionInfoEntity::getAdcd, deptRegionEntity.getAdcd());
|
|
|
|
|
+ RegionInfoEntity regionInfoEntity= this.regionService.getOne(regionWrapper);
|
|
|
|
|
+ if (regionInfoEntity.getParentCode().equals(BusinessConstant.REGION_NM_ADCODE)){
|
|
|
|
|
+ excludeCode=1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (null == adCode) {
|
|
if (null == adCode) {
|
|
|
- log.error("adcd is null********************");
|
|
|
|
|
return R.status(false);
|
|
return R.status(false);
|
|
|
}
|
|
}
|
|
|
WarnKindCountInfoVO infoVO = new WarnKindCountInfoVO();
|
|
WarnKindCountInfoVO infoVO = new WarnKindCountInfoVO();
|
|
|
RtuWarningInfoDTO dto = new RtuWarningInfoDTO();
|
|
RtuWarningInfoDTO dto = new RtuWarningInfoDTO();
|
|
|
dto.setAdCode(adCode);
|
|
dto.setAdCode(adCode);
|
|
|
|
|
+ dto.setExcludeCode(excludeCode);
|
|
|
Long count = rtuWarningService.warningRtuCount(dto);
|
|
Long count = rtuWarningService.warningRtuCount(dto);
|
|
|
infoVO.setWarnRtus(count.intValue());
|
|
infoVO.setWarnRtus(count.intValue());
|
|
|
count = rtuWarningService.warningClockRtuCount(dto);
|
|
count = rtuWarningService.warningClockRtuCount(dto);
|