dingxin 6 anni fa
parent
commit
9d77b4d3dd
28 ha cambiato i file con 718 aggiunte e 395 eliminazioni
  1. 11
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUser.java
  2. 6
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  3. 14
    3
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml
  4. 9
    2
      CODE/smart-community/app-api/src/test/java/com/community/huiju/DemoApplicationTests.java
  5. 108
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/uuid/IdGen.java
  6. 13
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/TaUser.java
  7. 14
    3
      CODE/smart-community/operate-api/src/main/resources/mapper/TaUserMapper.xml
  8. 3
    2
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java
  9. 7
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  10. 5
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaUser.java
  11. 0
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/User.java
  12. 2
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfoService.java
  13. 25
    8
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java
  14. 24
    3
      CODE/smart-community/property-api/src/main/resources/mapper/TaUserMapper.xml
  15. 41
    0
      CODE/smart-community/zuul/src/main/java/com/community/huiju/model/TaUser.java
  16. 53
    6
      CODE/smart-community/zuul/src/main/resources/mapper/TaUserMapper.xml
  17. 1
    1
      VUECODE/smart-operate-manage/config/dev.env.js
  18. 1
    1
      VUECODE/smart-operate-manage/config/prod.env.js
  19. 1
    1
      VUECODE/smart-operate-manage/src/views/banner/addBanner/index.vue
  20. 1
    1
      VUECODE/smart-operate-manage/src/views/banner/ediBanner/index.vue
  21. 1
    1
      VUECODE/smart-property-manage/config/dev.env.js
  22. 1
    1
      VUECODE/smart-property-manage/config/prod.env.js
  23. 1
    0
      VUECODE/smart-property-manage/src/utils/ajax.js
  24. 1
    1
      VUECODE/smart-property-manage/src/views/banner/addBanner/index.vue
  25. 1
    1
      VUECODE/smart-property-manage/src/views/banner/ediBanner/index.vue
  26. 7
    2
      VUECODE/smart-property-manage/src/views/building/edi/index.vue
  27. 4
    3
      VUECODE/smart-property-manage/src/views/building/index.vue
  28. 363
    351
      文档/MYSQL/smartCommunity.pdm

+ 11
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUser.java Vedi File

