dingxin 6 年之前
父節點
當前提交
5e8505f412
共有 15 個文件被更改,包括 139 次插入35 次删除
  1. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/CodeController.java
  2. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java
  3. 5
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java
  4. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java
  5. 30
    12
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  6. 63
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml
  7. 1
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/CodeController.java
  8. 1
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/UserMapper.java
  9. 3
    3
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java
  10. 2
    2
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpAnnouncementServiceImpl.java
  11. 1
    1
      CODE/smart-community/property-api/src/main/resources/mapper/UserMapper.xml
  12. 2
    2
      VUECODE/smart-property-manage/src/views/owner/index.vue
  13. 0
    2
      VUECODE/smart-property-manage/src/views/social/activity/add/index.vue
  14. 14
    7
      VUECODE/smart-property-manage/src/views/social/activity/info/index.vue
  15. 14
    1
      VUECODE/smart-property-manage/src/views/social/signUp/index.vue

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/CodeController.java 查看文件

@@ -43,7 +43,7 @@ public class CodeController {
43 43
 
44 44
         log.info("{} 手机号校验结果: {}",phone, AccountValidatorUtil.isPhone(phone));
45 45
         if (!AccountValidatorUtil.isPhone(phone)){
46
-            response.addError("请输入正的手机号!");
46
+            response.addError("请输入正的手机号!");
47 47
             return response;
48 48
         }
49 49
 

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java 查看文件

@@ -72,7 +72,7 @@ public class UserController extends BaseController {
72 72
         ResponseBean responseBean = new ResponseBean();
73 73
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
74 74
         Integer userId=userElement.getId();
75
-        ResponseBean response=iTaUserService.upDateloginName(userId,paramets);
75
+        ResponseBean response=iTaUserService.upDateloginName(userId,paramets,userElement.getCommunityId());
76 76
         return response;
77 77
     }
78 78
 

+ 5
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java 查看文件

@@ -25,4 +25,9 @@ public interface TpBuildingOwnerInfoMapper {
25 25
     @ResultMap("BaseResultMap")
26 26
     @Select("select * from tp_building_owner_info where community_id=#{communityId} and owner_tel=#{ownerTel}")
27 27
     List<TpBuildingOwnerInfo> getByCommunityIdAndOwnerTel(@Param("communityId") Integer communityId, @Param("ownerTel") String ownerTel);
28
+
29
+    TpBuildingOwnerInfo updatOwnerTel(Integer communityId,String OwnerTel);
30
+
31
+    //根据手机号查询当前信息
32
+    TpBuildingOwnerInfo selectOwnerTel(@Param("ownerTel")String ownerTel);
28 33
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java 查看文件

@@ -39,7 +39,7 @@ public interface ITaUserService {
39 39
      * @param id
40 40
      * @return
41 41
      */
42
-    ResponseBean upDateloginName(Integer id, String paramets);
42
+    ResponseBean upDateloginName(Integer id, String paramets,Integer communityId);
43 43
 
44 44
     /**
45 45
      * 获取房屋成员列表

+ 30
- 12
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java 查看文件

@@ -35,6 +35,8 @@ import java.time.format.DateTimeFormatter;
35 35
 import java.util.*;
36 36
 import java.util.logging.SimpleFormatter;
37 37
 
38
+import static com.community.commom.constant.Constant.OWNER;
39
+
38 40
 /**
39 41
  * 用户业务 实现
40 42
  * @author weiximei
@@ -73,7 +75,7 @@ public class TaUserServiceImpl implements ITaUserService {
73 75
         ResponseBean response = new ResponseBean();
74 76
         log.info("{} 手机号校验结果: {}",user.getLoginName(),AccountValidatorUtil.isPhone(user.getLoginName()));
75 77
         if (!AccountValidatorUtil.isPhone(user.getLoginName())){
76
-            response.addError("请输入正的手机号!");
78
+            response.addError("请输入正的手机号!");
77 79
             return response;
78 80
         }
79 81
         Map<String,Object> map = Maps.newHashMap();
@@ -112,7 +114,7 @@ public class TaUserServiceImpl implements ITaUserService {
112 114
         AppkeyCache.setCache(loginName,"null");
113 115
         log.info("{} 手机号校验结果: {}",loginName,AccountValidatorUtil.isPhone(loginName));
114 116
         if (!AccountValidatorUtil.isPhone(loginName)){
115
-            response.addError("请输入正的手机号!");
117
+            response.addError("请输入正的手机号!");
116 118
             return response;
117 119
         }
118 120
         if (StringUtils.isBlank(communityId)) {
@@ -239,7 +241,7 @@ public class TaUserServiceImpl implements ITaUserService {
239 241
 
240 242
     @Transactional(rollbackFor = Exception.class)
241 243
     @Override
242
-    public ResponseBean upDateloginName(Integer id, String paramets) {
244
+    public ResponseBean upDateloginName(Integer id, String paramets,Integer communityId) {
243 245
         ResponseBean response = new ResponseBean();
244 246
 
245 247
         JSONObject jsonObject = JSONObject.parseObject(paramets);
@@ -288,11 +290,11 @@ public class TaUserServiceImpl implements ITaUserService {
288 290
             response.addError("验证码错误!");
289 291
             return response;
290 292
         }
291
-
292
-
293 293
             TaUser taUser=new TaUser();
294 294
             taUser.setLoginName(phone);
295 295
             taUser.setId(userId);
296
+            taUser.setUpdateDate(new Date());
297
+            taUser.setUpdateUser(id);
296 298
             taUserMapper.updateLongName(taUser);
297 299
             response.addSuccess("修改成功");
298 300
             AppkeyCache.setCache(user.getLoginName(),"null");
@@ -303,10 +305,10 @@ public class TaUserServiceImpl implements ITaUserService {
303 305
              */
304 306
 
305 307
             // 修改楼栋信息资料库的手机号
306
-            Map<String, Object> map = Maps.newHashMap();
307
-            map.put("communityId", user.getCommunityId());
308
-            map.put("userId", userId);
309
-            TaSysUserRole taSysUserRole = taSysUserRoleMapper.selectByCommunityIdAndUserId(map);
308
+            Map<String, Object> roleMap = Maps.newHashMap();
309
+            roleMap.put("communityId", user.getCommunityId());
310
+            roleMap.put("userId", userId);
311
+            TaSysUserRole taSysUserRole = taSysUserRoleMapper.selectByCommunityIdAndUserId(roleMap);
310 312
             // 1 业主 2 租客 3 家属
311 313
             // 只允许业主修改
312 314
             if (taSysUserRole.getRoleId().intValue() == 1) {
@@ -350,10 +352,26 @@ public class TaUserServiceImpl implements ITaUserService {
350 352
         ResponseBean response = new ResponseBean();
351 353
 
352 354
         TaUser taUser = taUserMapper.selectByPrimaryKey(user.getId());
355
+        HashMap map= new HashMap<>();
356
+                map.put("communityId",taUser.getCommunityId());
357
+                map.put("userId",taUser.getId());
358
+        TaSysUserRole TaSysUserRole= taSysUserRoleMapper.selectByCommunityIdAndUserId(map);
353 359
         BeanTools.copyProperties(user, taUser);
354
-
355
-        int result = taUserMapper.updateByPrimaryKeySelective(taUser);
356
-
360
+            int result = taUserMapper.updateByPrimaryKeySelective(taUser);
361
+            int VerifyStatus= Integer.parseInt(taUser.getVerifyStatus());
362
+            int Role= TaSysUserRole.getRoleId();
363
+            if (1==VerifyStatus &&1==Role) {
364
+                //根据手机号查当前信息
365
+            TpBuildingOwnerInfo tpBuildingOwnerInfoId=tpBuildingOwnerInfoMapper.selectOwnerTel(taUser.getLoginName());          //
366
+            TpBuildingOwnerInfo TpBuildingOwnerInfo = new TpBuildingOwnerInfo();
367
+            TpBuildingOwnerInfo.setOwnerName(user.getUserName());
368
+            TpBuildingOwnerInfo.setGender(user.getGender());
369
+            TpBuildingOwnerInfo.setOwnerTel(user.getLoginName());
370
+            TpBuildingOwnerInfo.setUpdateDate(new Date());
371
+            TpBuildingOwnerInfo.setUpdateUser(taUser.getId());
372
+            TpBuildingOwnerInfo.setId(tpBuildingOwnerInfoId.getId());
373
+            tpBuildingOwnerInfoMapper.updateByPrimaryKeySelective(TpBuildingOwnerInfo);
374
+        }
357 375
         if (result > 0){
358 376
             response.addSuccess("修改成功!");
359 377
         }else {

+ 63
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml 查看文件

@@ -231,4 +231,67 @@
231 231
       update_date = #{updateDate,jdbcType=TIMESTAMP}
232 232
     where id = #{id,jdbcType=INTEGER}
233 233
   </update>
234
+  <update id="updatOwnerTel" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
235
+    update tp_building_owner_info
236
+    <set >
237
+      <if test="communityId != null" >
238
+        community_id = #{communityId,jdbcType=INTEGER},
239
+      </if>
240
+      <if test="idCard != null" >
241
+        id_card = #{idCard,jdbcType=VARCHAR},
242
+      </if>
243
+      <if test="phase != null">
244
+        phase = #{phase,jdbcType=VARCHAR},
245
+      </if>
246
+      <if test="building != null" >
247
+        building = #{building,jdbcType=VARCHAR},
248
+      </if>
249
+      <if test="unit != null" >
250
+        unit = #{unit,jdbcType=VARCHAR},
251
+      </if>
252
+      <if test="level != null" >
253
+        level = #{level,jdbcType=VARCHAR},
254
+      </if>
255
+      <if test="roomNo != null" >
256
+        room_no = #{roomNo,jdbcType=VARCHAR},
257
+      </if>
258
+      <if test="ownerName != null" >
259
+        owner_name = #{ownerName,jdbcType=VARCHAR},
260
+      </if>
261
+      <if test="ownerTel != null" >
262
+        owner_tel = #{ownerTel,jdbcType=VARCHAR},
263
+      </if>
264
+      <if test="gender != null" >
265
+        gender = #{gender,jdbcType=CHAR},
266
+      </if>
267
+      <if test="pairStatus != null" >
268
+        pair_status = #{pairStatus,jdbcType=CHAR},
269
+      </if>
270
+      <if test="verifyStatus != null" >
271
+        verify_status = #{verifyStatus,jdbcType=CHAR},
272
+      </if>
273
+      <if test="createUser != null" >
274
+        create_user = #{createUser,jdbcType=INTEGER},
275
+      </if>
276
+      <if test="createDate != null" >
277
+        create_date = #{createDate,jdbcType=TIMESTAMP},
278
+      </if>
279
+      <if test="updateUser != null" >
280
+        update_user = #{updateUser,jdbcType=INTEGER},
281
+      </if>
282
+      <if test="updateDate != null" >
283
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
284
+      </if>
285
+    </set>
286
+    where community_id = #{communityId,jdbcType=INTEGER} and wnerTel =  owner_tel = #{ownerTel,jdbcType=VARCHAR}
287
+  </update>
288
+
289
+  <select id="selectOwnerTel" resultType="com.community.huiju.model.TpBuildingOwnerInfo" parameterType="string">
290
+    select
291
+    id
292
+    from
293
+    tp_building_owner_info
294
+    where  owner_tel = #{ownerTel,jdbcType=VARCHAR}
295
+  </select>
296
+
234 297
 </mapper>

+ 1
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/CodeController.java 查看文件

@@ -41,7 +41,7 @@ public class CodeController {
41 41
 
42 42
         log.info("{} 手机号校验结果: {}",phone, AccountValidatorUtil.isPhone(phone));
43 43
         if (!AccountValidatorUtil.isPhone(phone)){
44
-            response.addError("请输入正的手机号!");
44
+            response.addError("请输入正的手机号!");
45 45
             return response;
46 46
         }
47 47
 

+ 1
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/UserMapper.java 查看文件

@@ -16,6 +16,6 @@ import org.apache.ibatis.annotations.Param;
16 16
  */
17 17
 @Mapper
18 18
 public interface UserMapper extends BaseMapper<User> {
19
-    String selectByIdCreateUserName(@Param("id") Integer id);
19
+    String selectByIdUserName(@Param("id") Integer id);
20 20
 
21 21
 }

+ 3
- 3
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java 查看文件

@@ -140,7 +140,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
140 140
 
141 141
         TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(parameter, TpBuildingOwnerInfo.class);
142 142
         if (!AccountValidatorUtil.isPhone(tpBuildingOwnerInfo.getOwnerTel())){
143
-            responseBean.addError("请输入正的手机号!");
143
+            responseBean.addError("请输入正的手机号!");
144 144
             return responseBean;
145 145
         }
146 146
 
@@ -254,7 +254,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
254 254
         // 物业端的用户,也就是正在操作的物业人员
255 255
         User user = userMapper.selectById(userElement.getId());
256 256
         if (!AccountValidatorUtil.isPhone(tpBuildingOwnerInfo.getOwnerTel())){
257
-            responseBean.addError("请输入正的手机号!");
257
+            responseBean.addError("请输入正的手机号!");
258 258
             return responseBean;
259 259
         }
260 260
 
@@ -270,7 +270,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
270 270
         // 校验楼栋信息表
271 271
         selectBuild = getBuildingInfo(tpBuildingOwnerInfo, userElement.getCommunityId());
272 272
         if (null != selectBuild) {
273
-            responseBean.addError("该楼层的户号,已存在!");
273
+            responseBean.addError("该楼层的户号已存在!");
274 274
             return responseBean;
275 275
         }
276 276
 

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpAnnouncementServiceImpl.java 查看文件

@@ -74,9 +74,9 @@ private  TpAnnouncementMapper tpAnnouncementMapper;
74 74
             AnnouncementTable announcementTable = new AnnouncementTable();
75 75
             BeanUtils.copyProperties(e, announcementTable);
76 76
             //创建人
77
-            String createUserName = userMapper.selectByIdCreateUserName(e.getUpdateUser());
77
+            String createUserName = userMapper.selectByIdUserName(e.getUpdateUser());
78 78
             //修改人
79
-            String updateDateName = userMapper.selectByIdCreateUserName(e.getCreateUser());
79
+            String updateDateName = userMapper.selectByIdUserName(e.getCreateUser());
80 80
             announcementTable.setCreateUserName(createUserName);
81 81
             announcementTable.setUpdateDateName(updateDateName);
82 82
             return announcementTable;

+ 1
- 1
CODE/smart-community/property-api/src/main/resources/mapper/UserMapper.xml 查看文件

@@ -1,7 +1,7 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.community.huiju.dao.UserMapper">
4
-    <select id="selectByIdCreateUserName" parameterType="int" resultType="string">
4
+    <select id="selectByIdUserName" parameterType="int" resultType="string">
5 5
         SELECT
6 6
          user_name
7 7
         FROM

+ 2
- 2
VUECODE/smart-property-manage/src/views/owner/index.vue 查看文件

@@ -34,14 +34,14 @@
34 34
         <template slot-scope="scope">
35 35
           <span v-if="scope.row.gender==1">{{ '男' }}</span>
36 36
           <span v-if="scope.row.gender==2">{{ '女' }}</span>
37
-        </template>      
37
+        </template>
38 38
       </el-table-column>
39 39
       <el-table-column prop="idCard" label="身份证号" align="center" />
40 40
       <!-- <el-table-column prop="name" label="所在户" width="180" /> -->
41 41
       <el-table-column label="所在户" align="center">
42 42
         <template slot-scope="scope">
43 43
           <span v-if="scope.row.building!==null&&scope.row.unit!==null&&scope.row.level!==null&&scope.row.roomNo!==null&&scope.row.phase!==null">
44
-          {{ scope.row.building + scope.row.unit + scope.row.level + scope.row.roomNo+scope.row.phase }}
44
+          {{ scope.row.phase+scope.row.building + scope.row.unit + scope.row.level + scope.row.roomNo }}
45 45
           </span>
46 46
           </template>
47 47
       </el-table-column>

+ 0
- 2
VUECODE/smart-property-manage/src/views/social/activity/add/index.vue 查看文件

@@ -113,10 +113,8 @@ export default {
113 113
       })
114 114
     },
115 115
     resetForm(formName) {
116
-      console.log("2")
117 116
       // this.$refs[formName].resetFields()
118 117
       this.$refs[formName].validate((valid) => {
119
-        console.log("1")
120 118
         if (valid) {
121 119
           this.addActivity(2)
122 120
         } else {

+ 14
- 7
VUECODE/smart-property-manage/src/views/social/activity/info/index.vue 查看文件

@@ -12,7 +12,7 @@
12 12
       <div class="text-progress">
13 13
         <span class="people-number">已报名人数 {{ ruleForm.signUpCount }}</span>
14 14
         <div class="outer-layer"/>
15
-        <div class="inner-layer"/>
15
+        <div ref="innerDiv" :style="{ backgroundColor: 'aquamarine', height: '6px', width: innerW + 'px', position: 'relative', marginTop: '-4px' }"/> <!-- class="inner-layer" -->
16 16
       </div>
17 17
       <div class="circular"/>
18 18
       <div class="people-limit">限制{{ ruleForm.signUpMax }}人</div>
@@ -26,6 +26,7 @@
26 26
 </template>
27 27
 
28 28
 <script>
29
+
29 30
 export default {
30 31
   name: 'Index',
31 32
   data() {
@@ -42,7 +43,8 @@ export default {
42 43
         registrationEndTime: '', // 报名活动结束时间
43 44
         sort: 1, // 权重
44 45
         status: '' // 状态 0 是已作废 1 是已发布   2 是草稿 3 是已修改
45
-      }
46
+      },
47
+      innerW: 0 // 进度条
46 48
     }
47 49
   },
48 50
   mounted() {
@@ -54,6 +56,12 @@ export default {
54 56
         const resData = res.data
55 57
         this.ruleForm = resData.info
56 58
         this.ruleForm.contentImg = resData.contentImg
59
+        if (this.ruleForm.signUpMax !== 0) {
60
+          const tempNum = 450 / this.ruleForm.signUpMax
61
+          this.innerW = this.ruleForm.signUpCount * tempNum
62
+          console.log(this.$refs.innerDiv.style.width)
63
+          console.log(this.innerW)
64
+        }
57 65
       })
58 66
     },
59 67
     formatDate(val) {
@@ -115,13 +123,12 @@ export default {
115 123
   background-color: gainsboro;
116 124
   height: 3px;
117 125
   width: 450px;
118
-  margin-top: -10px;
119 126
   position: relative;
120 127
 }
121 128
 .inner-layer {
122 129
   background-color: aquamarine;
123 130
   height: 6px;
124
-  width: 100px;
131
+  width: 20px;
125 132
   position: relative;
126 133
   margin-top: -4px;
127 134
 }
@@ -133,16 +140,16 @@ export default {
133 140
   height: 20px;
134 141
   position: relative;
135 142
   margin-left: 452px;
136
-  margin-top: 11px;
143
+  margin-top: 21px;
137 144
   float: left;
138 145
 }
139 146
 .people-limit {
140
-  margin-top: 13px;
147
+  margin-top: 23px;
141 148
 }
142 149
 .bom-button{
143 150
   display: flex;
144 151
   justify-content: center;
145
-  margin-top: 20px;
152
+  margin-top: 30px;
146 153
   margin-bottom: 100px;
147 154
 }
148 155
 </style>

+ 14
- 1
VUECODE/smart-property-manage/src/views/social/signUp/index.vue 查看文件

@@ -57,7 +57,14 @@
57 57
         prop="remark"
58 58
         label="报名备注"
59 59
         align="center">
60
-        <template slot-scope="scope"><el-input :value="scope.row.remark" readonly @click="showDialog(scope.row.remark)" /></template>
60
+        <template slot-scope="scope">
61
+          <el-popover trigger="hover" placement="top">
62
+            <p>{{ scope.row.remark }}</p>
63
+            <div slot="reference" class="text-remark">
64
+              {{ scope.row.remark }}
65
+            </div>
66
+          </el-popover>
67
+        </template>
61 68
       </el-table-column>
62 69
       <el-table-column
63 70
         prop="phone"
@@ -244,4 +251,10 @@ export default {
244 251
   display: flex;
245 252
   justify-content: flex-end;
246 253
 }
254
+.text-remark{
255
+  text-overflow: ellipsis;
256
+  overflow: hidden;
257
+  white-space: nowrap !important;
258
+  outline: 0 !important
259
+}
247 260
 </style>