wuxw преди 2 години
родител
ревизия
35f4412614

+ 10 - 0
java110-bean/src/main/java/com/java110/dto/reportFee/ReportFeeMonthStatisticsDto.java

@@ -45,6 +45,8 @@ public class ReportFeeMonthStatisticsDto extends PageDto implements Serializable
     private String unitNum;
     private String roomId;
     private String roomNum;
+
+    private String roomName;
     private String carNum;
     private String psName;
     private String contractCode;
@@ -1181,4 +1183,12 @@ public class ReportFeeMonthStatisticsDto extends PageDto implements Serializable
     public void setPayerObjName(String payerObjName) {
         this.payerObjName = payerObjName;
     }
+
+    public String getRoomName() {
+        return roomName;
+    }
+
+    public void setRoomName(String roomName) {
+        this.roomName = roomName;
+    }
 }

+ 50 - 1
service-job/src/main/java/com/java110/job/export/adapt/ReportPayFeeDetailAdapt.java

@@ -4,11 +4,17 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.data.ExportDataDto;
 import com.java110.dto.fee.FeeDto;
+import com.java110.dto.owner.OwnerCarDto;
+import com.java110.dto.owner.OwnerRoomRelDto;
 import com.java110.dto.reportFee.ReportFeeMonthStatisticsDto;
+import com.java110.dto.room.RoomDto;
+import com.java110.intf.community.IRoomInnerServiceSMO;
 import com.java110.intf.report.IQueryPayFeeDetailInnerServiceSMO;
+import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO;
 import com.java110.job.export.IExportDataAdapt;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.DateUtil;
+import com.java110.utils.util.ListUtil;
 import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.apache.poi.ss.usermodel.Row;
@@ -19,6 +25,7 @@ import org.springframework.stereotype.Service;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -31,6 +38,12 @@ public class ReportPayFeeDetailAdapt implements IExportDataAdapt {
     @Autowired
     private IQueryPayFeeDetailInnerServiceSMO queryPayFeeDetailInnerServiceSMOImpl;
 
+    @Autowired
+    private IOwnerRoomRelInnerServiceSMO ownerRoomRelInnerServiceSMOImpl;
+
+    @Autowired
+    private IRoomInnerServiceSMO roomInnerServiceSMOImpl;
+
     private static final int MAX_ROW = 60000;
 
     @Override
@@ -106,7 +119,14 @@ public class ReportPayFeeDetailAdapt implements IExportDataAdapt {
             dataObj = reportFeeMonthStatisticsDtos.getJSONObject(roomIndex);
 //            dataObj = JSONObject.parseObject(JSONObject.toJSONString(reportFeeMonthStatisticsDtos.get(roomIndex)));
             row.createCell(0).setCellValue(dataObj.getString("oId"));
-            row.createCell(1).setCellValue(dataObj.getString("payerObjName"));
+            if (FeeDto.PAYER_OBJ_TYPE_CAR.equals(dataObj.getString("payerObjType"))) {
+                String payerObjName = dataObj.getString("payerObjName");
+                payerObjName += doFreshRoomInfo(dataObj.getString("payerObjId"));
+                row.createCell(1).setCellValue(payerObjName);
+
+            } else {
+                row.createCell(1).setCellValue(dataObj.getString("payerObjName"));
+            }
             endDate = DateUtil.getDateFromStringB(dataObj.getString("endTime"));
             //todo 如果不是一次性费用结束时间建1
             if (!StringUtil.isEmpty(dataObj.getString("feeFlag"))
@@ -136,4 +156,33 @@ public class ReportPayFeeDetailAdapt implements IExportDataAdapt {
             row.createCell(20).setCellValue(dataObj.getString("remark"));
         }
     }
+
+    private String doFreshRoomInfo(String ownerId) {
+
+        if (StringUtil.isNullOrNone(ownerId)) {
+            return "";
+        }
+        OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto();
+        ownerRoomRelDto.setOwnerId(ownerId);
+        ownerRoomRelDto.setPage(1);
+        ownerRoomRelDto.setRow(3); //只展示3个房屋以内 不然页面太乱
+        List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
+        if (ListUtil.isNull(ownerRoomRelDtos)) {
+            return "";
+        }
+        List<String> roomIds = new ArrayList<>();
+        for (OwnerRoomRelDto tOwnerRoomRelDto : ownerRoomRelDtos) {
+            roomIds.add(tOwnerRoomRelDto.getRoomId());
+        }
+        RoomDto roomDto = new RoomDto();
+        roomDto.setRoomIds(roomIds.toArray(new String[roomIds.size()]));
+        List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto);
+        String roomName = "";
+        for (RoomDto tRoomDto : roomDtos) {
+            roomName += (tRoomDto.getFloorNum() + "-" + tRoomDto.getUnitNum() + "-" + tRoomDto.getRoomNum() + "-" + "/");
+        }
+        roomName = roomName.endsWith("/") ? roomName.substring(0, roomName.length() - 1) : roomName;
+        return "(" + roomName + ")";
+
+    }
 }

