ソースを参照

用户信息更新

温红权 9 年 前
コミット
8ee37e60e8

+ 6 - 0
VisualInspection_server/pom.xml

@@ -59,6 +59,12 @@
         </dependency>
 
 
+        <dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-devtools</artifactId>
+		</dependency>
+
+
         <!--<dependency>-->
             <!--<groupId>org.springframework.session</groupId>-->
             <!--<artifactId>spring-session-data-redis</artifactId>-->

+ 0 - 16
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Department.java

@@ -1,16 +0,0 @@
-package com.xintong.visualinspection.bean;
-
-import lombok.Data;
-
-/**
- * 文件名:Department
- * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
- */
-@Data
-public class Department {
-    //编号
-    private Integer id;
-    //名称
-    private String name;
-
-}

+ 28 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Organ.java

@@ -0,0 +1,28 @@
+package com.xintong.visualinspection.bean;
+
+import lombok.Data;
+
+/**
+ * 文件名:Organ
+ * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+public class Organ {
+    //编号
+    private Integer id;
+    //组织机构名称
+    private String organname;
+    //备注
+    private String remark;
+    //父节点ID
+    private int parentid;
+    //班次类型  (1 两班 2 三班)'
+    private String classtype;
+    //机构编码
+    private String organcode;
+    //是否显示,0:不显示,1:显示
+    private String isshow;
+    //单位类型 10 公司 20 养护 30 交警 40 路政 50 外协
+    private String deptype;
+
+}

+ 102 - 75
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/User.java

@@ -12,82 +12,109 @@ import org.springframework.security.core.userdetails.UserDetails;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 
 /**
- * 文件名:User
- * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ * 文件名:User 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  */
 @Data
-public class User implements UserDetails  {
-    private Integer id;
-    private String username;
-    private String truename;
-    private Integer age;
-    //工号
-    private String workno;
-    //身份证
-    private String idno;
-    //手机号
-    private String mobile;
-    //性别
-    private String sex;
-    //生日
-    private Date birth;
-    //部门id
-    private Integer deptId;
-    //职位id
-    private Integer positionId;
-    @JsonIgnore
-    private String password;
-    @JsonIgnore
-    private List<Role> roles;
-    private List<? extends GrantedAuthority> authorities;
-
-
-    public User(){
-
-    }
-
-    public User(String username, String password, List<GrantedAuthority> grantedAuthorities) {
-        this.username = username;
-        this.password = password;
-        this.authorities = grantedAuthorities;
-    }
-
-
-
-    @JsonIgnore
-    @Override
-    public boolean isAccountNonExpired() {
-        return true;
-    }
-
-    @JsonIgnore
-    @Override
-    public boolean isAccountNonLocked() {
-        return true;
-    }
-
-    @JsonIgnore
-    @Override
-    public boolean isCredentialsNonExpired() {
-        return true;
-    }
-
-
-    @JsonIgnore
-    @Override
-    public boolean isEnabled() {
-        return true;
-    }
-
-    @JsonIgnore
-    @Override
-    public Collection<? extends GrantedAuthority> getAuthorities() {
-        return authorities;
-    }
-
-    public void setGrantedAuthorities(List<? extends GrantedAuthority> authorities) {
-        this.authorities = authorities;
-    }
-
+public class User implements UserDetails {
+	private Integer id;
+	// 登录名
+	private String username;
+	// 姓名
+	private String truename;
+	// 密码
+	@JsonIgnore
+	private String password;
+	// 组织机构ID
+	private int organid;
+	// 班次
+	private int classid;
+	// 电话号码
+	private String phone;
+	// 状态(-1-删除;1未删除)
+	private int status;
+	// 手机号
+	private String mobile;
+	// 短号
+	private String cornet;
+	// 手机号是否为外地 0:不是 1:是
+	private String mobileaddress;
+	// 座机号是否为外地 0:不是 1:是
+	private String phoneadderss;
+	// 工号
+	private String worknumber;
+	// 工号+密码组合后的值
+	private String workidpassword;
+	// 是否内部人员(1-是 2-否)
+	private String isinner;
+	// 是否是经理
+	private String ismanage;
+	// 宅电
+	private String homephone;
+	// 宅电是否为外地 0:不是 1:是
+	private String homephoneadderss;
+	// 手机号2
+	private String mobile2;
+	// 手机号2是否为外地 0:不是 1:是
+	private String ismobileaddress;
+	// 生日
+	private Date birth;
+	// 年龄
+	private int age;
+	// 职位ID
+	private int positionid;
+	// 性别
+	private String sex;
+	// 工号
+	private int workno;
+	// 身份证号
+	private String idno;
+
+	@JsonIgnore
+	private List<Role> roles;
+	private List<? extends GrantedAuthority> authorities;
+
+	public User() {
+
+	}
+
+	public User(String username, String password, List<GrantedAuthority> grantedAuthorities) {
+		this.username = username;
+		this.password = password;
+		this.authorities = grantedAuthorities;
+	}
+
+	@JsonIgnore
+	@Override
+	public boolean isAccountNonExpired() {
+		return true;
+	}
+
+	@JsonIgnore
+	@Override
+	public boolean isAccountNonLocked() {
+		return true;
+	}
+
+	@JsonIgnore
+	@Override
+	public boolean isCredentialsNonExpired() {
+		return true;
+	}
+
+	@JsonIgnore
+	@Override
+	public boolean isEnabled() {
+		return true;
+	}
+
+	@JsonIgnore
+	@Override
+	public Collection<? extends GrantedAuthority> getAuthorities() {
+		return authorities;
+	}
+
+	public void setGrantedAuthorities(List<? extends GrantedAuthority> authorities) {
+		this.authorities = authorities;
+	}
 
 }

+ 3 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/UserServiceImpl.java

@@ -58,11 +58,12 @@ public class UserServiceImpl extends BaseService implements UserService {
         user.setUsername("aa"+count++);
         redisTemplate.opsForValue().set(user.getUsername(), user);
 
+        
         User u = (User) redisTemplate.opsForValue().get("aa"+(count-2));
 
+        System.out.println(u.toString()+"dsa");
 
-
-        return u==null?getUserById(id):u;
+        return getUserById(id);
     }
 
     @Override

+ 4 - 0
VisualInspection_server/src/main/resources/application.properties

@@ -80,6 +80,10 @@ log4j.logger.org.thymeleaf.TemplateEngine.cache.EXPRESSION_CACHE=DEBUG
 
 
 
+spring.devtools.restart.enabled=true
+
+
+
 management.shell.auth.simple.user.name=wen
 management.shell.auth.simple.user.password=wen
 management.shell.auth.type=simple

+ 8 - 0
VisualInspection_server/temp

@@ -0,0 +1,8 @@
+ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `ORGANNAME` varchar(150) DEFAULT NULL COMMENT '组织机构名称',
+  `REMARK` varchar(80) DEFAULT NULL COMMENT '备注',
+  `PARENTID` int(11) DEFAULT NULL COMMENT '父节点ID',
+  `CLASSTYPE` varchar(80) DEFAULT NULL COMMENT '班次类型  (1 两班 2 三班)',
+  `ORGANCODE` varchar(80) DEFAULT NULL COMMENT '机构编码',
+  `ISSHOW` varchar(10) DEFAULT NULL COMMENT '是否显示,0:不显示,1:显示',
+  `DEPTYPE` varchar(2) DEFAULT NULL COMMENT '单位类型 10 公司 20 养护 30 交警 40 路政 50 外协',