dingxin 6 years ago
parent
commit
1e6315b2ec
70 changed files with 4765 additions and 3822 deletions
  1. 0
    1310
      CODE/smart-community-word/.idea/workspace.xml
  2. 3
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AliPayController.java
  3. 9
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BaseController.java
  4. 3
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BillController.java
  5. 5
    7
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/IBuildingOwnerInfoController.java
  6. 11
    11
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java
  7. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserVerifyController.java
  8. 14
    9
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/WxPayController.java
  9. 4
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillInvoiceMapper.java
  10. 35
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillOrderMapper.java
  11. 12
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingMapper.java
  12. 18
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java
  13. 35
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpLevelMapper.java
  14. 33
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpPhaseMapper.java
  15. 34
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpUnitMapper.java
  16. 1
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserVerify.java
  17. 95
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBillOrder.java
  18. 115
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpLevel.java
  19. 55
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpPhase.java
  20. 95
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpUnit.java
  21. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/AliPayServiceI.java
  22. 5
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/BillServiceI.java
  23. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfo.java
  24. 6
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java
  25. 7
    6
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/WxPayServiceI.java
  26. 19
    23
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/AliPayServiceImpl.java
  27. 13
    10
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java
  28. 45
    9
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java
  29. 3
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/ImageServiceimpl.java
  30. 74
    78
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  31. 42
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServicelmpl.java
  32. 150
    113
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxPayServiceImpl.java
  33. 14
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TaUserVO.java
  34. 2
    2
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserVerifyMapper.xml
  35. 3
    3
      CODE/smart-community/app-api/src/main/resources/mapper/TpBillInvoiceMapper.xml
  36. 178
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpBillOrderMapper.xml
  37. 2
    2
      CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingMapper.xml
  38. 2
    2
      CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml
  39. 164
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpLevelMapper.xml
  40. 93
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpPhaseMapper.xml
  41. 141
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpUnitMapper.xml
  42. 15
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/session/UserElement.java
  43. 7
    0
      CODE/smart-community/property-api/pom.xml
  44. 59
    7
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java
  45. 1
    2
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  46. 18
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserVerifyMapper.java
  47. 111
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaUserVerify.java
  48. 11
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java
  49. 33
    2
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfoService.java
  50. 2
    2
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java
  51. 185
    135
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java
  52. 1
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingTreeServiceImpl.java
  53. 0
    1
      CODE/smart-community/property-api/src/main/resources/mapper/TaUserMapper.xml
  54. 5
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TaUserVerifyMapper.xml
  55. 4
    2
      CODE/smart-community/property-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml
  56. BIN
      CODE/smart-community/property-api/src/main/resources/业主资料库.xlsx
  57. 42
    13
      VUECODE/smart-property-manage/src/api/buildingOwnerInfo.js
  58. 43
    2
      VUECODE/smart-property-manage/src/store/modules/buildingOwnerInfo.js
  59. 8
    5
      VUECODE/smart-property-manage/src/views/building/batch/batchImport.vue
  60. 1
    1
      VUECODE/smart-property-manage/src/views/building/buildingdata/BuildingBatchImport.vue
  61. 31
    27
      VUECODE/smart-property-manage/src/views/building/index.vue
  62. 1
    1
      VUECODE/smart-property-manage/src/views/social/activity/edi/index.vue
  63. 1
    1
      VUECODE/smart-property-manage/src/views/social/activity/index.vue
  64. 6
    5
      VUECODE/smart-property-manage/src/views/social/activity/info/index.vue
  65. 24
    15
      VUECODE/smart-property-manage/src/views/social/announcement/details.vue
  66. 13
    14
      VUECODE/smart-property-manage/src/views/social/announcement/edit.vue
  67. 1
    1
      VUECODE/smart-property-manage/src/views/social/announcement/index.vue
  68. 1
    1
      VUECODE/smart-property-manage/src/views/social/signUp/index.vue
  69. 1298
    986
      文档/MYSQL/smartCommunity.pdb
  70. 1298
    986
      文档/MYSQL/smartCommunity.pdm

+ 0
- 1310
CODE/smart-community-word/.idea/workspace.xml
File diff suppressed because it is too large
View File


+ 3
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AliPayController.java View File

@@ -59,13 +59,13 @@ public class AliPayController {
59 59
 	@ApiOperation(value = "统一下单", notes = "统一下单")
60 60
 	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "billInvoiceId", value = "账单Id"),
61 61
 			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token") })
62
-	@RequestMapping(value = "/aliPayOrder/{billInvoiceId}",method = RequestMethod.GET)
63
-	public ResponseBean wxUnifiedOrder(@PathVariable("billInvoiceId") Integer billInvoiceId, HttpSession session){
62
+	@RequestMapping(value = "/aliPayOrder/{outTradeNo}",method = RequestMethod.GET)
63
+	public ResponseBean wxUnifiedOrder(@PathVariable("outTradeNo") String outTradeNo, HttpSession session){
64 64
 		ResponseBean responseBean = new ResponseBean();
65 65
 		UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
66 66
 		String resp = "";
67 67
 		try {
68
-			resp = aliPayService.AliPayOrder(billInvoiceId,userElement);
68
+			resp = aliPayService.AliPayOrder(outTradeNo,userElement);
69 69
 		} catch (Exception e) {
70 70
 			e.printStackTrace();
71 71
 			responseBean.addError(e.getMessage());

+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BaseController.java View File

@@ -65,4 +65,13 @@ public class BaseController {
65 65
         return userElement;
66 66
     }
67 67
 
68
+    /**
69
+     * 删除 用户 session
70
+     * @param session
71
+     */
72
+    protected void removeUserElement(HttpSession session) {
73
+        log.info("用户当前sessionId:{}", session.getId());
74
+        session.removeAttribute(Constant.APP_USER_SESSION);
75
+    }
76
+
68 77
 }

+ 3
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BillController.java View File

@@ -40,13 +40,12 @@ public class BillController extends BaseController {
40 40
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
41 41
 			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
42 42
 	})
43
-	@RequestMapping(value = "/bills/{communityId}/{payType}",method = RequestMethod.GET)
43
+	@RequestMapping(value = "/bills/current_user/{payType}",method = RequestMethod.GET)
44 44
 	public ResponseBean getBillInvoice(@PathVariable Integer communityId,
45 45
 									   @PathVariable Integer payType,
46 46
 									   @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47 47
 									   @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize, HttpSession session){
48
-		UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
49
-		Integer userId = userElement.getId();
48
+		UserElement userElement = getUserElement(session);
50 49
 		ResponseBean responseBean = new ResponseBean();
51 50
 
52 51
 		if (!check(communityId)) {
@@ -54,7 +53,7 @@ public class BillController extends BaseController {
54 53
 			return responseBean;
55 54
 		}
56 55
 
57
-		Map<String, Object> map = billServiceI.getBillsList(communityId, payType, userId, pageNum, pageSize);
56
+		Map<String, Object> map = billServiceI.getBillsList(userElement, payType, pageNum, pageSize);
58 57
 		responseBean.addSuccess(map);
59 58
 		return responseBean;
60 59
 	}

+ 5
- 7
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/IBuildingOwnerInfoController.java View File

@@ -32,30 +32,28 @@ public class IBuildingOwnerInfoController extends BaseController {
32 32
     private IBuildingOwnerInfo iBuildingOwnerInfo;
33 33
 
34 34
     @RequestMapping(value = "/building/select/address", method = RequestMethod.GET)
35
-    @ApiOperation(value = "根据 小区/期/楼栋/单元/楼层/户号", notes = "根据 小区/期/楼栋/单元/楼层/户号")
35
+    @ApiOperation(value = "根据 小区/期/楼栋/单元/楼层/户号 (申请注册绑定)", notes = "根据 小区/期/楼栋/单元/楼层/户号")
36 36
     @ApiImplicitParams({
37 37
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "communityId", value = "小区"),
38 38
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phaseId", value = "期"),
39 39
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "buildingId", value = "楼栋"),
40 40
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "unitId", value = "单元"),
41
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "levelId", value = "楼层"),
42
-            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "roomNoId", value = "户号"),
41
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "levelId", value = "楼层")
43 42
     })
44 43
     public ResponseBean selectByAddress(@RequestParam("communityId") Integer communityId,
45 44
                                         @RequestParam(value = "phaseId", required = false) Integer phaseId,
46 45
                                         @RequestParam(value = "buildingId",required = false) Integer buildingId,
47 46
                                         @RequestParam(value = "unitId", required = false) Integer unitId,
48
-                                        @RequestParam(value = "levelId", required = false) Integer levelId,
49
-                                        @RequestParam(value = "roomNoId", required = false) Integer roomNoId) {
47
+                                        @RequestParam(value = "levelId", required = false) Integer levelId) {
50 48
 
51 49
         ResponseBean responseBean = new ResponseBean();
52
-        responseBean = iBuildingOwnerInfo.selectBuildList(communityId, phaseId, buildingId, unitId, levelId, roomNoId);
50
+        responseBean = iBuildingOwnerInfo.selectBuildList(communityId, phaseId, buildingId, unitId, levelId);
53 51
         return responseBean;
54 52
 
55 53
     }
56 54
 
57 55
     @RequestMapping(value = "/building/has", method = RequestMethod.GET)
58
-    @ApiOperation(value = "根据 小区、期、楼栋、单元、楼层、户号", notes = "根据 小区、期、楼栋、单元、楼层、户号")
56
+    @ApiOperation(value = "根据 小区、期、楼栋、单元、楼层、户号 (并校验这个用户,是否绑定了这个房产)", notes = "根据 小区、期、楼栋、单元、楼层、户号")
59 57
     @ApiImplicitParams({
60 58
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "phaseId", value = "期"),
61 59
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "buildingId", value = "楼栋"),

+ 11
- 11
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java View File

@@ -87,15 +87,14 @@ public class UserController extends BaseController {
87 87
 
88 88
     @ApiOperation(value = "修改手机号", notes = "修改手机号")
89 89
     @ApiImplicitParams({
90
-            @ApiImplicitParam(paramType = "body",dataType = "String",name = "paramets",value = "phone:登陆(手机号),code:(手机验证码),otherUserId:(租客或者家属ID,空为业主本人)"),
90
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "paramets",value = "phone:登陆(手机号),code:(手机验证码)"),
91 91
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
92 92
     })
93 93
             @RequestMapping(value = "/user/phone",method = RequestMethod.PUT)
94 94
     public ResponseBean update(@RequestBody String paramets, HttpSession session){
95 95
         ResponseBean responseBean = new ResponseBean();
96
-        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
97
-        Integer userId=userElement.getId();
98
-        ResponseBean response=iTaUserService.upDateloginName(userId,paramets,userElement.getCommunityId());
96
+        UserElement userElement = getUserElement(session);
97
+        ResponseBean response=iTaUserService.updateLoginName(userElement, paramets);
99 98
         return response;
100 99
     }
101 100
 
@@ -120,13 +119,8 @@ public class UserController extends BaseController {
120 119
     public ResponseBean updateUserNameAndGender(@RequestBody String parameter,
121 120
                                                 HttpSession session){
122 121
         ResponseBean response = new ResponseBean();
123
-
124
-        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
125
-
126
-        TaUser user = JSONObject.parseObject(parameter,TaUser.class);
127
-        user.setId(userElement.getId());
128
-
129
-        response = iTaUserService.modifyUser(user);
122
+        UserElement userElement = getUserElement(session);
123
+        response = iTaUserService.modifyUser(userElement, parameter);
130 124
         return response;
131 125
 
132 126
     }
@@ -231,6 +225,11 @@ public class UserController extends BaseController {
231 225
         ResponseBean response = new ResponseBean();
232 226
         UserElement userElement = getUserElement(session);
233 227
         response = iTaUserService.getUserInfo(userElement,userId);
228
+        if ("1".equals(response.getCode())) {
229
+            // 清空 session
230
+            removeUserElement(session);
231
+            return response;
232
+        }
234 233
         TaUserVO userVO = (TaUserVO) response.getData();
235 234
         userVO.setToken(session.getId());
236 235
 
@@ -244,6 +243,7 @@ public class UserController extends BaseController {
244 243
             @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "communityId", value = "小区Id"),
245 244
     })
246 245
     @RequestMapping(value = "/user/temporary/{communityId}", method = RequestMethod.POST)
246
+    @Deprecated
247 247
     public ResponseBean temporaryLogin(@PathVariable Integer communityId, HttpSession session) {
248 248
         ResponseBean responseBean = new ResponseBean();
249 249
         responseBean = iTaUserService.temporaryLogin(communityId);

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserVerifyController.java View File

@@ -42,7 +42,7 @@ public class UserVerifyController extends BaseController {
42 42
     @ApiOperation(value = "添加一个审核的房产", notes = "添加一个审核的房产")
43 43
     @ApiImplicitParams({
44 44
             @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
45
-            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "roleName角色名称;phase期;building楼栋;unit单元;level楼层;roomNo户号")
45
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "roleName角色名称;phaseId期;buildingId楼栋;unitId单元;levelId楼层;roomNoId户号")
46 46
     })
47 47
     public ResponseBean addUserVerify(@RequestBody String parameter, HttpSession session) {
48 48
         ResponseBean responseBean = new ResponseBean();

+ 14
- 9
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/WxPayController.java View File

@@ -30,6 +30,7 @@ import javax.servlet.http.HttpSession;
30 30
 import java.io.ByteArrayOutputStream;
31 31
 import java.io.InputStream;
32 32
 import java.util.HashMap;
33
+import java.util.List;
33 34
 import java.util.Map;
34 35
 
35 36
 /**
@@ -49,14 +50,14 @@ public class WxPayController {
49 50
 	@ApiOperation(value = "统一下单", notes = "统一下单")
50 51
 	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "billInvoiceId", value = "账单Id"),
51 52
 			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token") })
52
-	@RequestMapping(value = "/wxUnifiedOrder/{billInvoiceId}",method = RequestMethod.GET)
53
-	public ResponseBean wxUnifiedOrder(@PathVariable("billInvoiceId") Integer billInvoiceId, HttpSession session){
53
+	@RequestMapping(value = "/wxUnifiedOrder/{outTradeNo}",method = RequestMethod.GET)
54
+	public ResponseBean wxUnifiedOrder(@PathVariable("outTradeNo") String outTradeNo, HttpSession session){
54 55
 		ResponseBean responseBean = new ResponseBean();
55 56
 		UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
56 57
 		
57 58
 		Map<String, String> resp = Maps.newHashMap();
58 59
 		try {
59
-			resp = wxPayService.wxUnifiedOrder(billInvoiceId,userElement);
60
+			resp = wxPayService.wxUnifiedOrder(outTradeNo,userElement);
60 61
 		} catch (Exception e) {
61 62
 			e.printStackTrace();
62 63
 			responseBean.addError(e.getMessage());
@@ -132,12 +133,16 @@ public class WxPayController {
132 133
 	@ApiOperation(value = "准备开始支付", notes = "准备开始支付")
133 134
 	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "billInvoiceId", value = "账单Id"),
134 135
 			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token") })
135
-	@RequestMapping(value = "/wxStartPay/{billInvoiceId}",method = RequestMethod.POST)
136
-	public ResponseBean wxStartPay(@PathVariable("billInvoiceId") Integer billInvoiceId, HttpSession session){
136
+	@RequestMapping(value = "/wxStartPay",method = RequestMethod.POST)
137
+	public ResponseBean wxStartPay(List<Integer> billInvoiceIdList, HttpSession session){
137 138
 		ResponseBean responseBean = new ResponseBean();
138 139
 		try {
139 140
 			UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
140
-			wxPayService.wxStartPay(billInvoiceId,userElement);
141
+			String outTradeNo = wxPayService.wxStartPay(billInvoiceIdList, userElement);
142
+
143
+			Map<String,Object> resultMap = Maps.newHashMap();
144
+			resultMap.put("outTradeNo", outTradeNo);
145
+			responseBean.addSuccess(resultMap);
141 146
 		} catch (Exception e) {
142 147
 			e.printStackTrace();
143 148
 			responseBean.addError(e.getMessage());
@@ -149,12 +154,12 @@ public class WxPayController {
149 154
 	@ApiOperation(value = "取消支付", notes = "取消支付")
150 155
 	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "billInvoiceId", value = "账单Id"),
151 156
 			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token") })
152
-	@RequestMapping(value = "/wxCancelPay/{billInvoiceId}",method = RequestMethod.POST)
153
-	public ResponseBean wxCancelPay(@PathVariable("billInvoiceId") Integer billInvoiceId, HttpSession session){
157
+	@RequestMapping(value = "/wxCancelPay/{outTradeNo}",method = RequestMethod.POST)
158
+	public ResponseBean wxCancelPay(@PathVariable("outTradeNo") String outTradeNo, HttpSession session){
154 159
 		ResponseBean responseBean = new ResponseBean();
155 160
 		try {
156 161
 			UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
157
-			wxPayService.wxCancelPay(billInvoiceId,userElement);
162
+			wxPayService.wxCancelPay(outTradeNo,userElement);
158 163
 		} catch (Exception e) {
159 164
 			e.printStackTrace();
160 165
 			responseBean.addError(e.getMessage());

+ 4
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillInvoiceMapper.java View File

@@ -24,11 +24,11 @@ public interface TpBillInvoiceMapper {
24 24
     /**
25 25
      * 分页获取缴费和未缴费的数据
26 26
      * @param communityId
27
-     * @param userId
27
+     * @param buildingOwnerInfoId
28 28
      * @param payType
29 29
      * @return
30 30
      */
31
-    List<Map<String, Object>> getBillsList(@Param("communityId") Integer communityId,@Param("userId") Integer userId,@Param("payType") Integer payType);
31
+    List<Map<String, Object>> getBillsList(@Param("communityId") Integer communityId,@Param("buildingOwnerInfoId") Integer buildingOwnerInfoId,@Param("payType") Integer payType);
32 32
     
33 33
     /**
34 34
      * 获取账单的详细信息
@@ -40,11 +40,11 @@ public interface TpBillInvoiceMapper {
40 40
     /**
41 41
      * 获取需要支付的金额
42 42
      * @param billInvoiceId
43
-     * @param userId
43
+     * @param buildingOwnerInfoId
44 44
      * @param communityId
45 45
      * @return
46 46
      */
47
-	TpBillInvoice selectByIdAndUserId(@Param("id") Integer billInvoiceId,@Param("userId") Integer userId,@Param("communityId") Integer communityId);
47
+	TpBillInvoice selectByIdAndBuildingOwnerInfoId(@Param("id") Integer billInvoiceId,@Param("buildingOwnerInfoId") Integer buildingOwnerInfoId,@Param("communityId") Integer communityId);
48 48
     
49 49
     TpBillInvoice selectByOutTradeNo(@Param("outTradeNo") String outTradeNo);
50 50
 

+ 35
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillOrderMapper.java View File

@@ -0,0 +1,35 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpBillOrder;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import org.apache.ibatis.annotations.ResultMap;
7
+import org.apache.ibatis.annotations.Select;
8
+
9
+import java.util.List;
10
+
11
+@Mapper
12
+public interface TpBillOrderMapper {
13
+    int deleteByPrimaryKey(Integer id);
14
+
15
+    int insert(TpBillOrder record);
16
+
17
+    int insertSelective(TpBillOrder record);
18
+
19
+    TpBillOrder selectByPrimaryKey(Integer id);
20
+
21
+    int updateByPrimaryKeySelective(TpBillOrder record);
22
+
23
+    int updateByPrimaryKey(TpBillOrder record);
24
+
25
+    /**
26
+     * 批量插入
27
+     * @param list
28
+     * @return
29
+     */
30
+    int batchInsertSelective(List<TpBillOrder> list);
31
+
32
+    @ResultMap("BaseResultMap")
33
+    @Select("select * from tp_bill_order where order_bumber=#{orderNumber}")
34
+    List<TpBillOrder> selectByOrderBumber(@Param("orderNumber") String orderNumber);
35
+}

+ 12
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingMapper.java View File

@@ -3,6 +3,9 @@ package com.community.huiju.dao;
3 3
 
4 4
 import com.community.huiju.model.TpBuilding;
5 5
 import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+import org.apache.ibatis.annotations.ResultMap;
8
+import org.apache.ibatis.annotations.Select;
6 9
 
7 10
 import java.util.List;
8 11
 
@@ -20,6 +23,14 @@ public interface TpBuildingMapper {
20 23
 
21 24
     int updateByPrimaryKey(TpBuilding record);
22 25
 
23
-
26
+    /**
27
+     * 根据小区id,期id
28
+     * @param communityId
29
+     * @param phaseId
30
+     * @return
31
+     */
32
+    @ResultMap("BaseResultMap")
33
+    @Select("select * from tp_building where community_id=#{communityId} and phase_id=#{phaseId}")
34
+    List<TpBuilding> selectByAddress(@Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId);
24 35
 
25 36
 }

+ 18
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java View File

@@ -44,9 +44,26 @@ public interface TpBuildingOwnerInfoMapper {
44 44
     @ResultMap("BaseResultMap")
45 45
     @Select("select * from tp_building_owner_info where community_id=#{communityId}" +
46 46
             " and phase_id=#{phaseId} and building_id=#{buildingId} and unit_id=#{unitId}" +
47
-            " and level_id=#{levelId} and room_no_id=#{roomNoId} and verify_status=1")
47
+            " and level_id=#{levelId} and id=#{roomNoId} and verify_status=1")
48 48
     TpBuildingOwnerInfo selectCommunityIdAndAddress(@Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId,
49 49
                                                     @Param("buildingId") Integer building, @Param("unitId") Integer unitId,
50 50
                                                     @Param("levelId") Integer level, @Param("roomNoId") Integer roomNoId);
51 51
 
52
+    /*
53
+     * 根据 小区,期,楼栋,单元,楼层
54
+     * @param communityId
55
+     * @param phase
56
+     * @param building
57
+     * @param unit
58
+     * @param level
59
+     * @param roomNo
60
+     * @return
61
+     */
62
+    @ResultMap("BaseResultMap")
63
+    @Select("select * from tp_building_owner_info where community_id=#{communityId}" +
64
+            " and phase_id=#{phaseId} and building_id=#{buildingId} and unit_id=#{unitId}" +
65
+            " and level_id=#{levelId} and verify_status=1")
66
+    List<TpBuildingOwnerInfo> selectByAddress(@Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId,
67
+                                                    @Param("buildingId") Integer building, @Param("unitId") Integer unitId,
68
+                                                    @Param("levelId") Integer level);
52 69
 }

