소스 검색

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

魏熙美 6 년 전
부모
커밋
731a50c435

+ 338
- 268
CODE/smart-community-word/.idea/workspace.xml
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java 파일 보기

@@ -487,4 +487,18 @@ public class SocialController extends BaseController {
487 487
         return response;
488 488
     }
489 489
 
490
+    @ApiOperation(value = "签到扫码", notes = "签到扫码")
491
+    @ApiImplicitParams({
492
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
493
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =
494
+                    "activityId:活动id"),
495
+    })
496
+
497
+    @RequestMapping(value = "/tpactivitysignin/add", method = RequestMethod.GET)
498
+    public ResponseBean  TpActivitySignInAdd(HttpSession session,@RequestBody String paramets) {
499
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
500
+        ResponseBean response = socialServiceI.TpActivitySignInAdd(paramets,userElement);
501
+        return response;
502
+    }
503
+
490 504
 }

+ 20
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivitySignInMapper.java 파일 보기

@@ -0,0 +1,20 @@
1
+package com.community.huiju.dao;
2
+
3
+
4
+import com.community.huiju.model.TpActivitySignIn;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+@Mapper
8
+public interface TpActivitySignInMapper {
9
+    int deleteByPrimaryKey(Integer id);
10
+
11
+    int insert(TpActivitySignIn record);
12
+
13
+    int insertSelective(TpActivitySignIn record);
14
+
15
+    TpActivitySignIn selectByPrimaryKey(Integer id);
16
+
17
+    int updateByPrimaryKeySelective(TpActivitySignIn record);
18
+
19
+    int updateByPrimaryKey(TpActivitySignIn record);
20
+}

+ 66
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserVerify.java 파일 보기

