|
|
@@ -76,7 +76,7 @@ public class CockpitServiceImpl implements CockpitService {
|
|
|
|
|
|
@Override
|
|
|
public List<OrgGA38StatisticVo> orgGA38(Long orgId) {
|
|
|
- List<OrgGA38StatisticVo> data=cockpitMapper.orgGA38(orgId);
|
|
|
+ List<OrgGA38StatisticVo> data = cockpitMapper.orgGA38(orgId);
|
|
|
List<OrgGA38StatisticVo> r = getGA38Children(orgId);
|
|
|
for (OrgGA38StatisticVo orgVo : data) {
|
|
|
for (OrgGA38StatisticVo statisticVo : r) {
|
|
|
@@ -106,7 +106,9 @@ public class CockpitServiceImpl implements CockpitService {
|
|
|
|
|
|
@Override
|
|
|
public QuestionStatisticVo question(TaskStatisticDto dto) {
|
|
|
- return null;
|
|
|
+ Date date = getStartDate(dto.getPeriod());
|
|
|
+ String orgPath = remoteOrgService.selectOrgById(dto.getOrgId(), SecurityConstants.INNER).getPath();
|
|
|
+ return cockpitMapper.question(date, orgPath);
|
|
|
}
|
|
|
|
|
|
private List<TaskStatisticVo> taskStatistic(List<TaskStatisticVo> data, TaskStatisticDto dto) {
|
|
|
@@ -135,13 +137,13 @@ public class CockpitServiceImpl implements CockpitService {
|
|
|
if (ObjectUtil.equal(period, PeriodEnum.Today.getCode())) {
|
|
|
return DateUtil.beginOfDay(new Date());
|
|
|
} else if (ObjectUtil.equal(period, PeriodEnum.Nearly7Days.getCode())) {
|
|
|
- return DateUtil.beginOfDay(new Date());
|
|
|
+ return DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), 7));
|
|
|
} else if (ObjectUtil.equal(period, PeriodEnum.Nearly30Days.getCode())) {
|
|
|
- return DateUtil.beginOfDay(new Date());
|
|
|
+ return DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), 30));
|
|
|
} else if (ObjectUtil.equal(period, PeriodEnum.Nearly90Days.getCode())) {
|
|
|
- return DateUtil.beginOfDay(new Date());
|
|
|
+ return DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), 90));
|
|
|
} else if (ObjectUtil.equal(period, PeriodEnum.ThisYear.getCode())) {
|
|
|
- return DateUtil.beginOfDay(new Date());
|
|
|
+ return DateUtil.beginOfDay(DateUtil.beginOfYear(new Date()));
|
|
|
} else {
|
|
|
throw new ServiceException("未定义的值");
|
|
|
}
|
|
|
@@ -170,6 +172,7 @@ public class CockpitServiceImpl implements CockpitService {
|
|
|
|
|
|
return list;
|
|
|
}
|
|
|
+
|
|
|
private List<OrgGA38StatisticVo> getGA38Children(Long orgId) {
|
|
|
List<SysOrg> children = remoteOrgService.selectSysOrgByParentId(orgId, SecurityConstants.INNER);
|
|
|
List<Integer> enableOrgType = ListUtil.toList(
|