@@ -54,6 +54,9 @@ public class TaUser {
54 54
     // 角色名称
55 55
     private String roleName;
56 56
 
57
+    // 海康人员编号
58
+    private Long hkPersonNo;
59
+
57 60
     public Integer getId() {
58 61
         return id;
59 62
     }
@@ -237,4 +240,12 @@ public class TaUser {
237 240
     public void setRoleName(String roleName) {
238 241
         this.roleName = roleName;
239 242
     }
243
+
244
+    public Long getHkPersonNo() {
245
+        return hkPersonNo;
246
+    }
247
+
248
+    public void setHkPersonNo(Long hkPersonNo) {
249
+        this.hkPersonNo = hkPersonNo;
250
+    }
240 251
 }

+ 6
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Vedi File

@@ -6,6 +6,7 @@ import com.community.commom.constant.Constant;
6 6
 import com.community.commom.mode.ResponseBean;
7 7
 import com.community.commom.utils.AccountValidatorUtil;
8 8
 import com.community.commom.utils.MD5Utils;
9
+import com.community.commom.uuid.IdGen;
9 10
 import com.community.huiju.common.code.cache.AppkeyCache;
10 11
 import com.community.huiju.common.hk.HKConstant;
11 12
 import com.community.huiju.common.hk.HKOpenApi;
@@ -41,6 +42,8 @@ import java.util.logging.SimpleFormatter;
41 42
 @Slf4j
42 43
 public class TaUserServiceImpl implements ITaUserService {
43 44
 
45
+    private IdGen idGen = IdGen.get();
46
+
44 47
     @Autowired
45 48
     private TaUserMapper taUserMapper;
46 49
 
@@ -187,6 +190,7 @@ public class TaUserServiceImpl implements ITaUserService {
187 190
 
188 191
         ResponseBean<TaUserVO> response = new ResponseBean();
189 192
         // 开始注册
193
+        user.setHkPersonNo(idGen.nextId());
190 194
         user.setCreateDate(new Date());
191 195
         user.setUpdateDate(new Date());
192 196
         user.setStatus("1");
@@ -572,7 +576,7 @@ public class TaUserServiceImpl implements ITaUserService {
572 576
 
573 577
         // 添加人员
574 578
         Map<String,Object> parUser = Maps.newHashMap();
575
-        parUser.put("personNo",user.getId());
579
+        parUser.put("personNo",user.getHkPersonNo());
576 580
         parUser.put("personName",user.getUserName());
577 581
         parUser.put("phoneNo",user.getLoginName());
578 582
         parUser.put("deptUuid",deptUuid);
@@ -626,7 +630,7 @@ public class TaUserServiceImpl implements ITaUserService {
626 630
 
627 631
         // 人员参数
628 632
         Map<String,Object> parUser = Maps.newHashMap();
629
-        parUser.put("personNo",user.getId());
633
+        parUser.put("personNo",user.getHkPersonNo());
630 634
         parUser.put("personId",user.getHkUserId());
631 635
         parUser.put("personName",user.getUserName());
632 636
         parUser.put("phoneNo",user.getLoginName());

+ 14
- 3
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Vedi File

@@ -20,6 +20,7 @@
20 20
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
21 21
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
22 22
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
23
+    <result column="hk_person_no" property="hkPersonNo" jdbcType="BIGINT" />
23 24
     <result column="hk_user_id" property="hkUserId" jdbcType="INTEGER" />
24 25
     <result column="hk_card_no" property="hkCardNo" jdbcType="VARCHAR" />
25 26
     <result column="face_status" property="faceStatus" jdbcType="CHAR" />
@@ -27,7 +28,7 @@
27 28
   <sql id="Base_Column_List" >
28 29
     id, community_id, building_owner_info_id, head_portrait, user_name, login_name, login_password,
29 30
     email, gender, status, remark, parent_id, accept_agreement_status, verify_status,
30
-    create_user, create_date, update_user, update_date, hk_user_id, hk_card_no, face_status
31
+    create_user, create_date, update_user, update_date, hk_person_no, hk_user_id, hk_card_no, face_status
31 32
   </sql>
32 33
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
33 34
     select
@@ -45,7 +46,7 @@
45 46
       login_password, email, gender,
46 47
       status, remark, parent_id,
47 48
       accept_agreement_status, verify_status, create_user,
48
-      create_date, update_user, update_date,
49
+      create_date, update_user, update_date, hk_person_no,
49 50
       hk_user_id, hk_card_no, face_status
50 51
       )
51 52
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{buildingOwnerInfoId,jdbcType=INTEGER},
@@ -54,7 +55,7 @@
54 55
       #{status,jdbcType=CHAR}, #{remark,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
55 56
       #{acceptAgreementStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER},
56 57
       #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP},
57
-      #{hkUserId,jdbcType=INTEGER}, #{hkCardNo,jdbcType=VARCHAR}, #{faceStatus,jdbcType=CHAR}
58
+      #{hkPersonNo,jdbcType=BIGINT}, #{hkUserId,jdbcType=INTEGER}, #{hkCardNo,jdbcType=VARCHAR}, #{faceStatus,jdbcType=CHAR}
58 59
       )
59 60
   </insert>
60 61
   <insert id="insertSelective" parameterType="com.community.huiju.model.TaUser" useGeneratedKeys="true" keyProperty="id" >
@@ -114,6 +115,9 @@
114 115
       <if test="updateDate != null" >
115 116
         update_date,
116 117
       </if>
118
+      <if test="hkPersonNo != null" >
119
+        hk_person_no,
120
+      </if>
117 121
       <if test="hkUserId != null" >
118 122
         hk_user_id,
119 123
       </if>
@@ -179,6 +183,9 @@
179 183
       <if test="updateDate != null" >
180 184
         #{updateDate,jdbcType=TIMESTAMP},
181 185
       </if>
186
+      <if test="hkPersonNo != null" >
187
+        #{hkPersonNo,jdbcType=BIGINT},
188
+      </if>
182 189
       <if test="hkUserId != null" >
183 190
         #{hkUserId,jdbcType=INTEGER},
184 191
       </if>
@@ -244,6 +251,9 @@
244 251
       <if test="updateDate != null" >
245 252
         update_date = #{updateDate,jdbcType=TIMESTAMP},
246 253
       </if>
254
+      <if test="hkPersonNo != null" >
255
+        hk_person_no = #{hkPersonNo,jdbcType=BIGINT},
256
+      </if>
247 257
       <if test="hkUserId != null" >
248 258
         hk_user_id = #{hkUserId,jdbcType=INTEGER},
249 259
       </if>
@@ -275,6 +285,7 @@
275 285
       create_date = #{createDate,jdbcType=TIMESTAMP},
276 286
       update_user = #{updateUser,jdbcType=INTEGER},
277 287
       update_date = #{updateDate,jdbcType=TIMESTAMP},
288
+      hk_person_no = #{hkPersonNo,jdbcType=BIGINT},
278 289
       hk_user_id = #{hkUserId,jdbcType=INTEGER},
279 290
       hk_card_no = #{hkCardNo,jdbcType=VARCHAR},
280 291
       face_status = #{faceStatus,jdbcType=CHAR}

+ 9
- 2
CODE/smart-community/app-api/src/test/java/com/community/huiju/DemoApplicationTests.java Vedi File

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju;
2 2
 
3
+import com.community.commom.uuid.IdGen;
3 4
 import com.community.huiju.dao.TaUserMapper;
4 5
 import com.community.huiju.dao.ToCommunitiesMapper;
5 6
 import com.community.huiju.dao.TpTicketMapper;
@@ -31,14 +32,20 @@ public class DemoApplicationTests {
31 32
 	@Test
32 33
 	public void contextLoads() {
33 34
 
34
-		List<ToCommunities> list = toCommunitiesMapper.selectByCommunityName("小区");
35
-		System.out.println(list);
35
+//		List<ToCommunities> list = toCommunitiesMapper.selectByCommunityName("小区");
36
+//		System.out.println(list);
36 37
 
37 38
 //		TpTicket tpTicket = tpTicketMapper.selectByPrimaryKey(1);
38 39
 //		System.out.println(tpTicket);
39 40
 
40 41
 //		TaUser user = mapper.selectByPrimaryKey(1);
41 42
 //		System.out.println(user);
43
+
44
+//		IdGen idGen = IdGen.get();
45
+//		long lo = 454545454;
46
+//		int in =  454545454;
47
+//		System.out.println(Long.valueOf(idGen.nextId()).intValue());
48
+
42 49
 	}
43 50
 
44 51
 }

+ 108
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/uuid/IdGen.java Vedi File

@@ -0,0 +1,108 @@
1
+package com.community.commom.uuid;
2
+
3
+/**
4
+ * ID 生成策略
5
+ * @author  weiximei
6
+ */
7
+public class IdGen {
8
+
9
+    private long workerId;
10
+    private long datacenterId;
11
+    private long sequence = 0L;
12
+    private long twepoch = 1288834974657L;
13
+    //Thu, 04 Nov 2010 01:42:54 GMT
14
+    private long workerIdBits = 5L;
15
+    //节点ID长度
16
+    private long datacenterIdBits = 5L;
17
+    //数据中心ID长度
18
+    private long maxWorkerId = -1L ^ (-1L << workerIdBits);
19
+    //最大支持机器节点数0~31,一共32个
20
+    private long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
21
+    //最大支持数据中心节点数0~31,一共32个
22
+    private long sequenceBits = 12L;
23
+    //序列号12位
24
+    private long workerIdShift = sequenceBits;
25
+    //机器节点左移12位
26
+    private long datacenterIdShift = sequenceBits + workerIdBits;
27
+    //数据中心节点左移17位
28
+    private long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
29
+    //时间毫秒数左移22位
30
+    private long sequenceMask = -1L ^ (-1L << sequenceBits);
31
+    //最大为4095
32
+    private long lastTimestamp = -1L;
33
+
34
+    private static class IdGenHolder {
35
+        private static final IdGen instance = new IdGen();
36
+    }
37
+
38
+    public static IdGen get(){
39
+        return IdGenHolder.instance;
40
+    }
41
+
42
+    public IdGen() {
43
+        this(0L, 0L);
44
+    }
45
+
46
+    public IdGen(long workerId, long datacenterId) {
47
+        if (workerId > maxWorkerId || workerId < 0) {
48
+            throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
49
+        }
50
+        if (datacenterId > maxDatacenterId || datacenterId < 0) {
51
+            throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
52
+        }
53
+        this.workerId = workerId;
54
+        this.datacenterId = datacenterId;
55
+    }
56
+
57
+    public synchronized long nextId() {
58
+        long timestamp = timeGen();
59
+        //获取当前毫秒数
60
+        //如果服务器时间有问题(时钟后退) 报错。
61
+        if (timestamp < lastTimestamp) {
62
+            throw new RuntimeException(String.format(
63
+                    "Clock moved backwards.  Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
64
+        }
65
+        //如果上次生成时间和当前时间相同,在同一毫秒内
66
+        if (lastTimestamp == timestamp) {
67
+            //sequence自增,因为sequence只有12bit,所以和sequenceMask相与一下,去掉高位
68
+            sequence = (sequence + 1) & sequenceMask;
69
+            //判断是否溢出,也就是每毫秒内超过4095,当为4096时,与sequenceMask相与,sequence就等于0
70
+            if (sequence == 0) {
71
+                timestamp = tilNextMillis(lastTimestamp);
72
+                //自旋等待到下一毫秒
73
+            }
74
+        } else {
75
+            sequence = 0L;
76
+            //如果和上次生成时间不同,重置sequence,就是下一毫秒开始,sequence计数重新从0开始累加
77
+        }
78
+        lastTimestamp = timestamp;
79
+        // 最后按照规则拼出ID。
80
+        // 000000000000000000000000000000000000000000  00000            00000       000000000000
81
+        // time                                      datacenterId      workerId     sequence
82
+        // return ((timestamp - twepoch) << timestampLeftShift) | (datacenterId << datacenterIdShift)
83
+        //        | (workerId << workerIdShift) | sequence;
84
+
85
+        long longStr= ((timestamp - twepoch) << timestampLeftShift) | (datacenterId << datacenterIdShift) | (workerId << workerIdShift) | sequence;
86
+        // System.out.println(longStr);
87
+        return longStr;
88
+    }
89
+
90
+    protected long tilNextMillis(long lastTimestamp) {
91
+        long timestamp = timeGen();
92
+        while (timestamp <= lastTimestamp) {
93
+            timestamp = timeGen();
94
+        }
95
+        return timestamp;
96
+    }
97
+
98
+    protected long timeGen() {
99
+        return System.currentTimeMillis();
100
+    }
101
+
102
+
103
+    public static void main(String[] args) {
104
+        IdGen idGen = IdGen.get();
105
+        System.out.println(idGen.nextId());
106
+    }
107
+
108
+}

+ 13
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/TaUser.java Vedi File

@@ -39,6 +39,11 @@ public class TaUser {
39 39
 
40 40
     private Date updateDate;
41 41
 
42
+    /**
43
+     * 海康人员编号
44
+     */
45
+    private Long hkPersonNo;
46
+
42 47
     // 海康UserId
43 48
     private Integer hkUserId;
44 49
 
@@ -237,4 +242,12 @@ public class TaUser {
237 242
     public void setRoleName(String roleName) {
238 243
         this.roleName = roleName;
239 244
     }
245
+
246
+    public Long getHkPersonNo() {
247
+        return hkPersonNo;
248
+    }
249
+
250
+    public void setHkPersonNo(Long hkPersonNo) {
251
+        this.hkPersonNo = hkPersonNo;
252
+    }
240 253
 }

+ 14
- 3
CODE/smart-community/operate-api/src/main/resources/mapper/TaUserMapper.xml Vedi File

@@ -20,6 +20,7 @@
20 20
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
21 21
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
22 22
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
23
+    <result column="hk_person_no" property="hkPersonNo" jdbcType="BIGINT" />
23 24
     <result column="hk_user_id" property="hkUserId" jdbcType="INTEGER" />
24 25
     <result column="hk_card_no" property="hkCardNo" jdbcType="VARCHAR" />
25 26
     <result column="face_status" property="faceStatus" jdbcType="CHAR" />
@@ -27,7 +28,7 @@
27 28
   <sql id="Base_Column_List" >
28 29
     id, community_id, building_owner_info_id, head_portrait, user_name, login_name, login_password,
29 30
     email, gender, status, remark, parent_id, accept_agreement_status, verify_status,
30
-    create_user, create_date, update_user, update_date, hk_user_id, hk_card_no, face_status
31
+    create_user, create_date, update_user, update_date, hk_person_no , hk_user_id, hk_card_no, face_status
31 32
   </sql>
32 33
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
33 34
     select
@@ -45,7 +46,7 @@
45 46
       login_password, email, gender,
46 47
       status, remark, parent_id,
47 48
       accept_agreement_status, verify_status, create_user,
48
-      create_date, update_user, update_date,
49
+      create_date, update_user, update_date, hk_person_no,
49 50
       hk_user_id, hk_card_no, face_status
50 51
       )
51 52
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{buildingOwnerInfoId,jdbcType=INTEGER},
@@ -54,7 +55,7 @@
54 55
       #{status,jdbcType=CHAR}, #{remark,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
55 56
       #{acceptAgreementStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER},
56 57
       #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP},
57
-      #{hkUserId,jdbcType=INTEGER}, #{hkCardNo,jdbcType=VARCHAR}, #{faceStatus,jdbcType=CHAR}
58
+      #{hkPersonNo,jdbcType=BIGINT}, #{hkUserId,jdbcType=INTEGER}, #{hkCardNo,jdbcType=VARCHAR}, #{faceStatus,jdbcType=CHAR}
58 59
       )
59 60
   </insert>
60 61
   <insert id="insertSelective" parameterType="com.community.huiju.model.TaUser" useGeneratedKeys="true" keyProperty="id" >
@@ -114,6 +115,9 @@
114 115
       <if test="updateDate != null" >
115 116
         update_date,
116 117
       </if>
118
+      <if test="hkPersonNo != null" >
119
+        hk_person_no,
120
+      </if>
117 121
       <if test="hkUserId != null" >
118 122
         hk_user_id,
119 123
       </if>
@@ -179,6 +183,9 @@
179 183
       <if test="updateDate != null" >
180 184
         #{updateDate,jdbcType=TIMESTAMP},
181 185
       </if>
186
+      <if test="hkPersonNo != null" >
187
+        #{hkPersonNo,jdbcType=BIGINT},
188
+      </if>
182 189
       <if test="hkUserId != null" >
183 190
         #{hkUserId,jdbcType=INTEGER},
184 191
       </if>
@@ -244,6 +251,9 @@
244 251
       <if test="updateDate != null" >
245 252
         update_date = #{updateDate,jdbcType=TIMESTAMP},
246 253
       </if>
254
+      <if test="hkPersonNo != null" >
255
+        hk_person_no = #{hkPersonNo,jdbcType=BIGINT},
256
+      </if>
247 257
       <if test="hkUserId != null" >
248 258
         hk_user_id = #{hkUserId,jdbcType=INTEGER},
249 259
       </if>
@@ -275,6 +285,7 @@
275 285
       create_date = #{createDate,jdbcType=TIMESTAMP},
276 286
       update_user = #{updateUser,jdbcType=INTEGER},
277 287
       update_date = #{updateDate,jdbcType=TIMESTAMP},
288
+      hk_person_no = #{hkPersonNo,jdbcType=BIGINT},
278 289
       hk_user_id = #{hkUserId,jdbcType=INTEGER},
279 290
       hk_card_no = #{hkCardNo,jdbcType=VARCHAR},
280 291
       face_status = #{faceStatus,jdbcType=CHAR}

+ 3
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java Vedi File

@@ -44,9 +44,10 @@ public class BuildingOwnerInfoController extends BaseController {
44 44
                     "pageNum第几页;pageSize 一页多少行;")
45 45
     })
46 46
     @RequestMapping(value = "/building/list", method = RequestMethod.POST)
47
-    public ResponseBean getList(@RequestBody String parameter){
47
+    public ResponseBean getList(@RequestBody String parameter, HttpSession session){
48 48
         ResponseBean responseBean = new ResponseBean();
49
-        responseBean = iBuildingOwnerInfoService.listQuery(parameter);
49
+        UserElement userElement = getUserElement(session);
50
+        responseBean = iBuildingOwnerInfoService.listQuery(parameter, userElement);
50 51
         return responseBean;
51 52
     }
52 53
 

+ 7
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserMapper.java Vedi File

@@ -44,6 +44,13 @@ public interface TaUserMapper extends BaseMapper<TaUser> {
44 44
     TaUser selectByTel(@Param("loginName") String ownerTel,@Param("communityId") Integer communityId);
45 45
     
46 46
     int batchUpdate(List<TaUser> updataTaUserList);
47
+    
48
+    /**
49
+     * 更新角色为业主
50
+     * @param updataTaUserList
51
+     * @return
52
+     */
53
+    int batchUpdateRole(List<TaUser> updataTaUserList);
47 54
 
48 55
     /**
49 56
      * 根据手机得到用户ID

+ 5
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaUser.java Vedi File

@@ -110,6 +110,11 @@ public class TaUser implements Serializable {
110 110
      */
111 111
     private LocalDateTime updateDate;
112 112
 
113
+    /**
114
+     * 海康人员编号
115
+     */
116
+    private Long hkPersonNo;
117
+
113 118
     /**
114 119
      * 海康人员ID
115 120
      */

+ 0
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/User.java Vedi File

@@ -30,7 +30,6 @@ public class User implements Serializable {
30 30
     /**
31 31
      * 小区id, 这字段作废不使用
32 32
      */
33
-    @Deprecated
34 33
     private Integer communityId;
35 34
 
36 35
     /**

+ 2
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfoService.java Vedi File

@@ -26,9 +26,10 @@ public interface IBuildingOwnerInfoService extends IService<TpBuildingOwnerInfo>
26 26
     /**
27 27
      * 根据条件查询
28 28
      * @param parameter
29
+     * @param userElement 用户登陆后的信息
29 30
      * @return
30 31
      */
31
-    ResponseBean listQuery(String parameter);
32
+    ResponseBean listQuery(String parameter, UserElement userElement);
32 33
 
33 34
     /**
34 35
      * 修改 楼栋业主信息

+ 25
- 8
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Vedi File

@@ -80,7 +80,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
80 80
     public static final Logger logger = LoggerFactory.getLogger(BuildingOwnerInfoServiceImpl.class);
81 81
     
82 82
     @Override
83
-    public ResponseBean listQuery(String parameter) {
83
+    public ResponseBean listQuery(String parameter, UserElement userElement) {
84 84
 
85 85
         ResponseBean responseBean = new ResponseBean();
86 86
 
@@ -93,6 +93,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
93 93
         Page<TpBuildingOwnerInfo> page = new Page(pageNum,pageSize);
94 94
 
95 95
         Map<String, Object> map = Maps.newHashMap();
96
+        // 小区Id
97
+        map.put("community_id", userElement.getCommunityId());
96 98
         // 栋
97 99
         map.put("building", tpBuildingOwnerInfo.getBuilding());
98 100
         // 单元
@@ -144,6 +146,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
144 146
         }
145 147
 
146 148
         // 物业端的用户,也就是正在操作的物业人员
149
+        // 物业端用户小区Id不使用! 小区 Id 获取请使用 userElement
147 150
         User user = userMapper.selectById(userElement.getId());
148 151
 
149 152
         /**
@@ -184,8 +187,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
184 187
             return responseBean;
185 188
         }
186 189
 
187
-        // 开始修改手机号操作!
188
-
190
+        // 开始更新楼栋资料
189 191
         BeanTools.copyProperties(tpBuildingOwnerInfo, oldTpBuildingOwnerInfo);
190 192
 
191 193
         oldTpBuildingOwnerInfo.setUpdateDate(LocalDateTime.now());
@@ -197,15 +199,29 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
197 199
             throw new WisdomException("操作失败!");
198 200
         }
199 201
 
200
-        // 修改 APP 端业主用户的手机号信息!
202
+        /**
203
+         * APP 端这里, 如果楼栋资料库是已认证和已关联的! 那么就不允许修改手机号
204
+         */
205
+
201 206
         // 开始匹配 APP 端用户表
202 207
         // 查询 APP 端业主
203
-        TaUser appOwnerUser = getByIdAndCommunityId(tpBuildingOwnerInfo.getOwnerTel(), tpBuildingOwnerInfo.getCommunityId());
204
-        if (null != appOwnerUser) {
205
-            // 修改手机号
206
-            appOwnerUser.setLoginName(tpBuildingOwnerInfo.getOwnerTel());
208
+        TaUser appOwnerUser = getByIdAndCommunityId(tpBuildingOwnerInfo.getOwnerTel(), oldTpBuildingOwnerInfo.getCommunityId());
209
+        if (null != appOwnerUser
210
+                && !"1".equals(oldTpBuildingOwnerInfo.getVerifyStatus())
211
+                && !"1".equals(oldTpBuildingOwnerInfo.getPairStatus())) {
212
+            // 修改APP端信息
213
+            appOwnerUser.setUserName(tpBuildingOwnerInfo.getOwnerName());
214
+            appOwnerUser.setVerifyStatus("1");
215
+            appOwnerUser.setBuildingOwnerInfoId(tpBuildingOwnerInfo.getId());
207 216
             row = taUserMapper.updateById(appOwnerUser);
208 217
 
218
+            // 更新 楼栋业主信息表 的认证,关联状态
219
+            // 认证状态  0 是未认证    1是认证通过   2是已作废
220
+            oldTpBuildingOwnerInfo.setVerifyStatus("1");
221
+            // 关联状态   0 未关联  1 是已关联
222
+            oldTpBuildingOwnerInfo.setPairStatus("1");
223
+            row = tpBuildingOwnerInfoMapper.updateById(oldTpBuildingOwnerInfo);
224
+
209 225
             // 更新APP端用户的角色身份为 业主
210 226
             updateAppRole(tpBuildingOwnerInfo.getCommunityId(), appOwnerUser.getId(), Constant.OWNER_ID);
211 227
         }
@@ -412,6 +428,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
412 428
         }
413 429
         if (updataTaUserList.size() > 0){
414 430
             taUserMapper.batchUpdate(updataTaUserList);
431
+            taUserMapper.batchUpdateRole(updataTaUserList);
415 432
         }
416 433
         responseBean.addSuccess("success");
417 434
         return responseBean;

+ 24
- 3
CODE/smart-community/property-api/src/main/resources/mapper/TaUserMapper.xml Vedi File

@@ -20,6 +20,7 @@
20 20
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
21 21
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
22 22
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
23
+    <result column="hk_person_no" property="hkPersonNo" jdbcType="BIGINT" />
23 24
     <result column="hk_user_id" property="hkUserId" jdbcType="INTEGER" />
24 25
     <result column="hk_card_no" property="hkCardNo" jdbcType="VARCHAR" />
25 26
     <result column="face_status" property="faceStatus" jdbcType="CHAR" />
@@ -27,7 +28,7 @@
27 28
   <sql id="Base_Column_List" >
28 29
     id, community_id, building_owner_info_id, head_portrait, user_name, login_name, login_password,
29 30
     email, gender, status, remark, parent_id, accept_agreement_status, verify_status,
30
-    create_user, create_date, update_user, update_date, hk_user_id, hk_card_no, face_status
31
+    create_user, create_date, update_user, update_date, hk_person_no, hk_user_id, hk_card_no, face_status
31 32
   </sql>
32 33
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
33 34
     select
@@ -45,7 +46,7 @@
45 46
       login_password, email, gender,
46 47
       status, remark, parent_id,
47 48
       accept_agreement_status, verify_status, create_user,
48
-      create_date, update_user, update_date,
49
+      create_date, update_user, update_date, hk_person_no,
49 50
       hk_user_id, hk_card_no, face_status
50 51
       )
51 52
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{buildingOwnerInfoId,jdbcType=INTEGER},
@@ -54,7 +55,7 @@
54 55
       #{status,jdbcType=CHAR}, #{remark,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
55 56
       #{acceptAgreementStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER},
56 57
       #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP},
57
-      #{hkUserId,jdbcType=INTEGER}, #{hkCardNo,jdbcType=VARCHAR}, #{faceStatus,jdbcType=CHAR}
58
+      #{hkPersonNo,jdbcType=BIGINT}, #{hkUserId,jdbcType=INTEGER}, #{hkCardNo,jdbcType=VARCHAR}, #{faceStatus,jdbcType=CHAR}
58 59
       )
59 60
   </insert>
60 61
   <insert id="insertSelective" parameterType="com.community.huiju.model.TaUser" useGeneratedKeys="true" keyProperty="id" >
@@ -114,6 +115,9 @@
114 115
       <if test="updateDate != null" >
115 116
         update_date,
116 117
       </if>
118
+      <if test="hkPersonNo != null" >
119
+        hk_person_no,
120
+      </if>
117 121
       <if test="hkUserId != null" >
118 122
         hk_user_id,
119 123
       </if>
@@ -179,6 +183,9 @@
179 183
       <if test="updateDate != null" >
180 184
         #{updateDate,jdbcType=TIMESTAMP},
181 185
       </if>
186
+      <if test="hkPersonNo != null" >
187
+        #{hkPersonNo,jdbcType=BIGINT},
188
+      </if>
182 189
       <if test="hkUserId != null" >
183 190
         #{hkUserId,jdbcType=INTEGER},
184 191
       </if>
@@ -244,6 +251,9 @@
244 251
       <if test="updateDate != null" >
245 252
         update_date = #{updateDate,jdbcType=TIMESTAMP},
246 253
       </if>
254
+      <if test="hkPersonNo != null" >
255
+        hk_person_no = #{hkPersonNo,jdbcType=BIGINT},
256
+      </if>
247 257
       <if test="hkUserId != null" >
248 258
         hk_user_id = #{hkUserId,jdbcType=INTEGER},
249 259
       </if>
@@ -275,6 +285,7 @@
275 285
       create_date = #{createDate,jdbcType=TIMESTAMP},
276 286
       update_user = #{updateUser,jdbcType=INTEGER},
277 287
       update_date = #{updateDate,jdbcType=TIMESTAMP},
288
+      hk_person_no = #{hkPersonNo,jdbcType=BIGINT},
278 289
       hk_user_id = #{hkUserId,jdbcType=INTEGER},
279 290
       hk_card_no = #{hkCardNo,jdbcType=VARCHAR},
280 291
       face_status = #{faceStatus,jdbcType=CHAR}
@@ -328,4 +339,14 @@
328 339
     where parent_id=#{id,jdbcType=INTEGER};
329 340
   </select>
330 341
 
342
+  <update id="batchUpdateRole" parameterType="java.util.ArrayList">
343
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
344
+      update ta_sys_user_role
345
+      <set>
346
+        role_id= 1
347
+      </set>
348
+      where user_id = ${item.id} and community_id = ${item.communityId}
349
+    </foreach>
350
+  </update>
351
+
331 352
 </mapper>

+ 41
- 0
CODE/smart-community/zuul/src/main/java/com/community/huiju/model/TaUser.java Vedi File

@@ -39,6 +39,14 @@ public class TaUser {
39 39
 
40 40
     private Date updateDate;
41 41
 
42
+    private Long hkPersonNo;
43
+
44
+    private Integer hkUserId;
45
+
46
+    private String hkCardNo;
47
+
48
+    private String faceStatus;
49
+
42 50
     public Integer getId() {
43 51
         return id;
44 52
     }
@@ -182,4 +190,37 @@ public class TaUser {
182 190
     public void setUpdateDate(Date updateDate) {
183 191
         this.updateDate = updateDate;
184 192
     }
193
+
194
+    public Long getHkPersonNo() {
195
+        return hkPersonNo;
196
+    }
197
+
198
+    public void setHkPersonNo(Long hkPersonNo) {
199
+        this.hkPersonNo = hkPersonNo;
200
+    }
201
+
202
+    public Integer getHkUserId() {
203
+        return hkUserId;
204
+    }
205
+
206
+    public void setHkUserId(Integer hkUserId) {
207
+        this.hkUserId = hkUserId;
208
+    }
209
+
210
+    public String getHkCardNo() {
211
+        return hkCardNo;
212
+    }
213
+
214
+    public void setHkCardNo(String hkCardNo) {
215
+        this.hkCardNo = hkCardNo == null ? null : hkCardNo.trim();
216
+    }
217
+
218
+    public String getFaceStatus() {
219
+        return faceStatus;
220
+    }
221
+
222
+    public void setFaceStatus(String faceStatus) {
223
+        this.faceStatus = faceStatus == null ? null : faceStatus.trim();
224
+    }
225
+
185 226
 }

+ 53
- 6
CODE/smart-community/zuul/src/main/resources/mapper/TaUserMapper.xml Vedi File

@@ -20,11 +20,16 @@
20 20
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
21 21
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
22 22
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
23
+    <result column="hk_person_no" property="hkPersonNo" jdbcType="BIGINT" />
24
+    <result column="hk_user_id" property="hkUserId" jdbcType="INTEGER" />
25
+    <result column="hk_card_no" property="hkCardNo" jdbcType="VARCHAR" />
26
+    <result column="face_status" property="faceStatus" jdbcType="CHAR" />
23 27
   </resultMap>
24 28
   <sql id="Base_Column_List" >
25 29
     id, community_id, building_owner_info_id, head_portrait, user_name, login_name, login_password, 
26 30
     email, gender, status, remark, parent_id, accept_agreement_status, verify_status,
27
-    create_user, create_date, update_user, update_date
31
+    create_user, create_date, update_user, update_date, hk_person_no, hk_user_id, hk_card_no,
32
+    face_status
28 33
   </sql>
29 34
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
30 35
     select
@@ -42,15 +47,17 @@
42 47
       login_password, email, gender,
43 48
       status, remark, parent_id,
44 49
       accept_agreement_status, verify_status, create_user,
45
-      create_date, update_user, update_date
46
-      )
50
+      create_date, update_user, update_date,
51
+      hk_person_no, hk_user_id, hk_card_no,
52
+      face_status)
47 53
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{buildingOwnerInfoId,jdbcType=INTEGER},
48 54
       #{headPortrait,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{loginName,jdbcType=VARCHAR},
49 55
       #{loginPassword,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{gender,jdbcType=CHAR},
50 56
       #{status,jdbcType=CHAR}, #{remark,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
51 57
       #{acceptAgreementStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER},
52
-      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
53
-      )
58
+      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP},
59
+      #{hkPersonNo,jdbcType=BIGINT}, #{hkUserId,jdbcType=INTEGER}, #{hkCardNo,jdbcType=VARCHAR},
60
+      #{faceStatus,jdbcType=CHAR})
54 61
   </insert>
