Browse Source

SAI开项管理 - 优化导出文件,带出登记人班组信息
SAI开项管理 - 优化导出文件,合并导出的日,月,直接带出年月日,按登记日期顺序排序

wangggziwen 5 months ago
parent
commit
339616d56c

+ 8 - 2
master/src/main/java/com/ruoyi/project/production/controller/TSaiApplyController.java

@@ -311,8 +311,14 @@ public class TSaiApplyController extends BaseController
             vo.setPlantName(entity.getApplicantDeptName());
             vo.setStaffName(entity.getApplicantName());
             vo.setStaffId(staffIdMap.get(Long.parseLong(entity.getApplicant())));
-            vo.setMonth((entity.getApplyDate().getMonth() + 1) + "");
-            vo.setDate(entity.getApplyDate().getDate()+ "");
+            vo.setApplyDate(entity.getApplyDate());
+//            vo.setMonth((entity.getApplyDate().getMonth() + 1) + "");
+//            vo.setDate(entity.getApplyDate().getDate()+ "");
+            for (SysDictData sysDictData : teamDivideDict) {
+                if (sysDictData.getDictValue().equals(entity.getApplicantTeam() + "")) {
+                    vo.setStaffTeam(sysDictData.getDictLabel());
+                }
+            }
             for (SysDictData sysDictData : saiUnsafeStatusDict) {
                 if (sysDictData.getDictValue().equals(entity.getUnsafeStatus() + "")) {
                     vo.setUnsafeStatus(sysDictData.getDictLabel());

+ 26 - 2
master/src/main/java/com/ruoyi/project/production/controller/vo/SaiApplyExportVO.java

@@ -27,15 +27,23 @@ public class SaiApplyExportVO extends BaseEntity
     @Excel(name = "姓名")
     private String staffName;
 
+    @Excel(name = "班组")
+    private String staffTeam;
+
     @Excel(name = "员工号")
     private String staffId;
 
-    @Excel(name = "月份", width = 8)
+//    @Excel(name = "月份", width = 8)
     private String month;
 
-    @Excel(name = "日期", width = 8)
+//    @Excel(name = "日期", width = 8)
     private String date;
 
+    /** 登记时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "登记时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date applyDate;
+
     /** 不安全行为 */
     @Excel(name = "不安全行为", width = 50)
     private String unsafeAction;
@@ -98,6 +106,22 @@ public class SaiApplyExportVO extends BaseEntity
     @Excel(name = "SAI类别")
     private String category;
 
+    public Date getApplyDate() {
+        return applyDate;
+    }
+
+    public void setApplyDate(Date applyDate) {
+        this.applyDate = applyDate;
+    }
+
+    public String getStaffTeam() {
+        return staffTeam;
+    }
+
+    public void setStaffTeam(String staffTeam) {
+        this.staffTeam = staffTeam;
+    }
+
     public Long getSaiLevel() {
         return saiLevel;
     }