java110-bean/src/main/java/com/java110/dto/reportFeeMonthStatistics/ReportFeeMonthStatisticsDto.java
@@ -57,6 +57,9 @@ private String importFeeName; //支付方式 private String primeRate; //应收总金额(小计) private String totalReceivableAmount; @@ -375,4 +378,12 @@ public void setFeeConfigDtos(List<FeeConfigDto> feeConfigDtoS) { FeeConfigDtos = feeConfigDtoS; } public String getPrimeRate() { return primeRate; } public void setPrimeRate(String primeRate) { this.primeRate = primeRate; } } java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
@@ -275,7 +275,8 @@ <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> <select id="queryReportFeeSummary" parameterType="Map" resultType="Map"> select t.fee_year feeYear,t.fee_month feeMonth,SUM(t.receivable_amount) receivableAmount,SUM(t.received_amount) select t.fee_year feeYear,t.fee_month feeMonth,t.create_time createTime,SUM(t.receivable_amount) receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount from report_fee_month_statistics t left join building_room br on t.obj_id = br.room_id and t.obj_type = '3333' and br.status_cd = '0' @@ -381,7 +382,8 @@ <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> <select id="queryReportFloorUnitFeeSummary" parameterType="Map" resultType="Map"> select t.fee_year feeYear,t.fee_month feeMonth, f.floor_num floorNum, bu.unit_num unitNum, select t.fee_year feeYear,t.fee_month feeMonth, f.floor_num floorNum, bu.unit_num unitNum,t.create_time createTime, SUM(t.receivable_amount) receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount from report_fee_month_statistics t INNER JOIN building_room br on t.obj_id = br.room_id and br.status_cd = '0' @@ -488,7 +490,7 @@ <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> <select id="queryFeeBreakdown" parameterType="Map" resultType="Map"> select t.fee_name feeName,pfc.start_time feeCreateTime,SUM(t.receivable_amount) select t.fee_name feeName,pfc.start_time feeCreateTime,t.create_time createTime,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' @@ -597,8 +599,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) receivableAmount,SUM(t.received_amount) receivedAmount, SUM(t.owe_amount) oweAmount deadlineTime,t.create_time createTime,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' left join building_room br on t.obj_id = br.room_id and t.obj_type = '3333' and br.status_cd = '0' @@ -756,7 +758,8 @@ <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> <select id="queryOweFeeDetail" parameterType="Map" resultType="Map"> select t.obj_name objName,t.fee_name feeName,t.fee_create_time feeCreateTime,SUM(t.receivable_amount) select t.obj_name objName,t.fee_name feeName,t.fee_create_time feeCreateTime,t.create_time createTime,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' @@ -815,7 +818,7 @@ from ( select pfc.fee_name feeName,f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,oc.car_num carNum, 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 t.receivable_amount receivableAmount,t.received_amount receivedAmount,d.name 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' @@ -823,6 +826,8 @@ 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 t_dict d on t.prime_rate = d.status_cd and d.table_name="pay_fee_detail" and d.table_columns="prime_rate" where t.status_cd = '0' <if test="roomNum !=null and roomNum != ''"> and br.room_num= #{roomNum} @@ -857,6 +862,9 @@ <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="primeRate != null and primeRate != ''"> and t.prime_rate = #{primeRate} </if> <if test="startTime !=null"> and t.create_time >= #{startTime} </if> @@ -871,7 +879,7 @@ select pfc.fee_name feeName,f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,oc.car_num carNum, 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 importFeeName,t.prime_rate,d.name primeRate 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' @@ -916,6 +924,9 @@ <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="primeRate != null and primeRate != ''"> and t.prime_rate = #{primeRate} </if> <if test="startTime !=null"> and t.create_time >= #{startTime} </if> @@ -925,6 +936,61 @@ order by t.create_time desc <if test="page != -1 and page != null "> limit #{page}, #{row} </if> </select> <select id="queryAllPayFeeDetail" parameterType="Map" resultType="Map"> select SUM(t.receivable_amount) allReceivableAmount,SUM(t.received_amount) allReceivedAmount 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' left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0' 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' where t.status_cd = '0' <if test="roomNum !=null and roomNum != ''"> and br.room_num= #{roomNum} </if> <if test="unitId !=null and unitId != ''"> and bu.unit_id= #{unitId} </if> <if test="floorId !=null and floorId != ''"> and f.floor_id = #{floorId} </if> <if test="objName !=null and objName != ''"> and t.obj_name= #{objName} </if> <if test="feeYear !=null and feeYear != ''"> and t.fee_year= #{feeYear} </if> <if test="feeMonth !=null and feeMonth != ''"> and t.fee_month= #{feeMonth} </if> <if test="feeId !=null and feeId != ''"> and t.fee_id= #{feeId} </if> <if test="configId !=null and configId != ''"> and t.config_id= #{configId} </if> <if test="objId !=null and objId != ''"> and t.obj_id= #{objId} </if> <if test="feeName !=null and feeName != ''"> and t.fee_name= #{feeName} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="primeRate != null and primeRate != ''"> and t.prime_rate = #{primeRate} </if> <if test="startTime !=null"> and t.create_time >= #{startTime} </if> <if test="endTime !=null"> and t.create_time <= #{endTime} </if> </select> @@ -1169,6 +1235,8 @@ and t.bill_type = td3.status_cd and td3.table_name = 'pay_fee_config' and td3.table_columns = 'bill_type' and t.is_default = 'F' and t.status_cd = '0' <if test="feeTypeCd !=null and feeTypeCd != ''"> and t.fee_type_cd= #{feeTypeCd} </if> @@ -1178,14 +1246,8 @@ <if test="additionalAmount !=null and additionalAmount != ''"> and t.additional_amount= #{additionalAmount} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="squarePrice !=null and squarePrice != ''"> and t.square_price= #{squarePrice} </if> <if test="isDefault !=null and isDefault != ''"> and t.is_default= #{isDefault} </if> <if test="configId !=null and configId != ''"> and t.config_id= #{configId} java110-interface/src/main/java/com/java110/intf/report/IReportFeeMonthStatisticsInnerServiceSMO.java
@@ -189,6 +189,15 @@ List<ReportFeeMonthStatisticsDto> queryPayFeeDetail(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto); /** * 查询费用汇总表总费用 * * @param reportFeeMonthStatisticsDto * @return */ @RequestMapping(value = "/queryAllPayFeeDetail", method = RequestMethod.POST) List<ReportFeeMonthStatisticsDto> queryAllPayFeeDetail(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto); /** * 查询费用汇总表个数 * * @param reportFeeMonthStatisticsDto service-front/src/main/java/com/java110/front/smo/fee/impl/ListPayFeeSMOImpl.java
@@ -48,7 +48,7 @@ int row = paramIn.getInteger("row"); paramIn.put("storeId", result.getStoreId()); paramIn.put("page", (page - 1) * row); paramIn.put("row", page * row); paramIn.put("row", row); String apiUrl = ""; if (!paramIn.containsKey("payObjType") || "3333".equals(paramIn.getString("payObjType"))) { @@ -56,7 +56,7 @@ } else if ("6666".equals(paramIn.getString("payObjType"))) { apiUrl = ServiceConstant.SERVICE_API_URL + "/api/api.getParkingSpacePayFee" + mapToUrlParam(paramIn); } else { apiUrl = ServiceConstant.SERVICE_API_URL + "/api/api.getParkingSpacePayFee" + mapToUrlParam(paramIn); apiUrl = ServiceConstant.SERVICE_API_URL + "/api/api.getListPayFee" + mapToUrlParam(paramIn); } service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java
@@ -137,8 +137,8 @@ reportFeeMonthStatisticsDto.setUnitNum(unitNum); reportFeeMonthStatisticsDto.setRoomId(roomId); reportFeeMonthStatisticsDto.setRoomNum(roomNum); reportFeeMonthStatisticsDto.setStartTime(StringUtil.isEmpty(startTime) ? null : startTime + "-01"); reportFeeMonthStatisticsDto.setEndTime(StringUtil.isEmpty(endTime) ? null : endTime + "-01"); reportFeeMonthStatisticsDto.setStartTime(startTime); reportFeeMonthStatisticsDto.setEndTime(endTime); return getReportFeeMonthStatisticsBMOImpl.queryReportFeeSummary(reportFeeMonthStatisticsDto); } @@ -172,8 +172,8 @@ reportFeeMonthStatisticsDto.setUnitNum(unitNum); reportFeeMonthStatisticsDto.setRoomId(roomId); reportFeeMonthStatisticsDto.setRoomNum(roomNum); reportFeeMonthStatisticsDto.setStartTime(StringUtil.isEmpty(startTime) ? null : startTime + "-01"); reportFeeMonthStatisticsDto.setEndTime(StringUtil.isEmpty(endTime) ? null : endTime + "-01"); reportFeeMonthStatisticsDto.setStartTime(startTime); reportFeeMonthStatisticsDto.setEndTime(endTime); return getReportFeeMonthStatisticsBMOImpl.queryReportFloorUnitFeeSummary(reportFeeMonthStatisticsDto); } @@ -207,8 +207,8 @@ reportFeeMonthStatisticsDto.setUnitNum(unitNum); reportFeeMonthStatisticsDto.setRoomId(roomId); reportFeeMonthStatisticsDto.setRoomNum(roomNum); reportFeeMonthStatisticsDto.setStartTime(StringUtil.isEmpty(startTime) ? null : startTime + "-01"); reportFeeMonthStatisticsDto.setEndTime(StringUtil.isEmpty(endTime) ? null : endTime + "-01"); reportFeeMonthStatisticsDto.setStartTime(startTime); reportFeeMonthStatisticsDto.setEndTime(endTime); return getReportFeeMonthStatisticsBMOImpl.queryFeeBreakdown(reportFeeMonthStatisticsDto); } @@ -231,7 +231,7 @@ @RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "feeName", required = false) String feeName, @RequestParam(value = "configId",required = false) String configId, @RequestParam(value = "configId", required = false) String configId, @RequestParam(value = "page") int page, @RequestParam(value = "row") int row) { ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = new ReportFeeMonthStatisticsDto(); @@ -246,8 +246,8 @@ reportFeeMonthStatisticsDto.setRoomNum(roomNum); reportFeeMonthStatisticsDto.setFeeName(feeName); reportFeeMonthStatisticsDto.setConfigId(configId); reportFeeMonthStatisticsDto.setStartTime(StringUtil.isEmpty(startTime) ? null : startTime + "-01"); reportFeeMonthStatisticsDto.setEndTime(StringUtil.isEmpty(endTime) ? null : endTime + "-01"); reportFeeMonthStatisticsDto.setStartTime(startTime); reportFeeMonthStatisticsDto.setEndTime(endTime); return getReportFeeMonthStatisticsBMOImpl.queryFeeDetail(reportFeeMonthStatisticsDto); } @@ -281,8 +281,8 @@ reportFeeMonthStatisticsDto.setUnitNum(unitNum); reportFeeMonthStatisticsDto.setRoomId(roomId); reportFeeMonthStatisticsDto.setRoomNum(roomNum); reportFeeMonthStatisticsDto.setStartTime(StringUtil.isEmpty(startTime) ? null : startTime + "-01"); reportFeeMonthStatisticsDto.setEndTime(StringUtil.isEmpty(endTime) ? null : endTime + "-01"); reportFeeMonthStatisticsDto.setStartTime(startTime); reportFeeMonthStatisticsDto.setEndTime(endTime); return getReportFeeMonthStatisticsBMOImpl.queryOweFeeDetail(reportFeeMonthStatisticsDto); } @@ -302,6 +302,7 @@ @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 = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "page") int page, @@ -316,8 +317,9 @@ reportFeeMonthStatisticsDto.setUnitNum(unitNum); reportFeeMonthStatisticsDto.setRoomId(roomId); reportFeeMonthStatisticsDto.setRoomNum(roomNum); reportFeeMonthStatisticsDto.setStartTime(StringUtil.isEmpty(startTime) ? null : startTime + "-01"); reportFeeMonthStatisticsDto.setEndTime(StringUtil.isEmpty(endTime) ? null : endTime + "-01"); reportFeeMonthStatisticsDto.setPrimeRate(primeRate); reportFeeMonthStatisticsDto.setStartTime(startTime); reportFeeMonthStatisticsDto.setEndTime(endTime); return getReportFeeMonthStatisticsBMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto); } service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
@@ -187,9 +187,28 @@ int count = Integer.parseInt(countInfo.get("count").toString()); List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; List<ReportFeeMonthStatisticsDto> reportList = new ArrayList<>(); //应收总金额(大计) Double allReceivableAmount = 0.0; //实收金额(大计) Double allReceivedAmount = 0.0; if (count > 0) { reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto); List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsList = reportFeeMonthStatisticsInnerServiceSMOImpl.queryAllPayFeeDetail(reportFeeMonthStatisticsDto); allReceivableAmount = Double.valueOf(reportFeeMonthStatisticsList.get(0).getAllReceivableAmount()); allReceivedAmount = Double.valueOf(reportFeeMonthStatisticsList.get(0).getAllReceivedAmount()); //应收总金额(小计) Double totalReceivableAmount = 0.0; //实收总金额(小计) Double totalReceivedAmount = 0.0; for (ReportFeeMonthStatisticsDto reportFeeMonthStatistics : reportFeeMonthStatisticsDtos) { //应收金额 Double receivableAmount = Double.valueOf(reportFeeMonthStatistics.getReceivableAmount()); //实收金额 Double receivedAmount = Double.valueOf(reportFeeMonthStatistics.getReceivedAmount()); totalReceivableAmount = totalReceivableAmount + receivableAmount; totalReceivedAmount = totalReceivedAmount + receivedAmount; } for (ReportFeeMonthStatisticsDto tmpReportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) { if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(tmpReportFeeMonthStatisticsDto.getPayerObjType())) { tmpReportFeeMonthStatisticsDto.setObjName(tmpReportFeeMonthStatisticsDto.getFloorNum() @@ -202,13 +221,25 @@ if (!StringUtil.isEmpty(tmpReportFeeMonthStatisticsDto.getImportFeeName())) { tmpReportFeeMonthStatisticsDto.setFeeName(tmpReportFeeMonthStatisticsDto.getImportFeeName()); } //应收金额(小计) tmpReportFeeMonthStatisticsDto.setTotalReceivableAmount(String.format("%.2f", totalReceivableAmount)); //实收金额(小计) tmpReportFeeMonthStatisticsDto.setTotalReceivedAmount(String.format("%.2f", totalReceivedAmount)); //应收金额(大计) tmpReportFeeMonthStatisticsDto.setAllReceivableAmount(String.format("%.2f", allReceivableAmount)); //实收金额(大计) tmpReportFeeMonthStatisticsDto.setAllReceivedAmount(String.format("%.2f", allReceivedAmount)); reportList.add(tmpReportFeeMonthStatisticsDto); } } else { reportFeeMonthStatisticsDtos = new ArrayList<>(); reportList.addAll(reportFeeMonthStatisticsDtos); } FeeDetailResultVo resultVo = new FeeDetailResultVo(countInfo.getDouble("totalReceivableAmount"), countInfo.getDouble("totalReceivedAmount"), (int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportFeeMonthStatisticsDtos); /*FeeDetailResultVo resultVo = new FeeDetailResultVo(countInfo.getDouble("totalReceivableAmount"), countInfo.getDouble("totalReceivedAmount"), (int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportList);*/ ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportList); ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); service-report/src/main/java/com/java110/report/dao/IReportFeeMonthStatisticsServiceDao.java
@@ -184,6 +184,8 @@ List<Map> queryPayFeeDetail(Map info) throws DAOException; List<Map> queryAllPayFeeDetail(Map info) throws DAOException; List<Map> queryDeadlineFee(Map info) throws DAOException; /** @@ -233,6 +235,7 @@ /** * 查询费用配置信息(instance过程) * 根据bId 查询费用配置信息 * * @param info bId 信息 * @return 费用配置信息 * @throws DAOException DAO异常 service-report/src/main/java/com/java110/report/dao/impl/ReportFeeMonthStatisticsServiceDaoImpl.java
@@ -235,6 +235,15 @@ } @Override public List<Map> queryAllPayFeeDetail(Map info) throws DAOException { logger.debug("查询费用总数月统计信息 入参 info : {}", info); List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.queryAllPayFeeDetail", info); return businessReportFeeMonthStatisticsInfos; } @Override public int queryDeadlineFeeCount(Map info) { logger.debug("查询费用月统计数据 入参 info : {}", info); service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java
@@ -225,6 +225,13 @@ } @Override public List<ReportFeeMonthStatisticsDto> queryAllPayFeeDetail(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticss = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.queryAllPayFeeDetail(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)), ReportFeeMonthStatisticsDto.class); return reportFeeMonthStatisticss; } @Override public int queryDeadlineFeeCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { return reportFeeMonthStatisticsServiceDaoImpl.queryDeadlineFeeCount(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)); }