Browse Source

添加一种问题类型

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
95699f74eb
2 changed files with 16 additions and 7 deletions
  1. +1
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/questiontype/QuestionTypeEnum.java
  2. +15
    -7
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/InspectionFileServiceImpl.java

+ 1
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/questiontype/QuestionTypeEnum.java View File

@@ -6,6 +6,7 @@ package com.tuoheng.admin.enums.code.questiontype;
*/
public enum QuestionTypeEnum {

LONGITUDINAL_CRACK_NAME(0, "纵向裂缝"),
ABEAM_CRACK_NAME(1, "横向裂缝"),
RETICULAR_CRACK_NAME(3, "网状裂纹"),
PIT_GROOVE_NAME(4, "坑槽"),

+ 15
- 7
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/InspectionFileServiceImpl.java View File

@@ -191,7 +191,10 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
ListByDeptUserTypeVo vo2 = new ListByDeptUserTypeVo();
ListByDeptUserTypeVo vo3 = new ListByDeptUserTypeVo();
ListByDeptUserTypeVo vo4 = new ListByDeptUserTypeVo();
ListByDeptUserTypeVo vo5 = new ListByDeptUserTypeVo();
//坑槽 积水 裂缝
//0纵向裂缝
Integer longitudinalCrackNum = 0;
//4坑槽
Integer pitGrooveNum = 0;
//6积水
@@ -240,6 +243,9 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
}else if(name == QuestionTypeEnum.PON_DING_NAME.getCode()){
//6积水
ponDingNum+=1;
}else if(name == QuestionTypeEnum.LONGITUDINAL_CRACK_NAME.getCode()){
//0纵向裂缝
longitudinalCrackNum+=1;
}
}
vo.setType(QuestionTypeEnum.ABEAM_CRACK_NAME.getCode());
@@ -252,7 +258,9 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
vo3.setNum(massiveCrack);
vo4.setType(QuestionTypeEnum.PON_DING_NAME.getCode());
vo4.setNum(ponDingNum);
Collections.addAll(list,vo,vo1,vo2,vo3,vo4);
vo5.setType(QuestionTypeEnum.LONGITUDINAL_CRACK_NAME.getCode());
vo5.setNum(longitudinalCrackNum);
Collections.addAll(list,vo,vo1,vo2,vo3,vo4,vo5);
// list.add(vo);
// list.add(vo1);
// list.add(vo2);
@@ -310,6 +318,9 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
}else if(name == QuestionTypeEnum.PON_DING_NAME.getCode()){
//6积水
ponDingNum+=1;
}else if(name == QuestionTypeEnum.LONGITUDINAL_CRACK_NAME.getCode()){
//0纵向裂缝
longitudinalCrackNum+=1;
}
}
vo.setType(QuestionTypeEnum.ABEAM_CRACK_NAME.getCode());
@@ -322,12 +333,9 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
vo3.setNum(massiveCrack);
vo4.setType(QuestionTypeEnum.PON_DING_NAME.getCode());
vo4.setNum(ponDingNum);
Collections.addAll(list,vo,vo1,vo2,vo3,vo4);
// list.add(vo);
// list.add(vo1);
// list.add(vo2);
// list.add(vo3);
// list.add(vo4);
vo5.setType(QuestionTypeEnum.LONGITUDINAL_CRACK_NAME.getCode());
vo5.setNum(longitudinalCrackNum);
Collections.addAll(list,vo,vo1,vo2,vo3,vo4,vo5);

}


Loading…
Cancel
Save