55 62
   <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.community.huiju.model.TaUser" >
56 63
     insert into ta_user
@@ -109,6 +116,18 @@
109 116
       <if test="updateDate != null" >
110 117
         update_date,
111 118
       </if>
119
+      <if test="hkPersonNo != null" >
120
+        hk_person_no,
121
+      </if>
122
+      <if test="hkUserId != null" >
123
+        hk_user_id,
124
+      </if>
125
+      <if test="hkCardNo != null" >
126
+        hk_card_no,
127
+      </if>
128
+      <if test="faceStatus != null" >
129
+        face_status,
130
+      </if>
112 131
     </trim>
113 132
     <trim prefix="values (" suffix=")" suffixOverrides="," >
114 133
       <if test="id != null" >
@@ -165,6 +184,18 @@
165 184
       <if test="updateDate != null" >
166 185
         #{updateDate,jdbcType=TIMESTAMP},
167 186
       </if>
187
+      <if test="hkPersonNo != null" >
188
+        #{hkPersonNo,jdbcType=BIGINT},
189
+      </if>
190
+      <if test="hkUserId != null" >
191
+        #{hkUserId,jdbcType=INTEGER},
192
+      </if>
193
+      <if test="hkCardNo != null" >
194
+        #{hkCardNo,jdbcType=VARCHAR},
195
+      </if>
196
+      <if test="faceStatus != null" >
197
+        #{faceStatus,jdbcType=CHAR},
198
+      </if>
168 199
     </trim>
