Browse Source

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

傅行帆 6 years ago
parent
commit
74bc550e3e

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/common/hk/HKOpenApi.java View File

642
      * @param phoneNo 电话
642
      * @param phoneNo 电话
643
      * @return
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
         String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_UPDATE_USER;
647
         String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_UPDATE_USER;
648
         Map<String, Object> map = new HashMap<String, Object>();
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 View File

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

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

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

5
 import com.community.commom.constant.Constant;
5
 import com.community.commom.constant.Constant;
6
 import com.community.commom.mode.ResponseBean;
6
 import com.community.commom.mode.ResponseBean;
7
 import com.community.commom.utils.AccountValidatorUtil;
7
 import com.community.commom.utils.AccountValidatorUtil;
8
+import com.community.commom.utils.BeanTools;
8
 import com.community.commom.utils.MD5Utils;
9
 import com.community.commom.utils.MD5Utils;
9
 import com.community.commom.uuid.IdGen;
10
 import com.community.commom.uuid.IdGen;
10
 import com.community.huiju.common.code.cache.AppkeyCache;
11
 import com.community.huiju.common.code.cache.AppkeyCache;
216
             TpBuildingOwnerInfo buildingOwnerInfo = buildingOwnerInfoList.get(0);
217
             TpBuildingOwnerInfo buildingOwnerInfo = buildingOwnerInfoList.get(0);
217
             user.setBuildingOwnerInfoId(buildingOwnerInfo.getId());
218
             user.setBuildingOwnerInfoId(buildingOwnerInfo.getId());
218
             user.setVerifyStatus("1");
219
             user.setVerifyStatus("1");
220
+            user.setUserName(buildingOwnerInfo.getOwnerName());
219
             // 标记位1, 业主身份
221
             // 标记位1, 业主身份
220
             roleType = 1;
222
             roleType = 1;
221
 
223
 
292
             response.addError("号码已占用");
294
             response.addError("号码已占用");
293
             return response;
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
         if(null!=codes && codes.equals(code)){;
304
         if(null!=codes && codes.equals(code)){;
306
             TaUser taUser=new TaUser();
305
             TaUser taUser=new TaUser();
307
             taUser.setLoginName(phone);
306
             taUser.setLoginName(phone);
367
         ResponseBean response = new ResponseBean();
366
         ResponseBean response = new ResponseBean();
368
 
367
 
369
         TaUser taUser = taUserMapper.selectByPrimaryKey(user.getId());
368
         TaUser taUser = taUserMapper.selectByPrimaryKey(user.getId());
370
-        BeanUtils.copyProperties(user,taUser);
369
+        BeanTools.copyProperties(user, taUser);
371
 
370
 
372
         int result = taUserMapper.updateByPrimaryKeySelective(taUser);
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 View File

134
     public ResponseBean update(String parameter, UserElement userElement) {
134
     public ResponseBean update(String parameter, UserElement userElement) {
135
         ResponseBean responseBean = new ResponseBean();
135
         ResponseBean responseBean = new ResponseBean();
136
 
136
 
137
+
137
         TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(parameter, TpBuildingOwnerInfo.class);
138
         TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(parameter, TpBuildingOwnerInfo.class);
138
         if (!AccountValidatorUtil.isPhone(tpBuildingOwnerInfo.getOwnerTel())){
139
         if (!AccountValidatorUtil.isPhone(tpBuildingOwnerInfo.getOwnerTel())){
139
             responseBean.addError("请输入正取的手机号!");
140
             responseBean.addError("请输入正取的手机号!");
140
             return responseBean;
141
             return responseBean;
141
         }
142
         }
142
 
143
 
143
-
144
         TpBuildingOwnerInfo oldTpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectById(tpBuildingOwnerInfo.getId());
144
         TpBuildingOwnerInfo oldTpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectById(tpBuildingOwnerInfo.getId());
145
         if (null == oldTpBuildingOwnerInfo) {
145
         if (null == oldTpBuildingOwnerInfo) {
146
             throw new WisdomException("%s 数据不存在!", tpBuildingOwnerInfo.getId());
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
         // 物业端用户小区Id不使用! 小区 Id 获取请使用 userElement
154
         // 物业端用户小区Id不使用! 小区 Id 获取请使用 userElement
290
         if (null != appOwnerUser) {
294
         if (null != appOwnerUser) {
291
             // 更新 APP 端用户认证的状态
295
             // 更新 APP 端用户认证的状态
292
             appOwnerUser.setBuildingOwnerInfoId(tpBuildingOwnerInfo.getId());
296
             appOwnerUser.setBuildingOwnerInfoId(tpBuildingOwnerInfo.getId());
297
+            appOwnerUser.setUserName(tpBuildingOwnerInfo.getOwnerName());
298
+
293
             // 认证状态  0 是未认证    1是认证通过   2是已作废
299
             // 认证状态  0 是未认证    1是认证通过   2是已作废
294
             // 标记位已认证
300
             // 标记位已认证
295
             appOwnerUser.setVerifyStatus("1");
301
             appOwnerUser.setVerifyStatus("1");

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

23
         <el-input v-model="ruleForm.ownerTel" :disabled="isOwnerTel"/>
23
         <el-input v-model="ruleForm.ownerTel" :disabled="isOwnerTel"/>
24
       </el-form-item>
24
       </el-form-item>
25
       <el-form-item>
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
         <el-button @click="backIndex">返回</el-button>
27
         <el-button @click="backIndex">返回</el-button>
28
       </el-form-item>
28
       </el-form-item>
29
     </el-form>
29
     </el-form>

+ 13
- 1
VUECODE/smart-property-manage/src/views/building/index.vue View File

286
         this.$message.error('请选择一行数据进行修改!')
286
         this.$message.error('请选择一行数据进行修改!')
287
         return
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
     formatDate(val) {
303
     formatDate(val) {
292
       var value = new Date(val)
304
       var value = new Date(val)

+ 4
- 1
VUECODE/smart-property-manage/src/views/owner/index.vue View File

31
       <el-table-column prop="ownerName" label="姓名" align="center"/>
31
       <el-table-column prop="ownerName" label="姓名" align="center"/>
32
       <el-table-column prop="ownerTel" label="手机号" align="center" />
32
       <el-table-column prop="ownerTel" label="手机号" align="center" />
33
       <el-table-column prop="gender" label="性别" align="center">
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
       </el-table-column>
38
       </el-table-column>
36
       <el-table-column prop="idCard" label="身份证号" align="center" />
39
       <el-table-column prop="idCard" label="身份证号" align="center" />
37
       <!-- <el-table-column prop="name" label="所在户" width="180" /> -->
40
       <!-- <el-table-column prop="name" label="所在户" width="180" /> -->