소스 검색

Merge branch 'develop' of http://git.ycjcjy.com/fuxingfan/smartCommunity into develop

傅行帆 6 년 전
부모
커밋
74bc550e3e

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/common/hk/HKOpenApi.java 파일 보기

@@ -642,7 +642,7 @@ public class HKOpenApi {
642 642
      * @param phoneNo 电话
643 643
      * @return
644 644
      */
645
-    public static String HKpersonPhone(Integer personId,Integer personNo,String personName,String phoneNo) {
645
+    public static String HKpersonPhone(Integer personId,Long personNo,String personName,String phoneNo) {
646 646
 
647 647
         String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_UPDATE_USER;
648 648
         Map<String, Object> map = new HashMap<String, Object>();

+ 12
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java 파일 보기

@@ -41,6 +41,7 @@ public class UserController extends BaseController {
41 41
     @ApiImplicitParams({
42 42
             @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId",value = "小区"),
43 43
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName(登陆名(手机号)) code(验证码)"),
44
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
44 45
     })
45 46
     @RequestMapping(value = "/user/login/{communityId}",method = RequestMethod.POST)
46 47
     public ResponseBean login(@RequestBody String parameter,
@@ -64,6 +65,7 @@ public class UserController extends BaseController {
64 65
     @ApiImplicitParams({
65 66
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "paramets",value = "phone:登陆(手机号),code:(手机验证码),otherUserId:(租客或者家属ID,空为业主本人)"),
66 67
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
68
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
67 69
     })
68 70
             @RequestMapping(value = "/user/phone",method = RequestMethod.PUT)
69 71
     public ResponseBean update(@RequestBody String paramets, HttpSession session){
@@ -76,7 +78,8 @@ public class UserController extends BaseController {
76 78
 
77 79
     @ApiOperation(value = "查看房屋成员列表", notes = "查看房屋成员列表")
78 80
     @ApiImplicitParams({
79
-            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
81
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
82
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
80 83
     })
81 84
     @RequestMapping(value = "/roomUserList", method = RequestMethod.GET)
82 85
     public ResponseBean accessTicket(HttpSession session){
@@ -91,6 +94,7 @@ public class UserController extends BaseController {
91 94
     @ApiImplicitParams({
92 95
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "userName用户民和gender性别"),
93 96
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
97
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
94 98
     })
95 99
     @RequestMapping(value = "/user/update/info",method = RequestMethod.PUT)
96 100
     public ResponseBean updateUserNameAndGender(@RequestBody String parameter,
@@ -111,6 +115,7 @@ public class UserController extends BaseController {
111 115
     @ApiImplicitParams({
112 116
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "userId(租客或者家属) type(1启用 0停用)"),
113 117
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
118
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
114 119
     })
115 120
     @RequestMapping(value = "/user/dependentsOrTenants",method = RequestMethod.PUT)
116 121
     public ResponseBean updateDependentsOrTenants(@RequestBody String parameter,
@@ -133,6 +138,7 @@ public class UserController extends BaseController {
133 138
                     "phone(租客或者家属 手机号) " +
134 139
                     "gender(租客或者家属 性别 1男 2女) " +
135 140
                     "type(2租客 3家属)"),
141
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
136 142
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
137 143
     })
138 144
     @RequestMapping(value = "/user/addTenantsOrDependents",method = RequestMethod.POST)
@@ -158,6 +164,7 @@ public class UserController extends BaseController {
158 164
                     "phone(租客或者家属 手机号) " +
159 165
                     "gender(租客或者家属 性别 1男 2女) " +
160 166
                     "type(2租客 3家属)"),
167
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
161 168
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
162 169
     })
163 170
     @RequestMapping(value = "/user/updateTenantsOrDependents",method = RequestMethod.POST)
@@ -182,6 +189,7 @@ public class UserController extends BaseController {
182 189
     @ApiOperation(value = "修改用户头像", notes = "修改用户头像")
183 190
     @ApiImplicitParams({
184 191
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "headPortrait(用户头像)"),
192
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
185 193
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
186 194
     })
187 195
     @RequestMapping(value = "/user/modifyUserHeadPortrait",method = RequestMethod.PUT)
@@ -199,6 +207,7 @@ public class UserController extends BaseController {
199 207
     @ApiOperation(value = "获取用户信息", notes = "获取用户信息, 携带userId表示查询租客或者家属")
200 208
     @ApiImplicitParams({
201 209
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
210
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
202 211
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "userId",value = "租客或者家属的ID(可选值)"),
203 212
     })
204 213
     @RequestMapping(value = "/user/info",method = RequestMethod.GET)
@@ -220,7 +229,8 @@ public class UserController extends BaseController {
220 229
 
221 230
     @ApiOperation(value = "游客登录", notes = "游客登录")
222 231
     @ApiImplicitParams({
223
-            @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "communityId", value = "小区Id")
232
+            @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "communityId", value = "小区Id"),
233
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 app"),
224 234
     })
225 235
     @RequestMapping(value = "/user/temporary/{communityId}", method = RequestMethod.POST)
226 236
     public ResponseBean temporaryLogin(@PathVariable Integer communityId, HttpSession session) {

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java 파일 보기

@@ -35,7 +35,7 @@ public interface ITaUserService {
35 35
     ResponseBean register(TaUser user);
36 36
 
37 37
     /**
38
-     * 修改当前用户信息
38
+     * 修改当前用户手机号
39 39
      * @param id
40 40
      * @return
41 41
      */

+ 9
- 10
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java 파일 보기

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
5 5
 import com.community.commom.constant.Constant;
6 6
 import com.community.commom.mode.ResponseBean;
7 7
 import com.community.commom.utils.AccountValidatorUtil;
8
+import com.community.commom.utils.BeanTools;
8 9
 import com.community.commom.utils.MD5Utils;
9 10
 import com.community.commom.uuid.IdGen;
10 11
 import com.community.huiju.common.code.cache.AppkeyCache;
@@ -216,6 +217,7 @@ public class TaUserServiceImpl implements ITaUserService {
216 217
             TpBuildingOwnerInfo buildingOwnerInfo = buildingOwnerInfoList.get(0);
217 218
             user.setBuildingOwnerInfoId(buildingOwnerInfo.getId());
218 219
             user.setVerifyStatus("1");
220
+            user.setUserName(buildingOwnerInfo.getOwnerName());
219 221
             // 标记位1, 业主身份
220 222
             roleType = 1;
221 223
 
@@ -292,16 +294,13 @@ public class TaUserServiceImpl implements ITaUserService {
292 294
             response.addError("号码已占用");
293 295
             return response;
294 296
         }
295
-        String data=HKOpenApi.HKpersonPhone(user.getHkUserId(),user.getId(),user.getUserName(),phone);
296
-       try {
297
-             if (null == data) {
298
-            throw new RuntimeException("海康人脸推送失敗!");
297
+        String data=HKOpenApi.HKpersonPhone(user.getHkUserId(),user.getHkPersonNo(),user.getUserName(),phone);
298
+        JSONObject jsonobject = JSONObject.parseObject(data);
299
+        int errorCode = jsonobject.getInteger("errorCode");
300
+        if (errorCode!=0){
301
+            response.addError("海康电话已存在,推送海康电话修改失败");
302
+            return response;
299 303
         }
300
-       }catch (Exception e){
301
-           e.printStackTrace();
302
-           log.error("海康修改电话失敗! {}",e);
303
-           throw new RuntimeException("海康修改电话失敗!");
304
-       }
305 304
         if(null!=codes && codes.equals(code)){;
306 305
             TaUser taUser=new TaUser();
307 306
             taUser.setLoginName(phone);
@@ -367,7 +366,7 @@ public class TaUserServiceImpl implements ITaUserService {
367 366
         ResponseBean response = new ResponseBean();
368 367
 
369 368
         TaUser taUser = taUserMapper.selectByPrimaryKey(user.getId());
370
-        BeanUtils.copyProperties(user,taUser);
369
+        BeanTools.copyProperties(user, taUser);
371 370
 
372 371
         int result = taUserMapper.updateByPrimaryKeySelective(taUser);
373 372
 

+ 7
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java 파일 보기

@@ -134,17 +134,21 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
134 134
     public ResponseBean update(String parameter, UserElement userElement) {
135 135
         ResponseBean responseBean = new ResponseBean();
136 136
 
137
+
137 138
         TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(parameter, TpBuildingOwnerInfo.class);
138 139
         if (!AccountValidatorUtil.isPhone(tpBuildingOwnerInfo.getOwnerTel())){
139 140
             responseBean.addError("请输入正取的手机号!");
140 141
             return responseBean;
141 142
         }
142 143
 
143
-
144 144
         TpBuildingOwnerInfo oldTpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectById(tpBuildingOwnerInfo.getId());
145 145
         if (null == oldTpBuildingOwnerInfo) {
146 146
             throw new WisdomException("%s 数据不存在!", tpBuildingOwnerInfo.getId());
147 147
         }
148
+        if ("1".equals(oldTpBuildingOwnerInfo.getVerifyStatus())) {
149
+            responseBean.addError("不能修改已认证的楼栋业主信息!");
150
+            return responseBean;
151
+        }
148 152
 
149 153
         // 物业端的用户,也就是正在操作的物业人员
150 154
         // 物业端用户小区Id不使用! 小区 Id 获取请使用 userElement
@@ -290,6 +294,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
290 294
         if (null != appOwnerUser) {
291 295
             // 更新 APP 端用户认证的状态
292 296
             appOwnerUser.setBuildingOwnerInfoId(tpBuildingOwnerInfo.getId());
297
+            appOwnerUser.setUserName(tpBuildingOwnerInfo.getOwnerName());
298
+
293 299
             // 认证状态  0 是未认证    1是认证通过   2是已作废
294 300
             // 标记位已认证
295 301
             appOwnerUser.setVerifyStatus("1");

+ 1
- 1
VUECODE/smart-property-manage/src/views/building/edi/index.vue 파일 보기

@@ -23,7 +23,7 @@
23 23
         <el-input v-model="ruleForm.ownerTel" :disabled="isOwnerTel"/>
24 24
       </el-form-item>
25 25
       <el-form-item>
26
-        <el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
26
+        <el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
27 27
         <el-button @click="backIndex">返回</el-button>
28 28
       </el-form-item>
29 29
     </el-form>

+ 13
- 1
VUECODE/smart-property-manage/src/views/building/index.vue 파일 보기

@@ -286,7 +286,19 @@ export default {
286 286
         this.$message.error('请选择一行数据进行修改!')
287 287
         return
288 288
       }
289
-      this.$router.push({ name: 'building-edi', params: { id: ids[0], listQuery: this.listQuery }})
289
+      this.$store.dispatch('GetByIdBuildingId', ids[0]).then((res) => {
290
+        const resCode = res.code
291
+        if (resCode === '0') {
292
+          const resData = res.data
293
+          if (resData.verifyStatus === '1') {
294
+            this.$message.error('不能修改已认证的楼栋业主信息!')
295
+            return
296
+          }
297
+        }
298
+        this.$router.push({ name: 'building-edi', params: { id: ids[0], listQuery: this.listQuery }})
299
+      }).catch(() => {
300
+        console.log('error GetByIdBuildingId')
301
+      })
290 302
     },
291 303
     formatDate(val) {
292 304
       var value = new Date(val)

+ 4
- 1
VUECODE/smart-property-manage/src/views/owner/index.vue 파일 보기

@@ -31,7 +31,10 @@
31 31
       <el-table-column prop="ownerName" label="姓名" align="center"/>
32 32
       <el-table-column prop="ownerTel" label="手机号" align="center" />
33 33
       <el-table-column prop="gender" label="性别" align="center">
34
-        <template slot-scope="scope">{{ scope.row.gender =='1' ? '男':'女' }}</template>
34
+        <template slot-scope="scope">
35
+          <span v-if="scope.row.gender==1">{{ '男' }}</span>
36
+          <span v-if="scope.row.gender==2">{{ '女' }}</span>
37
+        </template>      
35 38
       </el-table-column>
36 39
       <el-table-column prop="idCard" label="身份证号" align="center" />
37 40
       <!-- <el-table-column prop="name" label="所在户" width="180" /> -->