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