@@ -25,6 +25,39 @@ public class TaUserVerify {
25 25
 
26 26
     private Date createDate;
27 27
 
28
+    /**
29
+     * 期
30
+     */
31
+    private  String phaseName;
32
+
33
+    /**
34
+     * 栋
35
+     */
36
+    private  String buildingName;
37
+
38
+    /**
39
+     * 单元
40
+     */
41
+    private  String unitName;
42
+
43
+    /**
44
+     * 楼层
45
+     */
46
+    private  String levelName;
47
+
48
+    /**
49
+     * 房间号
50
+     */
51
+    private  String roomNoName;
52
+
53
+    public String getPhaseName() {
54
+        return phaseName;
55
+    }
56
+
57
+    public void setPhaseName(String phaseName) {
58
+        this.phaseName = phaseName;
59
+    }
60
+
28 61
     /**
29 62
      * 审核人姓名
30 63
      */
@@ -50,6 +83,7 @@ public class TaUserVerify {
50 83
     /**
51 84
      * 小区 省市区
52 85
      */
86
+
53 87
     private String communityAddress;
54 88
 
55 89
     public Integer getId() {
@@ -179,4 +213,36 @@ public class TaUserVerify {
179 213
     public void setCommunityAddress(String communityAddress) {
180 214
         this.communityAddress = communityAddress;
181 215
     }
216
+
217
+    public String getBuildingName() {
218
+        return buildingName;
219
+    }
220
+
221
+    public String getUnitName() {
222
+        return unitName;
223
+    }
224
+
225
+    public String getLevelName() {
226
+        return levelName;
227
+    }
228
+
229
+    public String getRoomNoName() {
230
+        return roomNoName;
231
+    }
232
+
233
+    public void setBuildingName(String buildingName) {
234
+        this.buildingName = buildingName;
235
+    }
236
+
237
+    public void setUnitName(String unitName) {
238
+        this.unitName = unitName;
239
+    }
240
+
241
+    public void setLevelName(String levelName) {
242
+        this.levelName = levelName;
243
+    }
244
+
245
+    public void setRoomNoName(String roomNoName) {
246
+        this.roomNoName = roomNoName;
247
+    }
182 248
 }

+ 95
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpActivitySignIn.java 파일 보기

@@ -0,0 +1,95 @@
1
+package com.community.huiju.model;
2
+
3
+
4
+import java.util.Date;
5
+public class TpActivitySignIn {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer activityId;
11
+
12
+    private String userName;
13
+
14
+    private String userRole;
15
+
16
+    private String buildingInfo;
17
+
18
+    private Integer taUserId;
19
+
20
+    private String userTel;
21
+
22
+    private Date createDate;
23
+
24
+    public Integer getId() {
25
+        return id;
26
+    }
27
+
28
+    public void setId(Integer id) {
29
+        this.id = id;
30
+    }
31
+
32
+    public Integer getCommunityId() {
33
+        return communityId;
34
+    }
35
+
36
+    public void setCommunityId(Integer communityId) {
37
+        this.communityId = communityId;
38
+    }
39
+
40
+    public Integer getActivityId() {
41
+        return activityId;
42
+    }
43
+
44
+    public void setActivityId(Integer activityId) {
45
+        this.activityId = activityId;
46
+    }
47
+
48
+    public String getUserName() {
49
+        return userName;
50
+    }
51
+
52
+    public void setUserName(String userName) {
53
+        this.userName = userName == null ? null : userName.trim();
54
+    }
55
+
56
+    public String getUserRole() {
57
+        return userRole;
58
+    }
59
+
60
+    public void setUserRole(String userRole) {
61
+        this.userRole = userRole == null ? null : userRole.trim();
62
+    }
63
+
64
+    public String getBuildingInfo() {
65
+        return buildingInfo;
66
+    }
67
+
68
+    public void setBuildingInfo(String buildingInfo) {
69
+        this.buildingInfo = buildingInfo == null ? null : buildingInfo.trim();
70
+    }
71
+
72
+    public Integer getTaUserId() {
73
+        return taUserId;
74
+    }
75
+
76
+    public void setTaUserId(Integer taUserId) {
77
+        this.taUserId = taUserId;
78
+    }
79
+
80
+    public String getUserTel() {
81
+        return userTel;
82
+    }
83
+
84
+    public void setUserTel(String userTel) {
85
+        this.userTel = userTel == null ? null : userTel.trim();
86
+    }
87
+
88
+    public Date getCreateDate() {
89
+        return createDate;
90
+    }
91
+
92
+    public void setCreateDate(Date createDate) {
93
+        this.createDate = createDate;
94
+    }
95
+}

+ 8
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java 파일 보기

@@ -206,4 +206,12 @@ public interface SocialServiceI {
206 206
 	 * @return
207 207
 	 */
208 208
 	ResponseBean userTransactionList(UserElement userElement,Integer pageNum,Integer paeSize);
209
+
210
+	/**
211
+	 * 扫码签到
212
+	 * @param paramets
213
+	 * @param userElement
214
+	 * @return
215
+	 */
216
+    ResponseBean TpActivitySignInAdd(String paramets, UserElement userElement);
209 217
 }

+ 34
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java 파일 보기

@@ -91,6 +91,15 @@ public class SocialServiceImpl implements SocialServiceI {
91 91
     @Autowired
92 92
     private  TpTransactionLikeMapper tpTransactionLikeMapper;
93 93
 
94
+    @Autowired
95
+    private TaUserVerifyMapper taUserVerifyMapper;
96
+
97
+    @Autowired
98
+    private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
99
+
100
+    @Autowired
101
+    private  TpActivitySignInMapper tpActivitySignInMapper;
102
+
94 103
     @Override
95 104
     @Transactional
96 105
     public TpAnnouncement findAnnouncementDetail(Integer id, Integer communityId, Integer userId) {
@@ -652,6 +661,31 @@ public class SocialServiceImpl implements SocialServiceI {
652 661
         return responseBean;
653 662
     }
654 663
 
664
+    @Override
665
+    public ResponseBean TpActivitySignInAdd(String paramets, UserElement userElement) {
666
+        ResponseBean responseBean= new ResponseBean();
667
+        Integer activityId= JSONObject.parseObject(paramets).getInteger("activityId");
668
+        TpActivitySignIn tpActivitySignIn= new TpActivitySignIn();
669
+        tpActivitySignIn.setId(activityId);
670
+        tpActivitySignIn.setCommunityId(userElement.getCommunityId());
671
+
672
+        TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
673
+
674
+        String description= taSysRoleMapper.selectByPrimaryKey(taUserVerify.getRoleId()).getDescription();
675
+        tpActivitySignIn.setUserRole(description);
676
+        tpActivitySignIn.setUserName(userElement.getUserName());
677
+        //期/栋/单/层/户
678
+        String bu=taUserVerify.getPhaseName()+taUserVerify.getBuildingName()+taUserVerify.getUnitName()+taUserVerify.getLevelName()+taUserVerify.getRoomNoName();
679
+        tpActivitySignIn.setBuildingInfo(bu);
680
+        tpActivitySignIn.setTaUserId(userElement.getId());
681
+        tpActivitySignIn.setUserTel(userElement.getLoginName());
682
+        tpActivitySignIn.setCreateDate(new Date());
683
+        tpActivitySignInMapper.insert(tpActivitySignIn);
684
+
685
+
686
+        return null;
687
+    }
688
+
655 689
 
656 690
     @Override
657 691
     public void accessTicket(Integer communityId, TpTicket tpTicket, String ticketId, Integer userId) {

+ 6
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TaUserVerifyMapper.xml 파일 보기

@@ -14,10 +14,15 @@
14 14
     <result column="verify_status" property="verifyStatus" jdbcType="VARCHAR" />
15 15
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
16 16
     <result column="verify_name" property="verifyName"/>
17
+    <result column="phase_name" property="phaseName"/>
18
+    <result column="building_name" property="buildingName"/>
19
+    <result column="unit_name" property="unitName"/>
20
+    <result column="level_name" property="levelName"/>
21
+    <result column="room_no_name" property="roomNoName"/>
17 22
   </resultMap>
18 23
   <sql id="Base_Column_List" >
19 24
     id, user_id, community_id, role_id, phase, building, unit, level, room_no, verify_status, 
20
-     create_date, verify_name
25
+     create_date, verify_name, phase_name, building_name, unit_name, room_no_name,level_name
21 26
   </sql>
22 27
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
23 28
     select 

+ 142
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpActivitySignInMapper.xml 파일 보기

@@ -0,0 +1,142 @@
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.TpActivitySignInMapper">
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpActivitySignIn">
5
+    <id column="id" jdbcType="INTEGER" property="id" />
6
+    <result column="community_id" jdbcType="INTEGER" property="communityId" />
7
+    <result column="activity_id" jdbcType="INTEGER" property="activityId" />
8
+    <result column="user_name" jdbcType="VARCHAR" property="userName" />
9
+    <result column="user_role" jdbcType="VARCHAR" property="userRole" />
10
+    <result column="building_info" jdbcType="VARCHAR" property="buildingInfo" />
11
+    <result column="ta_user_id" jdbcType="INTEGER" property="taUserId" />
12
+    <result column="user_tel" jdbcType="VARCHAR" property="userTel" />
13
+    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
14
+  </resultMap>
15
+  <sql id="Base_Column_List">
16
+    id, community_id, activity_id, user_name, user_role, building_info, ta_user_id, user_tel, 
17
+    create_date
18
+  </sql>
19
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
20
+    select 
21
+    <include refid="Base_Column_List" />
22
+    from tp_activity_sign_in
23
+    where id = #{id,jdbcType=INTEGER}
24
+  </select>
25
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
26
+    delete from tp_activity_sign_in
27
+    where id = #{id,jdbcType=INTEGER}
28
+  </delete>
29
+  <insert id="insert" parameterType="com.community.huiju.model.TpActivitySignIn">
30
+    insert into tp_activity_sign_in (id, community_id, activity_id, 
31
+      user_name, user_role, building_info, 
32
+      ta_user_id, user_tel, create_date
33
+      )
34
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{activityId,jdbcType=INTEGER}, 
35
+      #{userName,jdbcType=VARCHAR}, #{userRole,jdbcType=VARCHAR}, #{buildingInfo,jdbcType=VARCHAR}, 
36
+      #{taUserId,jdbcType=INTEGER}, #{userTel,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}
37
+      )
38
+  </insert>
39
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpActivitySignIn">
40
+    insert into tp_activity_sign_in
41
+    <trim prefix="(" suffix=")" suffixOverrides=",">
42
+      <if test="id != null">
43
+        id,
44
+      </if>
45
+      <if test="communityId != null">
46
+        community_id,
47
+      </if>
48
+      <if test="activityId != null">
49
+        activity_id,
50
+      </if>
51
+      <if test="userName != null">
52
+        user_name,
53
+      </if>
54
+      <if test="userRole != null">
55
+        user_role,
56
+      </if>
57
+      <if test="buildingInfo != null">
58
+        building_info,
59
+      </if>
60
+      <if test="taUserId != null">
61
+        ta_user_id,
62
+      </if>
63
+      <if test="userTel != null">
64
+        user_tel,
65
+      </if>
66
+      <if test="createDate != null">
67
+        create_date,
68
+      </if>
69
+    </trim>
70
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
71
+      <if test="id != null">
72
+        #{id,jdbcType=INTEGER},
73
+      </if>
74
+      <if test="communityId != null">
75
+        #{communityId,jdbcType=INTEGER},
76
+      </if>
77
+      <if test="activityId != null">
78
+        #{activityId,jdbcType=INTEGER},
79
+      </if>
80
+      <if test="userName != null">
81
+        #{userName,jdbcType=VARCHAR},
82
+      </if>
83
+      <if test="userRole != null">
84
+        #{userRole,jdbcType=VARCHAR},
85
+      </if>
86
+      <if test="buildingInfo != null">
87
+        #{buildingInfo,jdbcType=VARCHAR},
88
+      </if>
89
+      <if test="taUserId != null">
90
+        #{taUserId,jdbcType=INTEGER},
91
+      </if>
92
+      <if test="userTel != null">
93
+        #{userTel,jdbcType=VARCHAR},
94
+      </if>
95
+      <if test="createDate != null">
96
+        #{createDate,jdbcType=TIMESTAMP},
97
+      </if>
98
+    </trim>
99
+  </insert>
100
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpActivitySignIn">
101
+    update tp_activity_sign_in
102
+    <set>
103
+      <if test="communityId != null">
104
+        community_id = #{communityId,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="activityId != null">
107
+        activity_id = #{activityId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="userName != null">
110
+        user_name = #{userName,jdbcType=VARCHAR},
111
+      </if>
112
+      <if test="userRole != null">
113
+        user_role = #{userRole,jdbcType=VARCHAR},
114
+      </if>
115
+      <if test="buildingInfo != null">
116
+        building_info = #{buildingInfo,jdbcType=VARCHAR},
117
+      </if>
118
+      <if test="taUserId != null">
119
+        ta_user_id = #{taUserId,jdbcType=INTEGER},
120
+      </if>
121
+      <if test="userTel != null">
122
+        user_tel = #{userTel,jdbcType=VARCHAR},
123
+      </if>
124
+      <if test="createDate != null">
125
+        create_date = #{createDate,jdbcType=TIMESTAMP},
126
+      </if>
127
+    </set>
128
+    where id = #{id,jdbcType=INTEGER}
129
+  </update>
130
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpActivitySignIn">
131
+    update tp_activity_sign_in
132
+    set community_id = #{communityId,jdbcType=INTEGER},
133
+      activity_id = #{activityId,jdbcType=INTEGER},
134
+      user_name = #{userName,jdbcType=VARCHAR},
135
+      user_role = #{userRole,jdbcType=VARCHAR},
136
+      building_info = #{buildingInfo,jdbcType=VARCHAR},
137
+      ta_user_id = #{taUserId,jdbcType=INTEGER},
138
+      user_tel = #{userTel,jdbcType=VARCHAR},
139
+      create_date = #{createDate,jdbcType=TIMESTAMP}
140
+    where id = #{id,jdbcType=INTEGER}
141
+  </update>
142
+</mapper>