魏熙美 6 gadus atpakaļ
vecāks
revīzija
19a41aff8b
43 mainītis faili ar 855 papildinājumiem un 51 dzēšanām
  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. Binārs
      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 Parādīt failu

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

+ 4
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/IBuildingOwnerInfoController.java Parādīt failu

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

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java Parādīt failu

47
     public ResponseBean login(@RequestBody String parameter,
47
     public ResponseBean login(@RequestBody String parameter,
48
                               HttpSession session){
48
                               HttpSession session){
49
         JSONObject jsonObject = JSONObject.parseObject(parameter);
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
         TaUserVO userVO = (TaUserVO) responseBean.getData();
51
         TaUserVO userVO = (TaUserVO) responseBean.getData();
52
         if (null != userVO) {
52
         if (null != userVO) {
53
             setUserElement(userVO, session);
53
             setUserElement(userVO, session);

+ 3
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserVerifyController.java Parādīt failu

28
     private TaUserVerifyServicel taUserVerifyServicel;
28
     private TaUserVerifyServicel taUserVerifyServicel;
29
 
29
 
30
     @RequestMapping(value = "/user/verify/{userVerifyId}", method = RequestMethod.GET)
30
     @RequestMapping(value = "/user/verify/{userVerifyId}", method = RequestMethod.GET)
31
-    @ApiOperation(value = "获取当前 一个待审核或审核不通过房产", notes = "获取当前 一个待审核或审核不通过房产")
31
+    @ApiOperation(value = "获取 一个房产信息", notes = "获取 一个房产信息")
32
     @ApiImplicitParams({
32
     @ApiImplicitParams({
33
             @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "userVerifyId", value = "审核房产 id"),
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
     public ResponseBean getUserVerify(HttpSession session, @PathVariable("userVerifyId") Integer userVerifyId) {
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
         return responseBean;
37
         return responseBean;
40
     }
38
     }
41
 
39
 
43
     @ApiOperation(value = "添加一个审核的房产", notes = "添加一个审核的房产")
41
     @ApiOperation(value = "添加一个审核的房产", notes = "添加一个审核的房产")
44
     @ApiImplicitParams({
42
     @ApiImplicitParams({
45
             @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
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
     public ResponseBean addUserVerify(@RequestBody String parameter, HttpSession session) {
46
     public ResponseBean addUserVerify(@RequestBody String parameter, HttpSession session) {
49
         ResponseBean responseBean = new ResponseBean();
47
         ResponseBean responseBean = new ResponseBean();

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/WxLoginController.java Parādīt failu

48
 	@RequestMapping(value = "/wx/associated", method = RequestMethod.POST)
48
 	@RequestMapping(value = "/wx/associated", method = RequestMethod.POST)
49
 	@ApiOperation(value = "手机号和验证码 关联微信账号", notes = "手机号和验证码 关联微信账号")
49
 	@ApiOperation(value = "手机号和验证码 关联微信账号", notes = "手机号和验证码 关联微信账号")
50
 	@ApiImplicitParams({
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
 	public ResponseBean associatedWX(@RequestBody String parameter) {
53
 	public ResponseBean associatedWX(@RequestBody String parameter) {
54
 		ResponseBean responseBean = new ResponseBean();
54
 		ResponseBean responseBean = new ResponseBean();
58
 
58
 
59
 	@ApiOperation(value = "注册", notes = "注册")
59
 	@ApiOperation(value = "注册", notes = "注册")
60
 	@ApiImplicitParams({
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
 	@RequestMapping(value = "/wx/register",method = RequestMethod.POST)
63
 	@RequestMapping(value = "/wx/register",method = RequestMethod.POST)
64
 	public ResponseBean register(@RequestBody String parameter) {
64
 	public ResponseBean register(@RequestBody String parameter) {

+ 13
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserVerify.java Parādīt failu

63
 
63
 
64
     private String communityAddress;
64
     private String communityAddress;
65
 
65
 
66
+    /**
67
+     * 审核结果的url
68
+     */
69
+    private String verifyUrl;
70
+
66
     public Integer getId() {
71
     public Integer getId() {
67
         return id;
72
         return id;
68
     }
73
     }
238
     public void setRemark(String remark) {
243
     public void setRemark(String remark) {
239
         this.remark = remark;
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 Parādīt failu

33
      * @param roomNoId
33
      * @param roomNoId
34
      * @return
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 Parādīt failu

7
 import com.community.huiju.model.TaUser;
7
 import com.community.huiju.model.TaUser;
8
 import org.springframework.web.multipart.MultipartFile;
8
 import org.springframework.web.multipart.MultipartFile;
9
 
9
 
10
+import javax.servlet.http.HttpSession;
10
 import java.util.List;
11
 import java.util.List;
11
 
12
 
12
 /**
13
 /**
33
      *
34
      *
34
      * @param loginName
35
      * @param loginName
35
      * @param code      验证码
36
      * @param code      验证码
37
+     * @param session
36
      * @return 用户对象
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
      *
52
      *
51
      * @param response
53
      * @param response
52
      * @param currentUser
54
      * @param currentUser
55
+     * @param session
53
      * @return
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 Parādīt failu

11
 
11
 
12
     /**
12
     /**
13
      * 获取当前 一个待审核或审核不通过房产 的数据
13
      * 获取当前 一个待审核或审核不通过房产 的数据
14
-     * @param userElement
15
      * @param userVerifyId
14
      * @param userVerifyId
16
      * @return
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 Parādīt failu

94
     }
94
     }
95
 
95
 
96
     @Override
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
         ResponseBean responseBean = new ResponseBean();
98
         ResponseBean responseBean = new ResponseBean();
99
         // 1.检验该用户关联有没有这个 户号
99
         // 1.检验该用户关联有没有这个 户号
100
         List<TaUserVerify> taUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getId(),userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId, 1);
100
         List<TaUserVerify> taUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getId(),userElement.getCommunityId(), phaseId, buildingId, unitId, levelId, roomNoId, 1);
106
         Map<String,Object> result = Maps.newHashMap();
106
         Map<String,Object> result = Maps.newHashMap();
107
 
107
 
108
         // 2.检验这个户号是否关联了 户主
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
         if (null != ownerUserVerify) {
110
         if (null != ownerUserVerify) {
111
             TaUser user = taUserMapper.selectByPrimaryKey(ownerUserVerify.getUserId());
111
             TaUser user = taUserMapper.selectByPrimaryKey(ownerUserVerify.getUserId());
112
             result.put("ownerName",user.getUserName());
112
             result.put("ownerName",user.getUserName());
115
             return responseBean;
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
         return responseBean;
119
         return responseBean;
120
     }
120
     }
121
 }
121
 }

+ 15
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Parādīt failu

42
 import org.springframework.web.client.RestTemplate;
42
 import org.springframework.web.client.RestTemplate;
43
 import org.springframework.web.multipart.MultipartFile;
43
 import org.springframework.web.multipart.MultipartFile;
44
 
44
 
45
+import javax.servlet.http.HttpSession;
45
 import java.io.IOException;
46
 import java.io.IOException;
46
 import java.text.ParseException;
47
 import java.text.ParseException;
47
 import java.text.SimpleDateFormat;
48
 import java.text.SimpleDateFormat;
106
 
107
 
107
     @Override
108
     @Override
108
     @Transactional(rollbackFor = Exception.class)
109
     @Transactional(rollbackFor = Exception.class)
109
-    public ResponseBean login(String loginName, String code) {
110
+    public ResponseBean login(String loginName, String code, HttpSession session) {
110
         ResponseBean response = new ResponseBean();
111
         ResponseBean response = new ResponseBean();
111
 
112
 
112
         // 校验手机号和验证码
113
         // 校验手机号和验证码
119
         }
120
         }
120
 
121
 
121
         // 检验登录房产
122
         // 检验登录房产
122
-        checkLogin(response, currentUser);
123
+        checkLogin(response, currentUser, session);
123
 
124
 
124
         return response;
125
         return response;
125
     }
126
     }
173
      * @return
174
      * @return
174
      */
175
      */
175
     @Override
176
     @Override
176
-    public ResponseBean checkLogin(ResponseBean response, TaUser currentUser) {
177
+    public ResponseBean checkLogin(ResponseBean response, TaUser currentUser, HttpSession session) {
177
         // 校验用户
178
         // 校验用户
178
         checkBlacklistStatusUser(currentUser);
179
         checkBlacklistStatusUser(currentUser);
179
 
180
 
193
         List<TaUserVerify> taUserVerifies = taUserVerifyMapper.selectByUserId(currentUser.getId());
194
         List<TaUserVerify> taUserVerifies = taUserVerifyMapper.selectByUserId(currentUser.getId());
194
         // 无关联房产
195
         // 无关联房产
195
         if (null == taUserVerifies || taUserVerifies.size() == 0) {
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
             return response;
202
             return response;
198
         }
203
         }
199
 
204
 
208
 
213
 
209
             return checkHouse(response, taUserVO, userVerify);
214
             return checkHouse(response, taUserVO, userVerify);
210
         } else if (taUserVerifies.size() >= 2) {
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
             return response;
221
             return response;
213
         }
222
         }
214
 
223
 
1045
         }
1054
         }
1046
         String resultCode = "0".equals(verifyStatus) ? UserVerifyEnum.A_TO_AUDIT_REAL_ESTATE.getCode() :
1055
         String resultCode = "0".equals(verifyStatus) ? UserVerifyEnum.A_TO_AUDIT_REAL_ESTATE.getCode() :
1047
                 "2".equals(verifyStatus) ? UserVerifyEnum.A_AUDIT_FAILED_REAL_ESTATE.getCode() : "500";
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
         return responseBean;
1058
         return responseBean;
1050
     }
1059
     }
1051
 
1060
 

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServicelmpl.java Parādīt failu

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

+ 12
- 11
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxLoginServiceImpl.java Parādīt failu

24
 import org.springframework.transaction.annotation.Transactional;
24
 import org.springframework.transaction.annotation.Transactional;
25
 import org.springframework.web.client.RestTemplate;
25
 import org.springframework.web.client.RestTemplate;
26
 
26
 
27
+import java.net.URLDecoder;
28
+import java.net.URLEncoder;
27
 import java.util.Date;
29
 import java.util.Date;
28
 import java.util.Map;
30
 import java.util.Map;
29
 
31
 
72
 			result.put("userInfo", userInfo);
74
 			result.put("userInfo", userInfo);
73
 			result.put("openid", openId);
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
 			return responseBean;
80
 			return responseBean;
77
 		}
81
 		}
78
 
82
 
79
-		responseBean = iTaUserService.checkLogin(responseBean, taUser);
83
+		responseBean = iTaUserService.checkLogin(responseBean, taUser, null);
80
 
84
 
81
 		return responseBean;
85
 		return responseBean;
82
 	}
86
 	}
103
 		// 检验微信绑定
107
 		// 检验微信绑定
104
 		responseBean = checkWX(responseBean, user, parameter);
108
 		responseBean = checkWX(responseBean, user, parameter);
105
 
109
 
110
+		// 检验登录房产
111
+		responseBean = iTaUserService.checkLogin(responseBean, user, null);
112
+
113
+
106
 		return responseBean;
114
 		return responseBean;
107
 	}
115
 	}
108
 
116
 
131
 			responseBean.addError("openid 参数缺失!");
139
 			responseBean.addError("openid 参数缺失!");
132
 			return responseBean;
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
 		user.setOpenid(openid);
143
 		user.setOpenid(openid);
141
-		user.setNickname(userInfoJSON.getString("nickname"));
144
+		user.setNickname(jsonObject.getString("nickname"));
142
 
145
 
143
 		// 更新用户信息
146
 		// 更新用户信息
144
 		taUserMapper.updateByPrimaryKeySelective(user);
147
 		taUserMapper.updateByPrimaryKeySelective(user);
145
 
148
 
146
-		// 检验登录房产
147
-		responseBean = iTaUserService.checkLogin(responseBean, user);
148
-
149
+		responseBean.addSuccess(user);
149
 		return responseBean;
150
 		return responseBean;
150
 	}
151
 	}
151
 
152
 

+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TaUserVO.java Parādīt failu

1
 package com.community.huiju.vo;
1
 package com.community.huiju.vo;
2
 
2
 
3
+import com.community.huiju.model.TaUserVerify;
3
 import lombok.AllArgsConstructor;
4
 import lombok.AllArgsConstructor;
4
 import lombok.Data;
5
 import lombok.Data;
5
 import lombok.NoArgsConstructor;
6
 import lombok.NoArgsConstructor;
6
 
7
 
8
+import java.util.List;
9
+
7
 /**
10
 /**
8
  * 用户数据
11
  * 用户数据
9
  * @author weiximei
12
  * @author weiximei
90
 
93
 
91
     /** 是否绑定了微信 **/
94
     /** 是否绑定了微信 **/
92
     private Integer bindingWX;
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 Parādīt failu

32
 # 登陆的状态跳转url配置
32
 # 登陆的状态跳转url配置
33
 login-code-perproties:
33
 login-code-perproties:
34
   login-code:
34
   login-code:
35
-    1000: /linkBuilding?from=index # 无关联房产
35
+    1000: linkBuilding?from=index # 无关联房产
36
     1001: index  # 关联一个审核通过的房产
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
     1005:    # 该房产,暂无审核通过的业主!关联房产的时候,验证是否可以选择业主进行绑定
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 Parādīt failu

243
       remark = #{remark,jdbcType=VARCHAR}
243
       remark = #{remark,jdbcType=VARCHAR}
244
     where id = #{id,jdbcType=INTEGER}
244
     where id = #{id,jdbcType=INTEGER}
245
   </update>
245
   </update>
246
-  <select id="selectByUserId" resultMap="BaseResultMap" parameterType="integer">
246
+  <select id="selectByUserId" resultType="com.community.huiju.model.TaUserVerify" parameterType="integer">
247
     select
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
   </select>
269
   </select>
252
   <select id="selectCommunityAndAddress" resultMap="BaseResultMap">
270
   <select id="selectCommunityAndAddress" resultMap="BaseResultMap">
253
     select
271
     select

+ 19
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/session/UserElement.java Parādīt failu

3
 import lombok.AllArgsConstructor;
3
 import lombok.AllArgsConstructor;
4
 import lombok.Data;
4
 import lombok.Data;
5
 import lombok.NoArgsConstructor;
5
 import lombok.NoArgsConstructor;
6
+import lombok.ToString;
6
 
7
 
7
 import java.io.Serializable;
8
 import java.io.Serializable;
8
 
9
 
56
     /** 当前登录 户号id **/
57
     /** 当前登录 户号id **/
57
     private Integer roomNoId;
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
 }

Binārs
CODE/smart-community/community-common/target/community-common-0.0.1.jar Parādīt failu


+ 4
- 0
CODE/smart-community/community-common/target/maven-archiver/pom.properties Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

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 Parādīt failu

20
 import menu from './modules/menu'
20
 import menu from './modules/menu'
21
 import message from './modules/message'
21
 import message from './modules/message'
22
 import buildingTree from './modules/buildingTree'
22
 import buildingTree from './modules/buildingTree'
23
+import equipment from './modules/equipment'
23
 
24
 
24
 Vue.use(Vuex)
25
 Vue.use(Vuex)
25
 
26
 
43
     tels,
44
     tels,
44
     menu,
45
     menu,
45
     message,
46
     message,
46
-    buildingTree
47
+    buildingTree,
48
+    equipment
47
   },
49
   },
48
   getters
50
   getters
49
 })
51
 })

+ 24
- 0
VUECODE/smart-property-manage/src/store/modules/equipment.js Parādīt failu

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 Parādīt failu

116
           </el-table-column>
116
           </el-table-column>
117
         </el-table>
117
         </el-table>
118
       </el-tab-pane>
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
     </el-tabs>
146
     </el-tabs>
120
   </div>
147
   </div>
121
 </template>
148
 </template>
132
         remark: '',
159
         remark: '',
133
         pageNum: 1,
160
         pageNum: 1,
134
         pageSize: 100
161
         pageSize: 100
162
+      },
163
+      monitoring: { // 监控数据
164
+
135
       },
165
       },
