|
@@ -1,6 +1,5 @@
|
1
|
1
|
package com.ruoyi.postCheck.service.impl;
|
2
|
2
|
|
3
|
|
-import java.awt.dnd.DropTarget;
|
4
|
3
|
import java.math.BigDecimal;
|
5
|
4
|
import java.math.RoundingMode;
|
6
|
5
|
import java.util.ArrayList;
|
|
@@ -26,16 +25,21 @@ import com.ruoyi.postCheck.domain.homePage.PostCheckedProblemView;
|
26
|
25
|
import com.ruoyi.postCheck.domain.homePage.PostCheckedUnCheckedView;
|
27
|
26
|
import com.ruoyi.postCheck.domain.homePage.PostTotalView;
|
28
|
27
|
import com.ruoyi.postCheck.domain.join.PostPlanJoinProblem;
|
29
|
|
-import com.ruoyi.postCheck.domain.problemStatistics.ProblemNumberBase;
|
|
28
|
+import com.ruoyi.postCheck.domain.problemStatistics.CoverageRateView;
|
|
29
|
+import com.ruoyi.postCheck.domain.problemStatistics.DutyTypeProblemStatisticsView;
|
|
30
|
+import com.ruoyi.postCheck.domain.problemStatistics.FunctionDeptProblemContrastView;
|
|
31
|
+import com.ruoyi.postCheck.domain.problemStatistics.ProblemAttributeCategoryView;
|
|
32
|
+import com.ruoyi.postCheck.domain.problemStatistics.ProblemLevelView;
|
30
|
33
|
import com.ruoyi.postCheck.domain.tools.ProblemCategory;
|
31
|
34
|
import com.ruoyi.postCheck.mapper.PostAssessmentRatingMapper;
|
|
35
|
+import com.ruoyi.postCheck.mapper.PostAssessmentRatingOtherMapper;
|
32
|
36
|
import com.ruoyi.postCheck.mapper.PostAssessmentRulesMapper;
|
33
|
37
|
import com.ruoyi.postCheck.mapper.PostListMapper;
|
34
|
38
|
import com.ruoyi.postCheck.mapper.PostPlanInfoMapper;
|
35
|
39
|
import com.ruoyi.postCheck.mapper.PostPlanMapper;
|
36
|
40
|
import com.ruoyi.postCheck.service.IPostPlanJoinProblemService;
|
|
41
|
+//import io.swagger.annotations.ApiModelProperty;
|
37
|
42
|
import io.swagger.annotations.ApiModelProperty;
|
38
|
|
-import lombok.Data;
|
39
|
43
|
import org.apache.commons.lang3.StringUtils;
|
40
|
44
|
import org.springframework.beans.factory.annotation.Autowired;
|
41
|
45
|
import org.springframework.stereotype.Service;
|
|
@@ -47,6 +51,14 @@ import org.springframework.transaction.annotation.Transactional;
|
47
|
51
|
import org.springframework.util.CollectionUtils;
|
48
|
52
|
|
49
|
53
|
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
50
|
62
|
/**
|
51
|
63
|
* 岗检问题表Service业务层处理
|
52
|
64
|
*
|
|
@@ -69,6 +81,9 @@ public class PostCheckedProblemServiceImpl extends ServiceImpl<PostCheckedProble
|
69
|
81
|
private IPostPlanJoinProblemService postPlanJoinProblemService;
|
70
|
82
|
@Autowired
|
71
|
83
|
private PostListMapper postListMapper;
|
|
84
|
+ @Autowired
|
|
85
|
+ private PostAssessmentRatingOtherMapper postAssessmentRatingOtherMapper;
|
|
86
|
+
|
72
|
87
|
/**
|
73
|
88
|
* 查询岗检问题表
|
74
|
89
|
*
|
|
@@ -515,11 +530,11 @@ public class PostCheckedProblemServiceImpl extends ServiceImpl<PostCheckedProble
|
515
|
530
|
//(1-完整问题;2-有效性问题;3-适宜性问题;)
|
516
|
531
|
if (!postCheckedProblems.isEmpty())
|
517
|
532
|
for (PostCheckedProblem postCheckedProblem : postCheckedProblems) {
|
518
|
|
- if (postCheckedProblem.getProblemAttribute()!=null && postCheckedProblem.getProblemAttribute() == 1)
|
|
533
|
+ if (postCheckedProblem.getProblemAttribute() != null && postCheckedProblem.getProblemAttribute() == 1)
|
519
|
534
|
problemComplete++;
|
520
|
|
- if (postCheckedProblem.getProblemAttribute()!=null && postCheckedProblem.getProblemAttribute() == 3)
|
|
535
|
+ if (postCheckedProblem.getProblemAttribute() != null && postCheckedProblem.getProblemAttribute() == 3)
|
521
|
536
|
problemEffective++;
|
522
|
|
- if (postCheckedProblem.getProblemAttribute()!=null && postCheckedProblem.getProblemAttribute() == 2)
|
|
537
|
+ if (postCheckedProblem.getProblemAttribute() != null && postCheckedProblem.getProblemAttribute() == 2)
|
523
|
538
|
problemSuitable++;
|
524
|
539
|
}
|
525
|
540
|
PostCheckedProblemView post = new PostCheckedProblemView();
|
|
@@ -549,34 +564,34 @@ public class PostCheckedProblemServiceImpl extends ServiceImpl<PostCheckedProble
|
549
|
564
|
//(1-完整问题;2-有效性问题;3-适宜性问题;4 总数)
|
550
|
565
|
if (!postCheckedProblems.isEmpty())
|
551
|
566
|
for (PostCheckedProblem postCheckedProblem : postCheckedProblems) {
|
552
|
|
- if (postCheckedProblem.getProblemAttribute()!=null&&postCheckedProblem.getProblemAttribute() == 1) {
|
|
567
|
+ if (postCheckedProblem.getProblemAttribute() != null && postCheckedProblem.getProblemAttribute() == 1) {
|
553
|
568
|
problemComplete++;
|
554
|
|
- if (postCheckedProblem.getIsImmediatelyCorrected()!=null&&postCheckedProblem.getIsImmediatelyCorrected() == 1) {
|
|
569
|
+ if (postCheckedProblem.getIsImmediatelyCorrected() != null && postCheckedProblem.getIsImmediatelyCorrected() == 1) {
|
555
|
570
|
overproblemComplete++;
|
556
|
571
|
}
|
557
|
572
|
}
|
558
|
|
- if (postCheckedProblem.getProblemAttribute()!=null&&postCheckedProblem.getProblemAttribute() == 3) {
|
|
573
|
+ if (postCheckedProblem.getProblemAttribute() != null && postCheckedProblem.getProblemAttribute() == 3) {
|
559
|
574
|
problemEffective++;
|
560
|
|
- if (postCheckedProblem.getIsImmediatelyCorrected()!=null&&postCheckedProblem.getIsImmediatelyCorrected() == 1) {
|
|
575
|
+ if (postCheckedProblem.getIsImmediatelyCorrected() != null && postCheckedProblem.getIsImmediatelyCorrected() == 1) {
|
561
|
576
|
overproblemEffective++;
|
562
|
577
|
}
|
563
|
578
|
}
|
564
|
|
- if (postCheckedProblem.getProblemAttribute()!=null&&postCheckedProblem.getProblemAttribute() == 2) {
|
|
579
|
+ if (postCheckedProblem.getProblemAttribute() != null && postCheckedProblem.getProblemAttribute() == 2) {
|
565
|
580
|
problemSuitable++;
|
566
|
|
- if (postCheckedProblem.getIsImmediatelyCorrected()!=null&&postCheckedProblem.getIsImmediatelyCorrected() == 1) {
|
|
581
|
+ if (postCheckedProblem.getIsImmediatelyCorrected() != null && postCheckedProblem.getIsImmediatelyCorrected() == 1) {
|
567
|
582
|
overproblemSuitable++;
|
568
|
583
|
}
|
569
|
584
|
}
|
570
|
585
|
total++;
|
571
|
|
- if (postCheckedProblem.getIsImmediatelyCorrected()!=null&&postCheckedProblem.getIsImmediatelyCorrected() == 1) {
|
|
586
|
+ if (postCheckedProblem.getIsImmediatelyCorrected() != null && postCheckedProblem.getIsImmediatelyCorrected() == 1) {
|
572
|
587
|
overtotal++;
|
573
|
588
|
}
|
574
|
589
|
}
|
575
|
590
|
Map<Integer, BigDecimal> map = new HashMap<>();
|
576
|
|
- map.put(1, new BigDecimal(overproblemComplete).divide(new BigDecimal(problemComplete),4, RoundingMode.HALF_UP));
|
577
|
|
- map.put(2, new BigDecimal(overproblemSuitable).divide(new BigDecimal(problemSuitable),4, RoundingMode.HALF_UP));
|
578
|
|
- map.put(3, new BigDecimal(overproblemEffective).divide(new BigDecimal(problemEffective),4, RoundingMode.HALF_UP));
|
579
|
|
- map.put(4, new BigDecimal(overtotal).divide(new BigDecimal(total),4, RoundingMode.HALF_UP));
|
|
591
|
+ map.put(1, new BigDecimal(overproblemComplete).divide(new BigDecimal(problemComplete), 4, RoundingMode.HALF_UP));
|
|
592
|
+ map.put(2, new BigDecimal(overproblemSuitable).divide(new BigDecimal(problemSuitable), 4, RoundingMode.HALF_UP));
|
|
593
|
+ map.put(3, new BigDecimal(overproblemEffective).divide(new BigDecimal(problemEffective), 4, RoundingMode.HALF_UP));
|
|
594
|
+ map.put(4, new BigDecimal(overtotal).divide(new BigDecimal(total), 4, RoundingMode.HALF_UP));
|
580
|
595
|
return map;
|
581
|
596
|
|
582
|
597
|
}
|
|
@@ -585,7 +600,7 @@ public class PostCheckedProblemServiceImpl extends ServiceImpl<PostCheckedProble
|
585
|
600
|
public List<DeptProblemRectificationView> deptProblemRectification() {
|
586
|
601
|
List<DeptProblemRectificationView> dataList = new ArrayList<>();
|
587
|
602
|
List<PostCheckedProblem> postCheckedProblems = postCheckedProblemMapper.selectList(Wrappers.lambdaQuery());
|
588
|
|
- if (!postCheckedProblems.isEmpty()){
|
|
603
|
+ if (!postCheckedProblems.isEmpty()) {
|
589
|
604
|
Map<Long, List<PostCheckedProblem>> postMapListMap = postCheckedProblems.stream().collect(Collectors.groupingBy(PostCheckedProblem::getCheckedDeptId));
|
590
|
605
|
for (Map.Entry<Long, List<PostCheckedProblem>> entry : postMapListMap.entrySet()) {
|
591
|
606
|
DeptProblemRectificationView data1 = new DeptProblemRectificationView();
|
|
@@ -595,13 +610,13 @@ public class PostCheckedProblemServiceImpl extends ServiceImpl<PostCheckedProble
|
595
|
610
|
Integer problemComplete = 0;
|
596
|
611
|
for (PostCheckedProblem postCheckedProblem : entry.getValue()) {
|
597
|
612
|
problemTotal++;
|
598
|
|
- if (postCheckedProblem.getIsRectificationCompleted()!=null&&postCheckedProblem.getIsRectificationCompleted() == 1){
|
|
613
|
+ if (postCheckedProblem.getIsRectificationCompleted() != null && postCheckedProblem.getIsRectificationCompleted() == 1) {
|
599
|
614
|
problemComplete++;
|
600
|
615
|
}
|
601
|
616
|
}
|
602
|
617
|
data1.setProblemTotal(problemTotal);
|
603
|
618
|
data1.setProblemComplete(problemComplete);
|
604
|
|
- data1.setProblemRectificationRate(new BigDecimal(problemComplete).divide(new BigDecimal(problemTotal),4, RoundingMode.HALF_UP));
|
|
619
|
+ data1.setProblemRectificationRate(new BigDecimal(problemComplete).divide(new BigDecimal(problemTotal), 4, RoundingMode.HALF_UP));
|
605
|
620
|
dataList.add(data1);
|
606
|
621
|
}
|
607
|
622
|
}
|
|
@@ -625,19 +640,19 @@ public class PostCheckedProblemServiceImpl extends ServiceImpl<PostCheckedProble
|
625
|
640
|
*/
|
626
|
641
|
@Override
|
627
|
642
|
public List<ProblemCategory> problemCategoryByAttribute() {
|
628
|
|
-// @ApiModelProperty("职责权限问题")
|
|
643
|
+//// @ApiModelProperty("职责权限问题")
|
629
|
644
|
// private Integer problemCategoryOne;
|
630
|
|
-// @ApiModelProperty("工作内容问题")
|
|
645
|
+//// @ApiModelProperty("工作内容问题")
|
631
|
646
|
// private Integer problemCategoryTwo;
|
632
|
|
-// @ApiModelProperty("工作标准问题")
|
|
647
|
+//// @ApiModelProperty("工作标准问题")
|
633
|
648
|
// private Integer problemCategoryThree;
|
634
|
|
-// @ApiModelProperty("考核奖励问题")
|
|
649
|
+//// @ApiModelProperty("考核奖励问题")
|
635
|
650
|
// private Integer problemCategoryFour;
|
636
|
|
-// @ApiModelProperty("任职资格问题")
|
|
651
|
+//// @ApiModelProperty("任职资格问题")
|
637
|
652
|
// private Integer problemCategoryFive;
|
638
|
|
-// @ApiModelProperty("其他")
|
|
653
|
+//// @ApiModelProperty("其他")
|
639
|
654
|
// private Integer problemCategorySix;
|
640
|
|
-// @ApiModelProperty("总数量")
|
|
655
|
+//// @ApiModelProperty("总数量")
|
641
|
656
|
// private Integer problemTotal;
|
642
|
657
|
|
643
|
658
|
List<ProblemCategory> list = postCheckedProblemMapper.problemCategoryByAttribute();
|
|
@@ -690,5 +705,211 @@ public class PostCheckedProblemServiceImpl extends ServiceImpl<PostCheckedProble
|
690
|
705
|
list.add(totalData);
|
691
|
706
|
return list;
|
692
|
707
|
}
|
|
708
|
+
|
|
709
|
+ @Override
|
|
710
|
+ public List<Map<String, Object>> getDeptIdListByType(Integer type) {
|
|
711
|
+ return postAssessmentRatingOtherMapper.getDeptIdListByType(type);
|
|
712
|
+ }
|
|
713
|
+
|
|
714
|
+ @Override
|
|
715
|
+ public void functionDeptProblemContrast(FunctionDeptProblemContrastView data) {
|
|
716
|
+// 查询问题表
|
|
717
|
+// select * from "public"."post_checked_problem";
|
|
718
|
+// GROUP BY problem_attribute -- 问题属性(1-完整问题;2-有效性问题;3-适宜性问题;)
|
|
719
|
+// GROUP BY problem_category -- 问题类别(职责权限问题、工作内容问题、工作标准问题、考核奖励问题、任职资格问题、其他)
|
|
720
|
+ List<PostCheckedProblem> postCheckedProblems = postCheckedProblemMapper.selectList(Wrappers.<PostCheckedProblem>lambdaQuery()
|
|
721
|
+ .eq(PostCheckedProblem::getCheckedDeptId, data.getDeptId())
|
|
722
|
+ );
|
|
723
|
+// @ApiModelProperty("总数量")
|
|
724
|
+ int problemTotal = 0;
|
|
725
|
+// @ApiModelProperty("完整性数量")
|
|
726
|
+ int problemComplete = 0;
|
|
727
|
+// @ApiModelProperty("适宜性数量")
|
|
728
|
+ int problemSuitable = 0;
|
|
729
|
+// @ApiModelProperty("有效性数量")
|
|
730
|
+ int problemEffective = 0;
|
|
731
|
+// @ApiModelProperty("职责权限问题")
|
|
732
|
+ int problemCategoryOne = 0;
|
|
733
|
+// @ApiModelProperty("工作内容问题")
|
|
734
|
+ int problemCategoryTwo = 0;
|
|
735
|
+// @ApiModelProperty("工作标准问题")
|
|
736
|
+ int problemCategoryThree = 0;
|
|
737
|
+// @ApiModelProperty("考核奖励问题")
|
|
738
|
+ int problemCategoryFour = 0;
|
|
739
|
+// @ApiModelProperty("任职资格问题")
|
|
740
|
+ int problemCategoryFive = 0;
|
|
741
|
+// @ApiModelProperty("其他")
|
|
742
|
+ int problemCategorySix = 0;
|
|
743
|
+ if (postCheckedProblems != null && postCheckedProblems.size() > 0) {
|
|
744
|
+ for (PostCheckedProblem postCheckedProblem : postCheckedProblems) {
|
|
745
|
+ problemTotal++;
|
|
746
|
+ if (postCheckedProblem.getProblemAttribute() == 1){
|
|
747
|
+ problemComplete++;
|
|
748
|
+ }
|
|
749
|
+ if (postCheckedProblem.getProblemAttribute() == 2){
|
|
750
|
+ problemEffective++;
|
|
751
|
+ }
|
|
752
|
+ if (postCheckedProblem.getProblemAttribute() == 3){
|
|
753
|
+ problemSuitable++;
|
|
754
|
+ }
|
|
755
|
+ if (postCheckedProblem.getProblemCategory() == null )
|
|
756
|
+ continue;
|
|
757
|
+ if (postCheckedProblem.getProblemCategory().equals("1"))
|
|
758
|
+ problemCategoryOne++;
|
|
759
|
+ if (postCheckedProblem.getProblemCategory().equals("2"))
|
|
760
|
+ problemCategoryTwo++;
|
|
761
|
+ if (postCheckedProblem.getProblemCategory().equals("3"))
|
|
762
|
+ problemCategoryThree++;
|
|
763
|
+ if (postCheckedProblem.getProblemCategory().equals("4"))
|
|
764
|
+ problemCategoryFour++;
|
|
765
|
+ if (postCheckedProblem.getProblemCategory().equals("5"))
|
|
766
|
+ problemCategoryFive++;
|
|
767
|
+ if (postCheckedProblem.getProblemCategory().equals("6"))
|
|
768
|
+ problemCategorySix++;
|
|
769
|
+ }
|
|
770
|
+ }
|
|
771
|
+ data.setProblemTotal(problemTotal);
|
|
772
|
+ data.setProblemComplete(problemComplete);
|
|
773
|
+ data.setProblemSuitable(problemSuitable);
|
|
774
|
+ data.setProblemEffective(problemEffective);
|
|
775
|
+ data.setProblemCategoryOne(problemCategoryOne);
|
|
776
|
+ data.setProblemCategoryTwo(problemCategoryTwo);
|
|
777
|
+ data.setProblemCategoryThree(problemCategoryThree);
|
|
778
|
+ data.setProblemCategoryFour(problemCategoryFour);
|
|
779
|
+ data.setProblemCategoryFive(problemCategoryFive);
|
|
780
|
+ data.setProblemCategorySix(problemCategorySix);
|
|
781
|
+ }
|
|
782
|
+
|
|
783
|
+ @Override
|
|
784
|
+ public List<CoverageRateView> coverageRateView(Integer type) {
|
|
785
|
+ // 查询问题表
|
|
786
|
+// select * from "public"."post_checked_problem";
|
|
787
|
+// status = 40 状态:1-待指定整改人(问题录入完成时);2-待填写方案(部门管理员指定整改人后);3-方案填写完成;10-部门审核通过;11-部门审核驳回;20-专业部门人审核(非必填)通过;21-专业部门人审核驳回(非必填);30-整改人待上传实施(整改人上传实施图片);31-上传实施照片完成;40-复查部门人审核通过;41-复查部门人审核驳回
|
|
788
|
+// is_rectification_completed = 1 整改情况-是否完成(1-Yes;2-No;)
|
|
789
|
+ List<Map<String, Object>> deptIdListByType = postAssessmentRatingOtherMapper.getDeptIdListByType(type);
|
|
790
|
+ if (deptIdListByType == null && deptIdListByType.size() == 0){
|
|
791
|
+ throw new IllegalArgumentException("查询职能部门个数为:0");
|
|
792
|
+ }
|
|
793
|
+ List<String> deptIds = deptIdListByType.stream().map(d -> d.get("deptId").toString()).distinct().collect(Collectors.toList());
|
|
794
|
+ // 查询职能问题数量
|
|
795
|
+ List<PostCheckedProblem> postCheckedProblems = postCheckedProblemMapper.selectList(Wrappers.<PostCheckedProblem>lambdaQuery()
|
|
796
|
+ .in(PostCheckedProblem::getCheckedDeptId, deptIds)
|
|
797
|
+ );
|
|
798
|
+ List<CoverageRateView> list = new ArrayList<>();
|
|
799
|
+ if (postCheckedProblems!=null && postCheckedProblems.size()>0){
|
|
800
|
+ CoverageRateView data = new CoverageRateView();
|
|
801
|
+ data.setProblemTotal(postCheckedProblems.size());
|
|
802
|
+ List<PostCheckedProblem> collect = postCheckedProblems.stream().filter(d -> d.getIsRectificationCompleted().equals(1)).collect(Collectors.toList());
|
|
803
|
+ data.setProblemComplete(collect.size());
|
|
804
|
+ list.add(data);
|
|
805
|
+ }
|
|
806
|
+ return list;
|
|
807
|
+ }
|
|
808
|
+
|
|
809
|
+ @Override
|
|
810
|
+ public List<DutyTypeProblemStatisticsView> dutyTypeProblemStatisticsView(Integer type) {
|
|
811
|
+ List<Map<String, Object>> deptIdListByType = postAssessmentRatingOtherMapper.getDeptIdListByType(type);
|
|
812
|
+ if (deptIdListByType == null && deptIdListByType.size() == 0){
|
|
813
|
+ throw new IllegalArgumentException("查询职能部门个数为:0");
|
|
814
|
+ }
|
|
815
|
+ List<String> deptIds = deptIdListByType.stream().map(d -> d.get("deptId").toString()).distinct().collect(Collectors.toList());
|
|
816
|
+ // 查询职能问题数量
|
|
817
|
+ List<PostCheckedProblem> postCheckedProblems = postCheckedProblemMapper.selectList(Wrappers.<PostCheckedProblem>lambdaQuery()
|
|
818
|
+ .in(PostCheckedProblem::getCheckedDeptId, deptIds)
|
|
819
|
+ );
|
|
820
|
+ List<DutyTypeProblemStatisticsView> list = new ArrayList<>();
|
|
821
|
+ if (postCheckedProblems!=null && postCheckedProblems.size()>0){
|
|
822
|
+// @ApiModelProperty("业务职责")
|
|
823
|
+ Integer dutyTypeOne = 0;
|
|
824
|
+
|
|
825
|
+// @ApiModelProperty("党建及党风廉政")
|
|
826
|
+ Integer dutyTypeTwo = 0;
|
|
827
|
+
|
|
828
|
+// @ApiModelProperty("安全环保职责")
|
|
829
|
+ Integer dutyTypeThree = 0;
|
|
830
|
+
|
|
831
|
+// @ApiModelProperty("合规保密职")
|
|
832
|
+ Integer dutyTypeFour = 0;
|
|
833
|
+ for (PostCheckedProblem postCheckedProblem : postCheckedProblems) {
|
|
834
|
+ if (postCheckedProblem.getDutyType() == 1)
|
|
835
|
+ dutyTypeOne++;
|
|
836
|
+ if (postCheckedProblem.getDutyType() == 2)
|
|
837
|
+ dutyTypeTwo++;
|
|
838
|
+ if (postCheckedProblem.getDutyType() == 3)
|
|
839
|
+ dutyTypeThree++;
|
|
840
|
+ if (postCheckedProblem.getDutyType() == 4)
|
|
841
|
+ dutyTypeFour++;
|
|
842
|
+ }
|
|
843
|
+ DutyTypeProblemStatisticsView data = new DutyTypeProblemStatisticsView();
|
|
844
|
+ data.setDutyTypeOne(dutyTypeOne);
|
|
845
|
+ data.setDutyTypeTwo(dutyTypeTwo);
|
|
846
|
+ data.setDutyTypeThree(dutyTypeThree);
|
|
847
|
+ data.setDutyTypeFour(dutyTypeFour);
|
|
848
|
+ list.add(data);
|
|
849
|
+ }
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+ return list;
|
|
853
|
+ }
|
|
854
|
+
|
|
855
|
+ @Override
|
|
856
|
+ public List<ProblemLevelView> problemLevelView(Integer type) {
|
|
857
|
+ // 查询问题表
|
|
858
|
+// select * from "public"."post_checked_problem";
|
|
859
|
+// group by problem_level 问题等级(一般、重要)
|
|
860
|
+ List<Map<String, Object>> deptIdListByType = postAssessmentRatingOtherMapper.getDeptIdListByType(type);
|
|
861
|
+ if (deptIdListByType == null && deptIdListByType.size() == 0){
|
|
862
|
+ throw new IllegalArgumentException("查询职能部门个数为:0");
|
|
863
|
+ }
|
|
864
|
+ List<String> deptIds = deptIdListByType.stream().map(d -> d.get("deptId").toString()).distinct().collect(Collectors.toList());
|
|
865
|
+ // 查询职能问题数量
|
|
866
|
+ List<PostCheckedProblem> postCheckedProblems = postCheckedProblemMapper.selectList(Wrappers.<PostCheckedProblem>lambdaQuery()
|
|
867
|
+ .in(PostCheckedProblem::getCheckedDeptId, deptIds)
|
|
868
|
+ );
|
|
869
|
+ List<ProblemLevelView> list = new ArrayList<>();
|
|
870
|
+ if (postCheckedProblems!=null && postCheckedProblems.size()>0){
|
|
871
|
+ List<PostCheckedProblem> collect = postCheckedProblems.stream().filter(d -> d.getProblemLevel() != null && d.getProblemLevel().equals("2")).collect(Collectors.toList());
|
|
872
|
+ ProblemLevelView data = new ProblemLevelView();
|
|
873
|
+ data.setProblemLeveOne(collect.size());
|
|
874
|
+ data.setProblemLeveTwo(postCheckedProblems.size() - collect.size());
|
|
875
|
+ list.add(data);
|
|
876
|
+ }
|
|
877
|
+
|
|
878
|
+ return list;
|
|
879
|
+ }
|
|
880
|
+
|
|
881
|
+ @Override
|
|
882
|
+ public List<ProblemAttributeCategoryView> problemAttributeCategoryView(Integer type) {
|
|
883
|
+ // 查询问题表
|
|
884
|
+// select * from "public"."post_checked_problem";
|
|
885
|
+// GROUP BY problem_attribute -- 问题属性(1-完整问题;2-有效性问题;3-适宜性问题;)
|
|
886
|
+// GROUP BY problem_category -- 问题类别(职责权限问题、工作内容问题、工作标准问题、考核奖励问题、任职资格问题、其他)
|
|
887
|
+
|
|
888
|
+ List<Map<String, Object>> deptIdListByType = postAssessmentRatingOtherMapper.getDeptIdListByType(type);
|
|
889
|
+ if (deptIdListByType == null && deptIdListByType.size() == 0){
|
|
890
|
+ throw new IllegalArgumentException("查询职能部门个数为:0");
|
|
891
|
+ }
|
|
892
|
+ List<String> deptIds = deptIdListByType.stream().map(d -> d.get("deptId").toString()).distinct().collect(Collectors.toList());
|
|
893
|
+ // 查询职能问题数量
|
|
894
|
+ List<PostCheckedProblem> postCheckedProblems = postCheckedProblemMapper.selectList(Wrappers.<PostCheckedProblem>lambdaQuery()
|
|
895
|
+ .in(PostCheckedProblem::getCheckedDeptId, deptIds)
|
|
896
|
+ );
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+ List<ProblemAttributeCategoryView> list = new ArrayList<>();
|
|
900
|
+ ProblemAttributeCategoryView data = new ProblemAttributeCategoryView();
|
|
901
|
+// data.set完成性
|
|
902
|
+// data.set适宜性
|
|
903
|
+// data.set有效性
|
|
904
|
+// data.set职责权限
|
|
905
|
+// data.set工作内容
|
|
906
|
+// data.set工作标准
|
|
907
|
+// data.set考核奖励
|
|
908
|
+// data.set任职资格
|
|
909
|
+// data.set其他
|
|
910
|
+
|
|
911
|
+ list.add(data);
|
|
912
|
+ return null;
|
|
913
|
+ }
|
693
|
914
|
}
|
694
|
915
|
|