+ 35
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpLevelMapper.java View File

@@ -0,0 +1,35 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpLevel;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.ResultMap;
6
+import org.apache.ibatis.annotations.Select;
7
+
8
+import java.util.List;
9
+
10
+@Mapper
11
+public interface TpLevelMapper {
12
+    int deleteByPrimaryKey(Integer id);
13
+
14
+    int insert(TpLevel record);
15
+
16
+    int insertSelective(TpLevel record);
17
+
18
+    TpLevel selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(TpLevel record);
21
+
22
+    int updateByPrimaryKey(TpLevel record);
23
+
24
+    /**
25
+     * 根据 小区id,期id,楼栋id,单元id 进行查询
26
+     * @param communityId
27
+     * @param phaseId
28
+     * @param buildingId
29
+     * @param unitId
30
+     * @return
31
+     */
32
+    @ResultMap("BaseResultMap")
33
+    @Select("select * from tp_level where community_id=#{communityId} and phase_id=#{phaseId} and building_id=#{buildingId} and unit_id=#{unitId}")
34
+    List<TpLevel> selectByAddress(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId);
35
+}

+ 33
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpPhaseMapper.java View File

@@ -0,0 +1,33 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpPhase;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import org.apache.ibatis.annotations.ResultMap;
7
+import org.apache.ibatis.annotations.Select;
8
+
9
+import java.util.List;
10
+
11
+@Mapper
12
+public interface TpPhaseMapper {
13
+    int deleteByPrimaryKey(Integer id);
14
+
15
+    int insert(TpPhase record);
16
+
17
+    int insertSelective(TpPhase record);
18
+
19
+    TpPhase selectByPrimaryKey(Integer id);
20
+
21
+    int updateByPrimaryKeySelective(TpPhase record);
22
+
23
+    int updateByPrimaryKey(TpPhase record);
24
+
25
+    /**
26
+     * 根据小区查询 期
27
+     * @param communityId
28
+     * @return
29
+     */
30
+    @ResultMap("BaseResultMap")
31
+    @Select("select * from tp_phase where community_id = #{communityId}")
32
+    List<TpPhase> selectByAddress(@Param("communityId") Integer communityId);
33
+}

+ 34
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpUnitMapper.java View File

@@ -0,0 +1,34 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpUnit;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.ResultMap;
6
+import org.apache.ibatis.annotations.Select;
7
+
8
+import java.util.List;
9
+
10
+@Mapper
11
+public interface TpUnitMapper {
12
+    int deleteByPrimaryKey(Integer id);
13
+
14
+    int insert(TpUnit record);
15
+
16
+    int insertSelective(TpUnit record);
17
+
18
+    TpUnit selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(TpUnit record);
21
+
22
+    int updateByPrimaryKey(TpUnit record);
23
+
24
+    /**
25
+     * 根据 小区id,期id,楼栋id 查询
26
+     * @param communityId
27
+     * @param phaseId
28
+     * @param buildingId
29
+     * @return
30
+     */
31
+    @ResultMap("BaseResultMap")
32
+    @Select("select * from tp_unit where community_id=#{communityId} and phase_id=#{phaseId} and building_id=#{buildingId}")
33
+    List<TpUnit> selectByAddress(Integer communityId, Integer phaseId, Integer buildingId);
34
+}

+ 1
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserVerify.java View File

@@ -27,6 +27,7 @@ public class TaUserVerify {
27 27
 
28 28
     private String levelName;
29 29
 
30
+    /** 就是楼栋资料库的id **/
30 31
     private Integer roomNoId;
31 32
 
32 33
     private String roomNoName;

+ 95
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBillOrder.java View File

@@ -0,0 +1,95 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpBillOrder {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer tpBillId;
11
+
12
+    private Integer tpBillInvoiceId;
13
+
14
+    private String orderBumber;
15
+
16
+    private Integer createUser;
17
+
18
+    private Date createDate;
19
+
20
+    private Integer updateUser;
21
+
22
+    private Date updateDate;
23
+
24
+    public Integer getId() {
25
+        return id;
26
+    }
27
+
28
+    public void setId(Integer id) {
29
+        this.id = id;
30
+    }
31
+
32
+    public Integer getCommunityId() {
33
+        return communityId;
34
+    }
35
+
36
+    public void setCommunityId(Integer communityId) {
37
+        this.communityId = communityId;
38
+    }
39
+
40
+    public Integer getTpBillId() {
41
+        return tpBillId;
42
+    }
43
+
44
+    public void setTpBillId(Integer tpBillId) {
45
+        this.tpBillId = tpBillId;
46
+    }
47
+
48
+    public Integer getTpBillInvoiceId() {
49
+        return tpBillInvoiceId;
50
+    }
51
+
52
+    public void setTpBillInvoiceId(Integer tpBillInvoiceId) {
53
+        this.tpBillInvoiceId = tpBillInvoiceId;
54
+    }
55
+
56
+    public String getOrderBumber() {
57
+        return orderBumber;
58
+    }
59
+
60
+    public void setOrderBumber(String orderBumber) {
61
+        this.orderBumber = orderBumber == null ? null : orderBumber.trim();
62
+    }
63
+
64
+    public Integer getCreateUser() {
65
+        return createUser;
66
+    }
67
+
68
+    public void setCreateUser(Integer createUser) {
69
+        this.createUser = createUser;
70
+    }
71
+
72
+    public Date getCreateDate() {
73
+        return createDate;
74
+    }
75
+
76
+    public void setCreateDate(Date createDate) {
77
+        this.createDate = createDate;
78
+    }
79
+
80
+    public Integer getUpdateUser() {
81
+        return updateUser;
82
+    }
83
+
84
+    public void setUpdateUser(Integer updateUser) {
85
+        this.updateUser = updateUser;
86
+    }
87
+
88
+    public Date getUpdateDate() {
89
+        return updateDate;
90
+    }
91
+
92
+    public void setUpdateDate(Date updateDate) {
93
+        this.updateDate = updateDate;
94
+    }
95
+}

+ 115
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpLevel.java View File

@@ -0,0 +1,115 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpLevel {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer phaseId;
11
+
12
+    private String phaseName;
13
+
14
+    private Integer buildingId;
15
+
16
+    private String buildingName;
17
+
18
+    private Integer unitId;
19
+
20
+    private String unitName;
21
+
22
+    private String name;
23
+
24
+    private String sort;
25
+
26
+    private Date createDate;
27
+
28
+    public Integer getId() {
29
+        return id;
30
+    }
31
+
32
+    public void setId(Integer id) {
33
+        this.id = id;
34
+    }
35
+
36
+    public Integer getCommunityId() {
37
+        return communityId;
38
+    }
39
+
40
+    public void setCommunityId(Integer communityId) {
41
+        this.communityId = communityId;
42
+    }
43
+
44
+    public Integer getPhaseId() {
45
+        return phaseId;
46
+    }
47
+
48
+    public void setPhaseId(Integer phaseId) {
49
+        this.phaseId = phaseId;
50
+    }
51
+
52
+    public String getPhaseName() {
53
+        return phaseName;
54
+    }
55
+
56
+    public void setPhaseName(String phaseName) {
57
+        this.phaseName = phaseName == null ? null : phaseName.trim();
58
+    }
59
+
60
+    public Integer getBuildingId() {
61
+        return buildingId;
62
+    }
63
+
64
+    public void setBuildingId(Integer buildingId) {
65
+        this.buildingId = buildingId;
66
+    }
67
+
68
+    public String getBuildingName() {
69
+        return buildingName;
70
+    }
71
+
72
+    public void setBuildingName(String buildingName) {
73
+        this.buildingName = buildingName == null ? null : buildingName.trim();
74
+    }
75
+
76
+    public Integer getUnitId() {
77
+        return unitId;
78
+    }
79
+
80
+    public void setUnitId(Integer unitId) {
81
+        this.unitId = unitId;
82
+    }
83
+
84
+    public String getUnitName() {
85
+        return unitName;
86
+    }
87
+
88
+    public void setUnitName(String unitName) {
89
+        this.unitName = unitName == null ? null : unitName.trim();
90
+    }
91
+
92
+    public String getName() {
93
+        return name;
94
+    }
95
+
96
+    public void setName(String name) {
97
+        this.name = name == null ? null : name.trim();
98
+    }
99
+
100
+    public String getSort() {
101
+        return sort;
102
+    }
103
+
104
+    public void setSort(String sort) {
105
+        this.sort = sort == null ? null : sort.trim();
106
+    }
107
+
108
+    public Date getCreateDate() {
109
+        return createDate;
110
+    }
111
+
112
+    public void setCreateDate(Date createDate) {
113
+        this.createDate = createDate;
114
+    }
115
+}

+ 55
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpPhase.java View File

@@ -0,0 +1,55 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpPhase {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private String name;
11
+
12
+    private String sort;
13
+
14
+    private Date createDate;
15
+
16
+    public Integer getId() {
17
+        return id;
18
+    }
19
+
20
+    public void setId(Integer id) {
21
+        this.id = id;
22
+    }
23
+
24
+    public Integer getCommunityId() {
25
+        return communityId;
26
+    }
27
+
28
+    public void setCommunityId(Integer communityId) {
29
+        this.communityId = communityId;
30
+    }
31
+
32
+    public String getName() {
33
+        return name;
34
+    }
35
+
36
+    public void setName(String name) {
37
+        this.name = name == null ? null : name.trim();
38
+    }
39
+
40
+    public String getSort() {
41
+        return sort;
42
+    }
43
+
44
+    public void setSort(String sort) {
45
+        this.sort = sort == null ? null : sort.trim();
46
+    }
47
+
48
+    public Date getCreateDate() {
49
+        return createDate;
50
+    }
51
+
52
+    public void setCreateDate(Date createDate) {
53
+        this.createDate = createDate;
54
+    }
55
+}

+ 95
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpUnit.java View File

@@ -0,0 +1,95 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpUnit {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer phaseId;
11
+
12
+    private String phaseName;
13
+
14
+    private Integer buildingId;
15
+
16
+    private String buildingName;
17
+
18
+    private String name;
19
+
20
+    private String sort;
21
+
22
+    private Date createDate;
23
+
24
+    public Integer getId() {
25
+        return id;
26
+    }
27
+
28
+    public void setId(Integer id) {
29
+        this.id = id;
30
+    }
31
+
32
+    public Integer getCommunityId() {
33
+        return communityId;
34
+    }
35
+
36
+    public void setCommunityId(Integer communityId) {
37
+        this.communityId = communityId;
38
+    }
39
+
40
+    public Integer getPhaseId() {
41
+        return phaseId;
42
+    }
43
+
44
+    public void setPhaseId(Integer phaseId) {
45
+        this.phaseId = phaseId;
46
+    }
47
+
48
+    public String getPhaseName() {
49
+        return phaseName;
50
+    }
51
+
52
+    public void setPhaseName(String phaseName) {
53
+        this.phaseName = phaseName == null ? null : phaseName.trim();
54
+    }
55
+
56
+    public Integer getBuildingId() {
57
+        return buildingId;
58
+    }
59
+
60
+    public void setBuildingId(Integer buildingId) {
61
+        this.buildingId = buildingId;
62
+    }
63
+
64
+    public String getBuildingName() {
65
+        return buildingName;
66
+    }
67
+
68
+    public void setBuildingName(String buildingName) {
69
+        this.buildingName = buildingName == null ? null : buildingName.trim();
70
+    }
71
+
72
+    public String getName() {
73
+        return name;
74
+    }
75
+
76
+    public void setName(String name) {
77
+        this.name = name == null ? null : name.trim();
78
+    }
79
+
80
+    public String getSort() {
81
+        return sort;
82
+    }
83
+
84
+    public void setSort(String sort) {
85
+        this.sort = sort == null ? null : sort.trim();
86
+    }
87
+
88
+    public Date getCreateDate() {
89
+        return createDate;
90
+    }
91
+
92
+    public void setCreateDate(Date createDate) {
93
+        this.createDate = createDate;
94
+    }
95
+}

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/AliPayServiceI.java View File

@@ -8,9 +8,9 @@ public interface AliPayServiceI {
8 8
 	/**
9 9
 	 * 微信支付统一下单
10 10
 	 * @return
11
-	 * @param billInvoiceId
11
+	 * @param outTradeNo
12 12
 	 * @param userElement
13 13
 	 */
14
-	String AliPayOrder(Integer billInvoiceId, UserElement userElement) throws Exception;
14
+	String AliPayOrder(String outTradeNo, UserElement userElement) throws Exception;
15 15
 	
16 16
 }

+ 5
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/BillServiceI.java View File

@@ -1,18 +1,21 @@
1 1
 package com.community.huiju.service;
2 2
 
3
+import com.community.commom.session.UserElement;
4
+
3 5
 import java.util.List;
4 6
 import java.util.Map;
5 7
 
6 8
 public interface BillServiceI {
7 9
 	/**
8 10
 	 * 根据payType分页获取缴费或未缴费的数据
9
-	 * @param communityId
11
+	 *
12
+	 * @param userElement
10 13
 	 * @param payType
11 14
 	 * @param pageNum
12 15
 	 * @param pageSize
13 16
 	 * @return
14 17
 	 */
15
-	Map<String, Object> getBillsList(Integer communityId, Integer payType, Integer userId ,Integer pageNum, Integer pageSize);
18
+	Map<String, Object> getBillsList(UserElement userElement, Integer payType, Integer pageNum, Integer pageSize);
16 19
 	
17 20
 	/**
18 21
 	 * 获取账单的详细信息

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfo.java View File

@@ -19,13 +19,13 @@ public interface IBuildingOwnerInfo {
19 19
      * @param buildingId
20 20
      * @param unitId
21 21
      * @param levelId
22
-     * @param roomNoId
23 22
      * @return
24 23
      */
25
-    ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId);
24
+    ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId);
26 25
 
27 26
     /**
28 27
      * 根据 小区/期/楼栋/单元/楼层/户号
28
+     * 并校验这个用户,是否绑定了这个房产
29 29
      * @param phaseId
30 30
      * @param buildingId
31 31
      * @param unitId

+ 6
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java View File

@@ -43,10 +43,11 @@ public interface ITaUserService {
43 43
 
44 44
     /**
45 45
      * 修改当前用户手机号
46
-     * @param id
46
+     * @param userElement
47
+     * @param paramets
47 48
      * @return
48 49
      */
49
-    ResponseBean upDateloginName(Integer id, String paramets,Integer communityId);
50
+    ResponseBean updateLoginName(UserElement userElement, String paramets);
50 51
 
51 52
     /**
52 53
      * 获取房屋成员列表
@@ -57,10 +58,11 @@ public interface ITaUserService {
57 58
 
58 59
     /**
59 60
      * 修改用户
60
-     * @param user
61
+     * @param userElement
62
+     * @param parameter
61 63
      * @return
62 64
      */
63
-    ResponseBean modifyUser(TaUser user);
65
+    ResponseBean modifyUser(UserElement userElement, String parameter);
64 66
 
65 67
     /**
66 68
      * 停用用户 或者 启用用户

+ 7
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/WxPayServiceI.java View File

@@ -2,16 +2,17 @@ package com.community.huiju.service;
2 2
 
3 3
 import com.community.commom.session.UserElement;
4 4
 
5
+import java.util.List;
5 6
 import java.util.Map;
6 7
 
7 8
 public interface WxPayServiceI {
8 9
 	/**
9 10
 	 * 微信支付统一下单
10 11
 	 * @return
11
-	 * @param billInvoiceId
12
+	 * @param outTradeNo
12 13
 	 * @param userElement
13 14
 	 */
14
-	Map<String, String> wxUnifiedOrder(Integer billInvoiceId, UserElement userElement) throws Exception;
15
+	Map<String, String> wxUnifiedOrder(String outTradeNo, UserElement userElement) throws Exception;
15 16
 	
16 17
 	/**
17 18
 	 * 支付成功的回调
@@ -28,16 +29,16 @@ public interface WxPayServiceI {
28 29
 	
29 30
 	/**
30 31
 	 * 准备支付
31
-	 * @param billInvoiceId
32
+	 * @param billInvoiceIdArray
32 33
 	 * @param userElement
33 34
 	 * @throws Exception
34 35
 	 */
35
-	void wxStartPay(Integer billInvoiceId, UserElement userElement) throws Exception;
36
+	String wxStartPay(List<Integer> billInvoiceIdArray, UserElement userElement) throws Exception;
36 37
 	
37 38
 	/**
38 39
 	 * 取消支付
39
-	 * @param billInvoiceId
40
+	 * @param outTradeNo 订单号
40 41
 	 * @param userElement
41 42
 	 */
42
-	void wxCancelPay(Integer billInvoiceId, UserElement userElement) throws Exception;
43
+	void wxCancelPay(String outTradeNo, UserElement userElement) throws Exception;
43 44
 }

+ 19
- 23
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/AliPayServiceImpl.java View File

@@ -11,15 +11,13 @@ import com.community.huiju.common.wxpay.HfWxConfig;
11 11
 import com.community.huiju.common.wxpay.WXPay;
12 12
 import com.community.huiju.common.wxpay.WXPayConstants;
13 13
 import com.community.huiju.common.wxpay.WXPayUtil;
14
-import com.community.huiju.dao.TaSysRoleMapper;
15
-import com.community.huiju.dao.TaUserMapper;
16
-import com.community.huiju.dao.TpBillInvoiceMapper;
17
-import com.community.huiju.dao.TpBillMapper;
18
-import com.community.huiju.dao.TpBillStatementMapper;
14
+import com.community.huiju.dao.*;
19 15
 import com.community.huiju.model.TaSysRole;
20 16
 import com.community.huiju.model.TaUser;
21 17
 import com.community.huiju.model.TpBillInvoice;
18
+import com.community.huiju.model.TpBillOrder;
22 19
 import com.community.huiju.service.AliPayServiceI;
20
+import org.apache.commons.collections.CollectionUtils;
23 21
 import org.slf4j.Logger;
24 22
 import org.slf4j.LoggerFactory;
25 23
 import org.springframework.beans.factory.annotation.Autowired;
@@ -28,6 +26,7 @@ import org.springframework.stereotype.Service;
28 26
 import org.springframework.transaction.annotation.Transactional;
29 27
 
30 28
 import java.math.BigDecimal;
29
+import java.util.List;
31 30
 
32 31
 import static com.alipay.api.AlipayConstants.CHARSET_UTF8;
33 32
 
