eagle il y a 1 mois
Parent
commit
9c636d1913

+ 26 - 0
zfjg-api/zfjg-api-manage/src/main/java/com/zfjg/manage/api/dto/enforce/job/EnforceJobTimeoutDto.java

@@ -2,6 +2,7 @@ package com.zfjg.manage.api.dto.enforce.job;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zfjg.common.core.annotation.Excel;
+import com.zfjg.manage.api.utils.ParamTypeUtil;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -28,10 +29,19 @@ public class EnforceJobTimeoutDto {
     @ApiModelProperty(value = "任务类型:NORMAL-日常检查,SPECIAL-专项检查,REPORT-举报检查,TOWNS-乡镇检查,OTHER-其他,REVIEW-复查,BRIGADE-总队督查)")
     private String jobType;
 
+
+    @Excel(name = "任务类型")
+    @ApiModelProperty(value = "任务类型:NORMAL-日常检查,SPECIAL-专项检查,REPORT-举报检查,TOWNS-乡镇检查,OTHER-其他,REVIEW-复查,BRIGADE-总队督查)")
+    private String jobTypeName;
+
     @Excel(name = "合格情况")
     @ApiModelProperty(value = "PASS-合格,NOT_PASS:不合格,OVERPASS-不检查")
     private String enforceResult;
 
+    @Excel(name = "合格情况")
+    @ApiModelProperty(value = "PASS-合格,NOT_PASS:不合格,OVERPASS-不检查")
+    private String enforceResultName;
+
     @Excel(name = "检查员")
     @ApiModelProperty(value = "检察员名称,多个人名字用,隔开,顺序和id的顺序一致")
     private String executorNames;
@@ -62,5 +72,21 @@ public class EnforceJobTimeoutDto {
     @ApiModelProperty(value = "检查期限")
     private Date lastEnforceDate;
 
+    public void setJobTypeName(String jobTypeName) {
+        this.jobTypeName = ParamTypeUtil.getJobTypeName(this.jobType);
+    }
+
+    public void setEnforceResultName(String enforceResultName) {
+        this.enforceResultName = ParamTypeUtil.getEnforceResultName(this.enforceResult);
+    }
+
+    public String getJobTypeName() {
+        return ParamTypeUtil.getJobTypeName(this.jobType);
+    }
+
+    public String getEnforceResultName() {
+        return ParamTypeUtil.getEnforceResultName(this.enforceResult);
+    }
+
 
 }

+ 22 - 1
zfjg-api/zfjg-api-manage/src/main/java/com/zfjg/manage/api/dto/enforce/job/EnforceOrgAverageTimeDto.java

@@ -1,6 +1,7 @@
 package com.zfjg.manage.api.dto.enforce.job;
 
 import com.zfjg.common.core.annotation.Excel;
+import com.zfjg.common.core.utils.StringUtils;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -21,8 +22,28 @@ public class EnforceOrgAverageTimeDto {
     @ApiModelProperty("总队平均时长")
     private String headCorpsAvgTime;
 
-    @Excel(name = "视频时长与检查终端时长的比值")
     @ApiModelProperty("视频时长与检查终端时长的比值")
     private String rate;
 
+    @Excel(name = "视频时长与检查终端时长的比值")
+    @ApiModelProperty("视频时长与检查终端时长的比值")
+    private String ratePercent;
+
+    public void setRatePercent(String ratePercent) {
+        if (StringUtils.isNotEmpty(this.rate)) {
+            this.ratePercent = this.rate + "%";
+        }else{
+            this.ratePercent = ratePercent;
+        }
+    }
+
+    public String getRatePercent() {
+        if (StringUtils.isNotEmpty(this.rate)) {
+            return this.rate + "%";
+        }
+        return ratePercent;
+    }
+
+
+
 }

+ 20 - 1
zfjg-api/zfjg-api-manage/src/main/java/com/zfjg/manage/api/dto/enforce/job/EnforcementJobAverageTimeDTO.java

@@ -6,6 +6,7 @@ import com.zfjg.common.core.annotation.Excel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
 
 import java.util.Date;
 
@@ -62,10 +63,28 @@ public class EnforcementJobAverageTimeDTO {
     @ApiModelProperty("总队平均时长")
     private String headCorpsAvgTime;
 
-    @Excel(name = "视频时长与检查终端时长的比值")
     @ApiModelProperty("视频时长与检查终端时长的比值")
     private String rate;
 
+    @Excel(name = "视频时长与检查终端时长的比值")
+    @ApiModelProperty("视频时长与检查终端时长的比值")
+    private String ratePercent;
+
+    public void setRatePercent(String ratePercent) {
+        if (StringUtils.isNotEmpty(this.rate)) {
+            this.ratePercent = this.rate + "%";
+        }else{
+            this.ratePercent = ratePercent;
+        }
+    }
+
+    public String getRatePercent() {
+        if (StringUtils.isNotEmpty(this.rate)) {
+            return this.rate + "%";
+        }
+        return ratePercent;
+    }
+
 
 
 }

+ 31 - 3
zfjg-api/zfjg-api-manage/src/main/java/com/zfjg/manage/api/dto/enforce/job/EnforcementJobProcessDTO.java

@@ -3,6 +3,7 @@ package com.zfjg.manage.api.dto.enforce.job;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zfjg.common.core.annotation.Excel;
+import com.zfjg.manage.api.utils.ParamTypeUtil;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -21,14 +22,20 @@ public class EnforcementJobProcessDTO {
     /**
      * 任务类型(NORMAL-日常检查,SPECIAL-专项,REPORT-举报,TOWNS-乡镇检查,OTHER-其他,REVIEW-复查,BRIGADE-总队督查)OTHER-其他)
      */
-    @Excel(name = "任务类型")
     @ApiModelProperty(value = "任务类型:NORMAL-日常检查,SPECIAL-专项检查,REPORT-举报检查,TOWNS-乡镇检查,OTHER-其他,REVIEW-复查,BRIGADE-总队督查)")
     private String jobType;
 
-    @Excel(name = "合格情况")
+    @Excel(name = "任务类型")
+    @ApiModelProperty(value = "任务类型:NORMAL-日常检查,SPECIAL-专项检查,REPORT-举报检查,TOWNS-乡镇检查,OTHER-其他,REVIEW-复查,BRIGADE-总队督查)")
+    private String jobTypeName;
+
     @ApiModelProperty(value = "PASS-合格,NOT_PASS:不合格,OVERPASS-不检查")
     private String enforceResult;
 
+    @Excel(name = "合格情况")
+    @ApiModelProperty(value = "PASS-合格,NOT_PASS:不合格,OVERPASS-不检查")
+    private String enforceResultName;
+
     @Excel(name = "检查员")
     @ApiModelProperty(value = "检察员名称,多个人名字用,隔开,顺序和id的顺序一致")
     private String executorNames;
@@ -63,5 +70,26 @@ public class EnforcementJobProcessDTO {
     @Excel(name = "是否关联")
     private String relate;
 
-
+    public String getJobTypeName() {
+        return ParamTypeUtil.getJobTypeName(this.jobType);
+    }
+
+    public String getEnforceResultName() {
+        return ParamTypeUtil.getEnforceResultName(this.enforceResult);
+    }
+
+    public void setRelate(String relate) {
+        if (this.videoNum != null && this.videoNum > 0) {
+            this.relate = "已关联";
+        }else{
+            this.relate = "未关联";
+        }
+    }
+
+    public String getRelate() {
+        if (videoNum != null && videoNum > 0) {
+            return "已关联";
+        }
+        return "未关联";
+    }
 }

+ 20 - 1
zfjg-api/zfjg-api-manage/src/main/java/com/zfjg/manage/api/dto/enforce/job/EnforcementOrgProcess.java

@@ -2,6 +2,7 @@ package com.zfjg.manage.api.dto.enforce.job;
 
 
 import com.zfjg.common.core.annotation.Excel;
+import com.zfjg.common.core.utils.StringUtils;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -24,7 +25,25 @@ public class EnforcementOrgProcess {
     @ApiModelProperty("关联数量")
     private String relationNumber;
 
-    @Excel(name = "关联率")
     @ApiModelProperty("关联率")
     private String relationRate;
+
+    @Excel(name = "关联率")
+    @ApiModelProperty("关联率")
+    private String relationRatePercent;
+
+    public void setRelationRatePercent(String relationRatePercent) {
+        if (StringUtils.isNotEmpty(this.relationRate)) {
+            this.relationRatePercent = this.relationRate + "%";;
+        }else{
+            this.relationRatePercent = relationRatePercent;
+        }
+    }
+
+    public String getRelationRatePercent() {
+        if (StringUtils.isNotEmpty(this.relationRate)) {
+            return this.relationRate + "%";
+        }
+        return relationRatePercent;
+    }
 }

+ 54 - 0
zfjg-api/zfjg-api-manage/src/main/java/com/zfjg/manage/api/utils/ParamTypeUtil.java

@@ -0,0 +1,54 @@
+package com.zfjg.manage.api.utils;
+
+/**
+ * Created by Administrator on 2024/12/12 0012.
+ */
+public class ParamTypeUtil {
+    public static String getJobTypeName(String jobType){
+        String name = "";
+        switch (jobType) {
+            case "OTHER":
+                name="其他";
+                break;
+            case "NORMAL":
+                name="日常检查";
+                break;
+            case "TOWNS":
+                name="乡镇检查";
+                break;
+            case "REPORT":
+                name="举报检查";
+                break;
+            case "SPECIAL":
+                name="专项检查";
+                break;
+            case "REVIEW":
+                name="复查";
+                break;
+            case "BRIGADE":
+                name="总队督查";
+                break;
+            default:
+                break;
+        }
+        return  name;
+    }
+
+    public static String getEnforceResultName(String enforceResult){
+        String name = "";
+        switch (enforceResult) {
+            case "PASS":
+                name="合格";
+                break;
+            case "NOT_PASS":
+                name="不合格";
+                break;
+            case "OVERPASS":
+                name="不检查";
+                break;
+            default:
+                break;
+        }
+        return  name;
+    }
+}

+ 19 - 3
zfjg-modules/zfjg-manage/src/main/java/com/zfjg/manage/controller/enforce/job/EnforceSuperviseController.java

@@ -6,8 +6,6 @@ import com.zfjg.common.core.domain.R;
 import com.zfjg.common.core.utils.poi.ExcelUtil;
 import com.zfjg.common.core.web.page.TableInfo;
 import com.zfjg.manage.api.dto.enforce.job.*;
-import com.zfjg.manage.api.search.random.RandomTaskViewQuery;
-import com.zfjg.manage.api.vo.random.DailyCheckRule;
 import com.zfjg.manage.mapper.enforce.job.EnforceSuperviseMapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -50,6 +48,9 @@ public class EnforceSuperviseController {
             return;
         }
         ExcelUtil<EnforcementOrgProcess> util = new ExcelUtil<EnforcementOrgProcess>(EnforcementOrgProcess.class);
+        enforcementProcess.forEach(e->{
+            e.setRelationRatePercent(e.getRelationRatePercent());
+        });
         util.exportExcel(response, enforcementProcess, "执法全过程记录", "执法全过程记录");
     }
 
@@ -69,6 +70,9 @@ public class EnforceSuperviseController {
         if(com.zfjg.common.core.utils.StringUtils.isEmpty(list)){
             return;
         }
+        list.forEach(e->{
+            e.setRelate(e.getRelate());
+        });
         ExcelUtil<EnforcementJobProcessDTO> util = new ExcelUtil<EnforcementJobProcessDTO>(EnforcementJobProcessDTO.class);
         util.exportExcel(response, list, "执法全过程记录列表", "执法全过程记录列表");
     }
@@ -89,6 +93,10 @@ public class EnforceSuperviseController {
         if(com.zfjg.common.core.utils.StringUtils.isEmpty(list)){
             return;
         }
+        list.forEach(e->{
+            e.setEnforceResultName(e.getEnforceResultName());
+            e.setJobTypeName(e.getJobTypeName());
+        });
         ExcelUtil<EnforceJobTimeoutDto> util = new ExcelUtil<EnforceJobTimeoutDto>(EnforceJobTimeoutDto.class);
         util.exportExcel(response, list, "检查超期列表", "检查超期列表");
     }
@@ -168,6 +176,10 @@ public class EnforceSuperviseController {
         }
         enforceAverageTimes.add(0,enforceAverageTimeDto);
 
+        enforceAverageTimes.forEach(e->{
+            e.setRatePercent(e.getRatePercent());
+        });
+
         ExcelUtil<EnforceOrgAverageTimeDto> util = new ExcelUtil<EnforceOrgAverageTimeDto>(EnforceOrgAverageTimeDto.class);
         util.exportExcel(response, enforceAverageTimes, "检查时长", "检查时长");
     }
@@ -184,11 +196,15 @@ public class EnforceSuperviseController {
 
 
     @ApiOperation(value = "检查时长列表导出")
-    @GetMapping(value = "//enforcement/org/average-time/export")
+    @GetMapping(value = "/enforcement/org/average-time/export")
     public void selectEnforceJobAverageTimeExport(HttpServletResponse response, EnforcementJobProcessQuery query) {
         startPage();
         List<EnforcementJobAverageTimeDTO> list = enforceSuperviseMapper.selectEnforceJobAverageTime(query);
         ExcelUtil<EnforcementJobAverageTimeDTO> util = new ExcelUtil<EnforcementJobAverageTimeDTO>(EnforcementJobAverageTimeDTO.class);
+        list.forEach(e->{
+            e.setRatePercent(e.getRatePercent());
+        });
+
         util.exportExcel(response, list, "检查时长列表", "检查时长列表");
     }