dingxin 6 år sedan
förälder
incheckning
f9d8596e6b

+ 16
- 25
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BillInvoiceServiceImpl.java Visa fil

@@ -284,38 +284,28 @@ public class BillInvoiceServiceImpl extends ServiceImpl<BillInvoiceMapper, BillI
284 284
 //            return responseBean;
285 285
 //        }
286 286
 
287
+        // 校验 期/区/栋/单元/楼层/户号
288
+        QueryWrapper<TpRoomNo> roomNoQueryWrapper = new QueryWrapper<>();
289
+        roomNoQueryWrapper.eq("community_id", userElement.getCommunityId());
290
+        roomNoQueryWrapper.eq("phase_id", phase);
291
+        roomNoQueryWrapper.eq("building_id", building);
292
+        roomNoQueryWrapper.eq("unit_id", unit);
293
+        roomNoQueryWrapper.eq("level_id", level);
294
+        roomNoQueryWrapper.eq("id", roomNo);
295
+        TpRoomNo tpRoomNo = tpRoomNoMapper.selectOne(roomNoQueryWrapper);
296
+        if (null == tpRoomNo) {
297
+            responseBean.addError("房产不存在!");
298
+            return responseBean;
299
+        }
300
+
301
+
287 302
         BillInvoice billInvoice = new BillInvoice();
288 303
 
289 304
         /**
290 305
          * 缴费单挂靠在 房产下面
291 306
          */
292 307
 
293
-        /**
294
-         * 需要知道这个房产的业主
295
-         */
296
-        TaUserVerify userVerify = taUserVerifyMapper.selectCommunityAndAddress(userElement.getCommunityId(), phase, building, unit, level, roomNo);
297
-
298
-        TaUser ownerUser = null;
299
-        TpBuildingOwnerInfo buildingOwnerInfo = null;
300
-        if (null != userVerify) {
301
-            // 业主个人信息
302
-            ownerUser = taUserMapper.selectById(userVerify.getUserId());
303
-
304
-            // 楼栋资料库
305
-            buildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityIdAndAddress(userElement.getCommunityId(),
306
-                    userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(),
307
-                    userVerify.getLevelId(), userVerify.getRoomNoId(), ownerUser.getLoginName());
308
-            if (null == buildingOwnerInfo) {
309
-                throw new WisdomException("手机号为:" + ownerUser.getLoginName() + " 楼栋业主资料不存在!");
310
-            }
311
-            billInvoice.setBuildingOwnerInfoId(buildingOwnerInfo.getId());
312
-        }
313
-
314
-        if (null != ownerUser) {
315
-            billInvoice.setTaUserId(ownerUser.getId());
316
-        }
317 308
         // 设置房号
318
-        billInvoice.setRoomNoId(roomNo);
319 309
         billInvoice.setBillId(billId);
320 310
         billInvoice.setCommunityId(userElement.getCommunityId());
321 311
         billInvoice.setBillInvoiceExplain(billInvoiceExplain);
@@ -323,6 +313,7 @@ public class BillInvoiceServiceImpl extends ServiceImpl<BillInvoiceMapper, BillI
323 313
         billInvoice.setBillStatus("0");
324 314
         billInvoice.setCreateUser(userElement.getId());
325 315
         billInvoice.setCreateDate(new Date());
316
+        billInvoice.setRoomNoId(roomNo);
326 317
         billInvoice.setStatus(0);
327 318
 
328 319
         int result = billInvoiceMapper.insert(billInvoice);

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

@@ -121,7 +121,9 @@ public class HotelServiceImpl extends ServiceImpl<HotelMapper, Hotel> implements
121 121
                 .setHotelId(hotel.getId())
122 122
                 .setPrice(String.valueOf(hotelRoom.getPrice()))
123 123
                 .setCreateDate(LocalDateTime.now())
124
-                .setCreateUser(userElement.getId());
124
+                .setCreateUser(userElement.getId())
125
+                .setUpdateDate(LocalDateTime.now())
126
+                .setUpdateUser(userElement.getId());
125 127
         tpHotelRoomMapper.insert(hotelRoom);
126 128
         response.addSuccess("成功");
127 129
         return response;

+ 5
- 5
VUECODE/smart-property-manage/src/views/bill/info/add/index.vue Visa fil

@@ -67,11 +67,11 @@
67 67
           {{ scope.row.phase + scope.row.building + scope.row.unit + scope.row.roomNo }}
68 68
         </template>
69 69
       </el-table-column>
70
-      <el-table-column
71
-        prop="ownerName"
72
-        label="户主姓名"
73
-        align="center"
74
-        width="180"/>
70
+      <!--<el-table-column-->
71
+        <!--prop="ownerName"-->
72
+        <!--label="户主姓名"-->
73
+        <!--align="center"-->
74
+        <!--width="180"/>-->
75 75
       <el-table-column
76 76
         prop="billInvoiceExplain"
77 77
         align="center"