|
@@ -59,42 +59,42 @@ public class CockpitServiceImpl implements CockpitService {
|
|
|
List<SysDictData> dicts = remoteDictDataService.selectDictByeType("check_type", SecurityConstants.INNER);
|
|
List<SysDictData> dicts = remoteDictDataService.selectDictByeType("check_type", SecurityConstants.INNER);
|
|
|
dicts.sort(Comparator.comparing(SysDictData::getDictSort));
|
|
dicts.sort(Comparator.comparing(SysDictData::getDictSort));
|
|
|
List<WebSafetyCheckVo> r = dicts.stream()
|
|
List<WebSafetyCheckVo> r = dicts.stream()
|
|
|
- .filter(d->ObjectUtil.notEqual(d.getDictValue(),"1") && ObjectUtil.notEqual(d.getDictValue(),"2") )
|
|
|
|
|
|
|
+ .filter(d -> ObjectUtil.notEqual(d.getDictValue(), "1") && ObjectUtil.notEqual(d.getDictValue(), "2"))
|
|
|
.map(d -> {
|
|
.map(d -> {
|
|
|
- Optional<WebSafetyCheckVo> voOpt = list.stream().filter(i -> ObjectUtil.equal(i.getType(), d.getDictValue())).findFirst();
|
|
|
|
|
- WebSafetyCheckVo vo;
|
|
|
|
|
- if (voOpt.isPresent()) {
|
|
|
|
|
- vo = voOpt.get();
|
|
|
|
|
- } else {
|
|
|
|
|
- vo = new WebSafetyCheckVo();
|
|
|
|
|
- }
|
|
|
|
|
- String label = d.getDictLabel();
|
|
|
|
|
- switch (d.getDictValue()) {
|
|
|
|
|
- case "1":
|
|
|
|
|
- label = "省联社检查";
|
|
|
|
|
- break;
|
|
|
|
|
- case "2":
|
|
|
|
|
- label = "办事处检查";
|
|
|
|
|
- break;
|
|
|
|
|
- case "3":
|
|
|
|
|
- label = "网点自查";
|
|
|
|
|
- break;
|
|
|
|
|
- case "4":
|
|
|
|
|
- label = "全面检查";
|
|
|
|
|
- break;
|
|
|
|
|
- case "5":
|
|
|
|
|
- label = "阶段性检查";
|
|
|
|
|
- break;
|
|
|
|
|
- case "6":
|
|
|
|
|
- label = "专项检查";
|
|
|
|
|
- break;
|
|
|
|
|
- case "7":
|
|
|
|
|
- label = "其它检查";
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- vo.setType(label);
|
|
|
|
|
- return vo;
|
|
|
|
|
- }).collect(Collectors.toList());
|
|
|
|
|
|
|
+ Optional<WebSafetyCheckVo> voOpt = list.stream().filter(i -> ObjectUtil.equal(i.getType(), d.getDictValue())).findFirst();
|
|
|
|
|
+ WebSafetyCheckVo vo;
|
|
|
|
|
+ if (voOpt.isPresent()) {
|
|
|
|
|
+ vo = voOpt.get();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ vo = new WebSafetyCheckVo();
|
|
|
|
|
+ }
|
|
|
|
|
+ String label = d.getDictLabel();
|
|
|
|
|
+ switch (d.getDictValue()) {
|
|
|
|
|
+ case "1":
|
|
|
|
|
+ label = "省联社检查";
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "2":
|
|
|
|
|
+ label = "办事处检查";
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "3":
|
|
|
|
|
+ label = "网点自查";
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "4":
|
|
|
|
|
+ label = "全面检查";
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "5":
|
|
|
|
|
+ label = "阶段性检查";
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "6":
|
|
|
|
|
+ label = "专项检查";
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "7":
|
|
|
|
|
+ label = "其它检查";
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ vo.setType(label);
|
|
|
|
|
+ return vo;
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
|
|
|
return r;
|
|
return r;
|
|
|
}
|
|
}
|
|
@@ -115,7 +115,7 @@ public class CockpitServiceImpl implements CockpitService {
|
|
|
SysOrg org = getOrgThrowIfNull(dto.getOrgId());
|
|
SysOrg org = getOrgThrowIfNull(dto.getOrgId());
|
|
|
String orgPath = org.getPath();
|
|
String orgPath = org.getPath();
|
|
|
List<TaskStatisticVo> list = cockpitMapper.edu(date, DateUtil.endOfDay(new Date()), orgPath);
|
|
List<TaskStatisticVo> list = cockpitMapper.edu(date, DateUtil.endOfDay(new Date()), orgPath);
|
|
|
- list= taskStatistic(list, dto.getOrgId());
|
|
|
|
|
|
|
+ list = taskStatistic(list, dto.getOrgId());
|
|
|
|
|
|
|
|
list.sort(Comparator.comparing(TaskStatisticVo::getCompletedRate));
|
|
list.sort(Comparator.comparing(TaskStatisticVo::getCompletedRate));
|
|
|
Collections.reverse(list);
|
|
Collections.reverse(list);
|
|
@@ -203,8 +203,14 @@ public class CockpitServiceImpl implements CockpitService {
|
|
|
public OrgSecurityInfoVo orgSecurityInfo(Long orgId) {
|
|
public OrgSecurityInfoVo orgSecurityInfo(Long orgId) {
|
|
|
SysOrg org = getOrgThrowIfNull(orgId);
|
|
SysOrg org = getOrgThrowIfNull(orgId);
|
|
|
OrgSecurityInfoVo vo = cockpitMapper.orgSecurityInfo(org.getPath());
|
|
OrgSecurityInfoVo vo = cockpitMapper.orgSecurityInfo(org.getPath());
|
|
|
- vo.setEquippedRate(NumberUtils.computeRate(vo.getEquippedCount() + vo.getUnequippedCount(), vo.getEquippedCount()));
|
|
|
|
|
- vo.setUnequippedRate(NumberUtils.computeRate(vo.getEquippedCount() + vo.getUnequippedCount(), vo.getUnequippedCount()));
|
|
|
|
|
|
|
+ if (ObjectUtil.isNotNull(vo)) {
|
|
|
|
|
+ vo.setEquippedRate(NumberUtils.computeRate(vo.getEquippedCount() + vo.getUnequippedCount(), vo.getEquippedCount()));
|
|
|
|
|
+ vo.setUnequippedRate(NumberUtils.computeRate(vo.getEquippedCount() + vo.getUnequippedCount(), vo.getUnequippedCount()));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ vo = new OrgSecurityInfoVo();
|
|
|
|
|
+ vo.setEquippedRate(1f);
|
|
|
|
|
+ vo.setUnequippedRate(1f);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return vo;
|
|
return vo;
|
|
|
}
|
|
}
|
|
@@ -228,8 +234,6 @@ public class CockpitServiceImpl implements CockpitService {
|
|
|
vo.setPaperRate(NumberUtils.computeRate(total, vo.getPaperCount()));
|
|
vo.setPaperRate(NumberUtils.computeRate(total, vo.getPaperCount()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
return vo;
|
|
return vo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -242,7 +246,7 @@ public class CockpitServiceImpl implements CockpitService {
|
|
|
if (ObjectUtil.isNull(questionDto)) {
|
|
if (ObjectUtil.isNull(questionDto)) {
|
|
|
questionDto = new WebSyntheticQuestionDto();
|
|
questionDto = new WebSyntheticQuestionDto();
|
|
|
}
|
|
}
|
|
|
- Map<String, Object> overdueCount = cockpitMapper.selectOverDueQuestionCount(org.getPath(), range.getStartTime(),range.getEndTime());
|
|
|
|
|
|
|
+ Map<String, Object> overdueCount = cockpitMapper.selectOverDueQuestionCount(org.getPath(), range.getStartTime(), range.getEndTime());
|
|
|
|
|
|
|
|
QuestionStatisticVo vo = new QuestionStatisticVo();
|
|
QuestionStatisticVo vo = new QuestionStatisticVo();
|
|
|
vo.setTotal(questionDto.getTotal());
|
|
vo.setTotal(questionDto.getTotal());
|
|
@@ -253,8 +257,8 @@ public class CockpitServiceImpl implements CockpitService {
|
|
|
vo.setReformed(NumberUtils.computeRate(questionDto.getTotal(), questionDto.getReformedCount()));
|
|
vo.setReformed(NumberUtils.computeRate(questionDto.getTotal(), questionDto.getReformedCount()));
|
|
|
|
|
|
|
|
if (overdueCount.size() > 0) {
|
|
if (overdueCount.size() > 0) {
|
|
|
- Long count =(Long) overdueCount.get("count");
|
|
|
|
|
- BigDecimal overdue = (BigDecimal)overdueCount.get("overdueCount");
|
|
|
|
|
|
|
+ Long count = (Long) overdueCount.get("count");
|
|
|
|
|
+ BigDecimal overdue = (BigDecimal) overdueCount.get("overdueCount");
|
|
|
vo.setOverdue(NumberUtils.computeRate(count.intValue(), overdue.intValue()));
|
|
vo.setOverdue(NumberUtils.computeRate(count.intValue(), overdue.intValue()));
|
|
|
} else {
|
|
} else {
|
|
|
vo.setOverdue(1f);
|
|
vo.setOverdue(1f);
|