dingxin 6 vuotta sitten
vanhempi
commit
63b94b338c
34 muutettua tiedostoa jossa 2290 lisäystä ja 1290 poistoa
  1. 11
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java
  2. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  3. 14
    3
      CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml
  4. 14
    28
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/CommunityServiceImpl.java
  5. 1
    0
      CODE/smart-community/operate-api/src/main/resources/mapper/TpUserMapper.xml
  6. 19
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/ActivityController.java
  7. 4
    4
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/ToCommunitiesMapper.java
  8. 27
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpActivitySignUpMapper.java
  9. 55
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpActivitySignUp.java
  10. 24
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpActivitySignUpService.java
  11. 14
    5
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java
  12. 3
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivityServiceImpl.java
  13. 102
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivitySignUpServiceImpl.java
  14. 4
    22
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/UserServiceImpl.java
  15. 21
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/vo/ActivitySignUpVO.java
  16. 5
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpActivitySignUpMapper.xml
  17. 19
    0
      CODE/smart-community/zuul/pom.xml
  18. 30
    0
      CODE/smart-community/zuul/src/main/assembly/assembly.xml
  19. 86
    0
      CODE/smart-community/zuul/src/main/assembly/bin/start.sh
  20. 14
    2
      VUECODE/smart-property-manage/src/api/activity.js
  21. 4
    0
      VUECODE/smart-property-manage/src/api/buildingOwnerInfo.js
  22. 7
    0
      VUECODE/smart-property-manage/src/router/index.js
  23. 10
    1
      VUECODE/smart-property-manage/src/store/modules/activity.js
  24. 7
    0
      VUECODE/smart-property-manage/src/views/building/add/index.vue
  25. 1
    1
      VUECODE/smart-property-manage/src/views/building/batch/batchImport.vue
  26. 5
    0
      VUECODE/smart-property-manage/src/views/building/edi/index.vue
  27. 44
    10
      VUECODE/smart-property-manage/src/views/building/index.vue
  28. 1
    0
      VUECODE/smart-property-manage/src/views/social/activity/add/index.vue
  29. 1
    0
      VUECODE/smart-property-manage/src/views/social/activity/edi/index.vue
  30. 29
    2
      VUECODE/smart-property-manage/src/views/social/activity/index.vue
  31. 60
    9
      VUECODE/smart-property-manage/src/views/social/activity/info/index.vue
  32. 195
    0
      VUECODE/smart-property-manage/src/views/social/signUp/index.vue
  33. 729
    601
      文档/MYSQL/smartCommunity.pdb
  34. 729
    601
      文档/MYSQL/smartCommunity.pdm

+ 11
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java Näytä tiedosto