+ 0 - 58
service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java

@@ -276,64 +276,6 @@ public class ReportFeeMonthStatisticsApi {
         return getReportFeeMonthStatisticsBMOImpl.queryOweFeeDetail(reportFeeMonthStatisticsDto);
     }
 
-    /**
-     * 缴费明细表
-     *
-     * @param communityId 小区ID
-     * @return
-     * @serviceCode /reportFeeMonthStatistics/queryPayFeeDetail
-     * @path /app/reportFeeMonthStatistics/queryPayFeeDetail
-     */
-    @RequestMapping(value = "/queryPayFeeDetail", method = RequestMethod.GET)
-    public ResponseEntity<String> queryPayFeeDetail(@RequestParam(value = "communityId") String communityId,
-                                                    @RequestParam(value = "floorId", required = false) String floorId,
-                                                    @RequestParam(value = "floorNum", required = false) String floorNum,
-                                                    @RequestParam(value = "unitNum", required = false) String unitNum,
-                                                    @RequestParam(value = "unitId", required = false) String unitId,
-                                                    @RequestParam(value = "roomId", required = false) String roomId,
-                                                    @RequestParam(value = "roomNum", required = false) String roomNum,
-                                                    @RequestParam(value = "primeRate", required = false) String primeRate,
-                                                    @RequestParam(value = "state", required = false) String state,
-                                                    @RequestParam(value = "feeTypeCd", required = false) String feeTypeCd,
-                                                    @RequestParam(value = "configId", required = false) String configId,
-                                                    @RequestParam(value = "startTime", required = false) String startTime,
-                                                    @RequestParam(value = "endTime", required = false) String endTime,
-                                                    @RequestParam(value = "feeStartTime", required = false) String feeStartTime,
-                                                    @RequestParam(value = "feeEndTime", required = false) String feeEndTime,
-                                                    @RequestParam(value = "objId", required = false) String objId,
-                                                    @RequestParam(value = "roomName", required = false) String roomName,
-                                                    @RequestParam(value = "page") int page,
-                                                    @RequestParam(value = "row") int row) {
-        ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = new ReportFeeMonthStatisticsDto();
-        reportFeeMonthStatisticsDto.setPage(page);
-        reportFeeMonthStatisticsDto.setRow(row);
-        reportFeeMonthStatisticsDto.setCommunityId(communityId);
-        reportFeeMonthStatisticsDto.setFloorId(floorId);
-        reportFeeMonthStatisticsDto.setFloorNum(floorNum);
-        reportFeeMonthStatisticsDto.setUnitId(unitId);
-        reportFeeMonthStatisticsDto.setUnitNum(unitNum);
-        reportFeeMonthStatisticsDto.setRoomId(roomId);
-        reportFeeMonthStatisticsDto.setRoomNum(roomNum);
-        reportFeeMonthStatisticsDto.setPrimeRate(primeRate);
-        reportFeeMonthStatisticsDto.setState(state);
-        reportFeeMonthStatisticsDto.setFeeTypeCd(feeTypeCd);
-        reportFeeMonthStatisticsDto.setConfigId(configId);
-        reportFeeMonthStatisticsDto.setStartTime(startTime);
-        /*if(!StringUtil.isEmpty(endTime)){
-            endTime += " 23:59:59";
-        }*/
-        reportFeeMonthStatisticsDto.setEndTime(endTime);
-        reportFeeMonthStatisticsDto.setFeeStartTime(feeStartTime);
-        reportFeeMonthStatisticsDto.setFeeEndTime(feeEndTime);
-        reportFeeMonthStatisticsDto.setObjId(objId);
-        if (!StringUtil.isEmpty(roomName)) {
-            String[] roomNameArray = roomName.split("-", 3);
-            reportFeeMonthStatisticsDto.setFloorNum(roomNameArray[0]);
-            reportFeeMonthStatisticsDto.setUnitNum(roomNameArray[1]);
-            reportFeeMonthStatisticsDto.setRoomNum(roomNameArray[2]);
-        }
-        return getReportFeeMonthStatisticsBMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto);
-    }
 
     /**
      * 押金报表

+ 1 - 1
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IGetReportFeeMonthStatisticsBMO.java

@@ -38,7 +38,7 @@ public interface IGetReportFeeMonthStatisticsBMO {
 
     ResponseEntity<String> queryOweFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
 
-    ResponseEntity<String> queryPayFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
+
 
     ResponseEntity<String> queryDeadlineFee(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
 

+ 1 - 12
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java

@@ -390,18 +390,7 @@ public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthSta
         return responseEntity;
     }
 
-    /**
-     * 前台查询分页查询
-     *
-     * @param reportFeeMonthStatisticsDto
-     * @return
-     */
-    @Override
-    public ResponseEntity<String> queryPayFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
-        ResultVo resultVo = queryPayFeeDetailInnerServiceSMOImpl.query(reportFeeMonthStatisticsDto);
-        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-        return responseEntity;
-    }
+
 
     /**
      * @param ownerIds

+ 68 - 108
service-report/src/main/java/com/java110/report/smo/impl/QueryPayFeeDetailInnerServiceSMOImpl.java

@@ -16,6 +16,7 @@ import com.java110.dto.reportFee.ReportFeeMonthStatisticsTotalDto;
 import com.java110.dto.room.RoomDto;
 import com.java110.intf.community.IParkingSpaceV1InnerServiceSMO;
 import com.java110.intf.community.IRepairInnerServiceSMO;
+import com.java110.intf.community.IRoomInnerServiceSMO;
 import com.java110.intf.community.IRoomV1InnerServiceSMO;
 import com.java110.intf.fee.IFeeAccountDetailServiceSMO;
 import com.java110.intf.fee.IFeeDetailInnerServiceSMO;
@@ -68,6 +69,9 @@ public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailI
     @Autowired
     private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl;
 
+    @Autowired
+    private IRoomInnerServiceSMO roomInnerServiceSMOImpl;
+
     @Autowired
     private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl;
 
@@ -136,33 +140,88 @@ public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailI
         roomDto.setCommunityId(reportFeeMonthStatisticsDtos.get(0).getCommunityId());
         List<RoomDto> roomDtos = roomV1InnerServiceSMOImpl.queryRooms(roomDto);
 
-        if(!ListUtil.isNull(roomDtos)){
+        if (!ListUtil.isNull(roomDtos)) {
             for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
-                for(RoomDto tmpRoomDto: roomDtos){
-                    if(reportFeeMonthStatisticsDto.getPayerObjId().equals(tmpRoomDto.getRoomId())){
+                for (RoomDto tmpRoomDto : roomDtos) {
+                    if (reportFeeMonthStatisticsDto.getPayerObjId().equals(tmpRoomDto.getRoomId())) {
                         reportFeeMonthStatisticsDto.setBuiltUpArea(tmpRoomDto.getBuiltUpArea());
                     }
                 }
             }
         }
 
+        computeParkingSpace(reportFeeMonthStatisticsDtos, payerObjIds);
+
+    }
+
+    private void computeParkingSpace(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos, List<String> payerObjIds) {
         OwnerCarDto ownerCarDto = new OwnerCarDto();
         ownerCarDto.setMemberIds(payerObjIds.toArray(new String[payerObjIds.size()]));
         ownerCarDto.setCommunityId(reportFeeMonthStatisticsDtos.get(0).getCommunityId());
         List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
 
-        if(!ListUtil.isNull(ownerCarDtos)){
-            for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
-                for(OwnerCarDto tmpOwnerCarDto: ownerCarDtos){
-                    if(reportFeeMonthStatisticsDto.getPayerObjId().equals(tmpOwnerCarDto.getMemberId())){
-                        reportFeeMonthStatisticsDto.setPsName(tmpOwnerCarDto.getAreaNum()+"-"+tmpOwnerCarDto.getNum());
-                    }
+        if (ListUtil.isNull(ownerCarDtos)) {
+            return;
+        }
+        freshRoomInfo(ownerCarDtos);
+        for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
+            for (OwnerCarDto tmpOwnerCarDto : ownerCarDtos) {
+                if (!reportFeeMonthStatisticsDto.getPayerObjId().equals(tmpOwnerCarDto.getMemberId())) {
+                    continue;
                 }
+                reportFeeMonthStatisticsDto.setPsName(tmpOwnerCarDto.getAreaNum() + "-" + tmpOwnerCarDto.getNum());
+                reportFeeMonthStatisticsDto.setRoomName(tmpOwnerCarDto.getRoomName());
             }
         }
 
     }
 
+    /**
+     * 刷入房屋信息
+     *
+     * @param ownerCarDtos
+     */
+    private void freshRoomInfo(List<OwnerCarDto> ownerCarDtos) {
+
+        if (ListUtil.isNull(ownerCarDtos) || ownerCarDtos.size() > 30) {
+            return;
+        }
+        for (OwnerCarDto ownerCarDto : ownerCarDtos) {
+            doFreshRoomInfo(ownerCarDto);
+        }
+    }
+
+    /**
+     * 车位信息刷入房屋信息
+     *
+     * @param ownerCarDto
+     */
+    private void doFreshRoomInfo(OwnerCarDto ownerCarDto) {
+        OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto();
+        ownerRoomRelDto.setOwnerId(ownerCarDto.getOwnerId());
+        ownerRoomRelDto.setPage(1);
+        ownerRoomRelDto.setRow(3); //只展示3个房屋以内 不然页面太乱
+        List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
+        if (ListUtil.isNull(ownerRoomRelDtos)) {
+            ownerCarDto.setRoomName("-");
+            return;
+        }
+        List<String> roomIds = new ArrayList<>();
+        for (OwnerRoomRelDto tOwnerRoomRelDto : ownerRoomRelDtos) {
+            roomIds.add(tOwnerRoomRelDto.getRoomId());
+        }
+        RoomDto roomDto = new RoomDto();
+        roomDto.setCommunityId(ownerCarDto.getCommunityId());
+        roomDto.setRoomIds(roomIds.toArray(new String[roomIds.size()]));
+        List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto);
+        String roomName = "";
+        for (RoomDto tRoomDto : roomDtos) {
+            roomName += (tRoomDto.getFloorNum() + "-" + tRoomDto.getUnitNum() + "-" + tRoomDto.getRoomNum() + "-" + "/");
+        }
+        roomName = roomName.endsWith("/") ? roomName.substring(0, roomName.length() - 1) : roomName;
+        ownerCarDto.setRoomName(roomName);
+    }
+
     /**
      * 计算大计小计
      *
@@ -206,49 +265,6 @@ public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailI
 
     }
 
-    //处理账户抵扣
-    private ReportFeeMonthStatisticsDto dealFeeAccountDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatistics) {
-        //获取费用明细id
-        String detailId = reportFeeMonthStatistics.getDetailId();
-        FeeAccountDetailDto feeAccountDetailDto = new FeeAccountDetailDto();
-        feeAccountDetailDto.setDetailId(detailId);
-        feeAccountDetailDto.setCommunityId(reportFeeMonthStatistics.getCommunityId());
-        List<FeeAccountDetailDto> feeAccountDetailList = feeAccountDetailServiceSMOImpl.queryFeeAccountDetails(feeAccountDetailDto);
-        BigDecimal noDeduction = new BigDecimal(0.00).setScale(2, BigDecimal.ROUND_HALF_UP); //无抵扣
-        BigDecimal cashDeduction = new BigDecimal(0.00).setScale(2, BigDecimal.ROUND_HALF_UP); //现金账户抵扣
-        BigDecimal pointDeduction = new BigDecimal(0.00).setScale(2, BigDecimal.ROUND_HALF_UP); //积分账户抵扣
-        BigDecimal discountCouponDeduction = new BigDecimal(0.00).setScale(2, BigDecimal.ROUND_HALF_UP); //优惠卷抵扣
-        if (feeAccountDetailList != null && feeAccountDetailList.size() > 0) {
-            for (FeeAccountDetailDto feeAccountDetail : feeAccountDetailList) {
-                //抵扣类型 1001 无抵扣 1002 现金账户抵扣 1003 积分账户抵扣 1004 优惠券抵扣
-                if (!StringUtil.isEmpty(feeAccountDetail.getState()) && feeAccountDetail.getState().equals("1001")) { //无抵扣
-                    //获取账户抵扣金额
-                    BigDecimal amount = new BigDecimal(feeAccountDetail.getAmount());
-                    noDeduction = noDeduction.add(amount).setScale(2, BigDecimal.ROUND_HALF_UP);
-                }
-                if (!StringUtil.isEmpty(feeAccountDetail.getState()) && feeAccountDetail.getState().equals("1002")) { //现金账户抵扣
-                    //获取账户抵扣金额
-                    BigDecimal amount = new BigDecimal(feeAccountDetail.getAmount());
-                    cashDeduction = cashDeduction.add(amount).setScale(2, BigDecimal.ROUND_HALF_UP);
-                }
-                if (!StringUtil.isEmpty(feeAccountDetail.getState()) && feeAccountDetail.getState().equals("1003")) { //积分账户抵扣
-                    //获取账户抵扣金额
-                    BigDecimal amount = new BigDecimal(feeAccountDetail.getAmount());
-                    pointDeduction = pointDeduction.add(amount).setScale(2, BigDecimal.ROUND_HALF_UP);
-                }
-                if (!StringUtil.isEmpty(feeAccountDetail.getState()) && feeAccountDetail.getState().equals("1004")) { //优惠卷抵扣
-                    //获取账户抵扣金额
-                    BigDecimal amount = new BigDecimal(feeAccountDetail.getAmount());
-                    discountCouponDeduction = discountCouponDeduction.add(amount).setScale(2, BigDecimal.ROUND_HALF_UP);
-                }
-            }
-        }
-        reportFeeMonthStatistics.setNoDeduction(String.valueOf(noDeduction)); //无抵扣
-        reportFeeMonthStatistics.setCashDeduction(String.valueOf(cashDeduction)); //现金账户抵扣
-        reportFeeMonthStatistics.setPointDeduction(String.valueOf(pointDeduction)); //积分账户抵扣
-        reportFeeMonthStatistics.setDiscountCouponDeduction(String.valueOf(discountCouponDeduction)); //优惠卷抵扣
-        return reportFeeMonthStatistics;
-    }
 
     @Override
     public ResultVo queryPrepayment(@RequestBody ReportFeeMonthStatisticsPrepaymentDto reportFeeMonthStatisticsPrepaymentDto) {
@@ -741,61 +757,5 @@ public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailI
         return reportFeeMonthStatisticsPrepaymentTotal;
     }
 
-    /**
-     * @param ownerIds
-     * @param reportFeeMonthStatisticsDtos
-     */
-    private void refreshReportFeeMonthStatistics(List<String> ownerIds, List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) {
-        if (ownerIds == null || ownerIds.size() < 1) {
-            return;
-        }
-        OwnerDto ownerDto = new OwnerDto();
-        ownerDto.setOwnerIds(ownerIds.toArray(new String[ownerIds.size()]));
-        List<OwnerDto> ownerDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryRoomAndParkingSpace(ownerDto);
-        String objName = "";
-        for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
-            if (!FeeDto.PAYER_OBJ_TYPE_CAR.equals(reportFeeMonthStatisticsDto.getPayerObjType())) {
-                continue;
-            }
-            for (OwnerDto ownerDto1 : ownerDtos) {
-                if (!StringUtil.isEmpty(reportFeeMonthStatisticsDto.getOwnerId()) && !reportFeeMonthStatisticsDto.getOwnerId().equals(ownerDto1.getOwnerId())) {
-                    continue;
-                }
-                objName = reportFeeMonthStatisticsDto.getObjName() + "(" + ownerDto1.getFloorNum() + "栋" + ownerDto1.getUnitNum() + "单元" + ownerDto1.getRoomNum() + "室)";
-                reportFeeMonthStatisticsDto.setObjName(objName);
-            }
-        }
-    }
-
-    private boolean hasInReportListAndMerge(List<ReportFeeMonthStatisticsDto> reportList, ReportFeeMonthStatisticsDto reportFeeMonthStatistics) {
-        for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportList) {
-            if (reportFeeMonthStatisticsDto.getDetailId().equals(reportFeeMonthStatistics.getDetailId())) {
-                combineSydwCore(reportFeeMonthStatistics, reportFeeMonthStatisticsDto);
-                return true;
-            }
-        }
-        return false;
-    }
 
