dingxin 6 years ago
parent
commit
f9d8596e6b

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

284
 //            return responseBean;
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
         BillInvoice billInvoice = new BillInvoice();
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
         billInvoice.setBillId(billId);
309
         billInvoice.setBillId(billId);
320
         billInvoice.setCommunityId(userElement.getCommunityId());
310
         billInvoice.setCommunityId(userElement.getCommunityId());
321
         billInvoice.setBillInvoiceExplain(billInvoiceExplain);
311
         billInvoice.setBillInvoiceExplain(billInvoiceExplain);
323
         billInvoice.setBillStatus("0");
313
         billInvoice.setBillStatus("0");
324
         billInvoice.setCreateUser(userElement.getId());
314
         billInvoice.setCreateUser(userElement.getId());
325
         billInvoice.setCreateDate(new Date());
315
         billInvoice.setCreateDate(new Date());
316
+        billInvoice.setRoomNoId(roomNo);
326
         billInvoice.setStatus(0);
317
         billInvoice.setStatus(0);
327
 
318
 
328
         int result = billInvoiceMapper.insert(billInvoice);
319
         int result = billInvoiceMapper.insert(billInvoice);

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

121
                 .setHotelId(hotel.getId())
121
                 .setHotelId(hotel.getId())
122
                 .setPrice(String.valueOf(hotelRoom.getPrice()))
122
                 .setPrice(String.valueOf(hotelRoom.getPrice()))
123
                 .setCreateDate(LocalDateTime.now())
123
                 .setCreateDate(LocalDateTime.now())
124
-                .setCreateUser(userElement.getId());
124
+                .setCreateUser(userElement.getId())
125
+                .setUpdateDate(LocalDateTime.now())
126
+                .setUpdateUser(userElement.getId());
125
         tpHotelRoomMapper.insert(hotelRoom);
127
         tpHotelRoomMapper.insert(hotelRoom);
126
         response.addSuccess("成功");
128
         response.addSuccess("成功");
127
         return response;
129
         return response;

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

67
           {{ scope.row.phase + scope.row.building + scope.row.unit + scope.row.roomNo }}
67
           {{ scope.row.phase + scope.row.building + scope.row.unit + scope.row.roomNo }}
68
         </template>
68
         </template>
69
       </el-table-column>
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
       <el-table-column
75
       <el-table-column
76
         prop="billInvoiceExplain"
76
         prop="billInvoiceExplain"
77
         align="center"
77
         align="center"