lyhzzz před 1 rokem
rodič
revize
9cf0cecac8

+ 20 - 0
src/main/java/com/fdkankan/fusion/entity/SceneDownLog.java

@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import java.io.Serializable;
 import java.util.Date;
+
+import jdk.nashorn.internal.ir.annotations.Ignore;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -74,6 +76,12 @@ public class SceneDownLog implements Serializable {
     private Integer deptLevel;
 
     /**
+     * 组织类型
+     */
+    @TableField(exist = false)
+    private String deptLevelStr;
+
+    /**
      * 组织id
      */
     @TableField("dept_id")
@@ -105,5 +113,17 @@ public class SceneDownLog implements Serializable {
     private Date updateTime;
 
 
+    public String getDeptLevelStr() {
+        if(deptLevel != null){
+            switch (deptLevel){
+                case 0 : return "平台";
+                case 1 : return "总队";
+                case 2 : return "支队";
+                case 3 : return "大队";
+                default: return "";
+            }
+        }
+        return deptLevelStr;
+    }
 
 }

+ 1 - 1
src/main/java/com/fdkankan/fusion/service/impl/DownService.java

@@ -140,7 +140,7 @@ public class DownService implements IDownService {
         sceneDownloadLogEntity.setNickName(nickName);
         sceneDownloadLogEntity.setSnCode(camera.getSnCode());
         sceneDownloadLogEntity.setDeptName(tmDepartment.getName());
-        sceneDownloadLogEntity.setDeptLevel(tmDepartment.getLevel());
+        sceneDownloadLogEntity.setDeptLevel(tmDepartment.getDeptType());
         sceneDownloadLogEntity.setDeptId(deptId);
         sceneDownloadLogEntity.setStatus(0);
         sceneDownloadLogEntity.setVersion(sceneVersion);