136
       indexData: [], // APP端菜单列表数据
166
       indexData: [], // APP端菜单列表数据
137
       propertyList: [], // 物业数据列表
167
       propertyList: [], // 物业数据列表
139
       announcementBannerNum: 0, // banner数量
169
       announcementBannerNum: 0, // banner数量
140
       activityBannerNum: 0, // 活动banner数量
170
       activityBannerNum: 0, // 活动banner数量
141
       announcementBannerBool: false, // 是否显示公告的保存按钮
171
       announcementBannerBool: false, // 是否显示公告的保存按钮
142
-      activityBannerNumBool: false // 是否显示活动的保存按钮
172
+      activityBannerNumBool: false, // 是否显示活动的保存按钮
173
+      equipmentList: [] // 处理过后的监控数据
174
+      // equipmentRequestList: [] // 监控数据,后台获取的
143
     }
175
     }
144
   },
176
   },
145
   mounted() {
177
   mounted() {
169
       if (tabName === 'property') {
201
       if (tabName === 'property') {
170
         this.getPropertyData()
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
     onSubmit() {
212
     onSubmit() {
174
       this.getPropertyData()
213
       this.getPropertyData()
301
       }).catch(() => {
340
       }).catch(() => {
302
         console.log('error CarouselGetBanner')
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
 }