java110 лет назад: 5
Родитель
Сommit
11e922e6f7

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

@@ -41,6 +41,7 @@ public class ReportFeeMonthStatisticsDto extends PageDto implements Serializable
     private String payerObjType;
 
     private String objCount;
+    private String normalCount;
 
 
     private Date createTime;
@@ -313,4 +314,12 @@ public class ReportFeeMonthStatisticsDto extends PageDto implements Serializable
     public void setImportFeeName(String importFeeName) {
         this.importFeeName = importFeeName;
     }
+
+    public String getNormalCount() {
+        return normalCount;
+    }
+
+    public void setNormalCount(String normalCount) {
+        this.normalCount = normalCount;
+    }
 }

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

@@ -606,7 +606,8 @@
 
     <!-- 查询费用月统计信息 add by wuxw 2018-07-03 -->
     <select id="queryFeeDetail" parameterType="Map" resultType="Map">
-        select t.obj_name objName,t.fee_name feeName,t.fee_create_time feeCreateTime,t.deadline_time deadlineTime,SUM(t.receivable_amount)
+        select t.obj_name objName,t.fee_name feeName,t.fee_create_time feeCreateTime,t.deadline_time
+        deadlineTime,SUM(t.receivable_amount)
         receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount
         from report_fee_month_statistics t
         inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
@@ -835,7 +836,7 @@
         left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
         left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
         left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0'
-        left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and  pfa.spec_cd = '390002'
+        left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002'
         where t.status_cd = '0'
         <if test="roomNum !=null and roomNum != ''">
             and br.room_num= #{roomNum}
@@ -1075,7 +1076,6 @@
     </select>
 
 
-
     <select id="queryOwePaymentCount" parameterType="Map" resultType="Map">
         select t.fee_name feeName,count(t.obj_id) objCount
         from report_fee_month_statistics t
@@ -1084,11 +1084,20 @@
         group by t.config_id,t.fee_name
         order by objCount desc
     </select>
+    <select id="queryAllPaymentCount" parameterType="Map" resultType="Map">
+        select t.fee_name feeName,count(t.obj_id) objCount
+        from report_fee_month_statistics t
+        where t.community_id = #{communityId}
+        group by t.config_id,t.fee_name
+        order by objCount desc
+    </select>
+
 
     <select id="queryFinishOweFee" parameterType="Map" resultType="Map">
         select t.config_id configId, t.fee_id feeId,t.statistics_id statisticsId,t.fee_year feeYear,fee_month feeMonth
         from report_fee_month_statistics t
-        inner join pay_fee pf on t.fee_id = pf.fee_id and pf.state = '2009001' and pf.community_id = #{communityId} and pf.status_cd = '0'
+        inner join pay_fee pf on t.fee_id = pf.fee_id and pf.state = '2009001' and pf.community_id = #{communityId} and
+        pf.status_cd = '0'
         where t.owe_amount > 0
         and t.status_cd = '0'
         and t.community_id = #{communityId}

+ 8 - 1
java110-interface/src/main/java/com/java110/intf/report/IReportFeeMonthStatisticsInnerServiceSMO.java

@@ -218,6 +218,13 @@ public interface IReportFeeMonthStatisticsInnerServiceSMO {
      */
     @RequestMapping(value = "/queryOwePaymentCount", method = RequestMethod.POST)
     List<ReportFeeMonthStatisticsDto> queryOwePaymentCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
-
+    /**
+     * 查询预付费户数
+     *
+     * @param reportFeeMonthStatisticsDto
+     * @return
+     */
+    @RequestMapping(value = "/queryAllPaymentCount", method = RequestMethod.POST)
+    List<ReportFeeMonthStatisticsDto> queryAllPaymentCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
 
 }

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

@@ -231,10 +231,25 @@ public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthSta
     public ResponseEntity<String> queryOwePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
 
         List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null;
+        List<ReportFeeMonthStatisticsDto> reportAllFeeMonthStatisticsDtos = null;
 
         reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryOwePaymentCount(reportFeeMonthStatisticsDto);
 
-        ResultVo resultVo = new ResultVo(reportFeeMonthStatisticsDtos);
+        reportAllFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryAllPaymentCount(reportFeeMonthStatisticsDto);
+        int normalFee = 0;
+        for (ReportFeeMonthStatisticsDto aReportFeeMonthStatisticsDto : reportAllFeeMonthStatisticsDtos) {
+            for (ReportFeeMonthStatisticsDto oweReportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
+                String objCount = aReportFeeMonthStatisticsDto.getObjCount();
+                if (aReportFeeMonthStatisticsDto.getFeeName().equals(oweReportFeeMonthStatisticsDto.getFeeName())) {
+                    aReportFeeMonthStatisticsDto.setObjCount(oweReportFeeMonthStatisticsDto.getObjCount());
+                    normalFee = Integer.parseInt(objCount) - Integer.parseInt(oweReportFeeMonthStatisticsDto.getObjCount());
+                    aReportFeeMonthStatisticsDto.setNormalCount(normalFee + "");
+                }
+            }
+        }
+
+
+        ResultVo resultVo = new ResultVo(reportAllFeeMonthStatisticsDtos);
 
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
 

+ 1 - 0
service-report/src/main/java/com/java110/report/dao/IReportFeeMonthStatisticsServiceDao.java

@@ -213,4 +213,5 @@ public interface IReportFeeMonthStatisticsServiceDao {
     List<Map> queryFinishOweFee(Map info) throws DAOException;
 
 
+    List<Map> queryAllPaymentCount(Map beanCovertMap);
 }

+ 8 - 0
service-report/src/main/java/com/java110/report/dao/impl/ReportFeeMonthStatisticsServiceDaoImpl.java

@@ -313,5 +313,13 @@ public class ReportFeeMonthStatisticsServiceDaoImpl extends BaseServiceDao imple
         return businessReportFeeMonthStatisticsInfos;
     }
 
+    @Override
+    public List<Map> queryAllPaymentCount(Map info) {
+        logger.debug("查询费用月统计信息 入参 info : {}", info);
+
+        List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.queryAllPaymentCount", info);
+
+        return businessReportFeeMonthStatisticsInfos;    }
+
 
 }

+ 7 - 0
service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java

@@ -267,6 +267,13 @@ public class ReportFeeMonthStatisticsInnerServiceSMOImpl extends BaseServiceSMO
         return reportFeeMonthStatisticss;
     }
 
+    @Override
+    public List<ReportFeeMonthStatisticsDto> queryAllPaymentCount(@RequestBody  ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+        List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticss = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.queryAllPaymentCount(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)), ReportFeeMonthStatisticsDto.class);
+
+        return reportFeeMonthStatisticss;
+    }
+
 
     public IReportFeeMonthStatisticsServiceDao getReportFeeMonthStatisticsServiceDaoImpl() {
         return reportFeeMonthStatisticsServiceDaoImpl;