魏熙美 6 年之前
父節點
當前提交
19a41aff8b
共有 43 個文件被更改,包括 855 次插入51 次删除
  1. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BaseController.java
  2. 4
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/IBuildingOwnerInfoController.java
  3. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java
  4. 3
    5
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserVerifyController.java
  5. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/WxLoginController.java
  6. 13
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserVerify.java
  7. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfo.java
  8. 5
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java
  9. 1
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TaUserVerifyServicel.java
  10. 3
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java
  11. 15
    6
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  12. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServicelmpl.java
  13. 12
    11
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxLoginServiceImpl.java
  14. 9
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TaUserVO.java
  15. 7
    6
      CODE/smart-community/app-api/src/main/resources/application.yml
  16. 22
    4
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserVerifyMapper.xml
  17. 19
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/session/UserElement.java
  18. 二進制
      CODE/smart-community/community-common/target/community-common-0.0.1.jar
  19. 4
    0
      CODE/smart-community/community-common/target/maven-archiver/pom.properties
  20. 32
    0
      CODE/smart-community/community-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  21. 29
    0
      CODE/smart-community/community-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  22. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpConfigurationController.java
  23. 52
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpEquipmentController.java
  24. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpEquipmentTreeController.java
  25. 18
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpConfigurationMapper.java
  26. 42
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpEquipmentMapper.java
  27. 18
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpEquipmentTreeMapper.java
  28. 73
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpConfiguration.java
  29. 123
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpEquipment.java
  30. 68
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpEquipmentTree.java
  31. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpConfigurationService.java
  32. 26
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpEquipmentService.java
  33. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpEquipmentTreeService.java
  34. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpConfigurationServiceImpl.java
  35. 35
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpEquipmentServiceImpl.java
  36. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpEquipmentTreeServiceImpl.java
  37. 5
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpConfigurationMapper.xml
  38. 5
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpEquipmentMapper.xml
  39. 5
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpEquipmentTreeMapper.xml
  40. 12
    0
      VUECODE/smart-property-manage/src/api/equipment.js
  41. 3
    1
      VUECODE/smart-property-manage/src/store/index.js
  42. 24
    0
      VUECODE/smart-property-manage/src/store/modules/equipment.js
  43. 48
    1
      VUECODE/smart-property-manage/src/views/systemResources/app/index.vue

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BaseController.java 查看文件

@@ -43,7 +43,7 @@ public class BaseController {
43 43
             throw new WisdomException("用户信息不能为空!");
44 44
         }
45 45
 
46
-        log.info("用户当前sessionId:{}", session.getId());
46
+        log.info("用户当前sessionId:{}, 设置的用户信息: {}", session.getId(), userVO);
47 47
         UserElement userElement = new UserElement();
48 48
         BeanUtils.copyProperties(userVO,userElement);
49 49
         userElement.setLoginType(Constant.APP_LOGIN_TYPE);
