|
|
@@ -26,6 +26,7 @@ import java.io.IOException;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
@@ -55,7 +56,7 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
|
|
|
amount = 365;
|
|
|
break;
|
|
|
case "3":
|
|
|
- amount=30;
|
|
|
+ amount = 30;
|
|
|
break;
|
|
|
default:
|
|
|
amount = 7;
|
|
|
@@ -67,6 +68,7 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
|
|
|
Date time = cal.getTime();
|
|
|
monitoringAccessDTO.setStartTime(time);
|
|
|
monitoringAccessDTO.setEndTime(new Date());
|
|
|
+ // List<SysOrg> sysOrgs = orgService.selectSysOrgByParentId(resumptionDTO.getOrgId(), SecurityConstants.INNER);
|
|
|
Page<MonitoringAccessVO> report = monitorAccessReportMapper.report(page, monitoringAccessDTO);
|
|
|
report.getRecords().forEach(r -> {
|
|
|
Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(r.getPath());
|
|
|
@@ -77,13 +79,24 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
|
|
|
|
|
|
@Override
|
|
|
public List<MonitoringAccessVO> selectAll(MonitoringAccessDTO monitoringAccessDTO) {
|
|
|
-
|
|
|
- List<MonitoringAccessVO> monitoringAccessVOS = monitorAccessReportMapper.selectAll(monitoringAccessDTO);
|
|
|
- monitoringAccessVOS.forEach(m -> {
|
|
|
- Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(m.getPath());
|
|
|
- m.setNetworkNumber(integer);
|
|
|
+ if (null == monitoringAccessDTO.getOrgId()) {
|
|
|
+ monitoringAccessDTO.setOrgId(SecurityUtils.getLoginUser().getOrgId());
|
|
|
+ }
|
|
|
+ List<SysOrg> sysOrgs = remoteOrgService.selectSysOrgByParentId(monitoringAccessDTO.getOrgId(), SecurityConstants.INNER);
|
|
|
+ List<MonitoringAccessVO> monitoringAccessVOList = new ArrayList<>();
|
|
|
+ sysOrgs.forEach(s -> {
|
|
|
+ MonitoringAccessVO monitoringAccessVO = new MonitoringAccessVO();
|
|
|
+ Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(s.getPath());
|
|
|
+ monitoringAccessDTO.setOrgPath(s.getPath());
|
|
|
+ MonitoringAccessVO monitoringAccessVO1 = monitorAccessReportMapper.selectAll(monitoringAccessDTO);
|
|
|
+ monitoringAccessVO.setNetworkNumber(integer);
|
|
|
+ monitoringAccessVO.setAccessRate(monitoringAccessVO1.getAccessRate());
|
|
|
+ monitoringAccessVO.setOrgName(s.getShortName());
|
|
|
+ monitoringAccessVO.setPlanAccessNumber(monitoringAccessVO1.getPlanAccessNumber());
|
|
|
+ monitoringAccessVO.setRealityAccessNumber(monitoringAccessVO1.getRealityAccessNumber());
|
|
|
+ monitoringAccessVOList.add(monitoringAccessVO);
|
|
|
});
|
|
|
- return monitoringAccessVOS;
|
|
|
+ return monitoringAccessVOList;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -127,7 +140,7 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
|
|
|
timeUnit = "周";
|
|
|
break;
|
|
|
case "3":
|
|
|
- amount=30;
|
|
|
+ amount = 30;
|
|
|
timeUnit = "月";
|
|
|
break;
|
|
|
default:
|