@@ -54,6 +53,9 @@ public class AliPayServiceImpl implements AliPayServiceI {
54 53
 
55 54
 	@Autowired
56 55
 	private TaSysRoleMapper taSysRoleMapper;
56
+
57
+	@Autowired
58
+	private TpBillOrderMapper tpBillOrderMapper;
57 59
 	
58 60
 	@Value("${alipay.APP_PRIVATE_KEY}")
59 61
 	private String APP_PRIVATE_KEY;
@@ -68,29 +70,23 @@ public class AliPayServiceImpl implements AliPayServiceI {
68 70
 	 * 支付宝统一下单
69 71
 	 *
70 72
 	 * @return
71
-	 * @param billInvoiceId
73
+	 * @param outTradeNo
72 74
 	 * @param userElement
73 75
 	 */
74 76
 	@Override
75 77
 	@Transactional(rollbackFor = Exception.class)
76
-	public String AliPayOrder(Integer billInvoiceId, UserElement userElement) throws Exception {
78
+	public String AliPayOrder(String outTradeNo, UserElement userElement) throws Exception {
77 79
 		Integer userId = userElement.getId();
78 80
 
79
-		// 如果是家属/租客, 应该用业主的用户id
80
-		TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
81
-		TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(userId);
82
-		if (null != taSysRole && taSysRole.getId().intValue() != 1) {
83
-			TaUser ownerUser = taUserMapper.selectByPrimaryKey(taUser.getParentId());
84
-			userId = ownerUser.getId();
85
-		}
86
-
87 81
 		//获取支付金额
88
-		TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByIdAndUserId(billInvoiceId,userId,userElement.getCommunityId());
89
-		if (null == tpBillInvoice){
82
+		List<TpBillOrder> billOrderList = tpBillOrderMapper.selectByOrderBumber(outTradeNo);
83
+		if (CollectionUtils.isEmpty(billOrderList)){
90 84
 			throw new Exception("订单不存在");
91
-		}else if (!tpBillInvoice.getBillStatus().equals("3")){
92
-			throw new Exception("不是正在支付的订单");
93 85
 		}
86
+
87
+		// 计算金额
88
+		Integer payPrice = billOrderList.stream().mapToInt(e -> tpBillInvoiceMapper.selectByPrimaryKey(e.getTpBillInvoiceId()).getPayPrice()).sum();
89
+
94 90
 		
95 91
 		//下单
96 92
 		AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do", ALI_APP_ID, APP_PRIVATE_KEY, "json", CHARSET_UTF8, ALIPAY_PUBLIC_KEY, "RSA2");
@@ -98,11 +94,11 @@ public class AliPayServiceImpl implements AliPayServiceI {
98 94
 		AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
99 95
 		//SDK已经封装掉了公共参数,这里只需要传入业务参数。以下方法为sdk的model入参方式(model和biz_content同时存在的情况下取biz_content)。
100 96
 		AlipayTradeAppPayModel model = new AlipayTradeAppPayModel();
101
-		model.setBody(tpBillInvoice.getBillName());
102
-		model.setSubject(tpBillInvoice.getBillName());
103
-		model.setOutTradeNo(tpBillInvoice.getOutTradeNo());
97
+		model.setBody("缴费");
98
+		model.setSubject("缴费");
99
+		model.setOutTradeNo(outTradeNo);
104 100
 		model.setTimeoutExpress("30m");
105
-		model.setTotalAmount(BigDecimal.valueOf(Long.valueOf(tpBillInvoice.getPayPrice())).divide(new BigDecimal(100)).toString());
101
+		model.setTotalAmount(BigDecimal.valueOf(Long.valueOf(payPrice)).divide(new BigDecimal(100)).toString());
106 102
 		model.setProductCode("QUICK_MSECURITY_PAY");
107 103
 		request.setBizModel(model);
108 104
 		request.setNotifyUrl("http://106.14.20.193:8086/app-api/aliPayNotify");

+ 13
- 10
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java View File

@@ -1,10 +1,13 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.community.commom.session.UserElement;
3 4
 import com.community.huiju.dao.TaSysRoleMapper;
4 5
 import com.community.huiju.dao.TaUserMapper;
6
+import com.community.huiju.dao.TaUserVerifyMapper;
5 7
 import com.community.huiju.dao.TpBillInvoiceMapper;
6 8
 import com.community.huiju.model.TaSysRole;
7 9
 import com.community.huiju.model.TaUser;
10
+import com.community.huiju.model.TaUserVerify;
8 11
 import com.community.huiju.service.BillServiceI;
9 12
 import com.github.pagehelper.Page;
10 13
 import com.github.pagehelper.PageHelper;
@@ -30,30 +33,30 @@ public class BillServiceImpl implements BillServiceI {
30 33
 
31 34
 	@Autowired
32 35
 	private TaSysRoleMapper taSysRoleMapper;
36
+
37
+	@Autowired
38
+	private TaUserVerifyMapper taUserVerifyMapper;
33 39
 	
34 40
 	/**
35 41
 	 * 根据payType分页获取缴费或未缴费的数据
36
-	 * @param communityId
42
+	 * @param userElement
37 43
 	 * @param payType
38 44
 	 * @param pageNum
39 45
 	 * @param pageSize
40 46
 	 * @return
41 47
 	 */
42 48
 	@Override
43
-	public Map<String, Object> getBillsList(Integer communityId, Integer payType, Integer userId ,Integer pageNum, Integer pageSize) {
49
+	public Map<String, Object> getBillsList(UserElement userElement, Integer payType, Integer pageNum, Integer pageSize) {
44 50
 		//使用分页插件
45 51
 		Page<Map<String,Object>> page = PageHelper.startPage(pageNum, pageSize);
46 52
 
47
-		TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
53
+		/**
54
+		 * 账单 关联的是房产, 查询 审核表, 审核表里面的 roomNoId 就是楼栋资料库的id
55
+ 		 */
48 56
 
49
-		TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(userId);
50
-		// 如果不是业主
51
-		if (null != taSysRole && taSysRole.getId().intValue() != 1) {
52
-			TaUser ownerUser = taUserMapper.selectByPrimaryKey(taUser.getParentId());
53
-			userId = ownerUser.getId();
54
-		}
57
+		TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
55 58
 
56
-		List<Map<String,Object>> billsList = tpBillInvoiceMapper.getBillsList(communityId, userId, payType);
59
+		List<Map<String,Object>> billsList = tpBillInvoiceMapper.getBillsList(userElement.getCommunityId(), userVerify.getRoomNoId(), payType);
57 60
 		billsList.forEach(e-> {
58 61
 			String payPrice = String.valueOf(e.get("payPrice"));
59 62
 			Double payPriceDouble = Double.parseDouble(payPrice) / 100;

+ 45
- 9
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java View File

@@ -3,13 +3,8 @@ package com.community.huiju.service.impl;
3 3
 import com.alibaba.fastjson.JSONObject;
4 4
 import com.community.commom.mode.ResponseBean;
5 5
 import com.community.commom.session.UserElement;
6
-import com.community.huiju.dao.TaUserVerifyMapper;
7
-import com.community.huiju.dao.TpBuildingMapper;
8
-import com.community.huiju.dao.TpBuildingOwnerInfoMapper;
9
-import com.community.huiju.model.TaUserVerify;
10
-import com.community.huiju.model.TpBuilding;
11
-import com.community.huiju.model.TpBuildingOwnerInfo;
12
-import com.community.huiju.model.TpTransaction;
6
+import com.community.huiju.dao.*;
7
+import com.community.huiju.model.*;
13 8
 import com.community.huiju.service.IBuildingOwnerInfo;
14 9
 import com.github.pagehelper.Page;
15 10
 import com.github.pagehelper.PageHelper;
@@ -29,21 +24,62 @@ import java.util.Map;
29 24
 @Service
30 25
 public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
31 26
 
27
+    /**
28
+     * 栋
29
+     */
32 30
     @Autowired
33 31
     private TpBuildingMapper tpBuildingMapper;
34 32
 
33
+    /**
34
+     * 户号 /  楼栋资料库
35
+     */
35 36
     @Autowired
36 37
     private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
37 38
 
38 39
     @Autowired
39 40
     private TaUserVerifyMapper taUserVerifyMapper;
40 41
 
42
+    /**
43
+     * 期
44
+     */
45
+    @Autowired
46
+    private TpPhaseMapper tpPhaseMapper;
47
+
48
+    /**
49
+     * 单元
50
+     */
51
+    @Autowired
52
+    private TpUnitMapper tpUnitMapper;
53
+
54
+    /**
55
+     * 楼层
56
+     */
57
+    @Autowired
58
+    private TpLevelMapper tpLevelMapper;
59
+
60
+
41 61
     @Override
42
-    public ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId, Integer roomNoId) {
62
+    public ResponseBean selectBuildList(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId) {
43 63
         ResponseBean responseBean = new ResponseBean();
44 64
 
65
+        // 查询 期 -> 栋 -> 单元 -> 楼层 -> 户号
66
+        if (null == phaseId && null == buildingId && null == unitId && null == levelId) {
67
+            List<TpPhase> phaseList = tpPhaseMapper.selectByAddress(communityId);
68
+            responseBean.addSuccess(phaseList);
69
+        } else if (null == buildingId && null == unitId && null == levelId) {
70
+            List<TpBuilding> buildingList = tpBuildingMapper.selectByAddress(communityId, phaseId);
71
+            responseBean.addSuccess(buildingList);
72
+        } else if (null == unitId && null == levelId) {
73
+            List<TpUnit> unitList = tpUnitMapper.selectByAddress(communityId, phaseId, buildingId);
74
+            responseBean.addSuccess(unitList);
75
+        } else if (null == levelId) {
76
+            List<TpLevel> levelList = tpLevelMapper.selectByAddress(communityId, phaseId, buildingId, unitId);
77
+            responseBean.addSuccess(levelList);
78
+        } else {
79
+            List<TpBuildingOwnerInfo> buildingOwnerInfoList = tpBuildingOwnerInfoMapper.selectByAddress(communityId, phaseId, buildingId, unitId, levelId);
80
+            responseBean.addSuccess(buildingOwnerInfoList);
81
+        }
45 82
 
46
-        responseBean.addSuccess(null);
47 83
         return responseBean;
48 84
     }
49 85
 

+ 3
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/ImageServiceimpl.java View File

@@ -6,6 +6,9 @@ import org.springframework.stereotype.Service;
6 6
 import org.springframework.web.multipart.MultipartFile;
7 7
 
8 8
 import java.io.ByteArrayInputStream;
9
+import java.io.File;
10
+import java.io.FileInputStream;
11
+import java.io.FileNotFoundException;
9 12
 import java.io.IOException;
10 13
 import java.util.Date;
11 14
 

+ 74
- 78
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java View File

@@ -239,35 +239,18 @@ public class TaUserServiceImpl implements ITaUserService {
239 239
 
240 240
     @Transactional(rollbackFor = Exception.class)
241 241
     @Override
242
-    public ResponseBean upDateloginName(Integer id, String paramets,Integer communityId) {
242
+    public ResponseBean updateLoginName(UserElement userElement, String paramets) {
243 243
         ResponseBean response = new ResponseBean();
244 244
 
245 245
         JSONObject jsonObject = JSONObject.parseObject(paramets);
246 246
         String phone = (String) jsonObject.get("phone");
247 247
         String code = (String) jsonObject.get("code");
248
-        String otherUserId = (String) jsonObject.get("otherUserId");
249 248
 
250
-        // 默认为当前用户
251
-        Integer userId = id;
249
+        TaUser user=taUserMapper.selectByPrimaryKey(userElement.getId());
252 250
 
253
-        if (StringUtils.isNotBlank(otherUserId)) {
254
-            /**校验otherUserId是否为当前登入用户的家属和业主**/
255
-            response=getTaFaceParentId( id, Integer.valueOf(otherUserId));
256
-            if ("1".equals(response.getCode())) {
257
-                return response;
258
-            }
259
-            userId = Integer.valueOf(otherUserId.trim());
260
-        }
251
+        // 校验手机号和验证码
252
+        iCode.checkPhoneAndCode(phone, code);
261 253
 
262
-        TaUser user=taUserMapper.selectByPrimaryKey(userId);
263
-        //系统验证码
264
-        String  codes= (String) AppkeyCache.getCache(phone);
265
-        //用户电话
266
-            /*String  phones=user.getLoginName();*/
267
-        if (!AccountValidatorUtil.isPhone(phone)){
268
-            response.addError("请输入正确的手机号!");
269
-            return response;
270
-        }
271 254
         //当前小区下的电话校验
272 255
         TaUser loginName=taUserMapper.getByLoginName(user.getCommunityId(),phone);
273 256
         if (null!=loginName)  {
@@ -282,42 +265,35 @@ public class TaUserServiceImpl implements ITaUserService {
282 265
             return response;
283 266
         }
284 267
 
285
-        if ("1234".equals(code)) {
268
+        // 修改号码
269
+        TaUser taUser=new TaUser();
270
+        taUser.setLoginName(phone);
271
+        taUser.setId(user.getId());
272
+        taUser.setUpdateDate(new Date());
273
+        taUser.setUpdateUser(user.getId());
274
+        taUserMapper.updateLongName(taUser);
275
+        response.addSuccess("修改成功");
286 276
 
287
-        }else if (StringUtils.isBlank(code) || !codes.equals(code)) {
288
-            response.addError("验证码错误!");
289
-            return response;
290
-        }
291
-            TaUser taUser=new TaUser();
292
-            taUser.setLoginName(phone);
293
-            taUser.setId(userId);
294
-            taUser.setUpdateDate(new Date());
295
-            taUser.setUpdateUser(id);
296
-            taUserMapper.updateLongName(taUser);
297
-            response.addSuccess("修改成功");
298
-            AppkeyCache.setCache(user.getLoginName(),"null");
277
+        /**
278
+         * 如果是 家属或者租客,修改手机号, 就不允许修改资料库的信息
279
+         * 根据房产判断 当前是否是 业主
280
+         */
299 281
 
282
+        TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
283
+        TaSysRole sysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
300 284
 
301
-            /**
302
-             * 如果是家属或者租客,修改手机号, 就不允许修改资料库的信息
303
-             */
285
+        // 修改楼栋信息资料库的手机号
286
+        // 1 业主 2 租客 3 家属
287
+        // 只允许业主修改
288
+        if (null != sysRole && sysRole.getId().intValue() == 1) {
289
+            TpBuildingOwnerInfo buildingOwnerInfo = tpBuildingOwnerInfoMapper.selectByPrimaryKey(userVerify.getRoomNoId());
290
+            buildingOwnerInfo.setOwnerTel(phone);
291
+            tpBuildingOwnerInfoMapper.updateByPrimaryKeySelective(buildingOwnerInfo);
292
+        }
304 293
 
305
-            // 修改楼栋信息资料库的手机号
306
-            Map<String, Object> roleMap = Maps.newHashMap();
307
-            roleMap.put("communityId", user.getCommunityId());
308
-            roleMap.put("userId", userId);
309
-            TaSysUserRole taSysUserRole = taSysUserRoleMapper.selectByCommunityIdAndUserId(roleMap);
310
-            // 1 业主 2 租客 3 家属
311
-            // 只允许业主修改
312
-            if (taSysUserRole.getRoleId().intValue() == 1) {
313
-                // TODO 后期可能会有一个业主对应多个小区, 也就是会有多个资料, 具体看需求
314
-                // TODO 目前是一对一
315
-                TpBuildingOwnerInfo buildingOwnerInfo = tpBuildingOwnerInfoMapper.selectByPrimaryKey(user.getBuildingOwnerInfoId());
316
-                buildingOwnerInfo.setOwnerTel(phone);
317
-                tpBuildingOwnerInfoMapper.updateByPrimaryKeySelective(buildingOwnerInfo);
318
-            }
319
-            response.addSuccess(new String[0]);
320
-            return response;
294
+        // 给前端返回一个空数组
295
+        response.addSuccess(new String[0]);
296
+        return response;
321 297
     }
322 298
 
323 299
     public ResponseBean getTaFaceParentId(Integer userId,Integer otherUserId){
@@ -346,28 +322,33 @@ public class TaUserServiceImpl implements ITaUserService {
346 322
 
347 323
     @Transactional(rollbackFor = Exception.class)
348 324
     @Override
349
-    public ResponseBean modifyUser(TaUser user) {
325
+    public ResponseBean modifyUser(UserElement userElement, String parameter) {
350 326
 
351 327
         ResponseBean response = new ResponseBean();
352 328
 
353
-        TaUser taUser = taUserMapper.selectByPrimaryKey(user.getId());
354
-        HashMap map= new HashMap<>();
355
-                map.put("communityId",taUser.getCommunityId());
356
-                map.put("userId",taUser.getId());
357
-        TaSysUserRole TaSysUserRole= taSysUserRoleMapper.selectByCommunityIdAndUserId(map);
329
+        // 前台提交的数据
330
+        TaUser user = JSONObject.parseObject(parameter, TaUser.class);
331
+        // 数据库数据
332
+        TaUser taUser = taUserMapper.selectByPrimaryKey(userElement.getId());
333
+
334
+        /**
335
+         * 判断是否 是业主,如果业主就连着 楼栋资料库 信息修改
336
+         */
337
+
338
+        TaSysRole sysRole = taSysRoleMapper.selectByPrimaryKey(userElement.getUserVerifyId());
339
+
358 340
         BeanTools.copyProperties(user, taUser);
359
-            int result = taUserMapper.updateByPrimaryKeySelective(taUser);
360
-            int VerifyStatus= Integer.parseInt(taUser.getVerifyStatus());
361
-            int Role= TaSysUserRole.getRoleId();
362
-            if (1==VerifyStatus &&1==Role) {
363
-            TpBuildingOwnerInfo TpBuildingOwnerInfo = new TpBuildingOwnerInfo();
364
-            TpBuildingOwnerInfo.setOwnerName(user.getUserName());
365
-            TpBuildingOwnerInfo.setGender(user.getGender());
366
-            TpBuildingOwnerInfo.setOwnerTel(user.getLoginName());
367
-            TpBuildingOwnerInfo.setUpdateDate(new Date());
368
-            TpBuildingOwnerInfo.setUpdateUser(taUser.getId());
369
-            TpBuildingOwnerInfo.setId(taUser.getBuildingOwnerInfoId());
370
-            tpBuildingOwnerInfoMapper.updateByPrimaryKeySelective(TpBuildingOwnerInfo);
341
+        int result = taUserMapper.updateByPrimaryKeySelective(taUser);
342
+        // int VerifyStatus= Integer.parseInt(taUser.getVerifyStatus());
343
+        if (1 == sysRole.getId()) {
344
+            TpBuildingOwnerInfo tpBuildingOwnerInfo = new TpBuildingOwnerInfo();
345
+            tpBuildingOwnerInfo.setOwnerName(user.getUserName());
346
+            tpBuildingOwnerInfo.setGender(user.getGender());
347
+            tpBuildingOwnerInfo.setOwnerTel(user.getLoginName());
348
+            tpBuildingOwnerInfo.setUpdateDate(new Date());
349
+            tpBuildingOwnerInfo.setUpdateUser(taUser.getId());
350
+            tpBuildingOwnerInfo.setId(userElement.getRoomNoId());
351
+            tpBuildingOwnerInfoMapper.updateByPrimaryKeySelective(tpBuildingOwnerInfo);
371 352
         }
372 353
         if (result > 0){
373 354
             response.addSuccess("修改成功!");
@@ -520,10 +501,10 @@ public class TaUserServiceImpl implements ITaUserService {
520 501
             response.addError("当前用户不存在!");
521 502
             return response;
522 503
         }
523
-        if (taUser.getVerifyStatus().equals("0") || taUser.getVerifyStatus().equals("2")) {
524
-            response.addError("对不起,您未认证或认证已作废!");
525
-            return response;
526
-        }
504
+//        if (taUser.getVerifyStatus().equals("0") || taUser.getVerifyStatus().equals("2")) {
505
+//            response.addError("对不起,您未认证或认证已作废!");
506
+//            return response;
507
+//        }
527 508
         // 当前用户的身份
528 509
         TaSysRole role = taSysRoleMapper.findRoleByUserId(taUser.getId());
529 510
         if (!"OWNER".equals(role.getRoleName())) {
@@ -807,13 +788,22 @@ public class TaUserServiceImpl implements ITaUserService {
807 788
         // 获取用户
808 789
         TaUser user = taUserMapper.selectByPrimaryKey(userElement.getId());
809 790
         if (null == user) {
810
-            response.addError("业主用户不存在!");
791
+            response.addError("用户不存在!");
811 792
             return response;
812 793
         }
794
+        // 当 解除了这个房产关联关系的时候,就不能获取到用户信息
795
+        TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
796
+        if (null == userVerify) {
797
+            response.addError("无关联该房产");
798
+            return response;
799
+        }
800
+
801
+        // 查询 家属或者租客
813 802
         if (null != userId) {
814 803
             TaUser todUser = taUserMapper.selectByPrimaryKey(userId);
804
+            TaUserVerify todUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userId, userElement.getCommunityId(), userElement.getPhaseId(), userElement.getBuildingId(), userElement.getUnitId(), userElement.getLevelId(), userElement.getRoomNoId());
815 805
             // 判断 家属或者租客 属不属于这个业主的下面
816
-            if (todUser != null && !user.getId().equals(todUser.getParentId())) {
806
+            if (null == todUserVerify) {
817 807
                 response.addError("您的下面没有该家属或者租客!");
818 808
                 return response;
819 809
             }
@@ -970,8 +960,14 @@ public class TaUserServiceImpl implements ITaUserService {
970 960
         if ("1".equals(verifyStatus)) {
971 961
             // 设置 userVO 信息
972 962
             setUserVoProperties(userVerify.getCommunityId(), taUserVO);
973
-
963
+            taUserVO.setPhaseId(userVerify.getPhaseId());
964
+            taUserVO.setBuildingId(userVerify.getBuildingId());
965
+            taUserVO.setUnitId(userVerify.getUnitId());
966
+            taUserVO.setLevelId(userVerify.getLevelId());
967
+            taUserVO.setRoomNoId(userVerify.getRoomNoId());
974 968
             taUserVO.setAddressBuilding(userVerify.getPhaseName() + userVerify.getBuildingName() + userVerify.getUnitName() + userVerify.getLevelName() + userVerify.getRoomNoName());
969
+
970
+
975 971
             TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
976 972
             taUserVO.setRole(taSysRole.getRoleName());
977 973
 

+ 42
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServicelmpl.java View File

@@ -33,15 +33,42 @@ public class TaUserVerifyServicelmpl implements TaUserVerifyServicel {
33 33
     @Autowired
34 34
     private TaSysRoleMapper taSysRoleMapper;
35 35
 
36
-    @Autowired
37
-    private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
38
-
39 36
     @Autowired
40 37
     private SysNationMapper sysNationMapper;
41 38
 
42 39
     @Autowired
43 40
     private TaUserMapper taUserMapper;
44 41
 
42
+    /**
43
+     * 期
44
+     */
45
+    @Autowired
46
+    private TpPhaseMapper tpPhaseMapper;
47
+
48
+    /**
49
+     * 单元
50
+     */
51
+    @Autowired
52
+    private TpUnitMapper tpUnitMapper;
53
+
54
+    /**
55
+     * 楼层
56
+     */
57
+    @Autowired
58
+    private TpLevelMapper tpLevelMapper;
59
+
60
+    /**
61
+     * 栋
62
+     */
63
+    @Autowired
64
+    private TpBuildingMapper tpBuildingMapper;
65
+
66
+    /**
67
+     * 户号 /  楼栋资料库
68
+     */
69
+    @Autowired
70
+    private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
71
+
45 72
     @Override
46 73
     public ResponseBean getToAuditNotApproved(UserElement userElement, Integer userVerifyId) {
47 74
         ResponseBean responseBean = new ResponseBean();
@@ -50,7 +77,6 @@ public class TaUserVerifyServicelmpl implements TaUserVerifyServicel {
50 77
         taUserVerify.setRoleName(taSysRole.getRoleName());
51 78
         if ("2".equals(taUserVerify.getVerifyStatus())) {
52 79
 
53
-            // TODO 楼栋资料库查询有变动
54 80
             // 开始查询 业主
55 81
             TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(taUserVerify.getCommunityId(), taUserVerify.getPhaseId(), taUserVerify.getBuildingId(), taUserVerify.getUnitId(), taUserVerify.getLevelId(), taUserVerify.getRoomNoId());
56 82
             taUserVerify.setOwnerName(tpBuildingOwnerInfo.getOwnerName());
@@ -71,11 +97,23 @@ public class TaUserVerifyServicelmpl implements TaUserVerifyServicel {
71 97
         String roleName = jsonObject.getString("roleName");
72 98
         TaSysRole sysRole = taSysRoleMapper.selectByRoleName(roleName);
73 99
 
100
+        // 查询 期/栋/单元/楼层/户号 -> 设置 相应 id 和 name
101
+        TpPhase phase = tpPhaseMapper.selectByPrimaryKey(taUserVerify.getPhaseId());
102
+        TpBuilding building = tpBuildingMapper.selectByPrimaryKey(taUserVerify.getBuildingId());
103
+        TpUnit unit = tpUnitMapper.selectByPrimaryKey(taUserVerify.getUnitId());
104
+        TpLevel level = tpLevelMapper.selectByPrimaryKey(taUserVerify.getLevelId());
105
+        TpBuildingOwnerInfo buildingOwnerInfo = tpBuildingOwnerInfoMapper.selectByPrimaryKey(taUserVerify.getRoomNoId());
106
+
74 107
         taUserVerify.setRoleId(sysRole.getId());
75 108
         taUserVerify.setCommunityId(userElement.getCommunityId());
76 109
         taUserVerify.setUserId(userElement.getId());
77 110
         taUserVerify.setVerifyStatus("0");
78 111
         taUserVerify.setCreateDate(new Date());
112
+        taUserVerify.setPhaseName(phase.getName());
113
+        taUserVerify.setBuildingName(building.getName());
114
+        taUserVerify.setUnitName(unit.getName());
115
+        taUserVerify.setLevelName(level.getName());
116
+        taUserVerify.setRoomNoName(buildingOwnerInfo.getName());
79 117
 
80 118
         int rows = taUserVerifyMapper.insertSelective(taUserVerify);
81 119
         if (rows <= 0) {

+ 150
- 113
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxPayServiceImpl.java View File

@@ -8,7 +8,9 @@ import com.community.huiju.common.wxpay.WXPayUtil;
8 8
 import com.community.huiju.dao.*;
9 9
 import com.community.huiju.model.*;
10 10
 import com.community.huiju.service.WxPayServiceI;
11
+import com.google.common.collect.Lists;
11 12
 import com.google.common.collect.Maps;
13
+import org.apache.commons.collections.CollectionUtils;
12 14
 import org.slf4j.Logger;
13 15
 import org.slf4j.LoggerFactory;
14 16
 import org.springframework.beans.factory.annotation.Autowired;
@@ -16,9 +18,9 @@ import org.springframework.stereotype.Service;
16 18
 import org.springframework.transaction.annotation.Transactional;
17 19
 
18 20
 import java.time.Instant;
19
-import java.util.Date;
20
-import java.util.HashMap;
21
-import java.util.Map;
21
+import java.util.*;
22
+import java.util.concurrent.atomic.AtomicReference;
23
+import java.util.stream.Collectors;
22 24
 
23 25
 /**
24 26
  * @author FXF
@@ -47,46 +49,40 @@ public class WxPayServiceImpl implements WxPayServiceI {
47 49
 	@Autowired
48 50
 	private TpMessageMapper tpMessageMapper;
49 51
 
52
+	@Autowired
53
+	private TpBillOrderMapper tpBillOrderMapper;
54
+
50 55
 	/**
51 56
 	 * 微信支付统一下单
52 57
 	 *
53 58
 	 * @return
54
-	 * @param billInvoiceId
59
+	 * @param orderNo
55 60
 	 * @param userElement
56 61
 	 */
57 62
 	@Override
58 63
 	@Transactional(rollbackFor = Exception.class)
59
-	public Map<String, String> wxUnifiedOrder(Integer billInvoiceId, UserElement userElement) throws Exception {
64
+	public Map<String, String> wxUnifiedOrder(String orderNo, UserElement userElement) throws Exception {
60 65
 		HfWxConfig config = new HfWxConfig();
61 66
 		WXPay wxpay = new WXPay(config);
62
-
63
-		Integer userId = userElement.getId();
64
-
65
-		// 如果是家属/租客, 应该用业主的用户id
66
-		TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
67
-		TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(userId);
68
-		if (null != taSysRole && taSysRole.getId().intValue() != 1) {
69
-			TaUser ownerUser = taUserMapper.selectByPrimaryKey(taUser.getParentId());
70
-			userId = ownerUser.getId();
71
-		}
72 67
 		
73 68
 		//获取支付金额
74
-		TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByIdAndUserId(billInvoiceId,userId,userElement.getCommunityId());
75
-		if (null == tpBillInvoice){
69
+		List<TpBillOrder> billOrderList = tpBillOrderMapper.selectByOrderBumber(orderNo);
70
+		if (CollectionUtils.isEmpty(billOrderList)){
76 71
 			throw new Exception("订单不存在");
77
-		}else if (!tpBillInvoice.getBillStatus().equals("3")){
78
-			throw new Exception("不是正在支付的订单");
79 72
 		}
73
+
74
+		// 计算金额
75
+		Integer payPrice = billOrderList.stream().mapToInt(e -> tpBillInvoiceMapper.selectByPrimaryKey(e.getTpBillInvoiceId()).getPayPrice()).sum();
80 76
 		
81 77
 		//下单
82 78
 		Map<String, String> data = new HashMap<String, String>();
83
-		data.put("body", tpBillInvoice.getBillName());
79
+		data.put("body", "缴费");
84 80
 		//商品号唯一
85
-		data.put("out_trade_no", tpBillInvoice.getOutTradeNo());
81
+		data.put("out_trade_no", orderNo);
86 82
 		data.put("device_info", "");
87 83
 		data.put("fee_type", "CNY");
88 84
 		//金额 后台计算
89
-		data.put("total_fee", String.valueOf(tpBillInvoice.getPayPrice()));
85
+		data.put("total_fee", String.valueOf(payPrice));
90 86
 		//终端IP
91 87
 		data.put("spbill_create_ip", "123.12.12.123");
92 88
 		//回调地址
@@ -123,61 +119,64 @@ public class WxPayServiceImpl implements WxPayServiceI {
123 119
 	@Transactional(rollbackFor = Exception.class)
124 120
 	public String wxNotify(Map<String, String> resultMap) throws Exception {
125 121
 		String outTradeNo = resultMap.get("out_trade_no");
126
-		TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByOutTradeNo(outTradeNo);
127
-		if (null == tpBillInvoice){
122
+		List<TpBillOrder> billOrderList = tpBillOrderMapper.selectByOrderBumber(outTradeNo);
123
+		if (CollectionUtils.isEmpty(billOrderList)){
128 124
 			return "不存在的订单";
129
-		}else if (!tpBillInvoice.getBillStatus().equals("3")){
130
-			return "订单状态出错";
131 125
 		}
132 126
 
133
-
134 127
 		// 缴费人在准备支付状态下更新, 这里是微信的回调所有没有 token
135 128
 
136
-		// 更新为正在支付状态
137
-		// 更改收费单的 缴费时间, 修改人, 修改时间
138
-		tpBillInvoice.setBillStatus("1");
139
-		tpBillInvoice.setPayDate(new Date());
140
-		tpBillInvoice.setUpdateDate(new Date());
141
-		// 缴费方式  0:微信支付  1:线下缴费 2.支付宝支付
142
-		tpBillInvoice.setPayType(resultMap.get("pay_type"));
143
-		tpBillInvoiceMapper.updateByPrimaryKeySelective(tpBillInvoice);
144
-
145
-		//插入流水账单表
146
-		TpBillStatement tpBillStatement = new TpBillStatement();
147
-		tpBillStatement.setBillInvoiceId(tpBillInvoice.getId());
148
-		tpBillStatement.setCommunityId(tpBillInvoice.getCommunityId());
149
-		tpBillStatement.setTaUserId(tpBillInvoice.getTaUserId());
150
-		tpBillStatement.setPayPrice(tpBillInvoice.getPayPrice());
151
-		tpBillStatement.setPayName(tpBillInvoice.getPayName());
152
-		tpBillStatement.setPayRemark(tpBillInvoice.getBillName());
153
-		tpBillStatement.setPayType(resultMap.get("pay_type"));
154
-		tpBillStatement.setCreateTime(new Date());
155
-		tpBillStatementMapper.insert(tpBillStatement);
156
-
157
-		// 更新 收费单流水id
158
-		tpBillInvoice.setBillStatementId(tpBillStatement.getId());
159
-		tpBillInvoiceMapper.updateByPrimaryKeySelective(tpBillInvoice);
160
-
161
-		// 更新收费组的 未交费用户数 和 已缴费用户数
162
-		TpBill tpBill = tpBillMapper.selectByPrimaryKey(tpBillInvoice.getBillId());
163
-		tpBill.setPayedNum(tpBill.getPayedNum() + 1);
164
-		tpBill.setUnpayedNum(tpBill.getUnpayedNum() - 1);
165
-		// 如果为零, 表示这个收费组收费完成
166
-		if (tpBill.getUnpayedNum() <= 0) {
167
-			tpBill.setBillStatus("1");
168
-			tpBill.setUnpayedNum(0);
169
-		}
170
-		tpBillMapper.updateByPrimaryKeySelective(tpBill);
129
+		for ( TpBillOrder billOrder : billOrderList){
130
+			TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByPrimaryKey(billOrder.getTpBillInvoiceId());
131
+			if (!tpBillInvoice.getBillStatus().equals("3")){
132
+				return "订单状态出错";
133
+			}
134
+
135
+			// 更新为正在支付状态
136
+			// 更改收费单的 缴费时间, 修改人, 修改时间
137
+			tpBillInvoice.setBillStatus("1");
138
+			tpBillInvoice.setPayDate(new Date());
139
+			tpBillInvoice.setUpdateDate(new Date());
140
+			// 缴费方式  0:微信支付  1:线下缴费 2.支付宝支付
141
+			tpBillInvoice.setPayType(resultMap.get("pay_type"));
142
+			tpBillInvoiceMapper.updateByPrimaryKeySelective(tpBillInvoice);
143
+
144
+			//插入流水账单表
145
+			TpBillStatement tpBillStatement = new TpBillStatement();
146
+			tpBillStatement.setBillInvoiceId(tpBillInvoice.getId());
147
+			tpBillStatement.setCommunityId(tpBillInvoice.getCommunityId());
148
+			tpBillStatement.setTaUserId(tpBillInvoice.getTaUserId());
149
+			tpBillStatement.setPayPrice(tpBillInvoice.getPayPrice());
150
+			tpBillStatement.setPayName(tpBillInvoice.getPayName());
151
+			tpBillStatement.setPayRemark(tpBillInvoice.getBillName());
152
+			tpBillStatement.setPayType(resultMap.get("pay_type"));
153
+			tpBillStatement.setCreateTime(new Date());
154
+			tpBillStatementMapper.insert(tpBillStatement);
155
+
156
+			// 更新 收费单流水id
157
+			tpBillInvoice.setBillStatementId(tpBillStatement.getId());
158
+			tpBillInvoiceMapper.updateByPrimaryKeySelective(tpBillInvoice);
171 159
 
160
+			// 更新收费组的 未交费用户数 和 已缴费用户数
161
+			TpBill tpBill = tpBillMapper.selectByPrimaryKey(tpBillInvoice.getBillId());
162
+			tpBill.setPayedNum(tpBill.getPayedNum() + 1);
163
+			tpBill.setUnpayedNum(tpBill.getUnpayedNum() - 1);
164
+			// 如果为零, 表示这个收费组收费完成
165
+			if (tpBill.getUnpayedNum() <= 0) {
166
+				tpBill.setBillStatus("1");
167
+				tpBill.setUnpayedNum(0);
168
+			}
169
+			tpBillMapper.updateByPrimaryKeySelective(tpBill);
172 170
 
173
-		// 把相对应的APP端, 代办消息设置为无效
174
-		Map<String, Object> map = Maps.newHashMap();
175
-		map.put("communityId", tpBillInvoice.getCommunityId());
176
-		map.put("billInvoiceId", tpBillInvoice.getId());
177
-		map.put("userId", tpBillInvoice.getTaUserId());
178
-		TpMessage tpMessage = tpMessageMapper.selectBillinvoiceMessage(map);
179
-		tpMessage.setStatus("0");
180
-		tpMessageMapper.updateByPrimaryKeySelective(tpMessage);
171
+			// 把相对应的APP端, 代办消息设置为无效
172
+			Map<String, Object> map = Maps.newHashMap();
173
+			map.put("communityId", tpBillInvoice.getCommunityId());
174
+			map.put("billInvoiceId", tpBillInvoice.getId());
175
+			map.put("userId", tpBillInvoice.getTaUserId());
176
+			TpMessage tpMessage = tpMessageMapper.selectBillinvoiceMessage(map);
177
+			tpMessage.setStatus("0");
178
+			tpMessageMapper.updateByPrimaryKeySelective(tpMessage);
179
+		}
181 180
 
182 181
 		return "success";
183 182
 	}
@@ -199,84 +198,122 @@ public class WxPayServiceImpl implements WxPayServiceI {
199 198
 	
200 199
 	@Override
201 200
 	@Transactional(rollbackFor = Exception.class)
202
-	public void wxStartPay(Integer billInvoiceId, UserElement userElement) throws Exception {
203
-
204
-		Integer userId = userElement.getId();
201
+	public String wxStartPay(List<Integer> billInvoiceIdArray, UserElement userElement) throws Exception {
205 202
 
206 203
 		// 如果是家属/租客, 应该用业主的用户id
207
-		TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
208
-		TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(userId);
209
-		if (null != taSysRole && taSysRole.getId().intValue() != 1) {
210
-			TaUser ownerUser = taUserMapper.selectByPrimaryKey(taUser.getParentId());
211
-			userId = ownerUser.getId();
212
-		}
204
+		TaUser taUser = taUserMapper.selectByPrimaryKey(userElement.getId());
205
+		List<TpBillOrder> billOrderList = Lists.newArrayList();
206
+
207
+		Random random = new Random();
208
+		String orderNo = String.valueOf(System.currentTimeMillis()) + random.nextInt();
213 209
 
214 210
 		//获取支付金额
215
-		TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByIdAndUserId(billInvoiceId,userId,userElement.getCommunityId());
216
-		if (null == tpBillInvoice){
217
-			throw new Exception("订单不存在");
218
-		}else if (!tpBillInvoice.getBillStatus().equals("0")){
219
-			throw new Exception("正在支付的订单");
211
+		for (Integer billInvoiceId : billInvoiceIdArray) {
212
+			TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByIdAndBuildingOwnerInfoId(billInvoiceId,userElement.getRoomNoId(),userElement.getCommunityId());
213
+			if (null == tpBillInvoice){
214
+				throw new Exception("订单不存在");
215
+			}else if (!tpBillInvoice.getBillStatus().equals("0")){
216
+				throw new Exception("正在支付的订单");
217
+			}
218
+
219
+			TpBillOrder tpBillOrder = new TpBillOrder();
220
+			tpBillOrder.setCommunityId(userElement.getCommunityId());
221
+			tpBillOrder.setTpBillId(tpBillInvoice.getBillId());
222
+			tpBillOrder.setTpBillInvoiceId(tpBillInvoice.getId());
223
+			tpBillOrder.setCreateDate(new Date());
224
+			tpBillOrder.setCreateUser(userElement.getId());
225
+			tpBillOrder.setUpdateDate(new Date());
226
+			tpBillOrder.setUpdateUser(userElement.getId());
227
+			tpBillOrder.setOrderBumber(orderNo);
228
+
229
+			billOrderList.add(tpBillOrder);
220 230
 		}
221 231
 
232
+
222 233
 		//更新为正在支付状态
223
-		updateBillInvoiceBillStatus(billInvoiceId, taUser.getUserName(),"3");
234
+		updateBillInvoiceBillStatus(billInvoiceIdArray, taUser.getUserName(),"3");
235
+
236
+		// 生成缴费订单
237
+		tpBillOrderMapper.batchInsertSelective(billOrderList);
238
+
239
+		return orderNo;
224 240
 	}
225 241
 	
226 242
 	/**
227 243
 	 * 取消支付
228 244
 	 *
229
-	 * @param billInvoiceId
245
+	 * @param outTradeNo
230 246
 	 * @param userElement
231 247
 	 */
232 248
 	@Override
233 249
 	@Transactional(rollbackFor = Exception.class)
234
-	public void wxCancelPay(Integer billInvoiceId, UserElement userElement) throws Exception {
250
+	public void wxCancelPay(String outTradeNo, UserElement userElement) throws Exception {
251
+
252
+//		Integer userId = userElement.getId();
253
+//
254
+//		//获取支付金额
255
+//		TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByIdAndUserId(billInvoiceId,userId,userElement.getCommunityId());
256
+//		if (null == tpBillInvoice){
257
+//			throw new Exception("订单不存在");
258
+//		}else if (!tpBillInvoice.getBillStatus().equals("3")){
259
+//			throw new Exception("不是正在支付的订单");
260
+//		}
261
+//		//更新为正在支付状态
262
+//		updateBillInvoiceBillStatus(billInvoiceId,"0");
235 263
 
236
-		Integer userId = userElement.getId();
237 264
 
238
-		// 如果是家属/租客, 应该用业主的用户id
239
-		TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
240
-		TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(userId);
241
-		if (null != taSysRole && taSysRole.getId().intValue() != 1) {
242
-			TaUser ownerUser = taUserMapper.selectByPrimaryKey(taUser.getParentId());
243
-			userId = ownerUser.getId();
244
-		}
245 265
 
246 266
 		//获取支付金额
247
-		TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByIdAndUserId(billInvoiceId,userId,userElement.getCommunityId());
248
-		if (null == tpBillInvoice){
267
+		List<TpBillOrder> billOrderList = tpBillOrderMapper.selectByOrderBumber(outTradeNo);
268
+		if (CollectionUtils.isEmpty(billOrderList)){
249 269
 			throw new Exception("订单不存在");
250
-		}else if (!tpBillInvoice.getBillStatus().equals("3")){
251
-			throw new Exception("不是正在支付的订单");
252 270
 		}
271
+
272
+		List<TpBillInvoice> billInvoiceList = Lists.newArrayList();
273
+		for (TpBillOrder tpBillOrder : billOrderList) {
274
+			TpBillInvoice billInvoice = tpBillInvoiceMapper.selectByPrimaryKey(tpBillOrder.getTpBillInvoiceId());
275
+			if (!billInvoice.getBillStatus().equals("3")){
276
+				throw new Exception("不是正在支付的订单");
277
+			}
278
+			billInvoiceList.add(billInvoice);
279
+		}
280
+
281
+		// 缴费单id集合
282
+		List<Integer> billInvoiceIdList = billInvoiceList.stream().map(e -> e.getId()).collect(Collectors.toList());
283
+
253 284
 		//更新为正在支付状态
254
-		updateBillInvoiceBillStatus(billInvoiceId,"0");
285
+		updateBillInvoiceBillStatus(billInvoiceIdList,"0");
255 286
 	}
256 287
 	
257 288
 	/**
258 289
 	 * 更新支付状态
259
-	 * @param billInvoiceId
290
+	 * @param billInvoiceIdList
260 291
 	 * @param billStatus
261 292
 	 */
262
-	private void updateBillInvoiceBillStatus(Integer billInvoiceId, String billStatus) {
263
-		TpBillInvoice tpBillInvoiceUpdate = new TpBillInvoice();
264
-		tpBillInvoiceUpdate.setBillStatus(billStatus);
265
-		tpBillInvoiceUpdate.setId(billInvoiceId);
266
-		tpBillInvoiceMapper.updateByPrimaryKeySelective(tpBillInvoiceUpdate);
293
+	private void updateBillInvoiceBillStatus(List<Integer> billInvoiceIdList, String billStatus) {
294
+		billInvoiceIdList.forEach(e -> {
295
+			TpBillInvoice tpBillInvoiceUpdate = new TpBillInvoice();
296
+			tpBillInvoiceUpdate.setBillStatus(billStatus);
297
+			tpBillInvoiceUpdate.setId(e);
298
+			tpBillInvoiceMapper.updateByPrimaryKeySelective(tpBillInvoiceUpdate);
299
+		});
300
+
267 301
 	}
268 302
 
269 303
 	/**
270 304
 	 * 更新支付状态
271
-	 * @param billInvoiceId
305
+	 * @param billInvoiceIdList
272 306
 	 * @param userName 缴费人
273 307
 	 * @param billStatus
274 308
 	 */
275
-	private void updateBillInvoiceBillStatus(Integer billInvoiceId, String userName, String billStatus) {
276
-		TpBillInvoice tpBillInvoiceUpdate = new TpBillInvoice();
277
-		tpBillInvoiceUpdate.setBillStatus(billStatus);
278
-		tpBillInvoiceUpdate.setId(billInvoiceId);
279
-		tpBillInvoiceUpdate.setPayName(userName);
280
-		tpBillInvoiceMapper.updateByPrimaryKeySelective(tpBillInvoiceUpdate);
309
+	private void updateBillInvoiceBillStatus(List<Integer> billInvoiceIdList, String userName, String billStatus) {
310
+		billInvoiceIdList.forEach(e -> {
311
+			TpBillInvoice tpBillInvoiceUpdate = new TpBillInvoice();
312
+			tpBillInvoiceUpdate.setBillStatus(billStatus);
313
+			tpBillInvoiceUpdate.setId(e);
314
+			tpBillInvoiceUpdate.setPayName(userName);
315
+			tpBillInvoiceMapper.updateByPrimaryKeySelective(tpBillInvoiceUpdate);
316
+		});
317
+
281 318
 	}
282 319
 }

+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TaUserVO.java View File

@@ -73,4 +73,18 @@ public class TaUserVO {
73 73
     /** 审核的id **/
74 74
     private Integer userVerifyId;
75 75
 
76
+    /**  期id **/
77
+    private Integer phaseId;
78
+
79
+    /**  栋id **/
80
+    private Integer buildingId;
81
+
82
+    /**  单元id **/
83
+    private Integer unitId;
84
+
85
+    /**  楼层id **/
86
+    private Integer levelId;
87
+
88
+    /**  户号id **/
89
+    private Integer roomNoId;
76 90
 }

+ 2
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TaUserVerifyMapper.xml View File

@@ -35,7 +35,7 @@
35 35
     delete from ta_user_verify
36 36
     where id = #{id,jdbcType=INTEGER}
37 37
   </delete>
38
-  <insert id="insert" parameterType="com.community.huiju.model.TaUserVerify" >
38
+  <insert id="insert" parameterType="com.community.huiju.model.TaUserVerify"  keyColumn="id" useGeneratedKeys="true" >
39 39
     insert into ta_user_verify (id, user_id, community_id,
40 40
       role_id, phase_id, phase_name,
41 41
       building_id, building_name, unit_id,
@@ -49,7 +49,7 @@
49 49
       #{roomNoId,jdbcType=INTEGER}, #{roomNoName,jdbcType=VARCHAR}, #{verifyStatus,jdbcType=VARCHAR},
50 50
       #{createDate,jdbcType=TIMESTAMP}, #{verifyName,jdbcType=VARCHAR})
51 51
   </insert>
52
-  <insert id="insertSelective" parameterType="com.community.huiju.model.TaUserVerify" >
52
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TaUserVerify" keyColumn="id" useGeneratedKeys="true">
53 53
     insert into ta_user_verify
54 54
     <trim prefix="(" suffix=")" suffixOverrides="," >
55 55
       <if test="id != null" >

+ 3
- 3
CODE/smart-community/app-api/src/main/resources/mapper/TpBillInvoiceMapper.xml View File

@@ -248,7 +248,7 @@
248 248
             AND (i.bill_status = 1 or i.bill_status = 2)
249 249
           </if>
250 250
           and i.status=1
251
-          AND i.ta_user_id = #{userId,jdbcType=INTEGER}
251
+          AND i.building_owner_info_id = #{buildingOwnerInfoId,jdbcType=INTEGER}
252 252
   </select>
253 253
 
254 254
   <select id="getBillInvoiceDetail" resultType="map">
@@ -278,7 +278,7 @@
278 278
     AND i.community_id = #{communityId,jdbcType=INTEGER}
279 279
   </select>
280 280
 
281
-  <select id="selectByIdAndUserId" resultType="com.community.huiju.model.TpBillInvoice" >
281
+  <select id="selectByIdAndBuildingOwnerInfoId" resultType="com.community.huiju.model.TpBillInvoice" >
282 282
     SELECT
283 283
         t.id,
284 284
         t.community_id AS communityId,
@@ -298,7 +298,7 @@
298 298
     where t.id = #{id,jdbcType=INTEGER}
299 299
     and t.community_id = #{communityId,jdbcType=INTEGER}
300 300
     and t.status = 1
301
-    and t.ta_user_id = #{userId,jdbcType=INTEGER}
301
+    and t.building_owner_info_id = #{buildingOwnerInfoId,jdbcType=INTEGER}
302 302
   </select>
303 303
 
304 304
   <select id="selectByOutTradeNo" resultType="com.community.huiju.model.TpBillInvoice" >

+ 178
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBillOrderMapper.xml View File

@@ -0,0 +1,178 @@
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.TpBillOrderMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBillOrder" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="tp_bill_id" property="tpBillId" jdbcType="INTEGER" />
8
+    <result column="tp_bill_invoice_id" property="tpBillInvoiceId" jdbcType="INTEGER" />
9
+    <result column="order_bumber" property="orderBumber" jdbcType="VARCHAR" />
10
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
11
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
12
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
13
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
14
+  </resultMap>
15
+  <sql id="Base_Column_List" >
16
+    id, community_id, tp_bill_id, tp_bill_invoice_id, order_bumber, create_user, create_date, 
17
+    update_user, update_date
18
+  </sql>
19
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
20
+    select 
21
+    <include refid="Base_Column_List" />
22
+    from tp_bill_order
23
+    where id = #{id,jdbcType=INTEGER}
24
+  </select>
25
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
26
+    delete from tp_bill_order
27
+    where id = #{id,jdbcType=INTEGER}
28
+  </delete>
29
+  <insert id="insert" parameterType="com.community.huiju.model.TpBillOrder" >
30
+    insert into tp_bill_order (id, community_id, tp_bill_id, 
31
+      tp_bill_invoice_id, order_bumber, create_user, 
32
+      create_date, update_user, update_date
33
+      )
34
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{tpBillId,jdbcType=INTEGER}, 
35
+      #{tpBillInvoiceId,jdbcType=INTEGER}, #{orderBumber,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, 
36
+      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
37
+      )
38
+  </insert>
39
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBillOrder" >
40
+    insert into tp_bill_order
41
+    <trim prefix="(" suffix=")" suffixOverrides="," >
42
+      <if test="id != null" >
43
+        id,
44
+      </if>
45
+      <if test="communityId != null" >
46
+        community_id,
47
+      </if>
48
+      <if test="tpBillId != null" >
49
+        tp_bill_id,
50
+      </if>
51
+      <if test="tpBillInvoiceId != null" >
52
+        tp_bill_invoice_id,
53
+      </if>
54
+      <if test="orderBumber != null" >
55
+        order_bumber,
56
+      </if>
57
+      <if test="createUser != null" >
58
+        create_user,
59
+      </if>
60
+      <if test="createDate != null" >
61
+        create_date,
62
+      </if>
63
+      <if test="updateUser != null" >
64
+        update_user,
65
+      </if>
66
+      <if test="updateDate != null" >
67
+        update_date,
68
+      </if>
69
+    </trim>
70
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
71
+      <if test="id != null" >
72
+        #{id,jdbcType=INTEGER},
73
+      </if>
74
+      <if test="communityId != null" >
75
+        #{communityId,jdbcType=INTEGER},
76
+      </if>
77
+      <if test="tpBillId != null" >
78
+        #{tpBillId,jdbcType=INTEGER},
79
+      </if>
80
+      <if test="tpBillInvoiceId != null" >
81
+        #{tpBillInvoiceId,jdbcType=INTEGER},
82
+      </if>
83
+      <if test="orderBumber != null" >
84
+        #{orderBumber,jdbcType=VARCHAR},
85
+      </if>
86
+      <if test="createUser != null" >
87
+        #{createUser,jdbcType=INTEGER},
88
+      </if>
89
+      <if test="createDate != null" >
90
+        #{createDate,jdbcType=TIMESTAMP},
91
+      </if>
92
+      <if test="updateUser != null" >
93
+        #{updateUser,jdbcType=INTEGER},
94
+      </if>
95
+      <if test="updateDate != null" >
96
+        #{updateDate,jdbcType=TIMESTAMP},
97
+      </if>
98
+    </trim>
99
+  </insert>
100
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBillOrder" >
101
+    update tp_bill_order
102
+    <set >
103
+      <if test="communityId != null" >
104
+        community_id = #{communityId,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="tpBillId != null" >
107
+        tp_bill_id = #{tpBillId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="tpBillInvoiceId != null" >
110
+        tp_bill_invoice_id = #{tpBillInvoiceId,jdbcType=INTEGER},
111
+      </if>
112
+      <if test="orderBumber != null" >
113
+        order_bumber = #{orderBumber,jdbcType=VARCHAR},
114
+      </if>
115
+      <if test="createUser != null" >
116
+        create_user = #{createUser,jdbcType=INTEGER},
117
+      </if>
118
+      <if test="createDate != null" >
119
+        create_date = #{createDate,jdbcType=TIMESTAMP},
120
+      </if>
121
+      <if test="updateUser != null" >
122
+        update_user = #{updateUser,jdbcType=INTEGER},
123
+      </if>
124
+      <if test="updateDate != null" >
125
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
126
+      </if>
127
+    </set>
128
+    where id = #{id,jdbcType=INTEGER}
129
+  </update>
130
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBillOrder" >
131
+    update tp_bill_order
132
+    set community_id = #{communityId,jdbcType=INTEGER},
133
+      tp_bill_id = #{tpBillId,jdbcType=INTEGER},
134
+      tp_bill_invoice_id = #{tpBillInvoiceId,jdbcType=INTEGER},
135
+      order_bumber = #{orderBumber,jdbcType=VARCHAR},
136
+      create_user = #{createUser,jdbcType=INTEGER},
137
+      create_date = #{createDate,jdbcType=TIMESTAMP},
138
+      update_user = #{updateUser,jdbcType=INTEGER},
139
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
140
+    where id = #{id,jdbcType=INTEGER}
141
+  </update>
142
+
143
+  <insert id="batchInsertSelective" parameterType="list" >
144
+    insert into tp_bill_order
145
+    values
146
+    <foreach collection="list" index="index" item="item" open="(" close=")" separator="," >
147
+      <trim suffixOverrides=",">
148
+        <if test="item.id != null" >
149
+          #{item.id,jdbcType=INTEGER},
150
+        </if>
151
+        <if test="item.communityId != null" >
152
+          #{item.communityId,jdbcType=INTEGER},
153
+        </if>
154
+        <if test="item.tpBillId != null" >
155
+          #{item.tpBillId,jdbcType=INTEGER},
156
+        </if>
157
+        <if test="item.tpBillInvoiceId != null" >
158
+          #{item.tpBillInvoiceId,jdbcType=INTEGER},
159
+        </if>
160
+        <if test="item.orderBumber != null" >
161
+          #{item.orderBumber,jdbcType=VARCHAR},
162
+        </if>
163
+        <if test="item.createUser != null" >
164
+          #{item.createUser,jdbcType=INTEGER},
165
+        </if>
166
+        <if test="item.createDate != null" >
167
+          #{item.createDate,jdbcType=TIMESTAMP},
168
+        </if>
169
+        <if test="item.updateUser != null" >
170
+          #{item.updateUser,jdbcType=INTEGER},
171
+        </if>
172
+        <if test="item.updateDate != null" >
173
+          #{item.updateDate,jdbcType=TIMESTAMP},
174
+        </if>
175
+      </trim>
176
+    </foreach>
177
+  </insert>
178
+</mapper>

+ 2
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingMapper.xml View File

@@ -23,7 +23,7 @@
23 23
     delete from tp_building
24 24
     where id = #{id,jdbcType=INTEGER}
25 25
   </delete>
26
-  <insert id="insert" parameterType="com.community.huiju.model.TpBuilding" >
26
+  <insert id="insert" parameterType="com.community.huiju.model.TpBuilding"  keyColumn="id" useGeneratedKeys="true" >
27 27
     insert into tp_building (id, community_id, phase_id,
28 28
       phase_name, name, sort,
29 29
       create_date)
@@ -31,7 +31,7 @@
31 31
       #{phaseName,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR},
32 32
       #{createDate,jdbcType=TIMESTAMP})
33 33
   </insert>
34
-  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuilding" >
34
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuilding"  keyColumn="id" useGeneratedKeys="true" >
35 35
     insert into tp_building
36 36
     <trim prefix="(" suffix=")" suffixOverrides="," >
37 37
       <if test="id != null" >

+ 2
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml View File

@@ -40,7 +40,7 @@
40 40
     delete from tp_building_owner_info
41 41
     where id = #{id,jdbcType=INTEGER}
42 42
   </delete>
43
-  <insert id="insert" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
43
+  <insert id="insert" parameterType="com.community.huiju.model.TpBuildingOwnerInfo"  keyColumn="id" useGeneratedKeys="true" >
44 44
     insert into tp_building_owner_info (id, community_id, id_card,
45 45
       phase_id, phase_name, building_id,
46 46
       building_name, unit_id, unit_name,
@@ -58,7 +58,7 @@
58 58
       #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER},
59 59
       #{updateDate,jdbcType=TIMESTAMP})
60 60
   </insert>
61
-  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
61
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo"  keyColumn="id" useGeneratedKeys="true" >
62 62
     insert into tp_building_owner_info
63 63
     <trim prefix="(" suffix=")" suffixOverrides="," >
64 64
       <if test="id != null" >

+ 164
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpLevelMapper.xml View File

@@ -0,0 +1,164 @@
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.TpLevelMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpLevel" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="phase_id" property="phaseId" jdbcType="INTEGER" />
8
+    <result column="phase_name" property="phaseName" jdbcType="VARCHAR" />
9
+    <result column="building_id" property="buildingId" jdbcType="INTEGER" />
10
+    <result column="building_name" property="buildingName" jdbcType="VARCHAR" />
11
+    <result column="unit_id" property="unitId" jdbcType="INTEGER" />
12
+    <result column="unit_name" property="unitName" jdbcType="VARCHAR" />
13
+    <result column="name" property="name" jdbcType="VARCHAR" />
14
+    <result column="sort" property="sort" jdbcType="VARCHAR" />
15
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
16
+  </resultMap>
17
+  <sql id="Base_Column_List" >
18
+    id, community_id, phase_id, phase_name, building_id, building_name, unit_id, unit_name, 
19
+    name, sort, create_date
20
+  </sql>
21
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer"  >
22
+    select 
23
+    <include refid="Base_Column_List" />
24
+    from tp_level
25
+    where id = #{id,jdbcType=INTEGER}
26
+  </select>
27
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
28
+    delete from tp_level
29
+    where id = #{id,jdbcType=INTEGER}
30
+  </delete>
31
+  <insert id="insert" parameterType="com.community.huiju.model.TpLevel"  keyColumn="id" useGeneratedKeys="true" >
32
+    insert into tp_level (id, community_id, phase_id, 
33
+      phase_name, building_id, building_name, 
34
+      unit_id, unit_name, name, 
35
+      sort, create_date)
36
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{phaseId,jdbcType=INTEGER}, 
37
+      #{phaseName,jdbcType=VARCHAR}, #{buildingId,jdbcType=INTEGER}, #{buildingName,jdbcType=VARCHAR}, 
38
+      #{unitId,jdbcType=INTEGER}, #{unitName,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
39
+      #{sort,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP})
40
+  </insert>
41
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpLevel"  keyColumn="id" useGeneratedKeys="true" >
42
+    insert into tp_level
43
+    <trim prefix="(" suffix=")" suffixOverrides="," >
44
+      <if test="id != null" >
45
+        id,
46
+      </if>
47
+      <if test="communityId != null" >
48
+        community_id,
49
+      </if>
50
+      <if test="phaseId != null" >
51
+        phase_id,
52
+      </if>
53
+      <if test="phaseName != null" >
54
+        phase_name,
55
+      </if>
56
+      <if test="buildingId != null" >
57
+        building_id,
58
+      </if>
59
+      <if test="buildingName != null" >
60
+        building_name,
61
+      </if>
62
+      <if test="unitId != null" >
63
+        unit_id,
64
+      </if>
65
+      <if test="unitName != null" >
66
+        unit_name,
67
+      </if>
68
+      <if test="name != null" >
69
+        name,
70
+      </if>
71
+      <if test="sort != null" >
72
+        sort,
73
+      </if>
74
+      <if test="createDate != null" >
75
+        create_date,
76
+      </if>
77
+    </trim>
78
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
79
+      <if test="id != null" >
80
+        #{id,jdbcType=INTEGER},
81
+      </if>
82
+      <if test="communityId != null" >
83
+        #{communityId,jdbcType=INTEGER},
84
+      </if>
85
+      <if test="phaseId != null" >
86
+        #{phaseId,jdbcType=INTEGER},
87
+      </if>
88
+      <if test="phaseName != null" >
89
+        #{phaseName,jdbcType=VARCHAR},
90
+      </if>
91
+      <if test="buildingId != null" >
92
+        #{buildingId,jdbcType=INTEGER},
93
+      </if>
94
+      <if test="buildingName != null" >
95
+        #{buildingName,jdbcType=VARCHAR},
96
+      </if>
97
+      <if test="unitId != null" >
98
+        #{unitId,jdbcType=INTEGER},
99
+      </if>
100
+      <if test="unitName != null" >
101
+        #{unitName,jdbcType=VARCHAR},
102
+      </if>
103
+      <if test="name != null" >
104
+        #{name,jdbcType=VARCHAR},
105
+      </if>
106
+      <if test="sort != null" >
107
+        #{sort,jdbcType=VARCHAR},
108
+      </if>
109
+      <if test="createDate != null" >
110
+        #{createDate,jdbcType=TIMESTAMP},
111
+      </if>
112
+    </trim>
113
+  </insert>
114
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpLevel" >
115
+    update tp_level
116
+    <set >
117
+      <if test="communityId != null" >
118
+        community_id = #{communityId,jdbcType=INTEGER},
119
+      </if>
120
+      <if test="phaseId != null" >
121
+        phase_id = #{phaseId,jdbcType=INTEGER},
122
+      </if>
123
+      <if test="phaseName != null" >
124
+        phase_name = #{phaseName,jdbcType=VARCHAR},
125
+      </if>
126
+      <if test="buildingId != null" >
127
+        building_id = #{buildingId,jdbcType=INTEGER},
128
+      </if>
129
+      <if test="buildingName != null" >
130
+        building_name = #{buildingName,jdbcType=VARCHAR},
131
+      </if>
132
+      <if test="unitId != null" >
133
+        unit_id = #{unitId,jdbcType=INTEGER},
134
+      </if>
135
+      <if test="unitName != null" >
136
+        unit_name = #{unitName,jdbcType=VARCHAR},
137
+      </if>
138
+      <if test="name != null" >
139
+        name = #{name,jdbcType=VARCHAR},
140
+      </if>
141
+      <if test="sort != null" >
142
+        sort = #{sort,jdbcType=VARCHAR},
143
+      </if>
144
+      <if test="createDate != null" >
145
+        create_date = #{createDate,jdbcType=TIMESTAMP},
146
+      </if>
147
+    </set>
148
+    where id = #{id,jdbcType=INTEGER}
149
+  </update>
150
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpLevel" >
151
+    update tp_level
152
+    set community_id = #{communityId,jdbcType=INTEGER},
153
+      phase_id = #{phaseId,jdbcType=INTEGER},
154
+      phase_name = #{phaseName,jdbcType=VARCHAR},
155
+      building_id = #{buildingId,jdbcType=INTEGER},
156
+      building_name = #{buildingName,jdbcType=VARCHAR},
157
+      unit_id = #{unitId,jdbcType=INTEGER},
158
+      unit_name = #{unitName,jdbcType=VARCHAR},
159
+      name = #{name,jdbcType=VARCHAR},
160
+      sort = #{sort,jdbcType=VARCHAR},
161
+      create_date = #{createDate,jdbcType=TIMESTAMP}
162
+    where id = #{id,jdbcType=INTEGER}
163
+  </update>
164
+</mapper>

+ 93
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpPhaseMapper.xml View File

@@ -0,0 +1,93 @@
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.TpPhaseMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpPhase" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="NAME" property="name" jdbcType="VARCHAR" />
8
+    <result column="sort" property="sort" jdbcType="VARCHAR" />
9
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
10
+  </resultMap>
11
+  <sql id="Base_Column_List" >
12
+    id, community_id, NAME, sort, create_date
13
+  </sql>
14
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
15
+    select 
16
+    <include refid="Base_Column_List" />
17
+    from tp_phase
18
+    where id = #{id,jdbcType=INTEGER}
19
+  </select>
20
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
21
+    delete from tp_phase
22
+    where id = #{id,jdbcType=INTEGER}
23
+  </delete>
24
+  <insert id="insert" parameterType="com.community.huiju.model.TpPhase"  keyColumn="id" useGeneratedKeys="true" >
25
+    insert into tp_phase (id, community_id, NAME, 
26
+      sort, create_date)
27
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, 
28
+      #{sort,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP})
29
+  </insert>
30
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpPhase"  keyColumn="id" useGeneratedKeys="true" >
31
+    insert into tp_phase
32
+    <trim prefix="(" suffix=")" suffixOverrides="," >
33
+      <if test="id != null" >
34
+        id,
35
+      </if>
36
+      <if test="communityId != null" >
37
+        community_id,
38
+      </if>
39
+      <if test="name != null" >
40
+        NAME,
41
+      </if>
42
+      <if test="sort != null" >
43
+        sort,
44
+      </if>
45
+      <if test="createDate != null" >
46
+        create_date,
47
+      </if>
48
+    </trim>
49
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
50
+      <if test="id != null" >
51
+        #{id,jdbcType=INTEGER},
52
+      </if>
53
+      <if test="communityId != null" >
54
+        #{communityId,jdbcType=INTEGER},
55
+      </if>
56
+      <if test="name != null" >
57
+        #{name,jdbcType=VARCHAR},
58
+      </if>
59
+      <if test="sort != null" >
60
+        #{sort,jdbcType=VARCHAR},
61
+      </if>
62
+      <if test="createDate != null" >
63
+        #{createDate,jdbcType=TIMESTAMP},
64
+      </if>
65
+    </trim>
66
+  </insert>
67
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpPhase" >
68
+    update tp_phase
69
+    <set >
70
+      <if test="communityId != null" >
71
+        community_id = #{communityId,jdbcType=INTEGER},
72
+      </if>
73
+      <if test="name != null" >
74
+        NAME = #{name,jdbcType=VARCHAR},
75
+      </if>
76
+      <if test="sort != null" >
77
+        sort = #{sort,jdbcType=VARCHAR},
78
+      </if>
79
+      <if test="createDate != null" >
80
+        create_date = #{createDate,jdbcType=TIMESTAMP},
81
+      </if>
82
+    </set>
83
+    where id = #{id,jdbcType=INTEGER}
84
+  </update>
85
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpPhase" >
86
+    update tp_phase
87
+    set community_id = #{communityId,jdbcType=INTEGER},
88
+      NAME = #{name,jdbcType=VARCHAR},
89
+      sort = #{sort,jdbcType=VARCHAR},
90
+      create_date = #{createDate,jdbcType=TIMESTAMP}
91
+    where id = #{id,jdbcType=INTEGER}
92
+  </update>
93
+</mapper>

+ 141
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpUnitMapper.xml View File

@@ -0,0 +1,141 @@
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.TpUnitMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpUnit" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="phase_id" property="phaseId" jdbcType="INTEGER" />
8
+    <result column="phase_name" property="phaseName" jdbcType="VARCHAR" />
9
+    <result column="building_id" property="buildingId" jdbcType="INTEGER" />
10
+    <result column="building_name" property="buildingName" jdbcType="VARCHAR" />
11
+    <result column="name" property="name" jdbcType="VARCHAR" />
12
+    <result column="sort" property="sort" jdbcType="VARCHAR" />
13
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
14
+  </resultMap>
15
+  <sql id="Base_Column_List" >
16
+    id, community_id, phase_id, phase_name, building_id, building_name, name, sort, create_date
17
+  </sql>
18
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
19
+    select 
20
+    <include refid="Base_Column_List" />
21
+    from tp_unit
22
+    where id = #{id,jdbcType=INTEGER}
23
+  </select>
24
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
25
+    delete from tp_unit
26
+    where id = #{id,jdbcType=INTEGER}
27
+  </delete>
28
+  <insert id="insert" parameterType="com.community.huiju.model.TpUnit"  keyColumn="id" useGeneratedKeys="true" >
29
+    insert into tp_unit (id, community_id, phase_id, 
30
+      phase_name, building_id, building_name, 
31
+      name, sort, create_date
32
+      )
33
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{phaseId,jdbcType=INTEGER}, 
34
+      #{phaseName,jdbcType=VARCHAR}, #{buildingId,jdbcType=INTEGER}, #{buildingName,jdbcType=VARCHAR}, 
35
+      #{name,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}
36
+      )
37
+  </insert>
38
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpUnit"  keyColumn="id" useGeneratedKeys="true" >
39
+    insert into tp_unit
40
+    <trim prefix="(" suffix=")" suffixOverrides="," >
41
+      <if test="id != null" >
42
+        id,
43
+      </if>
44
+      <if test="communityId != null" >
45
+        community_id,
46
+      </if>
47
+      <if test="phaseId != null" >
48
+        phase_id,
49
+      </if>
50
+      <if test="phaseName != null" >
51
+        phase_name,
52
+      </if>
53
+      <if test="buildingId != null" >
54
+        building_id,
55
+      </if>
56
+      <if test="buildingName != null" >
57
+        building_name,
58
+      </if>
59
+      <if test="name != null" >
60
+        name,
61
+      </if>
62
+      <if test="sort != null" >
63
+        sort,
64
+      </if>
65
+      <if test="createDate != null" >
66
+        create_date,
67
+      </if>
68
+    </trim>
69
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
70
+      <if test="id != null" >
71
+        #{id,jdbcType=INTEGER},
72
+      </if>
73
+      <if test="communityId != null" >
74
+        #{communityId,jdbcType=INTEGER},
75
+      </if>
76
+      <if test="phaseId != null" >
77
+        #{phaseId,jdbcType=INTEGER},
78
+      </if>
79
+      <if test="phaseName != null" >
80
+        #{phaseName,jdbcType=VARCHAR},
81
+      </if>
82
+      <if test="buildingId != null" >
83
+        #{buildingId,jdbcType=INTEGER},
84
+      </if>
85
+      <if test="buildingName != null" >
86
+        #{buildingName,jdbcType=VARCHAR},
87
+      </if>
88
+      <if test="name != null" >
89
+        #{name,jdbcType=VARCHAR},
90
+      </if>
91
+      <if test="sort != null" >
92
+        #{sort,jdbcType=VARCHAR},
93
+      </if>
94
+      <if test="createDate != null" >
95
+        #{createDate,jdbcType=TIMESTAMP},
96
+      </if>
97
+    </trim>
98
+  </insert>
99
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpUnit" >
100
+    update tp_unit
101
+    <set >
102
+      <if test="communityId != null" >
103
+        community_id = #{communityId,jdbcType=INTEGER},
104
+      </if>
105
+      <if test="phaseId != null" >
106
+        phase_id = #{phaseId,jdbcType=INTEGER},
107
+      </if>
108
+      <if test="phaseName != null" >
109
+        phase_name = #{phaseName,jdbcType=VARCHAR},
110
+      </if>
111
+      <if test="buildingId != null" >
112
+        building_id = #{buildingId,jdbcType=INTEGER},
113
+      </if>
114
+      <if test="buildingName != null" >
115
+        building_name = #{buildingName,jdbcType=VARCHAR},
116
+      </if>
117
+      <if test="name != null" >
118
+        name = #{name,jdbcType=VARCHAR},
119
+      </if>
120
+      <if test="sort != null" >
121
+        sort = #{sort,jdbcType=VARCHAR},
122
+      </if>
123
+      <if test="createDate != null" >
124
+        create_date = #{createDate,jdbcType=TIMESTAMP},
125
+      </if>
126
+    </set>
127
+    where id = #{id,jdbcType=INTEGER}
128
+  </update>
129
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpUnit" >
130
+    update tp_unit
131
+    set community_id = #{communityId,jdbcType=INTEGER},
132
+      phase_id = #{phaseId,jdbcType=INTEGER},
133
+      phase_name = #{phaseName,jdbcType=VARCHAR},
134
+      building_id = #{buildingId,jdbcType=INTEGER},
135
+      building_name = #{buildingName,jdbcType=VARCHAR},
136
+      name = #{name,jdbcType=VARCHAR},
137
+      sort = #{sort,jdbcType=VARCHAR},
138
+      create_date = #{createDate,jdbcType=TIMESTAMP}
139
+    where id = #{id,jdbcType=INTEGER}
140
+  </update>
141
+</mapper>

+ 15
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/session/UserElement.java View File

@@ -41,4 +41,19 @@ public class UserElement implements Serializable {
41 41
     /** 当前登陆的房产 **/
42 42
     private Integer userVerifyId;
43 43
 
44
+    /** 当前登录 期id **/
45
+    private Integer phaseId;
46
+
47
+    /** 当前登录 栋id **/
48
+    private Integer buildingId;
49
+
50
+    /** 当前登录 单元id **/
51
+    private Integer unitId;
52
+
53
+    /** 当前登录 楼层id **/
54
+    private Integer levelId;
55
+
56
+    /** 当前登录 户号id **/
57
+    private Integer roomNoId;
58
+
44 59
 }

+ 7
- 0
CODE/smart-community/property-api/pom.xml View File

@@ -197,6 +197,13 @@
197 197
             <scope>compile</scope>
198 198
         </dependency>
199 199
 
200
+		<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
201
+		<dependency>
202
+			<groupId>com.alibaba</groupId>
203
+			<artifactId>fastjson</artifactId>
204
+			<version>1.2.56</version>
205
+		</dependency>
206
+
200 207
 
201 208
     </dependencies>
202 209
 

+ 59
- 7
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java View File

@@ -112,16 +112,62 @@ public class BuildingOwnerInfoController extends BaseController {
112 112
         return responseBean;
113 113
     }
114 114
 
115
-    @ApiOperation(value = "查询 楼栋/单元/楼层/户号", notes = "查询 楼栋/单元/楼层/户号")
115
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
116 116
     @ApiImplicitParams({
117
-            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "building楼层;" +
118
-                    "unit单元;level楼层") // ;roomNo户号
119 117
     })
120
-    @RequestMapping(value = "/building/address",method = RequestMethod.POST)
121
-    public ResponseBean buildingUnitNumber(@RequestBody String parameter, HttpSession session){
118
+    @RequestMapping(value = "/building/phase",method = RequestMethod.GET)
119
+    public ResponseBean getPhaseList(HttpSession session){
122 120
         ResponseBean responseBean = new ResponseBean();
123 121
         UserElement userElement = getUserElement(session);
124
-        responseBean = iBuildingOwnerInfoService.getBuildingOrUnitOrNumber(parameter, userElement.getCommunityId());
122
+        responseBean = iBuildingOwnerInfoService.getPhaseList(userElement.getCommunityId());
123
+        return responseBean;
124
+    }
125
+    
126
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
127
+    @ApiImplicitParams({
128
+            @ApiImplicitParam(paramType = "query", name = "phaseId",value = "期区ID")
129
+    })
130
+    @RequestMapping(value = "/building/building",method = RequestMethod.GET)
131
+    public ResponseBean getBuildingList(@RequestParam Integer phaseId, HttpSession session){
132
+        ResponseBean responseBean = new ResponseBean();
133
+        UserElement userElement = getUserElement(session);
134
+        responseBean = iBuildingOwnerInfoService.getBuildingList(phaseId,userElement.getCommunityId());
135
+        return responseBean;
136
+    }
137
+    
138
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
139
+    @ApiImplicitParams({
140
+            @ApiImplicitParam(paramType = "query", name = "buildingId",value = "楼栋ID")
141
+    })
142
+    @RequestMapping(value = "/building/unit",method = RequestMethod.GET)
143
+    public ResponseBean getUnitList(@RequestParam Integer buildingId,HttpSession session){
144
+        ResponseBean responseBean = new ResponseBean();
145
+        UserElement userElement = getUserElement(session);
146
+        responseBean = iBuildingOwnerInfoService.getUnitList(buildingId,userElement.getCommunityId());
147
+        return responseBean;
148
+    }
149
+    
150
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
151
+    @ApiImplicitParams({
152
+            @ApiImplicitParam(paramType = "query", name = "unitId",value = "单元ID")
153
+    })
154
+    @RequestMapping(value = "/building/level",method = RequestMethod.GET)
155
+    public ResponseBean getLevelList(@RequestParam Integer unitId,HttpSession session){
156
+        ResponseBean responseBean = new ResponseBean();
157
+        UserElement userElement = getUserElement(session);
158
+        responseBean = iBuildingOwnerInfoService.getLevelList(unitId,userElement.getCommunityId());
159
+        return responseBean;
160
+    }
161
+    
162
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
163
+    @ApiImplicitParams({
164
+            @ApiImplicitParam(paramType = "query", name = "levelId",value = "楼层ID")
165
+    })
166
+    @RequestMapping(value = "/building/roomno",method = RequestMethod.GET)
167
+    public ResponseBean getRoomNoList(@RequestParam Integer levelId,HttpSession session){
168
+        ResponseBean responseBean = new ResponseBean();
169
+        UserElement userElement = getUserElement(session);
170
+        responseBean = iBuildingOwnerInfoService.getRoomNoList(levelId,userElement.getCommunityId());
125 171
         return responseBean;
126 172
     }
127 173
     
@@ -138,7 +184,13 @@ public class BuildingOwnerInfoController extends BaseController {
138 184
     public ResponseBean submitExcel(@RequestParam("file") MultipartFile file, HttpSession session) {
139 185
         ResponseBean responseBean = new ResponseBean();
140 186
         UserElement userElement = getUserElement(session);
141
-        responseBean = iBuildingOwnerInfoService.submitExcelData(file,userElement);
187
+        try {
188
+            responseBean = iBuildingOwnerInfoService.submitExcelData(file,userElement);
189
+        }catch (Exception e){
190
+            responseBean.addError("导入数据失败" + e.getMessage());
191
+            e.printStackTrace();
192
+        }
193
+        
142 194
         return responseBean;
143 195
     }
144 196
 

+ 1
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserMapper.java View File

@@ -38,10 +38,9 @@ public interface TaUserMapper extends BaseMapper<TaUser> {
38 38
     /**
39 39
      * 查看是否有未认证数据
40 40
      * @param ownerTel
41
-     * @param communityId
42 41
      * @return
43 42
      */
44
-    TaUser selectByTel(@Param("loginName") String ownerTel,@Param("communityId") Integer communityId);
43
+    TaUser selectByTel(@Param("loginName") String ownerTel);
45 44
     
46 45
     int batchUpdate(List<TaUser> updataTaUserList);
47 46
     

+ 18
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserVerifyMapper.java View File

@@ -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.TaUserVerify;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * app端用户审核表,存放用户的角色还有房产信息 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-04-03
14
+ */
15
+@Mapper
16
+public interface TaUserVerifyMapper extends BaseMapper<TaUserVerify> {
17
+
18
+}

+ 111
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaUserVerify.java View File

@@ -0,0 +1,111 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import lombok.Data;
6
+import lombok.EqualsAndHashCode;
7
+import lombok.experimental.Accessors;
8
+
9
+import java.io.Serializable;
10
+import java.time.LocalDateTime;
11
+
12
+/**
13
+ * <p>
14
+ * app端用户审核表,存放用户的角色还有房产信息
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-04-03
19
+ */
20
+@Data
21
+@EqualsAndHashCode(callSuper = false)
22
+@Accessors(chain = true)
23
+public class TaUserVerify implements Serializable {
24
+
25
+    private static final long serialVersionUID = 1L;
26
+    
27
+    @TableId(value = "id", type = IdType.AUTO)
28
+    private Integer id;
29
+    
30
+    /**
31
+     * 用户ID
32
+     */
33
+    private Integer userId;
34
+
35
+    /**
36
+     * 小区id
37
+     */
38
+    private Integer communityId;
39
+
40
+    /**
41
+     * 角色ID
42
+     */
43
+    private Integer roleId;
44
+
45
+    /**
46
+     * 期ID
47
+     */
48
+    private Integer phaseId;
49
+
50
+    /**
51
+     * 期
52
+     */
53
+    private String phaseName;
54
+
55
+    /**
56
+     * 楼栋ID
57
+     */
58
+    private Integer buildingId;
59
+
60
+    /**
61
+     * 楼栋
62
+     */
63
+    private String buildingName;
64
+
65
+    /**
66
+     * 单元
67
+     */
68
+    private Integer unitId;
69
+
70
+    /**
71
+     * 单元
72
+     */
73
+    private String unitName;
74
+
75
+    /**
76
+     * 楼层id
77
+     */
78
+    private Integer levelId;
79
+
80
+    /**
81
+     * 楼层
82
+     */
83
+    private String levelName;
84
+
85
+    /**
86
+     * 户号ID
87
+     */
88
+    private Integer roomNoId;
89
+
90
+    /**
91
+     * 户号
92
+     */
93
+    private String roomNoName;
94
+
95
+    /**
96
+     * 认证状态  0 是未审核   1是审核通过   2是审核不通过
97
+     */
98
+    private String verifyStatus;
99
+
100
+    /**
101
+     * 创建时间
102
+     */
103
+    private LocalDateTime createDate;
104
+
105
+    /**
106
+     * 审核人的姓名
107
+     */
108
+    private String verifyName;
109
+
110
+
111
+}

+ 11
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java View File

@@ -1,6 +1,7 @@
1 1
 package com.community.huiju.model;
2 2
 
3 3
 import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
4 5
 import com.baomidou.mybatisplus.annotation.TableId;
5 6
 import com.baomidou.mybatisplus.annotation.TableName;
6 7
 import lombok.Data;
@@ -136,4 +137,14 @@ public class TpBuildingOwnerInfo implements Serializable {
136 137
      * 户号树信息
137 138
      */
138 139
     private Integer treeStatus;
140
+    
141
+    /**
142
+     * 1代表的是资料库信息
143
+     */
144
+    private String ownerStatus;
145
+    /**
146
+     * 身份
147
+     */
148
+    @TableField(exist = false)
149
+    private String roleName;
139 150
 }

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

@@ -59,11 +59,10 @@ public interface IBuildingOwnerInfoService extends IService<TpBuildingOwnerInfo>
59 59
      *
60 60
      *   楼栋是根据 小区ID查询
61 61
      *
62
-     * @param parameter
63 62
      * @param communityId
64 63
      * @return
65 64
      */
66
-    ResponseBean getBuildingOrUnitOrNumber(String parameter, Integer communityId);
65
+    ResponseBean getPhaseList(Integer communityId);
67 66
     
68 67
     /**
69 68
      * 上传excel里面的内容
@@ -118,4 +117,36 @@ public interface IBuildingOwnerInfoService extends IService<TpBuildingOwnerInfo>
118 117
      * @return
119 118
      */
120 119
     ResponseBean downloadExcel(UserElement userElement);
120
+    
121
+    /**
122
+     * 获取楼栋信息
123
+     * @param phaseId
124
+     * @param communityId
125
+     * @return
126
+     */
127
+    ResponseBean getBuildingList(Integer phaseId, Integer communityId);
128
+    
129
+    /**
130
+     * 获取单元信息
131
+     * @param buildingId
132
+     * @param communityId
133
+     * @return
134
+     */
135
+    ResponseBean getUnitList(Integer buildingId, Integer communityId);
136
+    
137
+    /**
138
+     * 获取楼层信息
139
+     * @param unitId
140
+     * @param communityId
141
+     * @return
142
+     */
143
+    ResponseBean getLevelList(Integer unitId, Integer communityId);
144
+    
145
+    /**
146
+     * 获取室号信息
147
+     * @param levelId
148
+     * @param communityId
149
+     * @return
150
+     */
151
+    ResponseBean getRoomNoList(Integer levelId, Integer communityId);
121 152
 }

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java View File

@@ -365,8 +365,8 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements IB
365 365
                 billInvoice.setCreateUser(userElement.getId());
366 366
                 billInvoice.setCreateDate(new Date());
367 367
                 billInvoice.setStatus(1);
368
-                Random random = new Random();
369
-                billInvoice.setOutTradeNo(String.valueOf(System.currentTimeMillis()) + random.nextInt());
368
+//                Random random = new Random();
369
+//                billInvoice.setOutTradeNo(String.valueOf(System.currentTimeMillis()) + random.nextInt());
370 370
 
371 371
 
372 372
                 return billInvoice;

+ 185
- 135
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java View File

@@ -53,6 +53,7 @@ import java.util.stream.Collectors;
53 53
  */
54 54
 @Service("iBuildingOwnerInfoService")
55 55
 @Slf4j
56
+@Transactional
56 57
 public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInfoMapper, TpBuildingOwnerInfo> implements IBuildingOwnerInfoService {
57 58
 
58 59
     @Autowired
@@ -66,10 +67,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
66 67
 
67 68
     @Autowired
68 69
     private TaSysUserRoleMapper taSysUserRoleMapper;
69
-
70
-    @Autowired
71
-    private ITaUserService iTaUserService;
72
-
70
+    
73 71
     @Autowired
74 72
     private BillInvoiceMapper billInvoiceMapper;
75 73
 
@@ -79,6 +77,18 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
79 77
     @Autowired
80 78
     private TpBuildingMapper tpBuildingMapper;
81 79
     
80
+    @Autowired
81
+    private TaUserVerifyMapper taUserVerifyMapper;
82
+    
83
+    @Autowired
84
+    private TpPhaseMapper tpPhaseMapper;
85
+    
86
+    @Autowired
87
+    private TpUnitMapper tpUnitMapper;
88
+    
89
+    @Autowired
90
+    private TpLevelMapper tpLevelMapper;
91
+    
82 92
     public static final Logger logger = LoggerFactory.getLogger(BuildingOwnerInfoServiceImpl.class);
83 93
     
84 94
     @Override
@@ -97,20 +107,21 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
97 107
         Map<String, Object> map = Maps.newHashMap();
98 108
         // 小区Id
99 109
         map.put("community_id", userElement.getCommunityId());
110
+        map.put("owner_status", "1");
100 111
         // 期
101
-        map.put("phase", tpBuildingOwnerInfo.getPhaseName());
112
+        //map.put("phase", tpBuildingOwnerInfo.getPhaseName());
102 113
         // 栋
103
-        map.put("building", tpBuildingOwnerInfo.getBuildingName());
114
+        //map.put("building", tpBuildingOwnerInfo.getBuildingName());
104 115
         // 单元
105
-        map.put("unit", tpBuildingOwnerInfo.getUnitName());
116
+        //map.put("unit", tpBuildingOwnerInfo.getUnitName());
106 117
         // 楼层
107
-        map.put("level", tpBuildingOwnerInfo.getLevelName());
118
+        //map.put("level", tpBuildingOwnerInfo.getLevelName());
108 119
         // 房号
109
-        map.put("room_no", tpBuildingOwnerInfo.getName());
120
+        //map.put("room_no", tpBuildingOwnerInfo.getName());
110 121
 
111 122
         QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
112 123
         queryWrapper.allEq(map,false);
113
-        queryWrapper.like(tpBuildingOwnerInfo.getOwnerName() != null,"owner_name", tpBuildingOwnerInfo.getOwnerName());
124
+        //queryWrapper.like(tpBuildingOwnerInfo.getOwnerName() != null,"owner_name", tpBuildingOwnerInfo.getOwnerName());
114 125
         queryWrapper.orderByDesc("create_date");
115 126
 
116 127
         // 分页查询
@@ -372,67 +383,21 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
372 383
     }
373 384
 
374 385
     @Override
375
-    public ResponseBean getBuildingOrUnitOrNumber(String parameter,Integer communityId) {
386
+    public ResponseBean getPhaseList(Integer communityId) {
376 387
 
377 388
         ResponseBean responseBean = new ResponseBean();
378 389
         if (null == communityId || "".equals(communityId)) {
379 390
             throw new WisdomException("编号:%s 小区不存在!", communityId);
380 391
         }
381 392
 
382
-        TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(parameter, TpBuildingOwnerInfo.class);
383
-
384 393
         Map<String, Object> map = Maps.newHashMap();
385
-
386 394
         // 小区
387 395
         map.put("community_id", communityId);
388
-        // 期
389
-        map.put("phase", tpBuildingOwnerInfo.getPhaseName());
390
-        // 栋
391
-        map.put("building", tpBuildingOwnerInfo.getBuildingName());
392
-        // 单元
393
-        map.put("unit", tpBuildingOwnerInfo.getUnitName());
394
-        // 楼层
395
-        map.put("level", tpBuildingOwnerInfo.getLevelName());
396
-
397
-        QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
396
+        QueryWrapper<TpPhase> queryWrapper = new QueryWrapper<>();
398 397
         queryWrapper.allEq(map, false);
399
-
400
-        /**
401
-         * 通过分组来去重
402
-         *
403
-         * 1. phase 为空表示为 phase 字段进行分组
404
-         * 2. building 为空表示为 building 字段进行分组
405
-         * 3. unit 为空表示为 unit 字段进行分组
406
-         * 4. level 为空表示为 level 字段进行分组
407
-         * 5. room_no 为空表示为 room_no 字段进行分组
408
-         */
409
-        if (null == tpBuildingOwnerInfo.getPhaseName() || "".equals(tpBuildingOwnerInfo.getPhaseName())) {
410
-            queryWrapper.groupBy("phase");
411
-        } else if (null == tpBuildingOwnerInfo.getBuildingName() || "".equals(tpBuildingOwnerInfo.getBuildingName())) {
412
-            queryWrapper.groupBy("building");
413
-        } else if (null == tpBuildingOwnerInfo.getUnitName() || "".equals(tpBuildingOwnerInfo.getUnitName())) {
414
-            queryWrapper.groupBy("unit");
415
-        } else if (null == tpBuildingOwnerInfo.getLevelName() || "".equals(tpBuildingOwnerInfo.getLevelName())) {
416
-            queryWrapper.groupBy("level");
417
-        } else if (null == tpBuildingOwnerInfo.getName() || "".equals(tpBuildingOwnerInfo.getName())) {
418
-            queryWrapper.groupBy("room_no");
419
-        }
420
-
421
-        /**
422
-         * 1.如果 楼栋值不存在表示根据小区Id查询时查询楼栋!
423
-         * 2.如果 楼栋存在表示查询单元
424
-         * 3.如果 单元存在表示查询楼层
425
-         * 4.如果 楼层存在表示查询户号
426
-         *
427
-         * 查询户号, 依赖于前面的查询条件成立!
428
-         *
429
-         * 这里的查询都依赖于, 前面的查询条件成立! 比如 要使用条件2, 那么条件1 必须成立!
430
-         *
431
-         */
432
-
433
-        List<TpBuildingOwnerInfo> selectList = tpBuildingOwnerInfoMapper.selectList(queryWrapper);
434
-
435
-        responseBean.addSuccess(selectList);
398
+    
399
+        List<TpPhase> tpPhaseList = tpPhaseMapper.selectList(queryWrapper);
400
+        responseBean.addSuccess(tpPhaseList);
436 401
 
437 402
         return responseBean;
438 403
     }
@@ -454,41 +419,92 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
454 419
         //获取要上传的数据
455 420
         Map<String,Object> map = (Map<String, Object>) responseBean.getData();
456 421
         List<TpBuildingOwnerInfo> list = (List<TpBuildingOwnerInfo>) map.get("list");
457
-        list.stream().forEach(BuildingOwnerInfo -> {
458
-            BuildingOwnerInfo.setCommunityId(userElement.getCommunityId());
459
-            BuildingOwnerInfo.setVerifyStatus(Constant.UN_VERIFY_STATUS);
460
-            BuildingOwnerInfo.setCreateUser(userElement.getId());
461
-            BuildingOwnerInfo.setCreateDate(LocalDateTime.now());
462
-            BuildingOwnerInfo.setUpdateUser(userElement.getId());
463
-            BuildingOwnerInfo.setUpdateDate(LocalDateTime.now());
464
-        });
465
-        //批量插入
466
-	    tpBuildingOwnerInfoMapper.batchInsert(list);
467
-        //判断是否认证过
468
-        List<TpBuildingOwnerInfo> updateList = new ArrayList<TpBuildingOwnerInfo>();
469
-        List<TaUser> updataTaUserList = new ArrayList<TaUser>();
470
-        list.stream().forEach(BuildingOwnerInfo -> {
471
-            TaUser taUser = taUserMapper.selectByTel(BuildingOwnerInfo.getOwnerTel(),BuildingOwnerInfo.getCommunityId());
472
-            if (null != taUser){
473
-                BuildingOwnerInfo.setVerifyStatus(Constant.VERIFY_STATUS);
474
-                updateList.add(BuildingOwnerInfo);
475
-                taUser.setVerifyStatus(Constant.VERIFY_STATUS);
476
-                taUser.setBuildingOwnerInfoId(BuildingOwnerInfo.getId());
477
-                updataTaUserList.add(taUser);
478
-            }
479
-        });
422
+        
480 423
         //批量更新
481
-        if (updateList.size() > 0){
482
-	        tpBuildingOwnerInfoMapper.batchUpdate(updateList);
483
-        }
484
-        if (updataTaUserList.size() > 0){
485
-            taUserMapper.batchUpdate(updataTaUserList);
486
-            taUserMapper.batchUpdateRole(updataTaUserList);
424
+        tpBuildingOwnerInfoMapper.batchUpdate(list);
425
+        
426
+        //构造数据
427
+        for (TpBuildingOwnerInfo tpBuildingOwnerInfo : list){
428
+            //根据手机号查询这个手机号是否注册
429
+            TaUser taUser = taUserMapper.selectByTel(tpBuildingOwnerInfo.getOwnerTel());
430
+            if (null == taUser){
431
+                //插入新用户并审核通过
432
+                addNewUser(tpBuildingOwnerInfo,userElement);
433
+            }else {
434
+                //已经有用户的情况下看是否审核通过,是否要添加新的房产
435
+                checkUserVerify(taUser,tpBuildingOwnerInfo,userElement);
436
+            }
487 437
         }
488 438
         responseBean.addSuccess("success");
489 439
         return responseBean;
490 440
     }
491
-
441
+    
442
+    private void checkUserVerify(TaUser taUser, TpBuildingOwnerInfo tpBuildingOwnerInfo, UserElement userElement) {
443
+        //有用户的情况下查看是否有申请的房产
444
+        QueryWrapper<TaUserVerify> queryWrapper = new QueryWrapper<>();
445
+        queryWrapper.eq("community_id",userElement.getCommunityId());
446
+        queryWrapper.eq("user_id",taUser.getId());
447
+        List<TaUserVerify> verifyList = taUserVerifyMapper.selectList(queryWrapper);
448
+        if (verifyList.size() > 0){
449
+            verifyList.stream().forEach(e -> {
450
+                if (e.getRoomNoId().equals(tpBuildingOwnerInfo.getId()) && e.getVerifyStatus().equals("0")){
451
+                    e.setVerifyStatus("1");
452
+                    e.setVerifyName(userElement.getUserName());
453
+                    taUserVerifyMapper.updateById(e);
454
+                }
455
+            });
456
+            return;
457
+        }
458
+        //插入一条房产数据
459
+        saveVerifyData(taUser.getId(),tpBuildingOwnerInfo,userElement);
460
+    }
461
+    
462
+    /**
463
+     * 插入新用户并审核通过
464
+     * @param tpBuildingOwnerInfo
465
+     * @param userElement
466
+     */
467
+    private void addNewUser(TpBuildingOwnerInfo tpBuildingOwnerInfo, UserElement userElement) {
468
+        //插入用户
469
+        TaUser taUser = new TaUser();
470
+        taUser.setUserName(tpBuildingOwnerInfo.getOwnerName());
471
+        taUser.setLoginName(tpBuildingOwnerInfo.getOwnerTel());
472
+        taUser.setStatus("1");
473
+        taUser.setCreateDate(LocalDateTime.now());
474
+        taUser.setFaceStatus("0");
475
+        taUserMapper.insert(taUser);
476
+        //审核通过
477
+        saveVerifyData(taUser.getId(),tpBuildingOwnerInfo,userElement);
478
+        
479
+    }
480
+    
481
+    private void saveVerifyData(Integer userId, TpBuildingOwnerInfo tpBuildingOwnerInfo, UserElement userElement) {
482
+        TaUserVerify taUserVerify = new TaUserVerify();
483
+        taUserVerify.setUserId(userId);
484
+        taUserVerify.setCommunityId(userElement.getCommunityId());
485
+        if (tpBuildingOwnerInfo.getRoleName().equals("户主")){
486
+            taUserVerify.setRoleId(1);
487
+        }else if (tpBuildingOwnerInfo.getRoleName().equals("家属")){
488
+            taUserVerify.setRoleId(3);
489
+        }else if (tpBuildingOwnerInfo.getRoleName().equals("租客")){
490
+            taUserVerify.setRoleId(2);
491
+        }
492
+        taUserVerify.setPhaseId(tpBuildingOwnerInfo.getPhaseId());
493
+        taUserVerify.setPhaseName(tpBuildingOwnerInfo.getPhaseName());
494
+        taUserVerify.setBuildingId(tpBuildingOwnerInfo.getBuildingId());
495
+        taUserVerify.setBuildingName(tpBuildingOwnerInfo.getBuildingName());
496
+        taUserVerify.setUnitId(tpBuildingOwnerInfo.getUnitId());
497
+        taUserVerify.setUnitName(tpBuildingOwnerInfo.getUnitName());
498
+        taUserVerify.setLevelId(tpBuildingOwnerInfo.getLevelId());
499
+        taUserVerify.setLevelName(tpBuildingOwnerInfo.getLevelName());
500
+        taUserVerify.setRoomNoId(tpBuildingOwnerInfo.getId());
501
+        taUserVerify.setRoomNoName(tpBuildingOwnerInfo.getName());
502
+        taUserVerify.setVerifyStatus("1");
503
+        taUserVerify.setCreateDate(LocalDateTime.now());
504
+        taUserVerify.setVerifyName(userElement.getUserName());
505
+        taUserVerifyMapper.insert(taUserVerify);
506
+    }
507
+    
492 508
     @Override
493 509
     public ResponseBean updataApprove(String paramets) {
494 510
         ResponseBean response = new ResponseBean();
@@ -556,48 +572,38 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
556 572
             return responseBean;
557 573
         } else {
558 574
             List<String> temBuildingList = new ArrayList<String>();
559
-            List<String> temTelList = new ArrayList<String>();
560 575
             //获取一个sheet也就是一个工作簿
561 576
             Sheet sheet = workbook.getSheetAt(0);
562 577
             int lastRowNum = sheet.getLastRowNum();
563 578
             //从第一行开始第一行一般是标题
564 579
             for (int j = 3; j <= lastRowNum; j++) {
565 580
                 Row row = sheet.getRow(j);
566
-                TpBuildingOwnerInfo tpBuildingOwnerInfo = new TpBuildingOwnerInfo();
567
-                String phase = row.getCell(0).getStringCellValue().trim();
568
-                String building = row.getCell(1).getStringCellValue().trim();
569
-                String unit = row.getCell(2).getStringCellValue().trim();
570
-                String level = row.getCell(3).getStringCellValue().trim();
571
-                String roomNo = row.getCell(4).getStringCellValue().trim();
572
-                String ownerName = row.getCell(5).getStringCellValue().trim();
573
-                String ownerTel = row.getCell(6).getStringCellValue().trim();
581
+                String buildingInfo = row.getCell(0).getStringCellValue().trim();
582
+                String roomNoId = row.getCell(1).getStringCellValue().trim();
583
+                String ownerName = row.getCell(2).getStringCellValue().trim();
584
+                String ownerTel = row.getCell(3).getStringCellValue().trim();
585
+                String ownerRole = row.getCell(4).getStringCellValue().trim();
574 586
                 int currentRow = j+1;
575
-                if (StringUtils.isEmpty(phase)){
576
-                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
577
-                    return responseBean;
578
-                }
579
-                if (StringUtils.isEmpty(building)){
580
-                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
581
-                    return responseBean;
582
-                }
583
-                if (StringUtils.isEmpty(unit)){
584
-                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
587
+                if (StringUtils.isEmpty(buildingInfo)){
588
+                    responseBean.addError("第" + currentRow + "行" + "房产信息不能为空!");
585 589
                     return responseBean;
586 590
                 }
587
-                if (StringUtils.isEmpty(level)){
588
-                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
591
+                if (StringUtils.isEmpty(roomNoId)){
592
+                    responseBean.addError("第" + currentRow + "行" + "房产ID不能为空!");
589 593
                     return responseBean;
590 594
                 }
591
-                if (StringUtils.isEmpty(roomNo)){
592
-                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
595
+                //房产ID不为空的情况下检查房产是否存在
596
+                TpBuildingOwnerInfo checkOwnerInfo =tpBuildingOwnerInfoMapper.selectById(roomNoId);
597
+                if (null == checkOwnerInfo){
598
+                    responseBean.addError("第" + currentRow + "行" + "房产ID不存在!");
593 599
                     return responseBean;
594 600
                 }
595 601
                 if (StringUtils.isEmpty(ownerName)){
596
-                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
602
+                    responseBean.addError("第" + currentRow + "行" + "姓名不能为空!");
597 603
                     return responseBean;
598 604
                 }
599 605
                 if (StringUtils.isEmpty(ownerTel)){
600
-                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
606
+                    responseBean.addError("第" + currentRow + "行" + "手机号不能为空!");
601 607
                     return responseBean;
602 608
                 }
603 609
                 //校验手机号码
@@ -605,29 +611,25 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
605 611
                     responseBean.addError("第"+ currentRow +"行请输入正确手机号:" + ownerTel);
606 612
                     return responseBean;
607 613
                 }
608
-                String buildingInfo = phase + building + unit + level + roomNo;
609
-                if (temBuildingList.contains(buildingInfo)){
610
-                    logger.info("存在重复房源:{}",buildingInfo);
611
-                    responseBean.addError("第"+ currentRow +"行存在重复房源");
614
+                if (StringUtils.isEmpty(ownerRole)){
615
+                    responseBean.addError("第" + currentRow + "行" + "身份不能为空!");
612 616
                     return responseBean;
613 617
                 }
614
-                if (temTelList.contains(ownerTel)){
615
-                    logger.info("存在重复手机号:{}",ownerTel);
616
-                    responseBean.addError("第"+ currentRow +"行存在重复手机号");
618
+    
619
+                if (temBuildingList.contains(roomNoId)){
620
+                    logger.info("存在重复房源:{}",roomNoId);
621
+                    responseBean.addError("第"+ currentRow +"行存在重复房源");
617 622
                     return responseBean;
618 623
                 }
624
+                
619 625
                 //把数据塞入temList校验是否有重复的数据
620
-                temBuildingList.add(buildingInfo);
621
-                temTelList.add(ownerTel);
626
+                temBuildingList.add(roomNoId);
622 627
                 //构建数据
623
-                tpBuildingOwnerInfo.setPhaseName(phase);
624
-                tpBuildingOwnerInfo.setBuildingName(building);
625
-                tpBuildingOwnerInfo.setUnitName(unit);
626
-                tpBuildingOwnerInfo.setLevelName(level);
627
-                tpBuildingOwnerInfo.setName(roomNo);
628
-                tpBuildingOwnerInfo.setOwnerName(ownerName);
629
-                tpBuildingOwnerInfo.setOwnerTel(ownerTel);
630
-                list.add(tpBuildingOwnerInfo);
628
+                checkOwnerInfo.setRoleName(ownerRole);
629
+                checkOwnerInfo.setOwnerName(ownerName);
630
+                checkOwnerInfo.setOwnerTel(ownerTel);
631
+                checkOwnerInfo.setOwnerStatus("1");
632
+                list.add(checkOwnerInfo);
631 633
             }
632 634
         }
633 635
         //构建分页
@@ -876,8 +878,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
876 878
         Long pages = infoIPage.getPages();
877 879
 
878 880
 
879
-        // 行数 默认从 第 5 行开始
880
-        int currentRow = 5;
881
+        // 行数 默认从 第 3 行开始
882
+        int currentRow = 3;
881 883
         // 记录坐标
882 884
         int index = 0;
883 885
 
@@ -926,4 +928,52 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
926 928
         responseBean.addSuccess(workbook);
927 929
         return responseBean;
928 930
     }
931
+    
932
+    /**
933
+     * 获取楼栋信息
934
+     *
935
+     * @param phaseId
936
+     * @param communityId
937
+     * @return
938
+     */
939
+    @Override
940
+    public ResponseBean getBuildingList(Integer phaseId, Integer communityId) {
941
+        return null;
942
+    }
943
+    
944
+    /**
945
+     * 获取单元信息
946
+     *
947
+     * @param buildingId
948
+     * @param communityId
949
+     * @return
950
+     */
951
+    @Override
952
+    public ResponseBean getUnitList(Integer buildingId, Integer communityId) {
953
+        return null;
954
+    }
955
+    
956
+    /**
957
+     * 获取楼层信息
958
+     *
959
+     * @param unitId
960
+     * @param communityId
961
+     * @return
962
+     */
963
+    @Override
964
+    public ResponseBean getLevelList(Integer unitId, Integer communityId) {
965
+        return null;
966
+    }
967
+    
968
+    /**
969
+     * 获取室号信息
970
+     *
971
+     * @param levelId
972
+     * @param communityId
973
+     * @return
974
+     */
975
+    @Override
976
+    public ResponseBean getRoomNoList(Integer levelId, Integer communityId) {
977
+        return null;
978
+    }
929 979
 }

+ 1
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingTreeServiceImpl.java View File

@@ -557,6 +557,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
557 557
 				tpBuildingOwnerInfoNew.setLevelName(lastLevelName);
558 558
 				tpBuildingOwnerInfoNew.setName(tpBuildingOwnerInfo.getName());
559 559
 				tpBuildingOwnerInfoNew.setCreateDate(LocalDateTime.now());
560
+				tpBuildingOwnerInfoNew.setTreeStatus("1");
560 561
 				tpBuildingOwnerInfoMapper.insert(tpBuildingOwnerInfoNew);
561 562
 			}
562 563
 		}

+ 0
- 1
CODE/smart-community/property-api/src/main/resources/mapper/TaUserMapper.xml View File

@@ -315,7 +315,6 @@
315 315
     <include refid="Base_Column_List" />
316 316
     from ta_user
317 317
     where login_name = #{loginName,jdbcType=VARCHAR}
318
-    and community_id = #{communityId,jdbcType=INTEGER}
319 318
     and verify_status = 0
320 319
   </select>
321 320
 

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TaUserVerifyMapper.xml View File

@@ -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.TaUserVerifyMapper">
4
+
5
+</mapper>

+ 4
- 2
CODE/smart-community/property-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml View File

@@ -50,9 +50,11 @@
50 50
         <foreach collection="list" item="item" index="index" open="" close="" separator=";">
51 51
             update tp_building_owner_info
52 52
             <set>
53
-                verify_status=${item.verifyStatus}
53
+                owner_name = #{item.ownerName},
54
+                owner_tel = #{item.ownerTel},
55
+                owner_status = #{item.ownerStatus}
54 56
             </set>
55
-            where id = ${item.id}
57
+            where id = #{item.id}
56 58
         </foreach>
57 59
     </update>
58 60
 

BIN
CODE/smart-community/property-api/src/main/resources/业主资料库.xlsx View File


+ 42
- 13
VUECODE/smart-property-manage/src/api/buildingOwnerInfo.js View File

@@ -1,19 +1,48 @@
1 1
 import request from '@/utils/request'
2 2
 
3 3
 //  查询 楼栋/单元/楼层/户号
4
-export function buildingAddress(data) {
5
-  const config = {
6
-    url: '/building/address',
7
-    method: 'post',
8
-    data: {
9
-      phase: data.phase,
10
-      building: data.building,
11
-      unit: data.unit,
12
-      level: data.level,
13
-      roomNo: data.roomNo
14
-    }
15
-  }
16
-  return request(config)
4
+export function getPhaseList(data) {
5
+  return request({
6
+    url: '/building/phase',
7
+    method: 'get',
8
+    params: data
9
+  })
10
+}
11
+
12
+//  查询 楼栋/单元/楼层/户号
13
+export function getBuildingList(data) {
14
+  return request({
15
+    url: '/building/building',
16
+    method: 'get',
17
+    params: data
18
+  })
19
+}
20
+
21
+//  查询 楼栋/单元/楼层/户号
22
+export function getUnitList(data) {
23
+  return request({
24
+    url: '/building/unit',
25
+    method: 'get',
26
+    params: data
27
+  })
28
+}
29
+
30
+//  查询 楼栋/单元/楼层/户号
31
+export function getLevelList(data) {
32
+  return request({
33
+    url: '/building/level',
34
+    method: 'get',
35
+    params: data
36
+  })
37
+}
38
+
39
+//  查询 楼栋/单元/楼层/户号
40
+export function getRoomNoList(data) {
41
+  return request({
42
+    url: '/building/roomno',
43
+    method: 'get',
44
+    params: data
45
+  })
17 46
 }
18 47
 
19 48
 // 获取楼栋业主信息列表

+ 43
- 2
VUECODE/smart-property-manage/src/store/modules/buildingOwnerInfo.js View File

@@ -1,6 +1,7 @@
1 1
 
2 2
 import { buildingAddress, buildingList, deleteBuilding, addBuilding, updateBuilding, getByIdBuildingId, userPassCertification, updataPassCertification, communityBuildinglist, buildingHouse, communityBuildingAdd, buildingDownloadExcel, addNode, deleteNode } from '@/api/buildingOwnerInfo'
3 3
 
4
+
4 5
 const buildingOwnerInfo = {
5 6
   state: {
6 7
     list: ''
@@ -11,9 +12,49 @@ const buildingOwnerInfo = {
11 12
     }
12 13
   },
13 14
   actions: {
14
-    BuildingAddress({ commit }, data) { // 查询 楼栋/单元/楼层/户号
15
+    GetPhaseList({ commit }, data) { // 查询 楼栋/单元/楼层/户号
16
+      return new Promise((resolve, reject) => {
17
+        getPhaseList(data).then(response => {
18
+          // console.log('查询 楼栋/单元/楼层/户号: ', response)
19
+          resolve(response)
20
+        }).catch(error => {
21
+          reject(error)
22
+        })
23
+      })
24
+    },
25
+    GetBuildingList({ commit }, data) { // 查询 楼栋/单元/楼层/户号
26
+      return new Promise((resolve, reject) => {
27
+        getBuildingList(data).then(response => {
28
+          // console.log('查询 楼栋/单元/楼层/户号: ', response)
29
+          resolve(response)
30
+        }).catch(error => {
31
+          reject(error)
32
+        })
33
+      })
34
+    },
35
+    GetUnitList({ commit }, data) { // 查询 楼栋/单元/楼层/户号
36
+      return new Promise((resolve, reject) => {
37
+        getUnitList(data).then(response => {
38
+          // console.log('查询 楼栋/单元/楼层/户号: ', response)
39
+          resolve(response)
40
+        }).catch(error => {
41
+          reject(error)
42
+        })
43
+      })
44
+    },
45
+    GetLevelList({ commit }, data) { // 查询 楼栋/单元/楼层/户号
46
+      return new Promise((resolve, reject) => {
47
+        getLevelList(data).then(response => {
48
+          // console.log('查询 楼栋/单元/楼层/户号: ', response)
49
+          resolve(response)
50
+        }).catch(error => {
51
+          reject(error)
52
+        })
53
+      })
54
+    },
55
+    GetRoomNoList({ commit }, data) { // 查询 楼栋/单元/楼层/户号
15 56
       return new Promise((resolve, reject) => {
16
-        buildingAddress(data).then(response => {
57
+        getRoomNoList(data).then(response => {
17 58
           // console.log('查询 楼栋/单元/楼层/户号: ', response)
18 59
           resolve(response)
19 60
         }).catch(error => {

+ 8
- 5
VUECODE/smart-property-manage/src/views/building/batch/batchImport.vue View File

@@ -14,23 +14,26 @@
14 14
     </el-form>
15 15
     <el-table ref="multipleTable" :data="list" border tooltip-effect="dark" style="width: 100%; margin-top: 20px;">
16 16
       <el-table-column label="期/区" align="center">
17
-        <template slot-scope="scope">{{ scope.row.phase }}</template>
17
+        <template slot-scope="scope">{{ scope.row.phaseName }}</template>
18 18
       </el-table-column>
19 19
       <el-table-column label="栋" align="center">
20
-        <template slot-scope="scope">{{ scope.row.building }}</template>
20
+        <template slot-scope="scope">{{ scope.row.buildingName }}</template>
21 21
       </el-table-column>
22 22
       <el-table-column label="单元" align="center">
23
-        <template slot-scope="scope">{{ scope.row.unit }}</template>
23
+        <template slot-scope="scope">{{ scope.row.unitName }}</template>
24 24
       </el-table-column>
25 25
       <el-table-column label="楼层" align="center">
26
-        <template slot-scope="scope">{{ scope.row.level }}</template>
26
+        <template slot-scope="scope">{{ scope.row.levelName }}</template>
27 27
       </el-table-column>
28 28
       <el-table-column label="户号" align="center">
29
-        <template slot-scope="scope">{{ scope.row.roomNo }}</template>
29
+        <template slot-scope="scope">{{ scope.row.name }}</template>
30 30
       </el-table-column>
31 31
       <el-table-column label="业主姓名" align="center">
32 32
         <template slot-scope="scope">{{ scope.row.ownerName }}</template>
33 33
       </el-table-column>
34
+      <el-table-column label="身份" align="center">
35
+        <template slot-scope="scope">{{ scope.row.roleName }}</template>
36
+      </el-table-column>
34 37
       <el-table-column label="手机号码" align="center">
35 38
         <template slot-scope="scope">{{ scope.row.ownerTel }}</template>
36 39
       </el-table-column>

+ 1
- 1
VUECODE/smart-property-manage/src/views/building/buildingdata/BuildingBatchImport.vue View File

@@ -4,7 +4,7 @@
4 4
     <el-form :inline="true" :model="listQuery" class="form-listQuery">
5 5
       <el-form-item>
6 6
         <el-upload :on-preview="handlePreview" :on-change="handleChange" :before-upload="beforeUpload" :limit="1" :on-exceed="handleExceed" class="upload-demo" action="" multiple>
7
-          <a href="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/%E6%A5%BC%E6%A0%8B%E5%BA%93%E6%A8%A1%E6%9D%BF.xlsx?Expires=1548327771"><el-button style="margin-left: 10px;" size="large" type="primary">下载模板</el-button></a>
7
+          <a href="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/%E6%A5%BC%E6%A0%8B%E5%BA%93%E6%A8%A1%E6%9D%BF.xlsx?Expires=1556098137"><el-button style="margin-left: 10px;" size="large" type="primary">下载模板</el-button></a>
8 8
           <el-button slot="trigger" size="large" type="primary">选取文件并预览</el-button>
9 9
           <el-button style="margin-left: 10px;" size="large" type="success" @click="submitUpload">提交</el-button>
10 10
           <el-button style="margin-left: 10px;" size="large" type="success" @click="dialogBuildingIndex">取消</el-button>

+ 31
- 27
VUECODE/smart-property-manage/src/views/building/index.vue View File

@@ -3,45 +3,45 @@
3 3
   <div class="root">
4 4
     <el-form :inline="true" :model="listQuery" class="form-listQuery">
5 5
       <el-form-item label="楼盘库">
6
-        <el-select v-model="listQuery.phase" placeholder="期/区" @change="buildSelectChange(0)">
6
+        <el-select v-model="listQuery.phaseId" placeholder="期/区" @change="buildSelectChange(0)">
7 7
           <!--<el-option label="选择楼栋" value="-1" />-->
8 8
           <el-option
9 9
             v-for="item in phaseList"
10 10
             :key="item.id"
11
-            :label="item.phase"
12
-            :value="item.phase"/>
11
+            :label="item.name"
12
+            :value="item.id"/>
13 13
         </el-select>
14
-        <el-select v-model="listQuery.building" placeholder="栋" @change="buildSelectChange(1)">
14
+        <el-select v-model="listQuery.buildingId" placeholder="栋" @change="buildSelectChange(1)">
15 15
           <!--<el-option label="选择楼栋" value="-1" />-->
16 16
           <el-option
17 17
             v-for="item in buildingList"
18 18
             :key="item.id"
19
-            :label="item.building"
20
-            :value="item.building"/>
19
+            :label="item.name"
20
+            :value="item.id"/>
21 21
         </el-select>
22
-        <el-select v-model="listQuery.unit" placeholder="单元" @change="buildSelectChange(2)">
22
+        <el-select v-model="listQuery.unitId" placeholder="单元" @change="buildSelectChange(2)">
23 23
           <!--<el-option label="选择单元" value="-1" />-->
24 24
           <el-option
25 25
             v-for="item in unitList"
26 26
             :key="item.id"
27
-            :label="item.unit"
28
-            :value="item.unit"/>
27
+            :label="item.name"
28
+            :value="item.id"/>
29 29
         </el-select>
30
-        <el-select v-model="listQuery.level" placeholder="楼层" @change="buildSelectChange(3)">
30
+        <el-select v-model="listQuery.levelId" placeholder="楼层" @change="buildSelectChange(3)">
31 31
           <!--<el-option label="选择楼层" value="-1" />-->
32 32
           <el-option
33 33
             v-for="item in levelList"
34 34
             :key="item.id"
35
-            :label="item.level"
36
-            :value="item.level"/>
35
+            :label="item.name"
36
+            :value="item.id"/>
37 37
         </el-select>
38
-        <el-select v-model="listQuery.roomNo" placeholder="户号">
38
+        <el-select v-model="listQuery.roomNoId" placeholder="户号">
39 39
           <!--<el-option label="选择户号" value="-1" />-->
40 40
           <el-option
41 41
             v-for="item in roomNoList"
42 42
             :key="item.id"
43
-            :label="item.roomNo"
44
-            :value="item.roomNo"/>
43
+            :label="item.name"
44
+            :value="item.id"/>
45 45
         </el-select>
46 46
         <el-form-item label="业主名称">
47 47
           <el-input v-model="listQuery.ownerName" placeholder="业主名称" />
@@ -105,11 +105,11 @@ export default {
105 105
   data() {
106 106
     return {
107 107
       listQuery: {
108
-        phase: '',
109
-        building: '',
110
-        unit: '',
111
-        level: '',
112
-        roomNo: '',
108
+        phaseId: '',
109
+        buildingId: '',
110
+        unitId: '',
111
+        levelId: '',
112
+        roomNoId: '',
113 113
         ownerName: '',
114 114
         pageNum: 1,
115 115
         pageSize: 10
@@ -156,7 +156,11 @@ export default {
156 156
   },
157 157
   methods: {
158 158
     ...mapActions('buildingOwnerInfo', [
159
-      'BuildingAddress',
159
+      'GetPhaseList',
160
+      'GetBuildingList',
161
+      'GetUnitList',
162
+      'GetLevelList',
163
+      'GetRoomNoList',
160 164
       'BuildingInfoList'
161 165
     ]),
162 166
     handleSizeChange(val) {
@@ -185,15 +189,15 @@ export default {
185 189
     },
186 190
     getPhase() { // 获取期
187 191
       this.listQuery.phase = ''
188
-      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
192
+      this.$store.dispatch('GetPhaseList', this.listQuery).then((res) => {
189 193
         this.phaseList = res.data
190 194
       }).catch(() => {
191 195
         console.log('error phase BuildingAddress')
192 196
       })
193 197
     },
194 198
     getBuild() { // 获取楼栋
195
-      this.listQuery.building = ''
196
-      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
199
+      this.listQuery.buildingId = ''
200
+      this.$store.dispatch('GetBuildingList', this.listQuery).then((res) => {
197 201
         this.buildingList = res.data
198 202
       }).catch(() => {
199 203
         console.log('error building BuildingAddress')
@@ -201,7 +205,7 @@ export default {
201 205
     },
202 206
     getUnit() { // 获取单元
203 207
       this.listQuery.unit = ''
204
-      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
208
+      this.$store.dispatch('GetUnitList', this.listQuery).then((res) => {
205 209
         this.unitList = res.data
206 210
       }).catch(() => {
207 211
         console.log('error unit BuildingAddress')
@@ -209,7 +213,7 @@ export default {
209 213
     },
210 214
     getLevel() { // 获取楼层
211 215
       this.listQuery.level = ''
212
-      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
216
+      this.$store.dispatch('GetLevelList', this.listQuery).then((res) => {
213 217
         this.levelList = res.data
214 218
       }).catch(() => {
215 219
         console.log('error level BuildingAddress')
@@ -217,7 +221,7 @@ export default {
217 221
     },
218 222
     getRoomNo() { // 获取户号
219 223
       this.listQuery.roomNo = ''
220
-      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
224
+      this.$store.dispatch('GetRoomNoList', this.listQuery).then((res) => {
221 225
         this.roomNoList = res.data
222 226
       }).catch(() => {
223 227
         console.log('error roomNo BuildingAddress')

+ 1
- 1
VUECODE/smart-property-manage/src/views/social/activity/edi/index.vue View File

@@ -105,7 +105,7 @@ export default {
105 105
     }
106 106
   },
107 107
   mounted() {
108
-    this.ruleForm.id = this.$route.params.id
108
+    this.ruleForm.id = this.$route.query.id
109 109
     this.getById()
110 110
   },
111 111
   methods: {

+ 1
- 1
VUECODE/smart-property-manage/src/views/social/activity/index.vue View File

@@ -240,7 +240,7 @@ export default {
240 240
       })
241 241
     },
242 242
     infoActivity(id) { // 查看活动
243
-      this.$router.push({ name: 'activity-info', params: { id: id }})
243
+      this.$router.push({ name: 'activity-info', query: { id: id }})
244 244
     },
245 245
     invalidActivity() { //  批量作废
246 246
       const ids = this.deleteIds

+ 6
- 5
VUECODE/smart-property-manage/src/views/social/activity/info/index.vue View File

@@ -49,11 +49,12 @@ export default {
49 49
     }
50 50
   },
51 51
   mounted() {
52
-    this.getById(this.$route.params.id)
52
+    this.ruleForm.id = this.$route.query.id
53
+    this.getById()
53 54
   },
54 55
   methods: {
55
-    getById(id) { // 根据ID获取活动信息
56
-      this.$store.dispatch('ActivityById', id).then((res) => {
56
+    getById() { // 根据ID获取活动信息
57
+      this.$store.dispatch('ActivityById', this.ruleForm.id).then((res) => {
57 58
         const resData = res.data
58 59
         this.ruleForm = resData.info
59 60
         this.ruleForm.contentImg = resData.contentImg
@@ -80,10 +81,10 @@ export default {
80 81
       return year + '-' + month + '-' + day
81 82
     },
82 83
     ediActivity() { // 修改活动
83
-      this.$router.push({ name: 'activity-edi', params: { id: this.ruleForm.id }})
84
+      this.$router.push({ name: 'activity-edi', query: { id: this.ruleForm.id }})
84 85
     },
85 86
     lockSignUp() { // 查看活动报名
86
-      this.$router.push({ name: 'signUp-info', params: { id: this.ruleForm.id }})
87
+      this.$router.push({ name: 'signUp-info', query: { id: this.ruleForm.id }})
87 88
     }
88 89
   }
89 90
 }

+ 24
- 15
VUECODE/smart-property-manage/src/views/social/announcement/details.vue View File

@@ -1,15 +1,24 @@
1 1
 <template>
2 2
   <div id="root">
3
-    <img :src="ruleForm.announcementCarouselImg" width="500" height="500">
4
-    <span class="activityTile">{{ ruleForm.announcementTitle }}</span>
5
-    <div class="activityContext">
6
-      {{ ruleForm.announcementContent }}
7
-    </div>
8
-    <div>
9
-      <template v-for="site in ruleForm.contentImg">
10
-        <img :src="site.url" width="500" height="500" >
11
-      </template>
12
-    </div>
3
+    <el-form ref="form" label-width="100px" label-position="left">
4
+      <el-form-item label="公共标题">
5
+        <span class="activityTile">{{ ruleForm.announcementTitle }}</span>
6
+      </el-form-item>
7
+      <el-form-item label="公告轮播图">
8
+        <span style="color: #99a9bf;">轮播图为横幅位展示图片,不会显示在公告详情页</span>
9
+        <img :src="ruleForm.announcementCarouselImg" width="100" height="100">
10
+      </el-form-item>
11
+      <el-form-item label="公告详细内容">
12
+        <div class="activityContext">
13
+          {{ ruleForm.announcementContent }}
14
+        </div>
15
+      </el-form-item>
16
+      <el-form-item label="公告配图">
17
+        <template v-for="site in ruleForm.contentImg">
18
+          <img :src="site.url" width="100" height="100" >
19
+        </template>
20
+      </el-form-item>
21
+    </el-form>
13 22
     <div class="bom-button">
14 23
       <el-button v-if="isEdi" type="primary" style="width: 150px;" @click="edi">修改</el-button>
15 24
     </div>
@@ -37,11 +46,11 @@ export default {
37 46
     }
38 47
   },
39 48
   mounted() {
40
-    this.getById(this.$route.params.id)
49
+    this.ruleForm.id = this.$route.query.id
50
+    this.getById()
41 51
   },
42 52
   methods: {
43
-    getById(id) { // 根据ID获取活动信息
44
-      this.ruleForm.id = this.$route.params.id
53
+    getById() { // 根据ID获取活动信息
45 54
       this.$store.dispatch('AnnouncementById', this.ruleForm).then((res) => {
46 55
         const resData = res.data
47 56
         const announcement = resData.tpAnnouncement
@@ -69,7 +78,7 @@ export default {
69 78
       return year + '-' + month + '-' + day
70 79
     },
71 80
     edi() { // 修改活动
72
-      this.$router.push({ name: 'announcement-edit', params: { id: this.ruleForm.id }})
81
+      this.$router.push({ name: 'announcement-edit', query: { id: this.ruleForm.id }})
73 82
     }
74 83
   }
75 84
 }
@@ -90,7 +99,7 @@ export default {
90 99
   margin-bottom: 10px;
91 100
 }
92 101
 .activityContext{
93
-  margin-top: 20px;
102
+  /*margin-top: 20px;*/
94 103
   margin-bottom: 20px;
95 104
   font-size: 20px;
96 105
   justify-items: center;

+ 13
- 14
VUECODE/smart-property-manage/src/views/social/announcement/edit.vue View File

@@ -76,11 +76,12 @@ export default {
76 76
       }
77 77
     }
78 78
   },
79
-    mounted() {
80
-    this.getById(this.$route.params.id)
79
+  mounted() {
80
+    this.ruleForm.id = this.$route.query.id
81
+    this.getById()
81 82
   },
82 83
   methods: {
83
-    submitForm(formName,status) {
84
+    submitForm(formName, status) {
84 85
       // 加载框
85 86
       const loading = this.$loading({
86 87
         lock: true,
@@ -93,11 +94,10 @@ export default {
93 94
           if (this.ruleForm.announcementContent.length <= 0 && this.ruleForm.contentImg.length <= 0) {
94 95
             this.$message.error('公告内容描述 和 公告配图至少要存在一个!')
95 96
             loading.close()
96
-            return 
97
+            return
97 98
           }
98 99
           this.ruleForm.status = status // 发布状态
99 100
           this.$store.dispatch('Updateannouncement', this.ruleForm).then((res) => {
100
-
101 101
             if (res.code === '0') {
102 102
               this.$message({
103 103
                 message: res.message,
@@ -118,7 +118,7 @@ export default {
118 118
           return false
119 119
         }
120 120
       })
121
-       // 关闭加载框
121
+      // 关闭加载框
122 122
       loading.close()
123 123
     },
124 124
     handleAvatarSuccess(res, file) { // 轮播图上传回调
@@ -156,15 +156,14 @@ export default {
156 156
     sortHandleChange(value) { // 权重值
157 157
       this.ruleForm.sort = value
158 158
     },
159
-    getById(id) { // 页面初始化后调用此方法根据ID获取公告信息
160
-      this.ruleForm.id=this.$route.params.id
159
+    getById() { // 页面初始化后调用此方法根据ID获取公告信息
161 160
       this.$store.dispatch('AnnouncementById', this.ruleForm).then((res) => {
162
-      const resData = res.data
163
-      this.ruleForm.announcementTitle=resData.tpAnnouncement.announcementTitle// 标题
164
-      this.ruleForm.announcementContent=resData.tpAnnouncement.announcementContent// 内容
165
-      this.Urlimage=resData.tpAnnouncement.announcementCarouselImg // 轮播图
166
-      this.ruleForm.sort=resData.tpAnnouncement.sort// 权重
167
-        //多张图片进行遍历
161
+        const resData = res.data
162
+        this.ruleForm.announcementTitle = resData.tpAnnouncement.announcementTitle// 标题
163
+        this.ruleForm.announcementContent = resData.tpAnnouncement.announcementContent// 内容
164
+        this.Urlimage = resData.tpAnnouncement.announcementCarouselImg // 轮播图
165
+        this.ruleForm.sort = resData.tpAnnouncement.sort// 权重
166
+        // 多张图片进行遍历
168 167
         for (let i = 0; i < resData.studentList.length; i++) {
169 168
           this.contentImgList.push({ url: resData.studentList[i].imageUrl })
170 169
           this.ruleForm.contentImg.push(resData.studentList[i].imageUrl)

+ 1
- 1
VUECODE/smart-property-manage/src/views/social/announcement/index.vue View File

@@ -228,7 +228,7 @@ export default {
228 228
 
229 229
 
230 230
     clickTitle(id) {
231
-      this.$router.push({ name: 'contentParticulars-details', params: { id: id }})
231
+      this.$router.push({ name: 'contentParticulars-details', query: { id: id }})
232 232
     },
233 233
     formatDate(val) {
234 234
       if (val === null) {

+ 1
- 1
VUECODE/smart-property-manage/src/views/social/signUp/index.vue View File

@@ -129,7 +129,7 @@ export default {
129 129
     }
130 130
   },
131 131
   mounted() {
132
-    this.listQuery.id = this.$route.params.id
132
+    this.listQuery.id = this.$route.query.id
133 133
     this.signUpList()
134 134
   },
135 135
   methods: {

+ 1298
- 986
文档/MYSQL/smartCommunity.pdb
File diff suppressed because it is too large
View File


+ 1298
- 986
文档/MYSQL/smartCommunity.pdm
File diff suppressed because it is too large
View File