169 200
   </insert>
170 201
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaUser" >
@@ -221,6 +252,18 @@
221 252
       <if test="updateDate != null" >
222 253
         update_date = #{updateDate,jdbcType=TIMESTAMP},
223 254
       </if>
255
+      <if test="hkPersonNo != null" >
256
+        hk_person_no = #{hkPersonNo,jdbcType=BIGINT},
257
+      </if>
258
+      <if test="hkUserId != null" >
259
+        hk_user_id = #{hkUserId,jdbcType=INTEGER},
260
+      </if>
261
+      <if test="hkCardNo != null" >
262
+        hk_card_no = #{hkCardNo,jdbcType=VARCHAR},
263
+      </if>
264
+      <if test="faceStatus != null" >
265
+        face_status = #{faceStatus,jdbcType=CHAR},
266
+      </if>
224 267
     </set>
225 268
     where id = #{id,jdbcType=INTEGER}
226 269
   </update>
@@ -242,7 +285,11 @@
242 285
       create_user = #{createUser,jdbcType=INTEGER},
243 286
       create_date = #{createDate,jdbcType=TIMESTAMP},
244 287
       update_user = #{updateUser,jdbcType=INTEGER},
245
-      update_date = #{updateDate,jdbcType=TIMESTAMP}
288
+      update_date = #{updateDate,jdbcType=TIMESTAMP},
289
+      hk_person_no = #{hkPersonNo,jdbcType=BIGINT},
290
+      hk_user_id = #{hkUserId,jdbcType=INTEGER},
291
+      hk_card_no = #{hkCardNo,jdbcType=VARCHAR},
292
+      face_status = #{faceStatus,jdbcType=CHAR}
246 293
     where id = #{id,jdbcType=INTEGER}
