Parcourir la source

布撤防不导出24小时防区列;检查跟踪情况导出数据不全及列名错误

jiawuxian il y a 1 an
Parent
commit
fffb78950d

+ 4 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/protection/ProtectionPageVo.java

@@ -59,14 +59,16 @@ public class ProtectionPageVo {
     /**
      * 24小时防区
      */
-    @ExcelProperty(value = "24小时防区",index = 4,converter =AllHourConverter.class )
-    @ColumnWidth(20)
+//    @ExcelProperty(value = "24小时防区",index = 4,converter =AllHourConverter.class )
+//    @ColumnWidth(20)
+    @ExcelIgnore
     private Integer allHour;
 
     /**
      * 登记人姓名
      */
     @ExcelProperty(value = "登记人",index = 5)
+    @ColumnWidth(15)
     private String statusUpdatorName;
 
     /**

+ 30 - 12
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/vo/CoreSafetyTaskExport.java

@@ -1,5 +1,6 @@
 package com.xunmei.core.safetyCheck.vo;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
@@ -20,37 +21,54 @@ public class CoreSafetyTaskExport {
     @TableField(exist = false)
     @ExcelProperty(value = "序号", index = 0)
     private Integer index;
+
     @ApiModelProperty(value = "任务名称")
     @ExcelProperty(value = "任务名称", index = 1)
+    @ColumnWidth(30)
     private String title;
+
     @ApiModelProperty(value = "检查主体")
     @ExcelProperty(value = "检查主体", index = 2)
+    @ColumnWidth(25)
     private String checkOrgName;
-    @ApiModelProperty(value = "受检机构")
-    @ExcelProperty(value = "受检机构", index = 3)
-    private String orgName;
+
     @ApiModelProperty(value = "检查人员")
-    @ExcelProperty(value = "检查人员", index = 4)
+    @ExcelProperty(value = "检查人员", index = 3)
     private String submitName;
+
+    @ApiModelProperty(value = "0待检查,1检查完成")
+    @ExcelProperty(value = "任务进度", index = 4,converter = SafeStatusConverter.class)
+    private String status;
+
+    @ApiModelProperty(value = "受检机构")
+    @ExcelProperty(value = "受检机构", index = 5)
+    @ColumnWidth(25)
+    private String orgName;
+
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "开始日期")
-    @ExcelProperty(value = "开始日期", index = 5)
+    @ExcelProperty(value = "开始日期", index = 6)
+    @ColumnWidth(20)
     private Date planStartTime;
+
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "截止日期")
-    @ExcelProperty(value = "截止日期", index = 6)
+    @ExcelProperty(value = "截止日期", index = 7)
+    @ColumnWidth(20)
     private Date planEndTime;
+
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "创建时间")
-    @ExcelProperty(value = "创建时间", index = 7)
+//    @ExcelProperty(value = "创建时间", index = 7)
+    @ExcelIgnore
     private Date createTime;
+
     @ApiModelProperty(value = "检查组成员")
-    @ExcelProperty(value = "检查组成员", index = 8)
+//    @ExcelProperty(value = "检查组成员", index = 8)
+    @ExcelIgnore
     private String checkTeam;
-    @ApiModelProperty(value = "0待检查,1检查完成")
-    @ExcelProperty(value = "检查状态", index = 9,converter = SafeStatusConverter.class)
-    private String status;
+
     @ApiModelProperty(value = "异常数目")
-    @ExcelProperty(value = "异常数目", index = 10)
+    @ExcelProperty(value = "隐患问题数", index = 8)
     private String exceptionCount;
 }

+ 12 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/safetycheck/CoreSafetyTaskMapper.xml

@@ -923,7 +923,18 @@ SELECT t.id,
             and DATE_FORMAT(t.plan_start_time, '%Y-%m-%d') = DATE_FORMAT(#{task.planStartTime}, '%Y-%m-%d')
         </if>
         <if test="task.range !=null and task.range.size==2">
-            and t.plan_start_time>=#{task.range[0]} and t.plan_start_time &lt; #{task.range[1]}
+            and ((
+            #{task.range[0]}  &lt;= t.plan_start_time
+            and #{task.range[1]} >= t.plan_start_time
+            )
+            or (
+            #{task.range[0]}   &lt;= t.plan_end_time
+            and #{task.range[1]} >= t.plan_end_time
+            )
+            or (
+            #{task.range[0]} >= t.plan_start_time
+            and #{task.range[1]} &lt;=  t.plan_end_time
+            ))
         </if>
         <if test="task.status != null  and task.status != ''">
             and t.status =#{task.status}