魏熙美 6 år sedan
förälder
incheckning
96abd1a327

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

@@ -49,6 +49,8 @@ public class TpBuildingOwnerInfo {
49 49
 
50 50
     private Date updateDate;
51 51
 
52
+    private Integer taUserVerifyId;
53
+
52 54
     public Integer getId() {
53 55
         return id;
54 56
     }
@@ -232,4 +234,12 @@ public class TpBuildingOwnerInfo {
232 234
     public void setUpdateDate(Date updateDate) {
233 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 Visa fil

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

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

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

@@ -137,6 +137,11 @@ public class TpBuildingOwnerInfo implements Serializable {
137 137
      * 更新时间
138 138
      */
139 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 Visa fil

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

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

@@ -176,7 +176,11 @@ public class TaUserVerifyServiceImpl extends ServiceImpl<TaUserVerifyMapper, TaU
176 176
             // 只有这个人在当前房产没有楼栋资料的时候才添加
177 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 186
             ResponseBean pushHKPerson = taUserFeignService.pushHKPerson(userVerify.getUserId());

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

@@ -23,3 +23,15 @@ eureka:
23 23
   client:
24 24
     service-url:
25 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 Visa fil

@@ -72,7 +72,7 @@
72 72
             t.update_date as updateDate
73 73
         FROM
74 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 76
             LEFT JOIN ta_sys_role r ON u.role_id = r.id
77 77
             LEFT JOIN tp_user m ON t.update_user = m.id
78 78
         WHERE