247 294
   </update>
248 295
 

+ 1
- 1
VUECODE/smart-operate-manage/config/dev.env.js Vedi File

@@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
4 4
 
5 5
 module.exports = merge(prodEnv, {
6 6
   NODE_ENV: '"development"',
7
-  BASE_API: '"http://localhost:8085/operate-api"',
7
+  BASE_API: '"http://localhost:8086/operate-api"',
8 8
 })

+ 1
- 1
VUECODE/smart-operate-manage/config/prod.env.js Vedi File

@@ -1,5 +1,5 @@
1 1
 'use strict'
2 2
 module.exports = {
3 3
   NODE_ENV: '"production"',
4
-  BASE_API: '"http://101.132.102.231:8085/operate-api"',
4
+  BASE_API: '"http://101.132.102.231:8086/operate-api"',
5 5
 }

+ 1
- 1
VUECODE/smart-operate-manage/src/views/banner/addBanner/index.vue Vedi File

@@ -24,7 +24,7 @@
24 24
           :show-file-list="false"
25 25
           :on-success="handleAvatarSuccess"
26 26
           class="avatar-uploader"
27
-          action="http://101.132.102.231:8085/operate-api/uploadimage"
27
+          action="http://101.132.102.231:8086/operate-api/uploadimage"
28 28
           name="uploadFiles">