@@ -57,8 +57,8 @@ public class BaseController {
57 57
      * @return
58 58
      */
59 59
     protected UserElement getUserElement(HttpSession session) {
60
-        log.info("用户当前sessionId:{}", session.getId());
61 60
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
61
+        log.info("用户当前sessionId:{}, 设置的用户信息: {}", session.getId(), userElement);
62 62
         if (null == userElement) {
63 63
             throw new WisdomException("用户 session 不存在!");
64 64
         }

+ 4
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/IBuildingOwnerInfoController.java 查看文件

@@ -55,6 +55,7 @@ public class IBuildingOwnerInfoController extends BaseController {
55 55
     @RequestMapping(value = "/building/has", method = RequestMethod.GET)
56 56
     @ApiOperation(value = "根据 小区、期、楼栋、单元、楼层、户号 (并校验这个用户,是否绑定了这个房产)", notes = "根据 小区、期、楼栋、单元、楼层、户号")
57 57
     @ApiImplicitParams({
58
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "communityId", value = "小区"),
58 59
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phaseId", value = "期"),
59 60
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "buildingId", value = "楼栋"),
60 61
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unitId", value = "单元"),
@@ -62,7 +63,8 @@ public class IBuildingOwnerInfoController extends BaseController {
62 63
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNoId", value = "户号"),
63 64
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
64 65
     })
65
-    public ResponseBean hasBuilding(@RequestParam(value = "phaseId", required = false) Integer phaseId,
66
+    public ResponseBean hasBuilding(@RequestParam(value = "communityId", required = false) Integer communityId,
67
+                                    @RequestParam(value = "phaseId", required = false) Integer phaseId,
66 68
                                    @RequestParam(value = "buildingId",required = false) Integer buildingId,
67 69
                                    @RequestParam(value = "unitId", required = false) Integer unitId,
68 70
                                    @RequestParam(value = "levelId", required = false) Integer levelId,
@@ -71,7 +73,7 @@ public class IBuildingOwnerInfoController extends BaseController {
71 73
 
72 74
         ResponseBean responseBean = new ResponseBean();
73 75
         UserElement userElement = getUserElement(session);
74
-        responseBean = iBuildingOwnerInfo.hasBuild(userElement, phaseId, buildingId, unitId, levelId, roomNoId);
76
+        responseBean = iBuildingOwnerInfo.hasBuild(userElement, communityId ,phaseId, buildingId, unitId, levelId, roomNoId);
75 77
         return responseBean;
76 78
     }
77 79
 

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java 查看文件

@@ -47,7 +47,7 @@ public class UserController extends BaseController {
47 47
     public ResponseBean login(@RequestBody String parameter,
48 48
                               HttpSession session){
49 49
         JSONObject jsonObject = JSONObject.parseObject(parameter);
50
-        ResponseBean responseBean = iTaUserService.login(jsonObject.getString("loginName"),jsonObject.getString("code"));
50
+        ResponseBean responseBean = iTaUserService.login(jsonObject.getString("loginName"),jsonObject.getString("code"), session);
51 51
         TaUserVO userVO = (TaUserVO) responseBean.getData();
52 52
         if (null != userVO) {
53 53
             setUserElement(userVO, session);

+ 3
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserVerifyController.java 查看文件

@@ -28,14 +28,12 @@ public class UserVerifyController extends BaseController {
28 28
     private TaUserVerifyServicel taUserVerifyServicel;
29 29
 
30 30
     @RequestMapping(value = "/user/verify/{userVerifyId}", method = RequestMethod.GET)
31
-    @ApiOperation(value = "获取当前 一个待审核或审核不通过房产", notes = "获取当前 一个待审核或审核不通过房产")
31
+    @ApiOperation(value = "获取 一个房产信息", notes = "获取 一个房产信息")
32 32
     @ApiImplicitParams({
33 33
             @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "userVerifyId", value = "审核房产 id"),
34
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
35 34
     })
36 35
     public ResponseBean getUserVerify(HttpSession session, @PathVariable("userVerifyId") Integer userVerifyId) {
37
-        UserElement userElement = getUserElement(session);
38
-        ResponseBean responseBean = taUserVerifyServicel.getToAuditNotApproved(userElement, userVerifyId);
36
+        ResponseBean responseBean = taUserVerifyServicel.getToAuditNotApproved(userVerifyId);
39 37
         return responseBean;
40 38
     }
41 39
 
@@ -43,7 +41,7 @@ public class UserVerifyController extends BaseController {
43 41
     @ApiOperation(value = "添加一个审核的房产", notes = "添加一个审核的房产")
44 42
     @ApiImplicitParams({
45 43
             @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
46
-            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "roleName角色名称;phaseId期;buildingId楼栋;unitId单元;levelId楼层;roomNoId户号")
44
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "communityId小区编号;roleName角色名称;phaseId期;buildingId楼栋;unitId单元;levelId楼层;roomNoId户号")
47 45
     })
48 46
     public ResponseBean addUserVerify(@RequestBody String parameter, HttpSession session) {
49 47
         ResponseBean responseBean = new ResponseBean();

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/WxLoginController.java 查看文件

@@ -48,7 +48,7 @@ public class WxLoginController {
48 48
 	@RequestMapping(value = "/wx/associated", method = RequestMethod.POST)
49 49
 	@ApiOperation(value = "手机号和验证码 关联微信账号", notes = "手机号和验证码 关联微信账号")
50 50
 	@ApiImplicitParams({
51
-			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "loginName手机号;code验证码;openid微信标识;userInfo微信用户信息")
51
+			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "loginName手机号;code验证码;openid微信标识;nickname微信用户名称")
52 52
 	})
53 53
 	public ResponseBean associatedWX(@RequestBody String parameter) {
54 54
 		ResponseBean responseBean = new ResponseBean();
@@ -58,7 +58,7 @@ public class WxLoginController {
58 58
 
59 59
 	@ApiOperation(value = "注册", notes = "注册")
60 60
 	@ApiImplicitParams({
61
-			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "userName用户姓名;idCard身份证;gender性别(1:男  2:女);loginName手机号;code验证码;openid微信标识;userInfo微信用户信息")
61
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "userName用户姓名;idCard身份证;gender性别(1:男  2:女);loginName手机号;code验证码;openid微信标识;nickname微信用户名称")
62 62
 	})
63 63
 	@RequestMapping(value = "/wx/register",method = RequestMethod.POST)
64 64
 	public ResponseBean register(@RequestBody String parameter) {

+ 13
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserVerify.java 查看文件

@@ -63,6 +63,11 @@ public class TaUserVerify {
63 63
 
64 64
     private String communityAddress;
65 65
 
66
+    /**
67
+     * 审核结果的url
68
+     */
69
+    private String verifyUrl;
70
+
66 71
     public Integer getId() {
67 72
         return id;
68 73
     }
@@ -238,4 +243,12 @@ public class TaUserVerify {
238 243
     public void setRemark(String remark) {
239 244
         this.remark = remark;
240 245
     }
246
+
247
+    public String getVerifyUrl() {
248
+        return verifyUrl;
249
+    }
250
+
251
+    public void setVerifyUrl(String verifyUrl) {
252
+        this.verifyUrl = verifyUrl;
253
+    }
241 254
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfo.java 查看文件

@@ -33,6 +33,6 @@ public interface IBuildingOwnerInfo {
33 33
      * @param roomNoId
34 34
      * @return
35 35
      */
36
-    ResponseBean hasBuild(UserElement userElement,Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId);
36
+    ResponseBean hasBuild(UserElement userElement, Integer communityId ,Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId);
37 37
 
38 38
 }

+ 5
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java 查看文件

@@ -7,6 +7,7 @@ import com.community.huiju.exception.WisdomException;
7 7
 import com.community.huiju.model.TaUser;
8 8
 import org.springframework.web.multipart.MultipartFile;
9 9
 
10
+import javax.servlet.http.HttpSession;
10 11
 import java.util.List;
11 12
 
12 13
 /**
@@ -33,9 +34,10 @@ public interface ITaUserService {
33 34
      *
34 35
      * @param loginName
35 36
      * @param code      验证码
37
+     * @param session
36 38
      * @return 用户对象
37 39
      */
38
-    ResponseBean login(String loginName, String code);
40
+    ResponseBean login(String loginName, String code, HttpSession session);
39 41
 
40 42
     /**
41 43
      * 注册用户
@@ -50,9 +52,10 @@ public interface ITaUserService {
50 52
      *
51 53
      * @param response
52 54
      * @param currentUser
55
+     * @param session
53 56
      * @return
54 57
      */
55
-    ResponseBean checkLogin(ResponseBean response, TaUser currentUser);
58
+    ResponseBean checkLogin(ResponseBean response, TaUser currentUser, HttpSession session);
56 59
 
57 60
     /**
58 61
      * 修改当前用户手机号

+ 1
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TaUserVerifyServicel.java 查看文件

@@ -11,11 +11,10 @@ public interface TaUserVerifyServicel {
11 11
 
12 12
     /**
13 13
      * 获取当前 一个待审核或审核不通过房产 的数据
14
-     * @param userElement
15 14
      * @param userVerifyId
16 15
      * @return
17 16
      */
18
-    ResponseBean getToAuditNotApproved(UserElement userElement, Integer userVerifyId);
17
+    ResponseBean getToAuditNotApproved(Integer userVerifyId);
19 18
 
20 19
     /**
21 20
      * 添加 一个审核房产

+ 3
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java 查看文件

@@ -94,7 +94,7 @@ public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
94 94
     }
95 95
 
96 96
     @Override
97
-    public ResponseBean hasBuild(UserElement userElement,  Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
97
+    public ResponseBean hasBuild(UserElement userElement, Integer communityId ,Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
98 98
         ResponseBean responseBean = new ResponseBean();
99 99
         // 1.检验该用户关联有没有这个 户号
100 100
         List<TaUserVerify> taUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getId(),userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId, 1);
@@ -106,7 +106,7 @@ public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
106 106
         Map<String,Object> result = Maps.newHashMap();
107 107
 
108 108
         // 2.检验这个户号是否关联了 户主
109
-        TaUserVerify ownerUserVerify = taUserVerifyMapper.selectCommunityAndAddressAndRoleId(userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId);
109
+        TaUserVerify ownerUserVerify = taUserVerifyMapper.selectCommunityAndAddressAndRoleId(communityId, phaseId, buildingId, unitId, levelId, roomNoId);
110 110
         if (null != ownerUserVerify) {
111 111
             TaUser user = taUserMapper.selectByPrimaryKey(ownerUserVerify.getUserId());
112 112
             result.put("ownerName",user.getUserName());
@@ -115,7 +115,7 @@ public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
115 115
             return responseBean;
116 116
         }
117 117
 
118
-        responseBean.addError(UserVerifyEnum.NO_OWNER.getCode(),UserVerifyEnum.NO_OWNER.getMsg());
118
+        responseBean.addSuccess(UserVerifyEnum.NO_OWNER.getMsg(), result, null);
119 119
         return responseBean;
120 120
     }
121 121
 }

+ 15
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java 查看文件

@@ -42,6 +42,7 @@ import org.springframework.transaction.annotation.Transactional;
42 42
 import org.springframework.web.client.RestTemplate;
43 43
 import org.springframework.web.multipart.MultipartFile;
44 44
 
45
+import javax.servlet.http.HttpSession;
45 46
 import java.io.IOException;
46 47
 import java.text.ParseException;
47 48
 import java.text.SimpleDateFormat;
@@ -106,7 +107,7 @@ public class TaUserServiceImpl implements ITaUserService {
106 107
 
107 108
     @Override
108 109
     @Transactional(rollbackFor = Exception.class)
109
-    public ResponseBean login(String loginName, String code) {
110
+    public ResponseBean login(String loginName, String code, HttpSession session) {
110 111
         ResponseBean response = new ResponseBean();
111 112
 
112 113
         // 校验手机号和验证码
@@ -119,7 +120,7 @@ public class TaUserServiceImpl implements ITaUserService {
119 120
         }
120 121
 
121 122
         // 检验登录房产
122
-        checkLogin(response, currentUser);
123
+        checkLogin(response, currentUser, session);
123 124
 
124 125
         return response;
125 126
     }
@@ -173,7 +174,7 @@ public class TaUserServiceImpl implements ITaUserService {
173 174
      * @return
174 175
      */
175 176
     @Override
176
-    public ResponseBean checkLogin(ResponseBean response, TaUser currentUser) {
177
+    public ResponseBean checkLogin(ResponseBean response, TaUser currentUser, HttpSession session) {
177 178
         // 校验用户
178 179
         checkBlacklistStatusUser(currentUser);
179 180
 
@@ -193,7 +194,11 @@ public class TaUserServiceImpl implements ITaUserService {
193 194
         List<TaUserVerify> taUserVerifies = taUserVerifyMapper.selectByUserId(currentUser.getId());
194 195
         // 无关联房产
195 196
         if (null == taUserVerifies || taUserVerifies.size() == 0) {
196
-            response.addError(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getCode()));
197
+            String token = null;
198
+            if (null != session) {
199
+                token = session.getId();
200
+            }
201
+            response.addError(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getCode()) + "&token=" + token);
197 202
             return response;
198 203
         }
199 204
 
@@ -208,7 +213,11 @@ public class TaUserServiceImpl implements ITaUserService {
208 213
 
209 214
             return checkHouse(response, taUserVO, userVerify);
210 215
         } else if (taUserVerifies.size() >= 2) {
211
-            response.addError(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getCode()));
216
+            taUserVerifies.forEach(e->{
217
+                e.setVerifyUrl(loginCodePerproties.getLoginCode().get("-1") + e.getId());
218
+            });
219
+            taUserVO.setUserVerifyList(taUserVerifies);
220
+            response.addSuccess(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getCode()));
212 221
             return response;
213 222
         }
214 223
 
@@ -1045,7 +1054,7 @@ public class TaUserServiceImpl implements ITaUserService {
1045 1054
         }
1046 1055
         String resultCode = "0".equals(verifyStatus) ? UserVerifyEnum.A_TO_AUDIT_REAL_ESTATE.getCode() :
1047 1056
                 "2".equals(verifyStatus) ? UserVerifyEnum.A_AUDIT_FAILED_REAL_ESTATE.getCode() : "500";
1048
-        responseBean.addError(UserVerifyEnum.getMsg(resultCode), taUserVO, loginCodePerproties.getLoginCode().get(resultCode));
1057
+        responseBean.addError(UserVerifyEnum.getMsg(resultCode), taUserVO, loginCodePerproties.getLoginCode().get("-1") + taUserVO.getUserVerifyId());
1049 1058
         return responseBean;
1050 1059
     }
1051 1060
 

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServicelmpl.java 查看文件

@@ -81,7 +81,7 @@ public class TaUserVerifyServicelmpl implements TaUserVerifyServicel {
81 81
     private TpRoomNoMapper tpRoomNoMapper;
82 82
 
83 83
     @Override
84
-    public ResponseBean getToAuditNotApproved(UserElement userElement, Integer userVerifyId) {
84
+    public ResponseBean getToAuditNotApproved(Integer userVerifyId) {
85 85
         ResponseBean responseBean = new ResponseBean();
86 86
         TaUserVerify taUserVerify = taUserVerifyMapper.selectByPrimaryKey(userVerifyId);
87 87
         TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(taUserVerify.getRoleId());
@@ -125,8 +125,8 @@ public class TaUserVerifyServicelmpl implements TaUserVerifyServicel {
125 125
         TpLevel level = tpLevelMapper.selectByPrimaryKey(taUserVerify.getLevelId());
126 126
         TpRoomNo roomNo = tpRoomNoMapper.selectByPrimaryKey(taUserVerify.getRoomNoId());
127 127
 
128
+
128 129
         taUserVerify.setRoleId(sysRole.getId());
129
-        taUserVerify.setCommunityId(userElement.getCommunityId());
130 130
         taUserVerify.setUserId(userElement.getId());
131 131
         taUserVerify.setVerifyStatus("0");
132 132
         taUserVerify.setCreateDate(new Date());

+ 12
- 11
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxLoginServiceImpl.java 查看文件

@@ -24,6 +24,8 @@ import org.springframework.stereotype.Service;
24 24
 import org.springframework.transaction.annotation.Transactional;
25 25
 import org.springframework.web.client.RestTemplate;
26 26
 
27
+import java.net.URLDecoder;
28
+import java.net.URLEncoder;
27 29
 import java.util.Date;
28 30
 import java.util.Map;
29 31
 
@@ -72,11 +74,13 @@ public class WxLoginServiceImpl implements WxLoginServiceI {
72 74
 			result.put("userInfo", userInfo);
73 75
 			result.put("openid", openId);
74 76
 
75
-			responseBean.addError(UserVerifyEnum.NO_ACCOUNT.getMsg(), result, loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_ACCOUNT.getCode()));
77
+			JSONObject userInfoJSON = JSONObject.parseObject(userInfo);
78
+			String wxPar = "&openid=" + openId + "&nickname=" + userInfoJSON.getString("nickname");
79
+			responseBean.addError(UserVerifyEnum.NO_ACCOUNT.getMsg(), result, loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_ACCOUNT.getCode()) + URLEncoder.encode(wxPar));
76 80
 			return responseBean;
77 81
 		}
78 82
 
79
-		responseBean = iTaUserService.checkLogin(responseBean, taUser);
83
+		responseBean = iTaUserService.checkLogin(responseBean, taUser, null);
80 84
 
81 85
 		return responseBean;
82 86
 	}
@@ -103,6 +107,10 @@ public class WxLoginServiceImpl implements WxLoginServiceI {
103 107
 		// 检验微信绑定
104 108
 		responseBean = checkWX(responseBean, user, parameter);
105 109
 
110
+		// 检验登录房产
111
+		responseBean = iTaUserService.checkLogin(responseBean, user, null);
112
+
113
+
106 114
 		return responseBean;
107 115
 	}
108 116
 
@@ -131,21 +139,14 @@ public class WxLoginServiceImpl implements WxLoginServiceI {
131 139
 			responseBean.addError("openid 参数缺失!");
132 140
 			return responseBean;
133 141
 		}
134
-		JSONObject userInfoJSON = jsonObject.getJSONObject("userInfo");
135
-		if (null == userInfoJSON) {
136
-			responseBean.addError("openid 参数缺失!");
137
-			return responseBean;
138
-		}
139 142
 
140 143
 		user.setOpenid(openid);
141
-		user.setNickname(userInfoJSON.getString("nickname"));
144
+		user.setNickname(jsonObject.getString("nickname"));
142 145
 
143 146
 		// 更新用户信息
144 147
 		taUserMapper.updateByPrimaryKeySelective(user);
145 148
 
146
-		// 检验登录房产
147
-		responseBean = iTaUserService.checkLogin(responseBean, user);
148
-
149
+		responseBean.addSuccess(user);
149 150
 		return responseBean;
150 151
 	}
151 152
 

+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TaUserVO.java 查看文件

@@ -1,9 +1,12 @@
1 1
 package com.community.huiju.vo;
2 2
 
3
+import com.community.huiju.model.TaUserVerify;
3 4
 import lombok.AllArgsConstructor;
4 5
 import lombok.Data;
5 6
 import lombok.NoArgsConstructor;
6 7
 
8
+import java.util.List;
9
+
7 10
 /**
8 11
  * 用户数据
9 12
  * @author weiximei
@@ -90,4 +93,10 @@ public class TaUserVO {
90 93
 
91 94
     /** 是否绑定了微信 **/
92 95
     private Integer bindingWX;
96
+
97
+    /**
98
+     * 房产列表
99
+     */
100
+    private List<TaUserVerify> userVerifyList;
101
+
93 102
 }

+ 7
- 6
CODE/smart-community/app-api/src/main/resources/application.yml 查看文件

@@ -32,11 +32,12 @@ welcome:
32 32
 # 登陆的状态跳转url配置
33 33
 login-code-perproties:
34 34
   login-code:
35
-    1000: /linkBuilding?from=index # 无关联房产
35
+    1000: linkBuilding?from=index # 无关联房产
36 36
     1001: index  # 关联一个审核通过的房产
37
-    1002: /linkBuildingState?from=index # 关联一个待审核房产
38
-    1003: /linkBuildingState?from=index # 关联一个审核未通过房产
39
-    1004:    # 有多个关联房产
37
+    1002: linkBuildingState?from=index&id= # 关联一个待审核房产
38
+    1003: linkBuildingState?from=index&id= # 关联一个审核未通过房产
39
+    1004: userCenter/landList?from=index   # 有多个关联房产
40 40
     1005:    # 该房产,暂无审核通过的业主!关联房产的时候,验证是否可以选择业主进行绑定
41
-    1006: /linkWeChat?from=index # 无关联账号!社交授权登录的时候
42
-    1007: /register?from=index # 未注册!社交授权登录 关联手机号账号未注册
41
+    1006: linkWeChat?from=index # 无关联账号!社交授权登录的时候
42
+    1007: register?from=index # 未注册!社交授权登录 关联手机号账号未注册
43
+    -1: linkBuildingState?from=index&id= # 审核结果的地址

+ 22
- 4
CODE/smart-community/app-api/src/main/resources/mapper/TaUserVerifyMapper.xml 查看文件

@@ -243,11 +243,29 @@
243 243
       remark = #{remark,jdbcType=VARCHAR}
244 244
     where id = #{id,jdbcType=INTEGER}
245 245
   </update>
246
-  <select id="selectByUserId" resultMap="BaseResultMap" parameterType="integer">
246
+  <select id="selectByUserId" resultType="com.community.huiju.model.TaUserVerify" parameterType="integer">
247 247
     select
248
-    <include refid="Base_Column_List"/>
249
-    from ta_user_verify
250
-    where user_id = #{userId,jdbcType=INTEGER}
248
+    tuv.id as id,
249
+    tuv.user_id as userId,
250
+    tuv.community_id as communityId,
251
+    tuv.role_id as roleId,
252
+    tuv.phase_id as phaseId,
253
+    tuv.phase_name as phaseName,
254
+    tuv.building_id as buildingId,
255
+    tuv.building_name as buildingName,
256
+    tuv.unit_id as unitId,
257
+    tuv.unit_name as unitName,
258
+    tuv.level_id as levelId,
259
+    tuv.level_name as levelName,
260
+    tuv.room_no_id as roomNoId,
261
+    tuv.room_no_name as roomNoName,
262
+    tuv.verify_status as verifyStatus,
263
+    tuv.create_date as createDate,
264
+    tuv.verify_name as verifyName,
265
+    tuv.remark as remark,
266
+    (select community_name from to_communities where id=tuv.community_id) as communityName
267
+    from ta_user_verify tuv
268
+    where tuv.user_id = #{userId,jdbcType=INTEGER}
251 269
   </select>
252 270
   <select id="selectCommunityAndAddress" resultMap="BaseResultMap">
253 271
     select

+ 19
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/session/UserElement.java 查看文件

@@ -3,6 +3,7 @@ package com.community.commom.session;
3 3
 import lombok.AllArgsConstructor;
4 4
 import lombok.Data;
5 5
 import lombok.NoArgsConstructor;
6
+import lombok.ToString;
6 7
 
7 8
 import java.io.Serializable;
8 9
 
@@ -56,4 +57,22 @@ public class UserElement implements Serializable {
56 57
     /** 当前登录 户号id **/
57 58
     private Integer roomNoId;
58 59
 
60
+    @Override
61
+    public String toString() {
62
+        return "UserElement{" +
63
+                "id=" + id +
64
+                ", communityId=" + communityId +
65
+                ", userName='" + userName + '\'' +
66
+                ", loginName='" + loginName + '\'' +
67
+                ", email='" + email + '\'' +
68
+                ", status='" + status + '\'' +
69
+                ", loginType='" + loginType + '\'' +
70
+                ", userVerifyId=" + userVerifyId +
71
+                ", phaseId=" + phaseId +
72
+                ", buildingId=" + buildingId +
73
+                ", unitId=" + unitId +
74
+                ", levelId=" + levelId +
75
+                ", roomNoId=" + roomNoId +
76
+                '}';
77
+    }
59 78
 }

二進制
CODE/smart-community/community-common/target/community-common-0.0.1.jar 查看文件


+ 4
- 0
CODE/smart-community/community-common/target/maven-archiver/pom.properties 查看文件

@@ -0,0 +1,4 @@
1
+#Created by Apache Maven 3.3.9
2
+version=0.0.1
3
+groupId=com.community
4
+artifactId=community-common

+ 32
- 0
CODE/smart-community/community-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst 查看文件

@@ -0,0 +1,32 @@
1
+com\community\commom\redis\RedisTemplate.class
2
+com\community\commom\redis\RedisConfiguration.class
3
+com\community\commom\utils\OssUtil.class
4
+com\community\commom\redis\SingleRedisTemplate.class
5
+com\community\commom\utils\EnumUtils.class
6
+com\community\commom\hk\HttpClientSSLUtils$2.class
7
+com\community\commom\redis\RedisJsonSerializer.class
8
+com\community\commom\uuid\IdGen.class
9
+com\community\commom\utils\BeanTools.class
10
+com\community\commom\hk\HttpClientSSLUtils.class
11
+com\community\commom\session\UserElement.class
12
+com\community\commom\utils\CommonUtils.class
13
+com\community\commom\redis\RedisSerializer.class
14
+com\community\commom\utils\StringConverter.class
15
+com\community\commom\mode\ResponseBean.class
16
+com\community\commom\utils\DESUtils.class
17
+com\community\commom\redis\FastJsonSerializer.class
18
+com\community\commom\utils\DateUtils.class
19
+com\community\commom\utils\HttpClientUtils.class
20
+com\community\commom\constant\Constant.class
21
+com\community\commom\utils\CookieUtil.class
22
+com\community\commom\mode\HkResponseBean.class
23
+com\community\commom\ailiyun\AESDecode.class
24
+com\community\commom\uuid\IdGen$IdGenHolder.class
25
+com\community\commom\utils\PayPriceUtils.class
26
+com\community\commom\hk\HttpClientSSLUtils$1.class
27
+com\community\commom\utils\MD5Utils.class
28
+com\community\commom\redis\RedisObjectSerializer.class
29
+com\community\commom\utils\QRCodeGeneratorUtils.class
30
+com\community\commom\redis\SerializationFailedException.class
31
+com\community\commom\hk\Digests.class
32
+com\community\commom\utils\AccountValidatorUtil.class

+ 29
- 0
CODE/smart-community/community-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst 查看文件

@@ -0,0 +1,29 @@
1
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisJsonSerializer.java
2
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\ailiyun\AESDecode.java
3
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\hk\HttpClientSSLUtils.java
4
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\PayPriceUtils.java
5
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\DateUtils.java
6
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\HttpClientUtils.java
7
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\DESUtils.java
8
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisSerializer.java
9
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\BeanTools.java
10
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\OssUtil.java
11
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisObjectSerializer.java
12
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\EnumUtils.java
13
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisTemplate.java
14
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\mode\HkResponseBean.java
15
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\SerializationFailedException.java
16
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\CommonUtils.java
17
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\MD5Utils.java
18
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\session\UserElement.java
19
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\SingleRedisTemplate.java
20
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\hk\Digests.java
21
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\QRCodeGeneratorUtils.java
22
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisConfiguration.java
23
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\AccountValidatorUtil.java
24
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\uuid\IdGen.java
25
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\mode\ResponseBean.java
26
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\StringConverter.java
27
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\FastJsonSerializer.java
28
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\constant\Constant.java
29
+E:\weiximei\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\CookieUtil.java

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpConfigurationController.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.community.huiju.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 设备配置表 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-04-15
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpConfigurationController extends BaseController {
19
+
20
+}

+ 52
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpEquipmentController.java 查看文件

@@ -0,0 +1,52 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.community.commom.mode.ResponseBean;
6
+import com.community.commom.session.UserElement;
7
+import com.community.huiju.common.base.BaseController;
8
+import com.community.huiju.model.TpEquipment;
9
+import com.community.huiju.service.ITpEquipmentService;
10
+import io.swagger.annotations.Api;
11
+import io.swagger.annotations.ApiImplicitParam;
12
+import io.swagger.annotations.ApiImplicitParams;
13
+import io.swagger.annotations.ApiOperation;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RequestMethod;
17
+import org.springframework.web.bind.annotation.RequestParam;
18
+import org.springframework.web.bind.annotation.RestController;
19
+
20
+import javax.servlet.http.HttpSession;
21
+import java.util.List;
22
+
23
+/**
24
+ * <p>
25
+ * 设备表 前端控制器
26
+ * </p>
27
+ *
28
+ * @author jobob
29
+ * @since 2019-04-15
30
+ */
31
+@RestController
32
+@RequestMapping("/")
33
+@Api(value = "设备表", description = "设备表")
34
+public class TpEquipmentController extends BaseController {
35
+
36
+    @Autowired
37
+    private ITpEquipmentService iTpEquipmentService;
38
+
39
+    @RequestMapping(value = "/equipment", method = RequestMethod.GET)
40
+    @ApiOperation(value = "根据类型查询设备表", notes = "根据类型查询设备表")
41
+    @ApiImplicitParams({
42
+        @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "type", value = "1 监控 2 访客机 3 可是对讲"),
43
+        @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
44
+    })
45
+    public ResponseBean getAll(@RequestParam("type") Integer type, HttpSession session) {
46
+        ResponseBean responseBean = new ResponseBean();
47
+        UserElement userElement = getUserElement(session);
48
+        responseBean = iTpEquipmentService.getAllByCommunityAndEquipmentType(userElement, type);
49
+        return responseBean;
50
+    }
51
+
52
+}

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpEquipmentTreeController.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.community.huiju.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 设备树 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-04-15
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpEquipmentTreeController extends BaseController {
19
+
20
+}

+ 18
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpConfigurationMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpConfiguration;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 设备配置表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-04-15
14
+ */
15
+@Mapper
16
+public interface TpConfigurationMapper extends BaseMapper<TpConfiguration> {
17
+
18
+}

+ 42
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpEquipmentMapper.java 查看文件

@@ -0,0 +1,42 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpEquipment;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+import org.apache.ibatis.annotations.ResultType;
8
+import org.apache.ibatis.annotations.Select;
9
+
10
+import java.util.List;
11
+
12
+/**
13
+ * <p>
14
+ * 设备表 Mapper 接口
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-04-15
19
+ */
20
+@Mapper
21
+public interface TpEquipmentMapper extends BaseMapper<TpEquipment> {
22
+
23
+    /**
24
+     * 根据小区id 和 类型查询
25
+     * @param communityId
26
+     * @param equipmentType
27
+     * @return
28
+     */
29
+    @ResultType(TpEquipment.class)
30
+    @Select("select " +
31
+            "tm.*, " +
32
+            "(select configuration_value FROM tp_configuration WHERE id = tm.url_id) as url, " +
33
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_guard_tel_id) as securityGuardTel, " +
34
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_room_tel_id) as securityRoomTel, " +
35
+            "(select configuration_value FROM tp_configuration WHERE id = tm.address_id) as address, " +
36
+            "(select configuration_value FROM tp_configuration WHERE id = tm.uuid_id)as uuid " +
37
+            "FROM " +
38
+            "tp_equipment tm " +
39
+            "where tm.community_id = #{communityId} and tm.equipment_type = #{equipmentType}")
40
+    List<TpEquipment> selectAllByCommunityAndEquipmentType(@Param("communityId") Integer communityId, @Param("equipmentType") Integer equipmentType);
41
+
42
+}

+ 18
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpEquipmentTreeMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpEquipmentTree;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 设备树 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-04-15
14
+ */
15
+@Mapper
16
+public interface TpEquipmentTreeMapper extends BaseMapper<TpEquipmentTree> {
17
+
18
+}

+ 73
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpConfiguration.java 查看文件

@@ -0,0 +1,73 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import lombok.Data;
5
+import lombok.EqualsAndHashCode;
6
+import lombok.experimental.Accessors;
7
+
8
+import java.io.Serializable;
9
+import java.time.LocalDateTime;
10
+
11
+/**
12
+ * <p>
13
+ * 设备配置表
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-04-15
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@TableName("tp_configuration")
23
+public class TpConfiguration implements Serializable {
24
+
25
+    private static final long serialVersionUID = 1L;
26
+
27
+    /**
28
+     * 配置key
29
+     */
30
+    private String key;
31
+
32
+    /**
33
+     * 配置项名称
34
+     */
35
+    private String configurationName;
36
+
37
+    /**
38
+     * 配置类型: 1字符串  2多列值
39
+     */
40
+    private Integer configurationType;
41
+
42
+    /**
43
+     * 配置值
44
+     */
45
+    private String configurationValue;
46
+
47
+    /**
48
+     * 创建时间
49
+     */
50
+    private LocalDateTime createTiem;
51
+
52
+    /**
53
+     * 创建人
54
+     */
55
+    private Integer createUser;
56
+
57
+    /**
58
+     * 修改时间
59
+     */
60
+    private LocalDateTime updateTime;
61
+
62
+    /**
63
+     * 修改人
64
+     */
65
+    private Integer updateUser;
66
+
67
+    /**
68
+     * 小区id
69
+     */
70
+    private Integer communityId;
71
+
72
+
73
+}

+ 123
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpEquipment.java 查看文件

@@ -0,0 +1,123 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import lombok.Data;
8
+import lombok.EqualsAndHashCode;
9
+import lombok.experimental.Accessors;
10
+
11
+import java.io.Serializable;
12
+import java.time.LocalDateTime;
13
+
14
+/**
15
+ * <p>
16
+ * 设备表
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2019-04-15
21
+ */
22
+@Data
23
+@EqualsAndHashCode(callSuper = false)
24
+@Accessors(chain = true)
25
+@TableName("tp_equipment")
26
+public class TpEquipment implements Serializable {
27
+
28
+    private static final long serialVersionUID = 1L;
29
+
30
+    @TableId(value = "id", type = IdType.AUTO)
31
+    private Integer id;
32
+
33
+    /**
34
+     * 设备url地址,对应 配置tp_configuration 表id
35
+     */
36
+    private Integer urlId;
37
+
38
+    /**
39
+     * 小区id
40
+     */
41
+    private Integer communityId;
42
+
43
+    /**
44
+     * 安保人员电话,对应 配置tp_configuration 表id
45
+     */
46
+    private Integer securityGuardTelId;
47
+
48
+    /**
49
+     * 保安室电话,对应 配置tp_configuration 表id
50
+     */
51
+    private Integer securityRoomTelId;
52
+
53
+    /**
54
+     * 设备地址,对应 配置tp_configuration 表id
55
+     */
56
+    private Integer addressId;
57
+
58
+    /**
59
+     * 创建时间
60
+     */
61
+    private LocalDateTime createTime;
62
+
63
+    /**
64
+     * 创建人
65
+     */
66
+    private Integer createUser;
67
+
68
+    /**
69
+     * 修改时间
70
+     */
71
+    private LocalDateTime updateTime;
72
+
73
+    /**
74
+     * 修改人
75
+     */
76
+    private Integer updateUser;
77
+
78
+    /**
79
+     * 设备UUID ,对应 配置tp_configuration 表id
80
+     */
81
+    private Integer uuidId;
82
+    /**
83
+     * 设备类型,1 监控 2 访客机 3 可是对讲 (看字典表)
84
+     */
85
+    private String equipmentType;
86
+
87
+    /**
88
+     * 设备树id,对应 tp_equipment_tree 表id
89
+     */
90
+    private Integer equipmentTreeId;
91
+
92
+    // =======================
93
+
94
+    /**
95
+     * url
96
+     */
97
+    @TableField(exist = false)
98
+    private String url;
99
+
100
+    /**
101
+     * 安保人员电话
102
+     */
103
+    @TableField(exist = false)
104
+    private String securityGuardTel;
105
+
106
+    /**
107
+     * 安保室电话
108
+     */
109
+    @TableField(exist = false)
110
+    private String securityRoomTel;
111
+
112
+    /**
113
+     * 设备地址
114
+     */
115
+    @TableField(exist = false)
116
+    private String address;
117
+
118
+    /**
119
+     * UUID
120
+     */
121
+    @TableField(exist = false)
122
+    private String uuid;
123
+}

+ 68
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpEquipmentTree.java 查看文件

@@ -0,0 +1,68 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import lombok.Data;
5
+import lombok.EqualsAndHashCode;
6
+import lombok.experimental.Accessors;
7
+
8
+import java.io.Serializable;
9
+import java.time.LocalDateTime;
10
+
11
+/**
12
+ * <p>
13
+ * 设备树
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-04-15
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@TableName("tp_equipment_tree")
23
+public class TpEquipmentTree implements Serializable {
24
+
25
+    private static final long serialVersionUID = 1L;
26
+
27
+    /**
28
+     * 小区id
29
+     */
30
+    private Integer communityId;
31
+
32
+    /**
33
+     * 名称
34
+     */
35
+    private String equipmentName;
36
+
37
+    /**
38
+     * 父节点id
39
+     */
40
+    private Integer pid;
41
+
42
+    /**
43
+     * 排序
44
+     */
45
+    private Integer sort;
46
+
47
+    /**
48
+     * 创建时间
49
+     */
50
+    private LocalDateTime createTime;
51
+
52
+    /**
53
+     * 创建人
54
+     */
55
+    private Integer createUser;
56
+
57
+    /**
58
+     * 修改时间
59
+     */
60
+    private LocalDateTime updateTime;
61
+
62
+    /**
63
+     * 修改人
64
+     */
65
+    private Integer updateUser;
66
+
67
+
68
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpConfigurationService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TpConfiguration;
5
+
6
+/**
7
+ * <p>
8
+ * 设备配置表 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-04-15
13
+ */
14
+public interface ITpConfigurationService extends IService<TpConfiguration> {
15
+
16
+}

+ 26
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpEquipmentService.java 查看文件

@@ -0,0 +1,26 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.commom.mode.ResponseBean;
5
+import com.community.commom.session.UserElement;
6
+import com.community.huiju.model.TpEquipment;
7
+
8
+/**
9
+ * <p>
10
+ * 设备表 服务类
11
+ * </p>
12
+ *
13
+ * @author weiximei
14
+ * @since 2019-04-15
15
+ */
16
+public interface ITpEquipmentService extends IService<TpEquipment> {
17
+
18
+    /**
19
+     * 根据小区id 和 设备类型
20
+     * @param userElement
21
+     * @param equipmentType
22
+     * @return
23
+     */
24
+    ResponseBean getAllByCommunityAndEquipmentType(UserElement userElement, Integer equipmentType);
25
+
26
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpEquipmentTreeService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TpEquipmentTree;
5
+
6
+/**
7
+ * <p>
8
+ * 设备树 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-04-15
13
+ */
14
+public interface ITpEquipmentTreeService extends IService<TpEquipmentTree> {
15
+
16
+}

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpConfigurationServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TpConfigurationMapper;
5
+import com.community.huiju.model.TpConfiguration;
6
+import com.community.huiju.service.ITpConfigurationService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 设备配置表 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-04-15
16
+ */
17
+@Service
18
+public class TpConfigurationServiceImpl extends ServiceImpl<TpConfigurationMapper, TpConfiguration> implements ITpConfigurationService {
19
+
20
+}

+ 35
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpEquipmentServiceImpl.java 查看文件

@@ -0,0 +1,35 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.commom.mode.ResponseBean;
5
+import com.community.commom.session.UserElement;
6
+import com.community.huiju.dao.TpEquipmentMapper;
7
+import com.community.huiju.model.TpEquipment;
8
+import com.community.huiju.service.ITpEquipmentService;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.stereotype.Service;
11
+
12
+import java.util.List;
13
+
14
+/**
15
+ * <p>
16
+ * 设备表 服务实现类
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2019-04-15
21
+ */
22
+@Service
23
+public class TpEquipmentServiceImpl extends ServiceImpl<TpEquipmentMapper, TpEquipment> implements ITpEquipmentService {
24
+
25
+    @Autowired
26
+    private TpEquipmentMapper tpEquipmentMapper;
27
+
28
+    @Override
29
+    public ResponseBean getAllByCommunityAndEquipmentType(UserElement userElement, Integer equipmentType) {
30
+        ResponseBean responseBean = new ResponseBean();
31
+        List<TpEquipment> tpEquipments = tpEquipmentMapper.selectAllByCommunityAndEquipmentType(userElement.getCommunityId(), equipmentType);
32
+        responseBean.addSuccess(tpEquipments);
33
+        return responseBean;
34
+    }
35
+}

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpEquipmentTreeServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TpEquipmentTreeMapper;
5
+import com.community.huiju.model.TpEquipmentTree;
6
+import com.community.huiju.service.ITpEquipmentTreeService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 设备树 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-04-15
16
+ */
17
+@Service
18
+public class TpEquipmentTreeServiceImpl extends ServiceImpl<TpEquipmentTreeMapper, TpEquipmentTree> implements ITpEquipmentTreeService {
19
+
20
+}

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpConfigurationMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpConfigurationMapper">
4
+
5
+</mapper>

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpEquipmentMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpEquipmentMapper">
4
+
5
+</mapper>

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpEquipmentTreeMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpEquipmentTreeMapper">
4
+
5
+</mapper>

+ 12
- 0
VUECODE/smart-property-manage/src/api/equipment.js 查看文件

@@ -0,0 +1,12 @@
1
+import request from '@/utils/request'
2
+
3
+export function getAll(data) {
4
+  return request({
5
+    url: '/equipment',
6
+    method: 'get',
7
+    params: {
8
+      type: data.type
9
+    }
10
+  })
11
+}
12
+

+ 3
- 1
VUECODE/smart-property-manage/src/store/index.js 查看文件

@@ -20,6 +20,7 @@ import tels from './modules/tels'
20 20
 import menu from './modules/menu'
21 21
 import message from './modules/message'
22 22
 import buildingTree from './modules/buildingTree'
23
+import equipment from './modules/equipment'
23 24
 
24 25
 Vue.use(Vuex)
25 26
 
@@ -43,7 +44,8 @@ const store = new Vuex.Store({
43 44
     tels,
44 45
     menu,
45 46
     message,
46
-    buildingTree
47
+    buildingTree,
48
+    equipment
47 49
   },
48 50
   getters
49 51
 })

+ 24
- 0
VUECODE/smart-property-manage/src/store/modules/equipment.js 查看文件

@@ -0,0 +1,24 @@
1
+import { getAll } from '@/api/equipment'
2
+
3
+const equipment = {
4
+  state: {
5
+
6
+  },
7
+  mutations: {
8
+
9
+  },
10
+  actions: {
11
+    EquipmentGetAll({ commit }, data) {
12
+      return new Promise((resolve, reject) => {
13
+        getAll(data).then(response => {
14
+          resolve(response)
15
+        }).catch(error => {
16
+          reject(error)
17
+        })
18
+      })
19
+    }
20
+  }
21
+}
22
+
23
+export default equipment
24
+

+ 48
- 1
VUECODE/smart-property-manage/src/views/systemResources/app/index.vue 查看文件

@@ -116,6 +116,33 @@
116 116
           </el-table-column>
117 117
         </el-table>
118 118
       </el-tab-pane>
119
+      <el-tab-pane label="工区监控" name="monitoring">
120
+        <span style="display: flex; justify-content: center;">可配置项</span>
121
+        <div style="display: flex; justify-content: center; flex-wrap: wrap;">
122
+          <el-form v-for="(item, index) in equipmentList" ref="monitoringForm" label-width="120px" style="margin-top: 20px;">
123
+            <div>
124
+              <el-form-item label="编号">
125
+                <span>{{ item.id }}</span>
126
+              </el-form-item>
127
+              <el-form-item label="视频流地址">
128
+                <el-input :value="item.url" :disabled="true" name="name"/>
129
+              </el-form-item>
130
+              <el-form-item label="地址">
131
+                <el-input :value="item.address" :disabled="true" name="address"/>
132
+              </el-form-item>
133
+              <el-form-item label="安保人员电话">
134
+                <el-input :value="item.securityGuardTel" :disabled="true" name="phone"/>
135
+              </el-form-item>
136
+              <el-form-item label="保安室电话">
137
+                <el-input :value="item.securityRoomTel" :disabled="true" name="phone-2"/>
138
+              </el-form-item>
139
+            </div>
140
+            <el-form-item>
141
+              <el-button type="primary" @click="monitoringSubmit(item.id, index)" >确认</el-button>
142
+            </el-form-item>
143
+          </el-form>
144
+        </div>
145
+      </el-tab-pane>
119 146
     </el-tabs>
120 147
   </div>
121 148
 </template>
@@ -132,6 +159,9 @@ export default {
132 159
         remark: '',
133 160
         pageNum: 1,
134 161
         pageSize: 100
162
+      },
163
+      monitoring: { // 监控数据
164
+
135 165
       },
136 166
       indexData: [], // APP端菜单列表数据
137 167
       propertyList: [], // 物业数据列表
@@ -139,7 +169,9 @@ export default {
139 169
       announcementBannerNum: 0, // banner数量
140 170
       activityBannerNum: 0, // 活动banner数量
141 171
       announcementBannerBool: false, // 是否显示公告的保存按钮
142
-      activityBannerNumBool: false // 是否显示活动的保存按钮
172
+      activityBannerNumBool: false, // 是否显示活动的保存按钮
173
+      equipmentList: [] // 处理过后的监控数据
174
+      // equipmentRequestList: [] // 监控数据,后台获取的
143 175
     }
144 176
   },
145 177
   mounted() {
@@ -169,6 +201,13 @@ export default {
169 201
       if (tabName === 'property') {
170 202
         this.getPropertyData()
171 203
       }
204
+      if (tabName === 'monitoring') {
205
+        // 监控
206
+        this.equipmentGetAll()
207
+      }
208
+    },
209
+    monitoringSubmit(id, index) { // 监控提交
210
+      console.log('monitoringForm : ', this.$refs.monitoringForm)
172 211
     },
173 212
     onSubmit() {
174 213
       this.getPropertyData()
@@ -301,6 +340,14 @@ export default {
301 340
       }).catch(() => {
302 341
         console.log('error CarouselGetBanner')
303 342
       })
343
+    },
344
+    equipmentGetAll() {
345
+      const eqData = { type: 1 }
346
+      this.$store.dispatch('EquipmentGetAll', eqData).then((res) => {
347
+        this.equipmentList = res.data
348
+      }).catch(() => {
349
+        console.log('EquipmentGetAll error')
350
+      })
304 351
     }
305 352
   }
306 353
 }