浏览代码

优化代码

java110 5 年之前
父节点
当前提交
bd7f97ec00

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/reportFeeMonthStatistics/ReportFeeMonthStatisticsDto.java

@@ -40,6 +40,7 @@ public class ReportFeeMonthStatisticsDto extends PageDto implements Serializable
     private String roomId;
     private String roomNum;
     private String carNum;
+    private String contractCode;
     private String payerObjType;
 
     private String objCount;
@@ -473,4 +474,12 @@ public class ReportFeeMonthStatisticsDto extends PageDto implements Serializable
     public void setVacantHousingReduction(String vacantHousingReduction) {
         this.vacantHousingReduction = vacantHousingReduction;
     }
+
+    public String getContractCode() {
+        return contractCode;
+    }
+
+    public void setContractCode(String contractCode) {
+        this.contractCode = contractCode;
+    }
 }

+ 3 - 3
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml

@@ -916,7 +916,7 @@
         pf.payer_obj_type payerObjType,t.start_time startTime,t.end_time endTime,t.create_time createTime,
         t.receivable_amount receivableAmount,t.received_amount receivedAmount,pfa.`value`
         importFeeName,t.prime_rate,d.name primeRate,fdr.discount_small_type discountSmallType,fdr.rule_name
-        ruleName,pfdd.discount_price discountPrice
+        ruleName,pfdd.discount_price discountPrice,co.contract_code contractCode
         from pay_fee_detail t
         INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
         inner join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0'
@@ -928,8 +928,8 @@
         left join pay_fee_detail_discount pfdd on t.detail_id = pfdd.detail_id and pfdd.status_cd = '0'
         left join fee_discount fd on pfdd.discount_id = fd.discount_id and fd.status_cd = '0'
         left join fee_discount_rule fdr on fd.rule_id = fdr.rule_id and fdr.status_cd = '0'
-        left join t_dict d on t.prime_rate = d.status_cd and d.table_name="pay_fee_detail" and
-        d.table_columns="prime_rate"
+        left join t_dict d on t.prime_rate = d.status_cd and d.table_name="pay_fee_detail" and d.table_columns="prime_rate"
+        LEFT JOIN contract co on pf.payer_obj_id = co.contract_id and co.status_cd = '0' and pf.payer_obj_type='7777'
         where t.status_cd = '0'
         <if test="roomNum !=null and roomNum != ''">
             and br.room_num= #{roomNum}

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

@@ -329,8 +329,11 @@ public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthSta
                     reportFeeMonthStatistics.setObjName(reportFeeMonthStatistics.getFloorNum()
                             + "栋" + reportFeeMonthStatistics.getUnitNum()
                             + "单元" + reportFeeMonthStatistics.getRoomNum() + "室");
-                } else {
+                } else if (FeeDto.PAYER_OBJ_TYPE_CAR.equals(reportFeeMonthStatistics.getPayerObjType())) {
                     reportFeeMonthStatistics.setObjName(reportFeeMonthStatistics.getCarNum());
+                }else{
+                    reportFeeMonthStatistics.setObjName(reportFeeMonthStatistics.getContractCode());
+
                 }
 
                 if (!StringUtil.isEmpty(reportFeeMonthStatistics.getImportFeeName())) {