魏熙美 6 years ago
parent
commit
96abd1a327

+ 10
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java View File

49
 
49
 
50
     private Date updateDate;
50
     private Date updateDate;
51
 
51
 
52
+    private Integer taUserVerifyId;
53
+
52
     public Integer getId() {
54
     public Integer getId() {
53
         return id;
55
         return id;
54
     }
56
     }
232
     public void setUpdateDate(Date updateDate) {
234
     public void setUpdateDate(Date updateDate) {
233
         this.updateDate = updateDate;
235
         this.updateDate = updateDate;
234
     }
236
     }
237
+
238
+    public Integer getTaUserVerifyId() {
239
+        return taUserVerifyId;
240
+    }
241
+
242
+    public void setTaUserVerifyId(Integer taUserVerifyId) {
243
+        this.taUserVerifyId = taUserVerifyId;
244
+    }
235
 }
245
 }

+ 4
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServicelmpl.java View File

257
             TpBuildingOwnerInfo selectBuild = getBuildingInfo(userElement, user.getLoginName());
257
             TpBuildingOwnerInfo selectBuild = getBuildingInfo(userElement, user.getLoginName());
258
             if (null == selectBuild) {
258
             if (null == selectBuild) {
259
                 // 插入楼栋信息数据
259
                 // 插入楼栋信息数据
260
-                insertTpBuildingOwnerInfo(userElement, user, null);
260
+                insertTpBuildingOwnerInfo(userElement, user, null, userVerify.getId());
261
             }
261
             }
262
             //审核通过后推送消息(临时数据)
262
             //审核通过后推送消息(临时数据)
263
             String[] messageArr= new String[14];
263
             String[] messageArr= new String[14];
328
      * @param userElement
328
      * @param userElement
329
      * @param user
329
      * @param user
330
      * @param userId 创建人
330
      * @param userId 创建人
331
+     * @param userVerifyId 审核的id
331
      */
332
      */
332
-    private TpBuildingOwnerInfo insertTpBuildingOwnerInfo (UserElement userElement, TaUser user, Integer userId) {
333
+    private TpBuildingOwnerInfo insertTpBuildingOwnerInfo (UserElement userElement, TaUser user, Integer userId, Integer userVerifyId) {
333
         TpBuildingOwnerInfo tpBuildingOwnerInfo = new TpBuildingOwnerInfo();
334
         TpBuildingOwnerInfo tpBuildingOwnerInfo = new TpBuildingOwnerInfo();
334
         // 查询 期/楼栋/单元/层/户号
335
         // 查询 期/楼栋/单元/层/户号
335
         TpPhase phase = tpPhaseMapper.selectByPrimaryKey(userElement.getPhaseId());
336
         TpPhase phase = tpPhaseMapper.selectByPrimaryKey(userElement.getPhaseId());
360
         // tpBuildingOwnerInfo.setCreateUser(userId);
361
         // tpBuildingOwnerInfo.setCreateUser(userId);
361
         tpBuildingOwnerInfo.setVerifyStatus("1");
362
         tpBuildingOwnerInfo.setVerifyStatus("1");
362
         tpBuildingOwnerInfo.setPairStatus("1");
363
         tpBuildingOwnerInfo.setPairStatus("1");
364
+        tpBuildingOwnerInfo.setTaUserVerifyId(userVerifyId);
363
 
365
 
364
         // 添加的时候, 默认是当前操作的小区
366
         // 添加的时候, 默认是当前操作的小区
365
         tpBuildingOwnerInfo.setCommunityId(userElement.getCommunityId());
367
         tpBuildingOwnerInfo.setCommunityId(userElement.getCommunityId());

+ 15
- 4
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml View File

25
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
25
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
26
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
26
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
27
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
27
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
28
+    <result column="ta_user_verify_id" property="taUserVerifyId" javaType="INTEGER"/>
28
   </resultMap>
29
   </resultMap>
29
   <sql id="Base_Column_List" >
30
   <sql id="Base_Column_List" >
30
     id, community_id, id_card, phase_id, phase_name, building_id, building_name, unit_id, 
31
     id, community_id, id_card, phase_id, phase_name, building_id, building_name, unit_id, 
31
     unit_name, level_id, level_name, room_no_id, room_no_name, owner_name, owner_tel, 
32
     unit_name, level_id, level_name, room_no_id, room_no_name, owner_name, owner_tel, 
32
     gender, pair_status, verify_status, sort, create_user, create_date, update_user, 
33
     gender, pair_status, verify_status, sort, create_user, create_date, update_user, 
33
-    update_date
34
+    update_date, ta_user_verify_id
34
   </sql>
35
   </sql>
35
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
36
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
36
     select
37
     select
50
       room_no_name, owner_name, owner_tel, 
51
       room_no_name, owner_name, owner_tel, 
51
       gender, pair_status, verify_status, 
52
       gender, pair_status, verify_status, 
52
       sort, create_user, create_date, 
53
       sort, create_user, create_date, 
53
-      update_user, update_date)
54
+      update_user, update_date, ta_user_verify_id)
54
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{idCard,jdbcType=VARCHAR}, 
55
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{idCard,jdbcType=VARCHAR}, 
55
       #{phaseId,jdbcType=INTEGER}, #{phaseName,jdbcType=VARCHAR}, #{buildingId,jdbcType=INTEGER}, 