@@ -9,6 +9,9 @@ public class TpBuildingOwnerInfo {
9 9
 
10 10
     private String idCard;
11 11
 
12
+    // 期
13
+    private String phase;
14
+
12 15
     private String building;
13 16
 
14 17
     private String unit;
@@ -59,6 +62,14 @@ public class TpBuildingOwnerInfo {
59 62
         this.idCard = idCard == null ? null : idCard.trim();
60 63
     }
61 64
 
65
+    public String getPhase() {
66
+        return phase;
67
+    }
68
+
69
+    public void setPhase(String phase) {
70
+        this.phase = phase;
71
+    }
72
+
62 73
     public String getBuilding() {
63 74
         return building;
64 75
     }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Näytä tiedosto

@@ -847,7 +847,7 @@ public class TaUserServiceImpl implements ITaUserService {
847 847
         TaUserVO userVO = new TaUserVO();
848 848
         BeanUtils.copyProperties(user,userVO);
849 849
         userVO.setAddressProvince(province.getProvince()+""+city.getCity()+""+district.getDistrict());
850
-        userVO.setAddressBuilding(tpBuildingOwnerInfo.getBuilding()
850
+        userVO.setAddressBuilding(tpBuildingOwnerInfo.getPhase() + tpBuildingOwnerInfo.getBuilding()
851 851
                 +tpBuildingOwnerInfo.getUnit()
852 852
                 +tpBuildingOwnerInfo.getLevel()
853 853
                 +tpBuildingOwnerInfo.getRoomNo());

+ 14
- 3
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml Näytä tiedosto

@@ -5,6 +5,7 @@
5 5
     <id column="id" property="id" jdbcType="INTEGER" />
6 6
     <result column="community_id" property="communityId" jdbcType="INTEGER" />
7 7
     <result column="id_card" property="idCard" jdbcType="VARCHAR" />
8
+    <result column="phase" property="phase" jdbcType="VARCHAR" />
8 9
     <result column="building" property="building" jdbcType="VARCHAR" />
9 10
     <result column="unit" property="unit" jdbcType="VARCHAR" />
10 11
     <result column="level" property="level" jdbcType="VARCHAR" />
@@ -20,7 +21,7 @@
20 21
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
21 22
   </resultMap>
22 23
   <sql id="Base_Column_List" >
23
-    id, community_id, id_card, building, unit, level, room_no, owner_name, owner_tel, 
24
+    id, community_id, id_card, phase, building, unit, level, room_no, owner_name, owner_tel,
24 25
     gender, pair_status, verify_status, create_user, create_date, update_user, update_date
25 26
   </sql>
26 27
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -34,14 +35,14 @@
34 35
     where id = #{id,jdbcType=INTEGER}
35 36
   </delete>
36 37
   <insert id="insert" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
37
-    insert into tp_building_owner_info (id, community_id, id_card, 
38
+    insert into tp_building_owner_info (id, community_id, id_card, phase,
38 39
       building, unit, level, 
39 40
       room_no, owner_name, owner_tel, 
40 41
       gender, pair_status, verify_status, 
41 42
       create_user, create_date, update_user, 
42 43
       update_date)
43 44
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{idCard,jdbcType=VARCHAR}, 
44
-      #{building,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, 
45
+      #{phase,jdbcType=VARCHAR}, #{building,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR},
45 46
       #{roomNo,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR}, #{ownerTel,jdbcType=VARCHAR}, 
46 47
       #{gender,jdbcType=CHAR}, #{pairStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, 
47 48
       #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, 
@@ -59,6 +60,9 @@
59 60
       <if test="idCard != null" >
60 61
         id_card,
61 62
       </if>
63
+      <if test="phase != null">
64
+        phase,
65
+      </if>
62 66
       <if test="building != null" >
63 67
         building,
64 68
       </if>
@@ -109,6 +113,9 @@
109 113
       <if test="idCard != null" >
110 114
         #{idCard,jdbcType=VARCHAR},
111 115
       </if>
116
+      <if test="phase != null">
117
+        #{phase,jdbcType=VARCHAR},
118
+      </if>
112 119
       <if test="building != null" >
113 120
         #{building,jdbcType=VARCHAR},
114 121
       </if>
@@ -159,6 +166,9 @@
159 166
       <if test="idCard != null" >
160 167
         id_card = #{idCard,jdbcType=VARCHAR},
161 168
       </if>
169
+      <if test="phase != null">
170
+        phase = #{phase,jdbcType=VARCHAR},
171
+      </if>
162 172
       <if test="building != null" >
163 173
         building = #{building,jdbcType=VARCHAR},
164 174
       </if>
@@ -205,6 +215,7 @@
205 215
     update tp_building_owner_info
206 216
     set community_id = #{communityId,jdbcType=INTEGER},
207 217
       id_card = #{idCard,jdbcType=VARCHAR},
218
+      phase = #{phase,jdbcType=VARCHAR},
208 219
       building = #{building,jdbcType=VARCHAR},
209 220
       unit = #{unit,jdbcType=VARCHAR},
210 221
       level = #{level,jdbcType=VARCHAR},

+ 14
- 28
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/CommunityServiceImpl.java Näytä tiedosto

@@ -62,29 +62,19 @@ public class CommunityServiceImpl implements CommunityServiceI {
62 62
 		if (size < 1){
63 63
 			return 0;
64 64
 		}
65
-		//查询这个用户是否包含多个小区
66
-		TpUser tpUserAlread = tpUserMapper.selectByLoginName(toCommunities.getLoginName());
67
-		if (null == tpUserAlread){
68
-			//构建用户信息
69
-			TpUser tpUser = new TpUser();
70
-			tpUser.setUserName(toCommunities.getUserName());
71
-			tpUser.setLoginName(toCommunities.getLoginName());
72
-			tpUser.setCreateDate(new Date());
73
-			tpUser.setCreateUser(1);
74
-			tpUser.setStatus(Constant.EFFECTIVE);
75
-			//插入用户信息
76
-			tpUserMapper.insertSelective(tpUser);
77
-			//维护此用户的角色
78
-			addUserAndRole(tpUser.getId(), 1);
79
-			//维护住户端用户与社区关系表
80
-			addUserAndCommunity(tpUser.getId(), toCommunities.getId());
81
-		}else {
82
-			//维护此用户的角色
83
-			addUserAndRole(tpUserAlread.getId(), 1);
84
-			//维护住户端用户与社区关系表
85
-			addUserAndCommunity(tpUserAlread.getId(), toCommunities.getId());
86
-		}
87
-		
65
+	 
66
+		//构建用户信息
67
+		TpUser tpUser = new TpUser();
68
+		tpUser.setUserName(toCommunities.getUserName());
69
+		tpUser.setLoginName(toCommunities.getLoginName());
70
+		tpUser.setCreateDate(new Date());
71
+		tpUser.setCreateUser(1);
72
+		tpUser.setCommunityId(toCommunities.getId());
73
+		tpUser.setStatus(Constant.EFFECTIVE);
74
+		//插入用户信息
75
+		tpUserMapper.insertSelective(tpUser);
76
+		//维护此用户的角色
77
+		addUserAndRole(tpUser.getId(), 1);
88 78
 		return size;
89 79
 	}
90 80
 
@@ -135,11 +125,7 @@ public class CommunityServiceImpl implements CommunityServiceI {
135 125
 		ToCommunities oldCommunities = toCommunitiesMapper.selectByPrimaryKey(toCommunities.getId());
136 126
 		//未修改前的电话号码
137 127
 		String oldTel = oldCommunities.getLoginName();
138
-		//判断电话号码是否重复
139
-		TpUser tpUser = tpUserMapper.selectByTel(toCommunities.getId(),toCommunities.getLoginName());
140
-		if (null != tpUser && !tpUser.getLoginName().equals(oldTel)){
141
-			return Constant.ADMIN_IS_EXIST;
142
-		}
128
+		//修改手机号码
143 129
 		tpUserMapper.updateByTel(toCommunities.getId(),toCommunities.getLoginName(),toCommunities.getUserName(),oldTel);
144 130
 		toCommunitiesMapper.updateByPrimaryKeySelective(toCommunities);
145 131
 		return Constant.SUCCESS;

+ 1
- 0
CODE/smart-community/operate-api/src/main/resources/mapper/TpUserMapper.xml Näytä tiedosto

@@ -203,6 +203,7 @@
203 203
       </if>
204 204
     </set>
205 205
     where login_name = #{oldTel,jdbcType=VARCHAR}
206
+    and community_id = #{id}
206 207
     and status = 1
207 208
   </update>
208 209
 

+ 19
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/ActivityController.java Näytä tiedosto

@@ -5,6 +5,7 @@ import com.community.commom.mode.ResponseBean;
5 5
 import com.community.commom.session.UserElement;
6 6
 import com.community.huiju.common.base.BaseController;
7 7
 import com.community.huiju.service.ITpActivityService;
8
+import com.community.huiju.service.ITpActivitySignUpService;
8 9
 import io.swagger.annotations.Api;
9 10
 import io.swagger.annotations.ApiImplicitParam;
10 11
 import io.swagger.annotations.ApiImplicitParams;
@@ -33,6 +34,9 @@ public class ActivityController extends BaseController {
33 34
     @Autowired
34 35
     private ITpActivityService iTpActivityService;
35 36
 
37
+    @Autowired
38
+    private ITpActivitySignUpService iTpActivitySignUpService;
39
+
36 40
     @ApiOperation(value = "查询活动列表数据", notes = "根据条件查询活动列表")
37 41
     @ApiImplicitParams({
38 42
             @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
@@ -109,4 +113,19 @@ public class ActivityController extends BaseController {
109 113
         return responseBean;
110 114
     }
111 115
 
116
+    @ApiOperation(value = "查询 活动报名人", notes = "查询 活动报名人")
117
+    @ApiImplicitParams({
118
+//            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
119
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
120
+            @ApiImplicitParam(paramType = "body", dataTypeClass = Integer.class, name = "parameter", value = "userName用户名;phone手机号;pageNum第一页;pageSize一页多少行"),
121
+    })
122
+    @RequestMapping(value = "/signUp", method = RequestMethod.POST)
123
+    public ResponseBean getSignUp(@RequestBody String parameter,
124
+                                  HttpSession session) {
125
+
126
+        ResponseBean responseBean = new ResponseBean();
127
+        responseBean = iTpActivitySignUpService.getSignUpUser(parameter);
128
+        return responseBean;
129
+    }
130
+
112 131
 }

+ 4
- 4
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/ToCommunitiesMapper.java Näytä tiedosto

@@ -19,11 +19,11 @@ import java.util.List;
19 19
 public interface ToCommunitiesMapper extends BaseMapper<ToCommunities> {
20 20
 
21 21
     /**
22
-     * 根据 用户Id 查询出
23
-     * @param userId
22
+     * 根据 电话号码 查询出
23
+     * @param phone
24 24
      * @return
25 25
      */
26
-    @Select("SELECT tc.* FROM tp_user_community tuc LEFT JOIN to_communities tc on tuc.community_id = tc.id WHERE tuc.tp_user_id=#{userId}")
27
-    List<ToCommunities> selectUserById(Integer userId);
26
+    @Select("SELECT tc.* FROM tp_user tu LEFT JOIN to_communities tc ON tu.community_id = tc.id WHERE tu.login_name = #{phone}")
27
+    List<ToCommunities> selectUserById(String phone);
28 28
 
29 29
 }

+ 27
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpActivitySignUpMapper.java Näytä tiedosto

@@ -0,0 +1,27 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.community.huiju.model.TpActivitySignUp;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+import org.apache.ibatis.annotations.Select;
10
+
11
+import java.util.List;
12
+
13
+/**
14
+ * <p>
15
+ * 物业web端活动报名表 Mapper 接口
16
+ * </p>
17
+ *
18
+ * @author weiximei
19
+ * @since 2019-01-03
20
+ */
21
+@Mapper
22
+public interface TpActivitySignUpMapper extends BaseMapper<TpActivitySignUp> {
23
+
24
+    @Select("SELECT tas.* FROM tp_activity_sign_up tas LEFT JOIN ta_user tau on tas.ta_user_id = tau.id where tau.user_name like concat('%',#{userName,jdbcType=VARCHAR},'%') and tau.login_name LIKE concat('%',#{phone,jdbcType=VARCHAR},'%')")
25
+    IPage<TpActivitySignUp> listQuery(Page page, @Param("userName") String userName, @Param("phone") String phone);
26
+
27
+}

+ 55
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpActivitySignUp.java Näytä tiedosto

@@ -0,0 +1,55 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import lombok.Data;
5
+import lombok.EqualsAndHashCode;
6
+import lombok.experimental.Accessors;
7
+
8
+import java.io.Serializable;
9
+import java.time.LocalDateTime;
10
+
11
+/**
12
+ * <p>
13
+ * 物业web端活动报名表
14
+ * </p>
15
+ *
16
+ * @author weiximei
17
+ * @since 2019-01-03
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@TableName("tp_activity_sign_up")
23
+public class TpActivitySignUp implements Serializable {
24
+
25
+    private static final long serialVersionUID = 1L;
26
+
27
+    private Integer id;
28
+
29
+    /**
30
+     * 小区id
31
+     */
32
+    private Integer communityId;
33
+
34
+    /**
35
+     * 活动id
36
+     */
37
+    private Integer activityId;
38
+
39
+    /**
40
+     * 住户用户id
41
+     */
42
+    private Integer taUserId;
43
+
44
+    /**
45
+     * 报名时间
46
+     */
47
+    private LocalDateTime signUpTime;
48
+
49
+    /**
50
+     * 备注
51
+     */
52
+    private String remark;
53
+
54
+
55
+}

+ 24
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpActivitySignUpService.java Näytä tiedosto

@@ -0,0 +1,24 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.commom.mode.ResponseBean;
5
+import com.community.huiju.model.TpActivitySignUp;
6
+
7
+/**
8
+ * <p>
9
+ * 物业web端活动报名表 服务类
10
+ * </p>
11
+ *
12
+ * @author weiximei
13
+ * @since 2019-01-03
14
+ */
15
+public interface ITpActivitySignUpService extends IService<TpActivitySignUp> {
16
+
17
+    /**
18
+     * 查询 活动的报名人员
19
+     * @param parameter 参数
20
+     * @return
21
+     */
22
+    ResponseBean getSignUpUser(String parameter);
23
+
24
+}

+ 14
- 5
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Näytä tiedosto

@@ -97,6 +97,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
97 97
         Map<String, Object> map = Maps.newHashMap();
98 98
         // 小区Id
99 99
         map.put("community_id", userElement.getCommunityId());
100
+        // 期
101
+        map.put("phase", tpBuildingOwnerInfo.getPhase());
100 102
         // 栋
101 103
         map.put("building", tpBuildingOwnerInfo.getBuilding());
102 104
         // 单元
@@ -360,6 +362,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
360 362
 
361 363
         // 小区
362 364
         map.put("community_id", communityId);
365
+        // 期
366
+        map.put("phase", tpBuildingOwnerInfo.getPhase());
363 367
         // 栋
364 368
         map.put("building", tpBuildingOwnerInfo.getBuilding());
365 369
         // 单元
@@ -373,12 +377,15 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
373 377
         /**
374 378
          * 通过分组来去重
375 379
          *
376
-         * 1. building 为空表示为 building 字段进行分组
377
-         * 2. unit 为空表示为 unit 字段进行分组
378
-         * 3. level 为空表示为 level 字段进行分组
379
-         * 4. room_no 为空表示为 room_no 字段进行分组
380
+         * 1. phase 为空表示为 phase 字段进行分组
381
+         * 2. building 为空表示为 building 字段进行分组
382
+         * 3. unit 为空表示为 unit 字段进行分组
383
+         * 4. level 为空表示为 level 字段进行分组
384
+         * 5. room_no 为空表示为 room_no 字段进行分组
380 385
          */
381
-        if (null == tpBuildingOwnerInfo.getBuilding() || "".equals(tpBuildingOwnerInfo.getBuilding())) {
386
+        if (null == tpBuildingOwnerInfo.getPhase() || "".equals(tpBuildingOwnerInfo.getPhase())) {
387
+            queryWrapper.groupBy("phase");
388
+        } else if (null == tpBuildingOwnerInfo.getBuilding() || "".equals(tpBuildingOwnerInfo.getBuilding())) {
382 389
             queryWrapper.groupBy("building");
383 390
         } else if (null == tpBuildingOwnerInfo.getUnit() || "".equals(tpBuildingOwnerInfo.getUnit())) {
384 391
             queryWrapper.groupBy("unit");
@@ -762,6 +769,8 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
762 769
         QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
763 770
         // 小区ID
764 771
         queryWrapper.eq("community_id", communityId);
772
+        // 期
773
+        queryWrapper.eq("phase", tpBuildingOwnerInfo.getPhase());
765 774
         // 栋
766 775
         queryWrapper.eq("building", tpBuildingOwnerInfo.getBuilding());
767 776
         // 单元

+ 3
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivityServiceImpl.java Näytä tiedosto

@@ -114,6 +114,9 @@ public class TpActivityServiceImpl extends ServiceImpl<TpActivityMapper, TpActiv
114 114
             return responseBean;
115 115
         }
116 116
 
117
+        // 活动报名人数默认为 0
118
+        tpActivity.setSignUpCount(0);
119
+        tpActivity.setViewCount(0);
117 120
         tpActivity.setCommunityId(userElement.getCommunityId());
118 121
         tpActivity.setUpdateDate(LocalDateTime.now());
119 122
         tpActivity.setUpdateUser(userElement.getId());

+ 102
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivitySignUpServiceImpl.java Näytä tiedosto

@@ -0,0 +1,102 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.baomidou.mybatisplus.core.metadata.IPage;
6
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
8
+import com.community.commom.mode.ResponseBean;
9
+import com.community.commom.utils.BeanTools;
10
+import com.community.huiju.dao.*;
11
+import com.community.huiju.model.*;
12
+import com.community.huiju.service.ITpActivitySignUpService;
13
+import com.community.huiju.vo.ActivitySignUpVO;
14
+import com.google.common.collect.Maps;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.stereotype.Service;
17
+
18
+import java.util.List;
19
+import java.util.Map;
20
+import java.util.stream.Collectors;
21
+
22
+/**
23
+ * <p>
24
+ * 物业web端活动报名表 服务实现类
25
+ * </p>
26
+ *
27
+ * @author weiximei
28
+ * @since 2019-01-03
29
+ */
30
+@Service
31
+public class TpActivitySignUpServiceImpl extends ServiceImpl<TpActivitySignUpMapper, TpActivitySignUp> implements ITpActivitySignUpService {
32
+
33
+    @Autowired
34
+    private TpActivityMapper tpActivityMapper;
35
+
36
+    @Autowired
37
+    private TpActivitySignUpMapper tpActivitySignUpMapper;
38
+
39
+    @Autowired
40
+    private TaUserMapper taUserMapper;
41
+
42
+    @Autowired
43
+    private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
44
+
45
+    @Autowired
46
+    private TaSysRoleMapper taSysRoleMapper;
47
+
48
+
49
+
50
+    @Override
51
+    public ResponseBean getSignUpUser(String parameter) {
52
+        ResponseBean responseBean = new ResponseBean();
53
+
54
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
55
+        Integer activityId = jsonObject.getInteger("id");
56
+        Integer pageNum = jsonObject.getInteger("pageNum");
57
+        Integer pageSize = jsonObject.getInteger("pageSize");
58
+        String userName = jsonObject.getString("userName");
59
+        String phone = jsonObject.getString("userName");
60
+
61
+        TpActivity tpActivity = tpActivityMapper.selectById(activityId);
62
+        if (null == tpActivity) {
63
+            responseBean.addError("活动不存在!");
64
+            return responseBean;
65
+        }
66
+
67
+        Page<TpActivitySignUp> page = new Page<>();
68
+        page.setCurrent(null == pageNum ? 0 : pageNum);
69
+        page.setSize(null == pageSize ? 10 : pageSize);
70
+        page.setDesc("sign_up_time");
71
+
72
+        IPage<TpActivitySignUp> signUpIPage = tpActivitySignUpMapper.listQuery(page, userName, phone);
73
+
74
+        List<TpActivitySignUp> tpActivitySignUpList = signUpIPage.getRecords();
75
+        // 数据包装填充
76
+        List<ActivitySignUpVO> activitySignUpVOS = tpActivitySignUpList.stream().map(e->{
77
+            ActivitySignUpVO activitySignUpVO = new ActivitySignUpVO();
78
+            BeanTools.copyProperties(e, activitySignUpVO);
79
+
80
+            TaUser taUser = taUserMapper.selectByPrimaryKey(e.getTaUserId());
81
+            TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(e.getTaUserId());
82
+            TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectById(taUser.getBuildingOwnerInfoId());
83
+
84
+            activitySignUpVO.setUserName(taUser.getUserName());
85
+            activitySignUpVO.setPhone(taUser.getLoginName());
86
+            activitySignUpVO.setRoleName(taSysRole.getRoleName());
87
+            activitySignUpVO.setAddress(tpBuildingOwnerInfo.getPhase() + tpBuildingOwnerInfo.getBuilding()
88
+                    + tpBuildingOwnerInfo.getUnit() + tpBuildingOwnerInfo.getLevel() + tpBuildingOwnerInfo.getRoomNo());
89
+
90
+            return activitySignUpVO;
91
+        }).collect(Collectors.toList());
92
+
93
+        Map<String, Object> map = Maps.newHashMap();
94
+        map.put("list", activitySignUpVOS);
95
+        map.put("total", signUpIPage.getTotal());
96
+        map.put("pageNum", signUpIPage.getCurrent());
97
+        map.put("pageSize", signUpIPage.getSize());
98
+
99
+        responseBean.addSuccess(map);
100
+        return responseBean;
101
+    }
102
+}

+ 4
- 22
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/UserServiceImpl.java Näytä tiedosto

@@ -67,27 +67,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
67 67
         // 查询用户
68 68
         QueryWrapper<User> queryWrapper = new QueryWrapper<>();
69 69
         queryWrapper.eq("login_name", phone);
70
+        queryWrapper.eq("community_id", communityId);
70 71
         User user = userMapper.selectOne(queryWrapper) ;
71 72
         if (null == user) {
72 73
             responseBean.addError("当前手机号不存在, 请联系运营人员!");
73 74
             return responseBean;
74 75
         }
75 76
 
76
-        // 查询这个用户是否有这个小区的管理
77
-        QueryWrapper<TpUserCommunity> userCommunityQueryWrapper = new QueryWrapper<>();
78
-        userCommunityQueryWrapper.eq("tp_user_id", user.getId());
79
-        userCommunityQueryWrapper.eq("community_id", communityId);
80
-        TpUserCommunity tpUserCommunity = tpUserCommunityMapper.selectOne(userCommunityQueryWrapper);
81
-        if (null == tpUserCommunity) {
82
-            responseBean.addError("当前手机号未绑定该社区");
83
-            return responseBean;
84
-        }
85
-
86 77
         UserVO userVO = new UserVO();
87
-
88
-        // 设置为当前小区Id
89
-        user.setCommunityId(tpUserCommunity.getCommunityId());
90
-
91 78
         // 查询该用户的权限
92 79
         // 获取用户权限
93 80
         getUserRole(user,userVO);
@@ -104,18 +91,13 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
104 91
         checkPhoneAndCode(phone, code);
105 92
 
106 93
         // 获取这个用户所管理的小区
107
-        // 查询用户
108
-        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
109
-        queryWrapper.eq("login_name", phone);
110
-        User user = userMapper.selectOne(queryWrapper);
111
-        if (null == user) {
94
+        List<ToCommunities> toCommunities = toCommunitiesMapper.selectUserById(phone);
95
+        if (toCommunities.size() < 1) {
112 96
             responseBean.addError("当前手机号不存在, 请联系运营人员!");
113 97
             return responseBean;
114 98
         }
115
-
116
-        List<ToCommunities> toCommunities = toCommunitiesMapper.selectUserById(user.getId());
99
+        
117 100
         responseBean.addSuccess(toCommunities);
118
-
119 101
         return responseBean;
120 102
     }
121 103
 

+ 21
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/vo/ActivitySignUpVO.java Näytä tiedosto

@@ -0,0 +1,21 @@
1
+package com.community.huiju.vo;
2
+
3
+import com.community.huiju.model.TpActivitySignUp;
4
+import lombok.Data;
5
+
6
+@Data
7
+public class ActivitySignUpVO extends TpActivitySignUp {
8
+
9
+    /** 用户姓名 **/
10
+    private String userName;
11
+
12
+    /** 角色名称 **/
13
+    private String roleName;
14
+
15
+    /** 住址 **/
16
+    private String address;
17
+
18
+    /** 联系方式 **/
19
+    private String phone;
20
+
21
+}

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpActivitySignUpMapper.xml Näytä tiedosto

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpActivitySignUpMapper">
4
+
5
+</mapper>

+ 19
- 0
CODE/smart-community/zuul/pom.xml Näytä tiedosto

@@ -158,6 +158,25 @@
158 158
 				<groupId>org.springframework.boot</groupId>
159 159
 				<artifactId>spring-boot-maven-plugin</artifactId>
160 160
 			</plugin>
161
+			<!--服务化打包工具-->
162
+			<plugin>
163
+				<groupId>org.apache.maven.plugins</groupId>
164
+				<artifactId>maven-assembly-plugin</artifactId>
165
+				<configuration>
166
+					<descriptors>
167
+						<descriptor>src/main/assembly/assembly.xml</descriptor>
168
+					</descriptors>
169
+				</configuration>
170
+				<executions>
171
+					<execution>
172
+						<id>make-assembly</id>
173
+						<phase>package</phase>
174
+						<goals>
175
+							<goal>single</goal>
176
+						</goals>
177
+					</execution>
178
+				</executions>
179
+			</plugin>
161 180
 		</plugins>
162 181
 	</build>
163 182
 

+ 30
- 0
CODE/smart-community/zuul/src/main/assembly/assembly.xml Näytä tiedosto

@@ -0,0 +1,30 @@
1
+<assembly>
2
+    <id>assembly</id>
3
+    <formats>
4
+        <format>tar.gz</format>
5
+    </formats>
6
+    <includeBaseDirectory>true</includeBaseDirectory>
7
+    <fileSets>
8
+        <fileSet>
9
+            <directory>src/main/assembly/bin</directory>
10
+            <outputDirectory>bin</outputDirectory>
11
+            <fileMode>0755</fileMode>
12
+        </fileSet>
13
+        <fileSet>
14
+            <directory>target/classes</directory>
15
+            <outputDirectory>conf</outputDirectory>
16
+            <includes>
17
+                <include>META-INF/**</include>
18
+                <include>*.yml</include>
19
+                <include>conf/**</include>
20
+            </includes>
21
+            <fileMode>0755</fileMode>
22
+        </fileSet>
23
+    </fileSets>
24
+    <dependencySets>
25
+        <dependencySet>
26
+            <useProjectArtifact>true</useProjectArtifact>
27
+            <outputDirectory>lib</outputDirectory>
28
+        </dependencySet>
29
+    </dependencySets>
30
+</assembly>

+ 86
- 0
CODE/smart-community/zuul/src/main/assembly/bin/start.sh Näytä tiedosto

@@ -0,0 +1,86 @@
1
+#!/bin/bash
2
+
3
+SERVER_NAME='zuul'
4
+# jar名称
5
+JAR_NAME='zuul-0.0.1.jar'
6
+cd `dirname $0`
7
+BIN_DIR=`pwd`
8
+cd ..
9
+DEPLOY_DIR=`pwd`
10
+CONF_DIR=$DEPLOY_DIR/conf
11
+# 获取应用的端口号
12
+SERVER_PORT=`sed -nr '/port: [0-9]+/ s/.*port: +([0-9]+).*/\1/p' conf/bootstrap.yml`
13
+
14
+PIDS=`ps -f | grep java | grep "$CONF_DIR" |awk '{print $2}'`
15
+if [ "$1" = "status" ]; then
16
+    if [ -n "$PIDS" ]; then
17
+        echo "The $SERVER_NAME is running...!"
18
+        echo "PID: $PIDS"
19
+        exit 0
20
+    else
21
+        echo "The $SERVER_NAME is stopped"
22
+        exit 0
23
+    fi
24
+fi
25
+
26
+if [ -n "$PIDS" ]; then
27
+    echo "ERROR: The $SERVER_NAME already started!"
28
+    echo "PID: $PIDS"
29
+    exit 1
30
+fi
31
+
32
+if [ -n "$SERVER_PORT" ]; then
33
+    SERVER_PORT_COUNT=`netstat -tln | grep $SERVER_PORT | wc -l`
34
+    if [ $SERVER_PORT_COUNT -gt 0 ]; then
35
+        echo "ERROR: The $SERVER_NAME port $SERVER_PORT already used!"
36
+        exit 1
37
+    fi
38
+fi
39
+
40
+LOGS_DIR=$DEPLOY_DIR/logs
41
+if [ ! -d $LOGS_DIR ]; then
42
+    mkdir $LOGS_DIR
43
+fi
44
+STDOUT_FILE=$LOGS_DIR/stdout.log
45
+
46
+JAVA_OPTS=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true "
47
+JAVA_DEBUG_OPTS=""
48
+if [ "$1" = "debug" ]; then
49
+    JAVA_DEBUG_OPTS=" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n "
50
+fi
51
+
52
+JAVA_JMX_OPTS=""
53
+if [ "$1" = "jmx" ]; then
54
+    JAVA_JMX_OPTS=" -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false "
55
+fi
56
+
57
+JAVA_MEM_OPTS=""
58
+BITS=`java -version 2>&1 | grep -i 64-bit`
59
+if [ -n "$BITS" ]; then
60
+    JAVA_MEM_OPTS=" -server -Xmx512m -Xms512m -Xmn256m -XX:PermSize=128m -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 "
61
+else
62
+    JAVA_MEM_OPTS=" -server -Xms512m -Xmx512m -XX:PermSize=128m -XX:SurvivorRatio=2 -XX:+UseParallelGC "
63
+fi
64
+
65
+CONFIG_FILES=" -Dspring.config.location=$CONF_DIR/ "
66
+echo -e "Starting the $SERVER_NAME ..."
67
+nohup java $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS $JAVA_JMX_OPTS $CONFIG_FILES -jar $DEPLOY_DIR/lib/$JAR_NAME > $STDOUT_FILE 2>&1 &
68
+
69
+COUNT=0
70
+while [ $COUNT -lt 1 ]; do
71
+    echo -e ".\c"
72
+    sleep 1
73
+    if [ -n "$SERVER_PORT" ]; then
74
+        COUNT=`netstat -an | grep $SERVER_PORT | wc -l`
75
+    else
76
+        COUNT=`ps -f | grep java | grep "$DEPLOY_DIR" | awk '{print $2}' | wc -l`
77
+    fi
78
+    if [ $COUNT -gt 0 ]; then
79
+        break
80
+    fi
81
+done
82
+
83
+echo "OK!"
84
+PIDS=`ps -f | grep java | grep "$DEPLOY_DIR" | awk '{print $2}'`
85
+echo "PID: $PIDS"
86
+echo "STDOUT: $STDOUT_FILE"

+ 14
- 2
VUECODE/smart-property-manage/src/api/activity.js Näytä tiedosto

@@ -64,9 +64,21 @@ export function invalidActivity(data) {
64 64
   return request({
65 65
     url: '/activity/invalid',
66 66
     method: 'put',
67
+    data
68
+  })
69
+}
70
+
71
+// 查询活动报名人
72
+export function getSignUp(data) {
73
+  return request({
74
+    url: '/signUp',
75
+    method: 'post',
67 76
     data: {
68
-      ids: data
77
+      id: data.id,
78
+      userName: data.userName,
79
+      phone: data.phone,
80
+      pageNum: data.userName,
81
+      pageSize: data.pageSize
69 82
     }
70 83
   })
71 84
 }
72
-

+ 4
- 0
VUECODE/smart-property-manage/src/api/buildingOwnerInfo.js Näytä tiedosto

@@ -6,6 +6,7 @@ export function buildingAddress(data) {
6 6
     url: '/building/address',
7 7
     method: 'post',
8 8
     data: {
9
+      phase: data.phase,
9 10
       building: data.building,
10 11
       unit: data.unit,
11 12
       level: data.level,
@@ -21,6 +22,7 @@ export function buildingList(data) {
21 22
     url: '/building/list',
22 23
     method: 'post',
23 24
     data: {
25
+      phase: data.phase,
24 26
       building: data.building,
25 27
       unit: data.unit,
26 28
       level: data.level,
@@ -73,6 +75,7 @@ export function addBuilding(data) {
73 75
     url: '/building/add',
74 76
     method: 'post',
75 77
     data: {
78
+      phase: data.phase,
76 79
       building: data.building,
77 80
       unit: data.unit,
78 81
       level: data.level,
@@ -90,6 +93,7 @@ export function updateBuilding(data) {
90 93
     method: 'put',
91 94
     data: {
92 95
       id: data.id,
96
+      phase: data.phase,
93 97
       building: data.building,
94 98
       unit: data.unit,
95 99
       level: data.level,

+ 7
- 0
VUECODE/smart-property-manage/src/router/index.js Näytä tiedosto

@@ -150,6 +150,13 @@ export const constantRouterMap = [
150 150
         name: 'announcement-edit',
151 151
         hidden: true,
152 152
         meta: { title: '编辑公告', icon: 'table' }
153
+      },
154
+      {
155
+        path: '/signUp/info',
156
+        component: () => import('@/views/social/signUp/index'),
157
+        name: 'signUp-info',
158
+        hidden: true,
159
+        meta: { title: '活动报名人', icon: 'table' }
153 160
       }
154 161
     ]
155 162
   },

+ 10
- 1
VUECODE/smart-property-manage/src/store/modules/activity.js Näytä tiedosto

@@ -1,4 +1,4 @@
1
-import { activityList, addActivity, updateActivity, activityById, invalidActivity  } from '@/api/activity'
1
+import { activityList, addActivity, updateActivity, activityById, invalidActivity, getSignUp } from '@/api/activity'
2 2
 
3 3
 const activityInfo = {
4 4
   state: {
@@ -50,6 +50,15 @@ const activityInfo = {
50 50
           reject(error)
51 51
         })
52 52
       })
53
+    },
54
+    GetSignUp({ commit, state }, data) { // 查询 活动报名人员
55
+      return new Promise((resolve, reject) => {
56
+        getSignUp(data).then(response => {
57
+          resolve(response)
58
+        }).catch(error => {
59
+          reject(error)
60
+        })
61
+      })
53 62
     }
54 63
 
55 64
   }

+ 7
- 0
VUECODE/smart-property-manage/src/views/building/add/index.vue Näytä tiedosto

@@ -1,6 +1,9 @@
1 1
 <template>
2 2
   <div class="root">
3 3
     <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="add-ruleForm">
4
+      <el-form-item label="期" prop="phase">
5
+        <el-input v-model="ruleForm.phase"/>
6
+      </el-form-item>
4 7
       <el-form-item label="栋" prop="building">
5 8
         <el-input v-model="ruleForm.building"/>
6 9
       </el-form-item>
@@ -32,6 +35,7 @@ export default {
32 35
   data() {
33 36
     return {
34 37
       ruleForm: {
38
+        phase: '',
35 39
         building: '',
36 40
         unit: '',
37 41
         level: '',
@@ -40,6 +44,9 @@ export default {
40 44
         ownerTel: ''
41 45
       },
42 46
       rules: {
47
+        phase: [
48
+          { required: true, message: '请输入期', trigger: 'blur' }
49
+        ],
43 50
         building: [
44 51
           { required: true, message: '请输入楼栋', trigger: 'blur' }
45 52
         ],

+ 1
- 1
VUECODE/smart-property-manage/src/views/building/batch/batchImport.vue Näytä tiedosto

@@ -4,7 +4,7 @@
4 4
     <el-form :inline="true" :model="listQuery" class="form-listQuery">
5 5
       <el-form-item>
6 6
         <el-upload :on-preview="handlePreview" :on-change="handleChange" :before-upload="beforeUpload" :limit="1" :on-exceed="handleExceed" class="upload-demo" action="" multiple>
7
-          <el-button style="margin-left: 10px;" size="large" type="primary"><a href="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/%E6%A5%BC%E6%A0%8B%E5%BA%93%E6%A8%A1%E6%9D%BF.xlsx?Expires=1547546690">下载模板</a></el-button>
7
+          <el-button style="margin-left: 10px;" size="large" type="primary"><a href="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/%E6%A5%BC%E6%A0%8B%E5%BA%93%E6%A8%A1%E6%9D%BF.xlsx?Expires=1548327771">下载模板</a></el-button>
8 8
           <el-button slot="trigger" size="large" type="primary">选取文件并预览</el-button>
9 9
           <el-button style="margin-left: 10px;" size="large" type="success" @click="submitUpload">提交</el-button>
10 10
           <el-button style="margin-left: 10px;" size="large" type="success" @click="dialogBuildingIndex">取消</el-button>

+ 5
- 0
VUECODE/smart-property-manage/src/views/building/edi/index.vue Näytä tiedosto

@@ -36,6 +36,7 @@ export default {
36 36
     return {
37 37
       ruleForm: {
38 38
         id: '',
39
+        phase: '',
39 40
         building: '',
40 41
         unit: '',
41 42
         level: '',
@@ -46,6 +47,9 @@ export default {
46 47
       isOwnerTel: false, // 手机号是否可以编辑 true 不可编辑  false 为可编辑
47 48
       listQuery: [], // 查询的参数
48 49
       rules: {
50
+        phase: [
51
+          { required: true, message: '请输入楼栋', trigger: 'blur' }
52
+        ],
49 53
         building: [
50 54
           { required: true, message: '请输入楼栋', trigger: 'blur' }
51 55
         ],
@@ -115,6 +119,7 @@ export default {
115 119
       this.$store.dispatch('GetByIdBuildingId', buildingId).then((res) => {
116 120
         const data = res.data
117 121
         this.ruleForm.id = data.id
122
+        this.ruleForm.phase = data.phase
118 123
         this.ruleForm.building = data.building
119 124
         this.ruleForm.unit = data.unit
120 125
         this.ruleForm.level = data.level

+ 44
- 10
VUECODE/smart-property-manage/src/views/building/index.vue Näytä tiedosto

@@ -3,6 +3,14 @@
3 3
   <div class="root">
4 4
     <el-form :inline="true" :model="listQuery" class="form-listQuery">
5 5
       <el-form-item label="楼盘库">
6
+        <el-select v-model="listQuery.phase" placeholder="期" @change="buildSelectChange(0)">
7
+          <!--<el-option label="选择楼栋" value="-1" />-->
8
+          <el-option
9
+            v-for="item in phaseList"
10
+            :key="item.id"
11
+            :label="item.phase"
12
+            :value="item.phase"/>
13
+        </el-select>
6 14
         <el-select v-model="listQuery.building" placeholder="栋" @change="buildSelectChange(1)">
7 15
           <!--<el-option label="选择楼栋" value="-1" />-->
8 16
           <el-option
@@ -63,6 +71,7 @@
63 71
       style="width: 100%; margin-top: 20px;"
64 72
       @selection-change="handleSelectionChange">
65 73
       <el-table-column type="selection" width="55" align="center"/>
74
+      <el-table-column prop="phase" label="期" align="center" />
66 75
       <el-table-column prop="building" label="栋" align="center" />
67 76
       <el-table-column prop="unit" label="单元" align="center" />
68 77
       <el-table-column prop="level" label="楼层" align="center" />
@@ -96,6 +105,7 @@ export default {
96 105
   data() {
97 106
     return {
98 107
       listQuery: {
108
+        phase: '',
99 109
         building: '',
100 110
         unit: '',
101 111
         level: '',
@@ -105,11 +115,12 @@ export default {
105 115
         pageSize: 10
106 116
       },
107 117
       total: 0, // 数据总数
108
-      buildingInfoLists: [],
109
-      buildingList: [],
110
-      unitList: [],
111
-      levelList: [],
112
-      roomNoList: [],
118
+      phaseList: [], // 期 集合
119
+      buildingInfoLists: [], // 表格数据集合
120
+      buildingList: [], // seletc 楼栋集合
121
+      unitList: [], // seletc 单元集合
122
+      levelList: [], // seletc 层 集合
123
+      roomNoList: [], //  seletc 户号集合
113 124
       listLoading: true, // 加载圈
114 125
       deleteIds: [] // 需要删除的id集合
115 126
     }
@@ -129,7 +140,10 @@ export default {
129 140
   },
130 141
   mounted() {
131 142
     // 获取栋
132
-    this.getBuild()
143
+    // this.getBuild()
144
+
145
+    // 获取期
146
+    this.getPhase()
133 147
 
134 148
     const query = this.$route.params.listQuery
135 149
     if (query !== undefined) {
@@ -169,12 +183,20 @@ export default {
169 183
         this.deleteIds.push(data[i].id)
170 184
       }
171 185
     },
186
+    getPhase() { // 获取楼栋
187
+      this.listQuery.phase = ''
188
+      this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
189
+        this.phaseList = res.data
190
+      }).catch(() => {
191
+        console.log('error phase BuildingAddress')
192
+      })
193
+    },
172 194
     getBuild() { // 获取楼栋
173 195
       this.listQuery.building = ''
174 196
       this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
175 197
         this.buildingList = res.data
176 198
       }).catch(() => {
177
-        console.log('error BuildingAddress')
199
+        console.log('error building BuildingAddress')
178 200
       })
179 201
     },
180 202
     getUnit() { // 获取单元
@@ -182,7 +204,7 @@ export default {
182 204
       this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
183 205
         this.unitList = res.data
184 206
       }).catch(() => {
185
-        console.log('error BuildingAddress')
207
+        console.log('error unit BuildingAddress')
186 208
       })
187 209
     },
188 210
     getLevel() { // 获取楼层
@@ -190,7 +212,7 @@ export default {
190 212
       this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
191 213
         this.levelList = res.data
192 214
       }).catch(() => {
193
-        console.log('error BuildingAddress')
215
+        console.log('error level BuildingAddress')
194 216
       })
195 217
     },
196 218
     getRoomNo() { // 获取户号
@@ -198,11 +220,22 @@ export default {
198 220
       this.$store.dispatch('BuildingAddress', this.listQuery).then((res) => {
199 221
         this.roomNoList = res.data
200 222
       }).catch(() => {
201
-        console.log('error BuildingAddress')
223
+        console.log('error roomNo BuildingAddress')
202 224
       })
203 225
     },
204 226
     buildSelectChange(value) { // select 的 change
205 227
       switch (value) {
228
+        case 0: // 查询栋
229
+          this.buildingList = []
230
+          this.unitList = []
231
+          this.levelList = []
232
+          this.roomNoList = []
233
+          this.listQuery.building = ''
234
+          this.listQuery.unit = ''
235
+          this.listQuery.level = ''
236
+          this.listQuery.roomNo = ''
237
+          this.getBuild()
238
+          break
206 239
         case 1: // 查询 单元
207 240
           this.unitList = []
208 241
           this.levelList = []
@@ -245,6 +278,7 @@ export default {
245 278
       })
246 279
     },
247 280
     emptyListQuery() { // 清空按钮
281
+      this.listQuery.phase = ''
248 282
       this.listQuery.building = ''
249 283
       this.listQuery.unit = ''
250 284
       this.listQuery.level = ''

+ 1
- 0
VUECODE/smart-property-manage/src/views/social/activity/add/index.vue Näytä tiedosto

@@ -171,6 +171,7 @@ export default {
171 171
       })
172 172
       if (this.ruleForm.activityContent.length <= 0 && this.ruleForm.contentImg.length <= 0) {
173 173
         this.$message.error('活动内容描述 和 活动配图至少要存在一个!')
174
+        loading.close()
174 175
         return false
175 176
       }
176 177
       this.ruleForm.status = status // 发布状态  1 是已发布   2 是草稿

+ 1
- 0
VUECODE/smart-property-manage/src/views/social/activity/edi/index.vue Näytä tiedosto

@@ -120,6 +120,7 @@ export default {
120 120
         if (valid) {
121 121
           if (this.ruleForm.activityContent.length <= 0 && this.ruleForm.contentImg.length <= 0) {
122 122
             this.$message.error('活动内容描述 和 活动配图至少要存在一个!')
123
+            loading.close()
123 124
             return false
124 125
           }
125 126
           this.ruleForm.status = 1 // 发布状态

+ 29
- 2
VUECODE/smart-property-manage/src/views/social/activity/index.vue Näytä tiedosto

@@ -19,7 +19,7 @@
19 19
     <div class="operation">
20 20
       <el-button type="primary" @click="addActivity">添加</el-button>
21 21
       <el-button type="warning" @click="ediActivity">修改</el-button>
22
-      <el-button type="danger" >作废</el-button>
22
+      <el-button type="danger" @click="invalidActivity">作废</el-button>
23 23
     </div>
24 24
     <el-table
25 25
       v-loading="listLoading"
@@ -57,7 +57,11 @@
57 57
       <el-table-column
58 58
         prop="signUpCount"
59 59
         label="已报名人数"
60
-        align="center"/>
60
+        align="center">
61
+        <template slot-scope="scope">
62
+          <span style="color: #409EFF;cursor: pointer" @click="selectSignUpActivity(scope.row.id)" >{{ scope.row.signUpCount }}</span>
63
+        </template>
64
+      </el-table-column>
61 65
       <el-table-column
62 66
         prop="status"
63 67
         label="状态"
@@ -219,6 +223,29 @@ export default {
219 223
     },
220 224
     infoActivity(id) { // 查看活动
221 225
       this.$router.push({ name: 'activity-info', params: { id: id }})
226
+    },
227
+    invalidActivity() { //  批量作废
228
+      const ids = this.deleteIds
229
+      if (ids < 1) {
230
+        this.$message.error('请选择一行数据进行修改!')
231
+        return
232
+      }
233
+      this.$store.dispatch('InvalidActivity', ids).then((res) => {
234
+        if (res.code === '0') {
235
+          this.$message({
236
+            message: res.message,
237
+            type: 'success'
238
+          })
239
+          this.activityList()
240
+          return
241
+        }
242
+        this.$message.error(res.message)
243
+      }).catch(() => {
244
+        console.log('error InvalidActivity')
245
+      })
246
+    },
247
+    selectSignUpActivity(id) {
248
+      this.$router.push({ name: 'signUp-info', params: { id: id }})
222 249
     }
223 250
   }
224 251
 }

+ 60
- 9
VUECODE/smart-property-manage/src/views/social/activity/info/index.vue Näytä tiedosto

@@ -1,31 +1,76 @@
1 1
 <template>
2 2
   <div id="root">
3
-    <span class="activityTile">活动标题</span>
4
-    <img src="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1543484412841.png" width="700" height="500">
3
+    <span class="activityTile">{{ ruleForm.activityTitle }}</span>
4
+    <img :src="ruleForm.activityCarouselImg" width="700" height="500">
5 5
     <div class="activityContext">
6
-      尊敬的业主/住户:
7
-      为丰富小区入住业主/住户的社区文化活动,增进各业主/住户间的联系,现物业服务中心特协调银城旗下分公司南京锦城佳业营销策划有限公司举办为期两个月的暑期露天电影节活动!详情请关注通知及各幢大堂的公告通知,下周六11月24日晚将进行第一场活动!更多细节敬请期待!
6
+      {{ ruleForm.activityContent }}
8 7
     </div>
9 8
     <div class="activityContextImg">
10
-      <img src="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1543484412841.png" width="700" height="500">
11
-      <img src="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1543484412841.png" width="700" height="500">
9
+      <img v-for="item in ruleForm.contentImg" :src="item" width="700" height="500" >
12 10
     </div>
13 11
     <div class="progress">
14 12
       <div class="text-progress">
15
-        <span class="people-number">已报名人数100</span>
13
+        <span class="people-number">已报名人数 {{ ruleForm.signUpCount }}</span>
16 14
         <div class="outer-layer"/>
17 15
         <div class="inner-layer"/>
18 16
       </div>
19 17
       <div class="circular"/>
20
-      <div class="people-limit">限制100人</div>
18
+      <div class="people-limit">限制{{ ruleForm.signUpMax }}人</div>
21 19
       <el-button type="primary" style="float: left;">查看报名名单</el-button>
22 20
     </div>
21
+    <span>报名截止时间:{{ formatDate(ruleForm.registrationEndTime) }}</span>
22
+    <div class="bom-button">
23
+      <el-button type="primary" style="width: 100px;" @click="ediActivity">修改</el-button>
24
+    </div>
23 25
   </div>
24 26
 </template>
25 27
 
26 28
 <script>
27 29
 export default {
28
-  name: 'Index'
30
+  name: 'Index',
31
+  data() {
32
+    return {
33
+      asOfdate: '2018/10/10 23:59:59',
34
+      ruleForm: {
35
+        id: '',
36
+        activityTitle: '',
37
+        activityCarouselImg: '', // 轮播图
38
+        activityContent: '', // 活动内容详细
39
+        contentImg: [], // 活动内容配图
40
+        signUpCount: '', // 报名人数统计
41
+        signUpMax: '', //  活动人数上限
42
+        registrationEndTime: '', // 报名活动结束时间
43
+        sort: 1, // 权重
44
+        status: '' // 状态 0 是已作废 1 是已发布   2 是草稿 3 是已修改
45
+      }
46
+    }
47
+  },
48
+  mounted() {
49
+    this.getById(this.$route.params.id)
50
+  },
51
+  methods: {
52
+    getById(id) { // 根据ID获取活动信息
53
+      this.$store.dispatch('ActivityById', id).then((res) => {
54
+        const resData = res.data
55
+        this.ruleForm = resData.info
56
+        this.ruleForm.contentImg = resData.contentImg
57
+      })
58
+    },
59
+    formatDate(val) {
60
+      var value = new Date(val)
61
+      var year = value.getFullYear()
62
+      var month = value.getMonth() + 1
63
+      var day = value.getDate()
64
+      // var hour = value.getHours()
65
+      // var minutes = value.getMinutes()
66
+      // var seconds = value.getSeconds()
67
+      // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
68
+      return year + '-' + month + '-' + day
69
+    },
70
+    ediActivity() { // 修改活动
71
+      this.$router.push({ name: 'activity-edi', params: { id: this.ruleForm.id }})
72
+    }
73
+  }
29 74
 }
30 75
 </script>
31 76
 
@@ -94,4 +139,10 @@ export default {
94 139
 .people-limit {
95 140
   margin-top: 13px;
96 141
 }
142
+.bom-button{
143
+  display: flex;
144
+  justify-content: center;
145
+  margin-top: 20px;
146
+  margin-bottom: 100px;
147
+}
97 148
 </style>

+ 195
- 0
VUECODE/smart-property-manage/src/views/social/signUp/index.vue Näytä tiedosto

@@ -0,0 +1,195 @@
1
+
2
+<template>
3
+  <div id="root">
4
+    <el-form :inline="true" :model="listQuery" class="form-inline">
5
+      <el-form-item label="报名人姓名">
6
+        <el-input v-model="listQuery.userName" placeholder="报名人姓名"/>
7
+      </el-form-item>
8
+      <el-form-item label="报名人手机号">
9
+        <el-input v-model="listQuery.phone" placeholder="报名人手机号"/>
10
+      </el-form-item>
11
+      <!--<el-form-item label="活动内容">-->
12
+      <!--<el-input v-model="formInline.user" placeholder="活动内容"/>-->
13
+      <!--</el-form-item>-->
14
+      <el-form-item>
15
+        <el-button type="info" @click="clearListQuery">清空</el-button>
16
+        <el-button type="primary" @click="onSubmit">查询</el-button>
17
+      </el-form-item>
18
+    </el-form>
19
+    <el-table
20
+      v-loading="listLoading"
21
+      ref="multipleTable"
22
+      :data="list"
23
+      tooltip-effect="dark"
24
+      style="width: 100%; margin-top: 20px;"
25
+      border
26
+      @selection-change="handleSelectionChange">
27
+      <el-table-column
28
+        type="selection"
29
+        align="center"/>
30
+      <el-table-column
31
+        label="编号"
32
+        align="center">
33
+        <template slot-scope="scope">{{ scope.row.id }}</template>
34
+      </el-table-column>
35
+      <el-table-column
36
+        prop="userName"
37
+        label="姓名"
38
+        align="center"/>
39
+      <el-table-column
40
+        prop="roleName"
41
+        label="角色"
42
+        show-overflow-tooltip
43
+        align="center">
44
+        <template slot-scope="scope">{{ getRoleName(scope.row.roleName) }}</template>
45
+      </el-table-column>
46
+      <el-table-column
47
+        prop="address"
48
+        label="房号"
49
+        align="center"/>
50
+      <el-table-column
51
+        prop="signUpTime"
52
+        label="报名时间"
53
+        align="center">
54
+        <template slot-scope="scope">{{ formatDate(scope.row.signUpTime) }}</template>
55
+      </el-table-column>
56
+      <el-table-column
57
+        prop="remark"
58
+        label="报名备注"
59
+        align="center">
60
+        <template slot-scope="scope">{{ scope.row.remark }}</template>
61
+      </el-table-column>
62
+      <el-table-column
63
+        prop="phone"
64
+        label="联系电话"
65
+        align="center"/>
66
+      <el-table-column
67
+        prop="id"
68
+        label="操作"
69
+        align="center">
70
+        <template slot-scope="scope">{{ '删除报名' }}</template>
71
+      </el-table-column>
72
+    </el-table>
73
+    <div class="block">
74
+      <el-pagination
75
+        :current-page.sync="listQuery.pageNum"
76
+        :page-sizes="[10, 20, 40, 100]"
77
+        :page-size.sync="listQuery.pageSize"
78
+        :total="total"
79
+        layout="total, sizes, prev, pager, next, jumper"
80
+        @size-change="handleSizeChange"
81
+        @current-change="handleCurrentChange"/>
82
+    </div>
83
+  </div>
84
+</template>
85
+<script>
86
+export default {
87
+  name: 'Index',
88
+  data() {
89
+    return {
90
+      listQuery: {
91
+        userName: '',
92
+        phone: '',
93
+        pageNum: 1,
94
+        pageSize: 10
95
+      },
96
+      total: 0, // 数据总数
97
+      list: [],
98
+      listLoading: true // 表格加载框
99
+    }
100
+  },
101
+  mounted() {
102
+    this.listQuery.id = this.$route.params.id
103
+    this.signUpList()
104
+  },
105
+  methods: {
106
+    onSubmit() {
107
+      this.listQuery.pageNum = 1
108
+      this.signUpList()
109
+    },
110
+    clearListQuery() {
111
+      this.listQuery.pageNum = 1
112
+      this.listQuery.pageSize = 10
113
+      this.listQuery.id = ''
114
+      this.listQuery.activityTitle = ''
115
+      this.signUpList()
116
+    },
117
+    handleSelectionChange(data) { // 表格选择
118
+      // 设置为 空
119
+      this.deleteIds = []
120
+      for (let i = 0; i < data.length; i++) {
121
+        this.deleteIds.push(data[i].id)
122
+      }
123
+    },
124
+    handleSizeChange(val) {
125
+      console.log(`每页 ${val} 条`)
126
+      this.listQuery.pageNum = 1
127
+      this.listQuery.pageSize = val
128
+      this.signUpList()
129
+    },
130
+    handleCurrentChange(val) {
131
+      console.log(`当前页: ${val}`)
132
+      this.listQuery.pageNum = val
133
+      this.signUpList()
134
+    },
135
+    signUpList() { // 查询列表
136
+      this.listLoading = true
137
+      this.$store.dispatch('GetSignUp', this.listQuery).then((res) => {
138
+        const resData = res.data
139
+        this.list = resData.list
140
+        this.listQuery.pageNum = resData.pageNum
141
+        this.listQuery.pageSize = resData.pageSize
142
+        this.total = resData.total
143
+        this.listLoading = false
144
+      }).catch(() => {
145
+        this.listLoading = false
146
+        console.log('error GetSignUp get')
147
+      })
148
+    },
149
+    formatDate(val) {
150
+      var value = new Date(val)
151
+      var year = value.getFullYear()
152
+      var month = value.getMonth() + 1
153
+      var day = value.getDate()
154
+      // var hour = value.getHours()
155
+      // var minutes = value.getMinutes()
156
+      // var seconds = value.getSeconds()
157
+      // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
158
+      return year + '-' + month + '-' + day
159
+    },
160
+    getRoleName(roleName) {
161
+      let role = ''
162
+      switch (roleName) {
163
+        case 'OWNER':
164
+          role = '业主'
165
+          break
166
+        case 'TENANT':
167
+          role = '租客'
168
+          break
169
+        case 'RELATION':
170
+          role = '家属'
171
+          break
172
+        default:
173
+          role = '未认证'
174
+      }
175
+      return role
176
+    }
177
+  }
178
+}
179
+</script>
180
+
181
+<style scoped>
182
+#root {
183
+  margin-top: 20px;
184
+}
185
+.form-inline{
186
+  margin-left: 20px;
187
+}
188
+.operation {
189
+  margin-left: 20px;
190
+}
191
+.block {
192
+  display: flex;
193
+  justify-content: flex-end;
194
+}
195
+</style>

+ 729
- 601
文档/MYSQL/smartCommunity.pdb
File diff suppressed because it is too large
Näytä tiedosto


+ 729
- 601
文档/MYSQL/smartCommunity.pdm
File diff suppressed because it is too large
Näytä tiedosto