|
@@ -62,6 +62,9 @@ public class TAuditController extends BaseController
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ITProgressService tProgressService;
|
|
private ITProgressService tProgressService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ITOpenItemService itOpenItemService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 查询首页柱状图数据
|
|
* 查询首页柱状图数据
|
|
|
*/
|
|
*/
|
|
@@ -128,7 +131,6 @@ public class TAuditController extends BaseController
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
if (code0Count != 0) {code0CompleteProgress = new BigDecimal(code0CompleteCount).divide(new BigDecimal(code0Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
if (code0Count != 0) {code0CompleteProgress = new BigDecimal(code0CompleteCount).divide(new BigDecimal(code0Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
|
if (code1Count != 0) {code1CompleteProgress = new BigDecimal(code1CompleteCount).divide(new BigDecimal(code1Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
if (code1Count != 0) {code1CompleteProgress = new BigDecimal(code1CompleteCount).divide(new BigDecimal(code1Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
|
if (code2Count != 0) {code2CompleteProgress = new BigDecimal(code2CompleteCount).divide(new BigDecimal(code2Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
if (code2Count != 0) {code2CompleteProgress = new BigDecimal(code2CompleteCount).divide(new BigDecimal(code2Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
@@ -139,7 +141,6 @@ public class TAuditController extends BaseController
|
|
|
if (code7Count != 0) {code7CompleteProgress = new BigDecimal(code7CompleteCount).divide(new BigDecimal(code7Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
if (code7Count != 0) {code7CompleteProgress = new BigDecimal(code7CompleteCount).divide(new BigDecimal(code7Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
|
if (code8Count != 0) {code8CompleteProgress = new BigDecimal(code8CompleteCount).divide(new BigDecimal(code8Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
if (code8Count != 0) {code8CompleteProgress = new BigDecimal(code8CompleteCount).divide(new BigDecimal(code8Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
|
if (code9Count != 0) {code9CompleteProgress = new BigDecimal(code9CompleteCount).divide(new BigDecimal(code9Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
if (code9Count != 0) {code9CompleteProgress = new BigDecimal(code9CompleteCount).divide(new BigDecimal(code9Count), 4, BigDecimal.ROUND_HALF_UP);}
|
|
|
-
|
|
|
|
|
map.put("code0", code0CompleteProgress.toString());
|
|
map.put("code0", code0CompleteProgress.toString());
|
|
|
map.put("code1", code1CompleteProgress.toString());
|
|
map.put("code1", code1CompleteProgress.toString());
|
|
|
map.put("code2", code2CompleteProgress.toString());
|
|
map.put("code2", code2CompleteProgress.toString());
|
|
@@ -150,7 +151,6 @@ public class TAuditController extends BaseController
|
|
|
map.put("code7", code7CompleteProgress.toString());
|
|
map.put("code7", code7CompleteProgress.toString());
|
|
|
map.put("code8", code8CompleteProgress.toString());
|
|
map.put("code8", code8CompleteProgress.toString());
|
|
|
map.put("code9", code9CompleteProgress.toString());
|
|
map.put("code9", code9CompleteProgress.toString());
|
|
|
-
|
|
|
|
|
return success(map);
|
|
return success(map);
|
|
|
} else {
|
|
} else {
|
|
|
return success();
|
|
return success();
|
|
@@ -162,8 +162,37 @@ public class TAuditController extends BaseController
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/pie")
|
|
@GetMapping("/pie")
|
|
|
public AjaxResult getPie() {
|
|
public AjaxResult getPie() {
|
|
|
-
|
|
|
|
|
- return success();
|
|
|
|
|
|
|
+ int count = 0;
|
|
|
|
|
+ int completeCount = 0;
|
|
|
|
|
+ BigDecimal progress = new BigDecimal(BigInteger.ZERO);
|
|
|
|
|
+ TAudit audit = new TAudit();
|
|
|
|
|
+ audit.setDeptId(getLoginUser().getDeptId().toString());
|
|
|
|
|
+ TAudit latest = tAuditService.selectTAuditLatest(audit);
|
|
|
|
|
+ Long auditId = latest.getId();
|
|
|
|
|
+ TChapter chapter = new TChapter();
|
|
|
|
|
+ chapter.setAuditId(auditId);
|
|
|
|
|
+ List<TChapter> tChapters = tChapterService.selectTChapterList(chapter);
|
|
|
|
|
+ for (TChapter tChapter : tChapters) {
|
|
|
|
|
+ TQuestionnaire questionnaire = new TQuestionnaire();
|
|
|
|
|
+ questionnaire.setChapterId(tChapter.getId());
|
|
|
|
|
+ List<TQuestionnaire> tQuestionnaires = tQuestionnaireService.selectTQuestionnaireList(questionnaire);
|
|
|
|
|
+ for (TQuestionnaire tQuestionnaire : tQuestionnaires) {
|
|
|
|
|
+ TOpenItem openItem = new TOpenItem();
|
|
|
|
|
+ openItem.setQuestionnaireId(tQuestionnaire.getId());
|
|
|
|
|
+ List<TOpenItem> tOpenItems = itOpenItemService.selectTOpenItemList(openItem);
|
|
|
|
|
+ for (TOpenItem tOpenItem : tOpenItems) {
|
|
|
|
|
+ count++;
|
|
|
|
|
+ String status = tOpenItem.getStatus();
|
|
|
|
|
+ if ("4".equals(status)) {
|
|
|
|
|
+ completeCount++;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (count != 0) {
|
|
|
|
|
+ progress = new BigDecimal(completeCount).divide(new BigDecimal(count), 4, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
+ }
|
|
|
|
|
+ return success(progress);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|