56
       #{phaseId,jdbcType=INTEGER}, #{phaseName,jdbcType=VARCHAR}, #{buildingId,jdbcType=INTEGER}, 
56
       #{buildingName,jdbcType=VARCHAR}, #{unitId,jdbcType=INTEGER}, #{unitName,jdbcType=VARCHAR}, 
57
       #{buildingName,jdbcType=VARCHAR}, #{unitId,jdbcType=INTEGER}, #{unitName,jdbcType=VARCHAR}, 
58
       #{roomNoName,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR}, #{ownerTel,jdbcType=VARCHAR}, 
59
       #{roomNoName,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR}, #{ownerTel,jdbcType=VARCHAR}, 
59
       #{gender,jdbcType=CHAR}, #{pairStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, 
60
       #{gender,jdbcType=CHAR}, #{pairStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, 
60
       #{sort,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
61
       #{sort,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
61
-      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
62
+      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}, #{taUserVerifyId,jdbcType=INTEGER})
62
   </insert>
63
   </insert>
63
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" keyProperty="id" useGeneratedKeys="true" >
64
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" keyProperty="id" useGeneratedKeys="true" >
64
     insert into tp_building_owner_info
65
     insert into tp_building_owner_info
132
       <if test="updateDate != null" >
133
       <if test="updateDate != null" >
133
         update_date,
134
         update_date,
134
       </if>
135
       </if>
136
+      <if test="ta_user_verify_id != null">
137
+        ta_user_verify_id,
138
+      </if>
135
     </trim>
139
     </trim>
136
     <trim prefix="values (" suffix=")" suffixOverrides="," >
140
     <trim prefix="values (" suffix=")" suffixOverrides="," >
137
       <if test="id != null" >
141
       <if test="id != null" >
203
       <if test="updateDate != null" >
207
       <if test="updateDate != null" >
204
         #{updateDate,jdbcType=TIMESTAMP},
208
         #{updateDate,jdbcType=TIMESTAMP},
205
       </if>
209
       </if>
210
+      <if test="taUserVerifyId != null">
211
+        #{taUserVerifyId,jdbcType=INTEGER},
212
+      </if>
206
     </trim>
213
     </trim>
207
   </insert>
214
   </insert>
208
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
215
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
274
       <if test="updateDate != null" >
281
       <if test="updateDate != null" >
275
         update_date = #{updateDate,jdbcType=TIMESTAMP},
282
         update_date = #{updateDate,jdbcType=TIMESTAMP},
276
       </if>
283
       </if>
284
+      <if test="taUserVerifyId != null">
285
+        ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
286
+      </if>
277
     </set>
287
     </set>
278
     where id = #{id,jdbcType=INTEGER}
288
     where id = #{id,jdbcType=INTEGER}
279
   </update>
289
   </update>
300
       create_user = #{createUser,jdbcType=INTEGER},
310
       create_user = #{createUser,jdbcType=INTEGER},
301
       create_date = #{createDate,jdbcType=TIMESTAMP},
311
       create_date = #{createDate,jdbcType=TIMESTAMP},
302
       update_user = #{updateUser,jdbcType=INTEGER},
312
       update_user = #{updateUser,jdbcType=INTEGER},
303
-      update_date = #{updateDate,jdbcType=TIMESTAMP}
313
+      update_date = #{updateDate,jdbcType=TIMESTAMP},
314
+      ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER}
304
     where id = #{id,jdbcType=INTEGER}
315
     where id = #{id,jdbcType=INTEGER}
305
   </update>
316
   </update>
306
   <update id="updatOwnerTel" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
317
   <update id="updatOwnerTel" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >

+ 5
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java View File

137
      * 更新时间
137
      * 更新时间
138
      */
138
      */
139
     private LocalDateTime updateDate;
139
     private LocalDateTime updateDate;
140
+
141
+    /**
142
+     * 审核id
143
+     */
144
+    private Integer taUserVerifyId;
140
     
145
     
