Bladeren bron

导出错误以及字段查询无效

Guos 1 week geleden
bovenliggende
commit
5c3f804d20

+ 15 - 14
fs-company/src/main/java/com/fs/company/controller/qw/QwSopTempController.java

@@ -63,6 +63,21 @@ public class QwSopTempController extends BaseController
         return getDataTable(list);
     }
 
+    /**
+     * 导出sop模板列表
+     */
+    @PreAuthorize("@ss.hasPermi('qw:sopTemp:export') or @ss.hasPermi('qw:sopTemp:myExport') or @ss.hasPermi('qw:sopTemp:deptExport')")
+    @Log(title = "sop模板", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(QwSopTemp qwSopTemp)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        qwSopTemp.setCompanyId(loginUser.getCompany().getCompanyId());
+        List<QwSopTemp> list = qwSopTempService.selectQwSopTempListNew(qwSopTemp);
+        ExcelUtil<QwSopTemp> util = new ExcelUtil<QwSopTemp>(QwSopTemp.class);
+        return util.exportExcel(list, "sop模板数据");
+    }
+
     /**
      * 查询我创建的sop模板列表
      */
@@ -111,20 +126,6 @@ public class QwSopTempController extends BaseController
         return getDataTable(list);
     }
 
-
-    /**
-     * 导出sop模板列表
-     */
-    @PreAuthorize("@ss.hasPermi('qw:sopTemp:export') or @ss.hasPermi('qw:sopTemp:myExport') or @ss.hasPermi('qw:sopTemp:deptExport')")
-    @Log(title = "sop模板", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(QwSopTemp qwSopTemp)
-    {
-        List<QwSopTemp> list = qwSopTempService.selectQwSopTempList(qwSopTemp);
-        ExcelUtil<QwSopTemp> util = new ExcelUtil<QwSopTemp>(QwSopTemp.class);
-        return util.exportExcel(list, "sop模板数据");
-    }
-
     /**
      * 获取sop模板详细信息
      */

+ 8 - 0
fs-service/src/main/java/com/fs/qw/vo/QwUserVoiceLogVo.java

@@ -1,5 +1,7 @@
 package com.fs.qw.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.BaseEntity;
 import com.fs.company.domain.Company;
@@ -83,4 +85,10 @@ public class QwUserVoiceLogVo extends BaseEntity {
 
     private Integer pageSize;
 
+    /** 开始时间 */
+    private String beginTime;
+
+    /** 结束时间 */
+    private String endTime;
+
 }

+ 14 - 0
fs-service/src/main/java/com/fs/sop/domain/QwSopTemp.java

@@ -24,10 +24,12 @@ public class QwSopTemp implements Serializable
 {
 
     /** id */
+    @Excel(name = "模板编号")
     @TableId(type = IdType.INPUT)
     private String id;
 
     /** 模板标题 */
+
     @Excel(name = "模板标题")
     private String name;
 
@@ -48,6 +50,7 @@ public class QwSopTemp implements Serializable
     @Excel(name = "公司id")
     private Long companyId;
 
+    @Excel(name = "间隔天数")
     private Integer gap;
 
     /**
@@ -61,27 +64,38 @@ public class QwSopTemp implements Serializable
     /**
     * 模板类型
     */
+    @Excel(name = "模板类型")
     private Integer sendType;
 
+    @Excel(name = "创建时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private String createTime;
 
+    @Excel(name = "修改时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private String updateTime;
 
     private String createBy;
+
     private Long project;
+
     private Long courseId;
+
     @TableField(exist = false)
     private String modeContent;
+
     @TableField(exist = false)
     private List<Map<String, Object>> rules;
+
     @TableField(exist = false)
     private List<QwSopTempDay> list = new ArrayList<>();
+
     @TableField(exist = false)
     private LocalTime time;
+
     @TableField(exist = false)
     private boolean cuoser;
+
     @TableField(exist = false)
     private List<String> timeList;