Browse Source

计算服务修改

shilin 1 năm trước cách đây
mục cha
commit
5ac7b73348

+ 2 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/mapper/auto/SysUserMapper.java

@@ -17,6 +17,7 @@ import java.util.List;
  */
 public interface SysUserMapper extends BaseMapper<SysUser> {
 
-    @Select("SELECT d.nem_code FROM system_dept as d,system_users as u where u.dept_id=d.id and u.id=#{userId} ")
+//    @Select("SELECT d.nem_code FROM system_dept as d,system_users as u where u.dept_id=d.id and u.id=#{userId} ")
+@Select("SELECT d.leader FROM sys_dept as d,sys_user as u where u.dept_id=d.dept_id and u.user_id=#{userId} ")
     public List<String> getUserByuserId(@Param(value = "userId") Long userId);
 }

+ 79 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/vo/StatusDetailValue.java

@@ -0,0 +1,79 @@
+package com.gyee.runeconomy.model.vo;
+
+public enum StatusDetailValue {
+    //0	待机
+    //1	手动停机
+    //2	正常发电
+    //3	发电降出力
+    //4	故障
+    //5	故障受累
+    //6	检修
+    //7	检修受累
+    //8	限电降出力
+    //9	限电停机
+    //10	电网受累
+    //11	环境受累
+    //12	通讯中断
+    //13	设备离线
+
+
+    DJ(0.0, "待机"),
+    SDTJ(1.0, "手动停机"),
+    ZCFD(2.0, "正常发电"),
+    FDJCL(3.0, "发电降出力"),
+    GZ(4.0, "故障"),
+    GZSL(5.0, "故障受累"),
+    JX(6.0, "检修"),
+    JXSL(7.0, "检修受累"),
+    XDJCL(8.0, "限电降出力"),
+    XDTJ(9.0, "限电停机"),
+    DWSL(10.0, "电网受累"),
+    HJSL(11.0, "环境受累"),
+    TXZD(12.0, "通讯中断"),
+    SBLX(13.0, "设备离线");
+
+    private Double code;
+    private String name;
+
+    StatusDetailValue(Double code) {
+        this.code = code;
+    }
+
+    StatusDetailValue(Double code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+
+    public Double getCode() {
+        return code;
+    }
+
+    public void setCode(Double code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 根据code获取message
+     *
+     * @param code
+     * @return
+     */
+    public static String getNmaeByCode(Double code) {
+        for (StatusDetailValue ele : values()) {
+            if (ele.getCode().equals(code)) {
+                return ele.getName();
+            }
+        }
+        return null;
+    }
+
+
+}