|
@@ -94,12 +94,15 @@ public class TaUserVerifyServiceImpl extends ServiceImpl<TaUserVerifyMapper, TaU
|
94
|
94
|
responseBean.addError("审核状态错误!");
|
95
|
95
|
return responseBean;
|
96
|
96
|
}
|
|
97
|
+ // 设置成用户提交上来的状态结果
|
|
98
|
+ String status = verifyStatus == true ? Constant.APPROVED : Constant.REJECTED;
|
|
99
|
+ userVerify.setVerifyStatus(status);
|
97
|
100
|
|
98
|
101
|
// 校验房产
|
99
|
102
|
hasUserVerify(userElement, userVerify, true);
|
100
|
103
|
|
101
|
104
|
User user = userMapper.selectById(userElement.getId());
|
102
|
|
- String status = verifyStatus == true ? Constant.APPROVED : Constant.REJECTED;
|
|
105
|
+
|
103
|
106
|
|
104
|
107
|
TaUser taUser = taUserMapper.selectById(userVerify.getUserId());
|
105
|
108
|
TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(userVerify.getCommunityId(), userVerify.getPhaseId(),
|
|
@@ -115,7 +118,7 @@ public class TaUserVerifyServiceImpl extends ServiceImpl<TaUserVerifyMapper, TaU
|
115
|
118
|
if (Constant.REJECTED.equals(status)) {
|
116
|
119
|
userVerify.setRemark(remark);
|
117
|
120
|
}
|
118
|
|
- userVerify.setVerifyStatus(status);
|
|
121
|
+
|
119
|
122
|
userVerify.setVerifyName(user.getUserName());
|
120
|
123
|
taUserVerifyMapper.updateById(userVerify);
|
121
|
124
|
|
|
@@ -164,7 +167,7 @@ public class TaUserVerifyServiceImpl extends ServiceImpl<TaUserVerifyMapper, TaU
|
164
|
167
|
private void hasUserVerify(UserElement userElement, TaUserVerify userVerify, boolean hasOwner){
|
165
|
168
|
TaUserVerify hasUserVerify = null;
|
166
|
169
|
// 校验这个房产有没有业主,只能存在一个业主
|
167
|
|
- if (hasOwner && userVerify.getRoleId().intValue() == 1) {
|
|
170
|
+ if (hasOwner && userVerify.getRoleId().intValue() == 1 && "1".equals(userVerify.getVerifyStatus())) {
|
168
|
171
|
hasUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getCommunityId(), userVerify.getPhaseId(),
|
169
|
172
|
userVerify.getBuildingId(), userVerify.getUnitId(),
|
170
|
173
|
userVerify.getLevelId(), userVerify.getRoomNoId());
|
|
@@ -235,6 +238,8 @@ public class TaUserVerifyServiceImpl extends ServiceImpl<TaUserVerifyMapper, TaU
|
235
|
238
|
// 不通过的原因
|
236
|
239
|
userVerify.setRemark(remark);
|
237
|
240
|
userVerify.setRoleId(Integer.valueOf(roleState));
|
|
241
|
+ userVerify.setVerifyStatus(verifyStatus);
|
|
242
|
+
|
238
|
243
|
//判断审核数据是否冲突
|
239
|
244
|
hasUserVerify(userElement, userVerify, true);
|
240
|
245
|
|
|
@@ -247,8 +252,6 @@ public class TaUserVerifyServiceImpl extends ServiceImpl<TaUserVerifyMapper, TaU
|
247
|
252
|
userVerify.getLevelId(), userVerify.getRoomNoId(),
|
248
|
253
|
taUser.getLoginName());
|
249
|
254
|
|
250
|
|
- userVerify.setVerifyStatus(verifyStatus);
|
251
|
|
-
|
252
|
255
|
// 审核通过的情况
|
253
|
256
|
if ("1".equals(verifyStatus) && StringUtils.isNotBlank(roleState)) {
|
254
|
257
|
// 审核通过就把 不通过的原因拿掉
|
|
@@ -263,11 +266,18 @@ public class TaUserVerifyServiceImpl extends ServiceImpl<TaUserVerifyMapper, TaU
|
263
|
266
|
tpBuildingOwnerInfo.setTaUserVerifyId(userVerify.getId());
|
264
|
267
|
tpBuildingOwnerInfoMapper.updateById(tpBuildingOwnerInfo);
|
265
|
268
|
}
|
266
|
|
- // 推送海康
|
267
|
|
- ResponseBean pushHKPerson = taUserFeignService.pushHKPerson(userVerify.getUserId());
|
268
|
|
- if (!"0".equals(pushHKPerson.getCode())) {
|
|
269
|
+
|
|
270
|
+ try {
|
|
271
|
+ // 推送海康
|
|
272
|
+ ResponseBean pushHKPerson = taUserFeignService.pushHKPerson(userVerify.getUserId());
|
|
273
|
+ if (!"0".equals(pushHKPerson.getCode())) {
|
|
274
|
+ throw new WisdomException("设备推送失败!");
|
|
275
|
+ }
|
|
276
|
+ } catch (Exception e) {
|
|
277
|
+ log.info("设备推送失败!,人员id:{}", userVerify.getUserId());
|
269
|
278
|
throw new WisdomException("设备推送失败!");
|
270
|
279
|
}
|
|
280
|
+
|
271
|
281
|
}
|
272
|
282
|
taUserVerifyMapper.updateById(userVerify);
|
273
|
283
|
//推送消息
|