29 29
           <img v-if="imageUrl" :src="imageUrl" class="avatar">
30 30
           <i v-else class="el-icon-plus avatar-uploader-icon"/>

+ 1
- 1
VUECODE/smart-operate-manage/src/views/banner/ediBanner/index.vue Vedi File

@@ -24,7 +24,7 @@
24 24
           :show-file-list="false"
25 25
           :on-success="handleAvatarSuccess"
26 26
           class="avatar-uploader"
27
-          action="http://101.132.102.231:8085/operate-api/uploadimage"
27
+          action="http://101.132.102.231:8086/operate-api/uploadimage"
28 28
           name="uploadFiles">
29 29
           <img v-if="imageUrl" :src="imageUrl" class="avatar">
30 30
           <i v-else class="el-icon-plus avatar-uploader-icon"/>

+ 1
- 1
VUECODE/smart-property-manage/config/dev.env.js Vedi File

@@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
4 4
 
5 5
 module.exports = merge(prodEnv, {
6 6
   NODE_ENV: '"development"',
7
-  BASE_API: '"http://localhost:8085/property-api"',
7
+  BASE_API: '"http://localhost:8086/property-api"',
8 8
 })

+ 1
- 1
VUECODE/smart-property-manage/config/prod.env.js Vedi File

@@ -1,5 +1,5 @@
1 1
 'use strict'