-    //针对所用对象
-    private static ReportFeeMonthStatisticsDto combineSydwCore(ReportFeeMonthStatisticsDto sourceBean, ReportFeeMonthStatisticsDto targetBean) {
-        Class sourceBeanClass = sourceBean.getClass();
-        Class targetBeanClass = targetBean.getClass();
-        Field[] sourceFields = sourceBeanClass.getDeclaredFields();
-        Field[] targetFields = sourceBeanClass.getDeclaredFields();
-        for (int i = 0; i < sourceFields.length; i++) {
-            Field sourceField = sourceFields[i];
-            Field targetField = targetFields[i];
-            sourceField.setAccessible(true);
-            targetField.setAccessible(true);
-            try {
-                if (!(sourceField.get(sourceBean) == null)) {
-                    targetField.set(targetBean, sourceField.get(sourceBean));
-                }
-            } catch (IllegalArgumentException | IllegalAccessException e) {
-                e.printStackTrace();
-            }
-        }
-        return targetBean;
-    }
 }

+ 3 - 2
service-user/src/main/java/com/java110/user/cmd/owner/QueryOwnerCarsCmd.java

@@ -21,6 +21,7 @@ import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.ListUtil;
 import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -197,7 +198,7 @@ public class QueryOwnerCarsCmd extends Cmd {
         ownerRoomRelDto.setPage(1);
         ownerRoomRelDto.setRow(3); //只展示3个房屋以内 不然页面太乱
         List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
-        if (ownerRoomRelDtos == null || ownerRoomRelDtos.size() < 1) {
+        if (ListUtil.isNull(ownerRoomRelDtos)) {
             ownerCarDto.setRoomName("-");
             return;
         }
@@ -211,7 +212,7 @@ public class QueryOwnerCarsCmd extends Cmd {
         List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto);
         String roomName = "";
         for (RoomDto tRoomDto : roomDtos) {
-            roomName += (tRoomDto.getFloorNum() + "栋" + tRoomDto.getUnitNum() + "单元" + tRoomDto.getRoomNum() + "室" + "/");
+            roomName += (tRoomDto.getFloorNum() + "-" + tRoomDto.getUnitNum() + "-" + tRoomDto.getRoomNum() + "-" + "/");
         }
         roomName = roomName.endsWith("/") ? roomName.substring(0, roomName.length() - 1) : roomName;
         ownerCarDto.setRoomName(roomName);