141
     /**
146
     /**
142
      * 身份
147
      * 身份

+ 9
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java View File

181
 
181
 
182
         // 审核通过后,往楼栋资料库添加数据
182
         // 审核通过后,往楼栋资料库添加数据
183
         if ("1".equals(verify)) {
183
         if ("1".equals(verify)) {
184
-            insertTpBuildingOwnerInfo(userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(),
184
+            TpBuildingOwnerInfo tpBuildingOwnerInfo = insertTpBuildingOwnerInfo(userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(),
185
                     userVerify.getLevelId(), userVerify.getRoomNoId(), userElement.getCommunityId(), userElement.getId(),
185
                     userVerify.getLevelId(), userVerify.getRoomNoId(), userElement.getCommunityId(), userElement.getId(),
186
                     userVerify.getGender(), user.getUserName(), user.getLoginName());
186
                     userVerify.getGender(), user.getUserName(), user.getLoginName());
187
+
188
+            // 设置审核id
189
+            tpBuildingOwnerInfo.setTaUserVerifyId(userVerify.getId());
190
+            tpBuildingOwnerInfoMapper.updateById(tpBuildingOwnerInfo);
191
+
187
             // 推送海康
192
             // 推送海康
188
             ResponseBean pushHKPerson = taUserFeignService.pushHKPerson(userVerify.getUserId());
193
             ResponseBean pushHKPerson = taUserFeignService.pushHKPerson(userVerify.getUserId());
189
             if (!"0".equals(pushHKPerson.getCode())) {
194
             if (!"0".equals(pushHKPerson.getCode())) {
296
         taUserVerify.setVerifyName(user.getUserName());
301
         taUserVerify.setVerifyName(user.getUserName());
297
         row = taUserVerifyMapper.insert(taUserVerify);
302
         row = taUserVerifyMapper.insert(taUserVerify);
298
 
303
 
304
+        tpBuildingOwnerInfo.setTaUserVerifyId(taUserVerify.getId());
305
+        row = tpBuildingOwnerInfoMapper.updateById(tpBuildingOwnerInfo);
306
+
299
         if (row <= 0) {
307
         if (row <= 0) {
300
             throw new WisdomException("操作失败!");
308
             throw new WisdomException("操作失败!");
301
         } else {
309
         } else {

+ 5
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaUserVerifyServiceImpl.java View File

176
             // 只有这个人在当前房产没有楼栋资料的时候才添加
176
             // 只有这个人在当前房产没有楼栋资料的时候才添加
177
             if (null == tpBuildingOwnerInfo) {
177
             if (null == tpBuildingOwnerInfo) {
178
                 // 添加楼栋数据
178
                 // 添加楼栋数据
179
-                insertBuildingOwnerInfo(userVerify, user);
179
+               tpBuildingOwnerInfo = insertBuildingOwnerInfo(userVerify, user);
180
+
181
+               // 设置审核id
182
+               tpBuildingOwnerInfo.setTaUserVerifyId(userVerify.getId());
183
+               tpBuildingOwnerInfoMapper.updateById(tpBuildingOwnerInfo);
180
             }
184
             }
181
             // 推送海康
185
             // 推送海康
182
             ResponseBean pushHKPerson = taUserFeignService.pushHKPerson(userVerify.getUserId());
186
             ResponseBean pushHKPerson = taUserFeignService.pushHKPerson(userVerify.getUserId());

+ 12
- 0
CODE/smart-community/property-api/src/main/resources/bootstrap.yml View File

23
   client:
23
   client:
24
     service-url:
24
     service-url:
25
       defaultZone: http://localhost:8080/eureka/
25
       defaultZone: http://localhost:8080/eureka/
26
+hystrix:
27
+  command:
28
+    default:
29
+      execution:
30
+        isolation:
31
+          thread:
32
+            timeoutInMilliseconds: 180000
33
+
34
+ribbon:
35
+  ReadTimeout: 38000
36
+  ConnectTimeout: 38000
37
+  eureka.enabled: true

+ 1
- 1
CODE/smart-community/property-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml View File

72
             t.update_date as updateDate
72
             t.update_date as updateDate
73
         FROM
73
         FROM
74
             tp_building_owner_info t
74
             tp_building_owner_info t
75
-            LEFT JOIN ta_user_verify u ON t.room_no_id = u.room_no_id
75
+            INNER JOIN ta_user_verify u ON t.ta_user_verify_id = u.id
76
             LEFT JOIN ta_sys_role r ON u.role_id = r.id
76
             LEFT JOIN ta_sys_role r ON u.role_id = r.id
77
             LEFT JOIN tp_user m ON t.update_user = m.id
77
             LEFT JOIN tp_user m ON t.update_user = m.id
78
         WHERE
78
         WHERE