2 2
 module.exports = {
3 3
   NODE_ENV: '"production"',
4
-  BASE_API: '"http://101.132.102.231:8085/property-api"',
4
+  BASE_API: '"http://101.132.102.231:8086/property-api"',
5 5
 }

+ 1
- 0
VUECODE/smart-property-manage/src/utils/ajax.js Vedi File

@@ -18,6 +18,7 @@ const Axios = axios.create({
18 18
 Axios.interceptors.request.use((config) => {
19 19
   config.headers['Content-Type'] = config.headerData ? config.headerData : 'multipart/form-data'
20 20
   config.headers['X-Auth-Token'] = getToken()
21
+  config.headers['Login-Type'] = 'web'
21 22
   // config.urlData = { ...config.urlData,  }
22 23
   // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
23 24
   const urlData = qs.stringify(config.urlData)

+ 1
- 1
VUECODE/smart-property-manage/src/views/banner/addBanner/index.vue Vedi File

@@ -22,7 +22,7 @@
22 22
       <el-form-item :label-width="formLabelWidth" label="banner图 *">
23 23
         <el-upload
24 24
           class="avatar-uploader"
25
-          action="http://101.132.102.231:8085/operate-api/uploadimage"
25
+          action="http://101.132.102.231:8086/operate-api/uploadimage"
26 26
           name="uploadFiles"
27 27
           :show-file-list="false"
28 28
           :on-success="handleAvatarSuccess">

+ 1
- 1
VUECODE/smart-property-manage/src/views/banner/ediBanner/index.vue Vedi File

@@ -22,7 +22,7 @@
22 22
       <el-form-item :label-width="formLabelWidth" label="banner图">
23 23
         <el-upload
24 24
           class="avatar-uploader"
25
-          action="http://101.132.102.231:8085/operate-api/uploadimage"
25
+          action="http://101.132.102.231:8086/operate-api/uploadimage"
26 26
           name="uploadFiles"
27 27
           :show-file-list="false"
28 28
           :on-success="handleAvatarSuccess">

+ 7
- 2
VUECODE/smart-property-manage/src/views/building/edi/index.vue Vedi File

@@ -17,10 +17,10 @@
17 17
         <el-input v-model="ruleForm.roomNo"/>
18 18
       </el-form-item>
19 19
       <el-form-item label="业主姓名" prop="ownerName">
20
-        <el-input v-model="ruleForm.ownerName"/>
20
+        <el-input v-model="ruleForm.ownerName" />
21 21
       </el-form-item>
22 22
       <el-form-item label="业主手机号" prop="ownerTel">
23
-        <el-input v-model="ruleForm.ownerTel"/>
23
+        <el-input v-model="ruleForm.ownerTel" :disabled="isOwnerTel"/>
24 24
       </el-form-item>
25 25
       <el-form-item>
26 26
         <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
@@ -43,6 +43,7 @@ export default {
43 43
         ownerName: '',
44 44
         ownerTel: ''
45 45
       },
46
+      isOwnerTel: false, // 手机号是否可以编辑 true 不可编辑  false 为可编辑
46 47
       listQuery: [], // 查询的参数
47 48
       rules: {
48 49
         building: [
@@ -120,6 +121,10 @@ export default {
120 121
         this.ruleForm.roomNo = data.roomNo
121 122
         this.ruleForm.ownerName = data.ownerName
122 123
         this.ruleForm.ownerTel = data.ownerTel
124
+        if (data.verifyStatus === '1') {
125
+          // 不可编辑手机号
126
+          this.isOwnerTel = true
127
+        }
123 128
       }).catch(() => {
124 129
         console.log('error GetByIdBuildingId')
125 130
       })

+ 4
- 3
VUECODE/smart-property-manage/src/views/building/index.vue Vedi File

@@ -70,7 +70,7 @@
70 70
       <el-table-column prop="ownerName" label="业主姓名" align="center"/>
71 71
       <el-table-column prop="ownerTel" label="手机号码" align="center" />
72 72
       <el-table-column prop="pairStatus" label="关联业主状态" align="center" >
73
-        <template slot-scope="scope">{{ scope.row.pairStatus === '1' ? '已关联':'未关联' }}</template>
73
+        <template slot-scope="scope">{{ scope.row.verifyStatus === '1' ? '已关联':'未关联' }}</template>
74 74
       </el-table-column>
75 75
       <el-table-column prop="createDate" label="创建时间" align="center" >
76 76
         <template slot-scope="scope">{{ formatDate(scope.row.createDate) }}</template>
@@ -78,9 +78,9 @@
78 78
     </el-table>
79 79
     <div class="block">
80 80
       <el-pagination
81
-        :current-page="listQuery.pageNum"
81
+        :current-page.sync="listQuery.pageNum"
82 82
         :page-sizes="[10, 20, 50, 100]"
83
-        :page-size="listQuery.pageSize"
83
+        :page-size.sync="listQuery.pageSize"
84 84
         :total="total"
85 85
         layout="total, sizes, prev, pager, next, jumper"
86 86
         @size-change="handleSizeChange"
@@ -133,6 +133,7 @@ export default {
133 133
 
134 134
     const query = this.$route.params.listQuery
135 135
     if (query !== undefined) {
136
+      console.log('参数:', query)
136 137
       this.listQuery = query
137 138
     }
138 139
 

+ 363
- 351
文档/MYSQL/smartCommunity.pdm
File diff suppressed because it is too large
Vedi File