weiximei 6 years ago
parent
commit
c76b5057c9

+ 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>();

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

294
             response.addError("号码已占用");
294
             response.addError("号码已占用");
295
             return response;
295
             return response;
296
         }
296
         }
297
-        String data=HKOpenApi.HKpersonPhone(user.getHkUserId(),user.getId(),user.getUserName(),phone);
298
-       try {
299
-             if (null == data) {
300
-            throw new RuntimeException("海康人脸推送失敗!");
301
-        }
302
-       }catch (Exception e){
303
-           e.printStackTrace();
304
-           log.error("海康修改电话失敗! {}",e);
305
-           throw new RuntimeException("海康修改电话失敗!");
306
-       }
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;
303
+        }
307
         if(null!=codes && codes.equals(code)){;
304
         if(null!=codes && codes.equals(code)){;
308
             TaUser taUser=new TaUser();
305
             TaUser taUser=new TaUser();
309
             taUser.setLoginName(phone);
306
             taUser.setLoginName(phone);

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

188
 
188
 
189
   <select id="selectByTel" resultMap="BaseResultMap">
189
   <select id="selectByTel" resultMap="BaseResultMap">
190
       select <include refid="Base_Column_List" /> from tp_user
190
       select <include refid="Base_Column_List" /> from tp_user
191
-      where community_id = #{id,jdbcType=INTEGER}
192
-      and login_name = #{loginName,jdbcType=VARCHAR}
191
+      where login_name = #{loginName,jdbcType=VARCHAR}
193
       and status = 1
192
       and status = 1
194
   </select>
193
   </select>
195
 
194
 
203
         login_name = #{loginName,jdbcType=VARCHAR},
202
         login_name = #{loginName,jdbcType=VARCHAR},
204
       </if>
203
       </if>
205
     </set>
204
     </set>
206
-    where community_id = #{id,jdbcType=INTEGER}
207
-    and login_name = #{oldTel,jdbcType=VARCHAR}
205
+    where login_name = #{oldTel,jdbcType=VARCHAR}
208
     and status = 1
206
     and status = 1
209
   </update>
207
   </update>
210
 
208
 

+ 4
- 4
VUECODE/smart-operate-manage/src/views/community/communityTable.vue View File

451
         if (valid) {
451
         if (valid) {
452
           this.CreateCommunity(this.detail).then(res => {
452
           this.CreateCommunity(this.detail).then(res => {
453
             this.dialogFormVisible = false;
453
             this.dialogFormVisible = false;
454
-            if (res.code === 0) {
454
+            if (res.code === '0') {
455
               this.$message({
455
               this.$message({
456
                 message: "创建成功",
456
                 message: "创建成功",
457
                 type: "success"
457
                 type: "success"
458
               });
458
               });
459
               this.getList();
459
               this.getList();
460
-            } else if (res.code === 0) {
460
+            } else if (res.code === '1') {
461
               this.$message({
461
               this.$message({
462
                 message: res.message,
462
                 message: res.message,
463
                 type: "warning"
463
                 type: "warning"
499
         if (valid) {
499
         if (valid) {
500
           this.UpdateCommunity(this.detail).then(res => {
500
           this.UpdateCommunity(this.detail).then(res => {
501
             this.dialogFormVisible = false;
501
             this.dialogFormVisible = false;
502
-            if (res.code === 0) {
502
+            if (res.code === '0') {
503
               this.$message({
503
               this.$message({
504
                 message: "更新成功",
504
                 message: "更新成功",
505
                 type: "success"
505
                 type: "success"
506
               });
506
               });
507
               this.getList();
507
               this.getList();
508
-            } else if (res.code === 0) {
508
+            } else if (res.code === '1') {
509
               this.$message.error(res.message);
509
               this.$message.error(res.message);
510
             }
510
             }
511
           });
511
           });

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

12
       </el-form-item>
12
       </el-form-item>
13
     </el-form>
13
     </el-form>
14
     <el-table ref="multipleTable" :data="list" border tooltip-effect="dark" style="width: 100%; margin-top: 20px;">
14
     <el-table ref="multipleTable" :data="list" border tooltip-effect="dark" style="width: 100%; margin-top: 20px;">
15
-      <el-table-column label="栋">
15
+      <el-table-column label="栋" align="center">
16
         <template slot-scope="scope">{{ scope.row.building }}</template>
16
         <template slot-scope="scope">{{ scope.row.building }}</template>
17
       </el-table-column>
17
       </el-table-column>
18
-      <el-table-column label="单元">
18
+      <el-table-column label="单元" align="center">
19
         <template slot-scope="scope">{{ scope.row.unit }}</template>
19
         <template slot-scope="scope">{{ scope.row.unit }}</template>
20
       </el-table-column>
20
       </el-table-column>
21
-      <el-table-column label="楼层">
21
+      <el-table-column label="楼层" align="center">
22
         <template slot-scope="scope">{{ scope.row.level }}</template>
22
         <template slot-scope="scope">{{ scope.row.level }}</template>
23
       </el-table-column>
23
       </el-table-column>
24
-      <el-table-column label="户号">
24
+      <el-table-column label="户号" align="center">
25
         <template slot-scope="scope">{{ scope.row.roomNo }}</template>
25
         <template slot-scope="scope">{{ scope.row.roomNo }}</template>
26
       </el-table-column>
26
       </el-table-column>
27
-      <el-table-column label="业主姓名">
27
+      <el-table-column label="业主姓名" align="center">
28
         <template slot-scope="scope">{{ scope.row.ownerName }}</template>
28
         <template slot-scope="scope">{{ scope.row.ownerName }}</template>
29
       </el-table-column>
29
       </el-table-column>
30
-      <el-table-column label="手机号码">
30
+      <el-table-column label="手机号码" align="center">
31
         <template slot-scope="scope">{{ scope.row.ownerTel }}</template>
31
         <template slot-scope="scope">{{ scope.row.ownerTel }}</template>
32
       </el-table-column>
32
       </el-table-column>
33
     </el-table>
33
     </el-table>