Browse Source

运营展示工作单功能完成

wuxw 1 year ago
parent
commit
bdddbb193b

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

@@ -213,6 +213,8 @@ public class ReportFeeMonthStatisticsDto extends PageDto implements Serializable
     private String discountSmallTypeFive;
     private String discountSmallTypeSix;
 
+    private String communityName;
+
     private String fadState;
     private String fadAmount;
 
@@ -1220,4 +1222,12 @@ public class ReportFeeMonthStatisticsDto extends PageDto implements Serializable
     public void setOwnerNameLike(String ownerNameLike) {
         this.ownerNameLike = ownerNameLike;
     }
+
+    public String getCommunityName() {
+        return communityName;
+    }
+
+    public void setCommunityName(String communityName) {
+        this.communityName = communityName;
+    }
 }

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

@@ -1656,7 +1656,7 @@
         t.state,d3.name stateName,t.fee_id feeId,t.detail_id detailId,pf.payer_obj_id payerObjId,
         t.cashier_id cashierId,t.cashier_name cashierName,t.payable_amount payableAmount,pfc.fee_flag feeFlag,
         t.acct_amount acctAmount, t.discount_amount discountAmount, t.deduction_amount deductionAmount, t.late_amount lateAmount,
-        t.gift_amount giftAmount,t.remark
+        t.gift_amount giftAmount,t.remark,t.community_id communityId
         from pay_fee_detail t
         left JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
         left join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0'

+ 50 - 0
service-report/src/main/java/com/java110/report/cmd/fee/QueryAdminPayFeeDetailCmd.java

@@ -0,0 +1,50 @@
+package com.java110.report.cmd.fee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.reportFee.ReportFeeMonthStatisticsDto;
+import com.java110.intf.report.IQueryPayFeeDetailInnerServiceSMO;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.DateUtil;
+import com.java110.utils.util.StringUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.text.ParseException;
+
+@Java110Cmd(serviceCode = "fee.queryAdminPayFeeDetail")
+public class QueryAdminPayFeeDetailCmd extends Cmd {
+    @Autowired
+    private IQueryPayFeeDetailInnerServiceSMO queryPayFeeDetailInnerServiceSMOImpl;
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+        super.validatePageInfo(reqJson);
+        super.validateAdmin(context);
+        String endTime = reqJson.getString("endTime");
+        if (!StringUtil.isEmpty(endTime) && !endTime.contains(":")) {
+            endTime += " 23:59:59";
+            reqJson.put("endTime", endTime);
+        }
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+        ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = BeanConvertUtil.covertBean(reqJson, ReportFeeMonthStatisticsDto.class);
+
+        reportFeeMonthStatisticsDto.setFeeYear(DateUtil.getYear() + "");
+        reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth() + "");
+
+
+        ResultVo resultVo = queryPayFeeDetailInnerServiceSMOImpl.query(reportFeeMonthStatisticsDto);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        context.setResponseEntity(responseEntity);
+    }
+}

+ 3 - 7
service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryPayFeeDetailCmd.java

@@ -25,8 +25,6 @@ import java.util.List;
 
 /**
  * 缴费明细查询
- *
- *
  */
 @Java110Cmd(serviceCode = "/reportFeeMonthStatistics/queryPayFeeDetail")
 public class QueryPayFeeDetailCmd extends Cmd {
@@ -37,7 +35,8 @@ public class QueryPayFeeDetailCmd extends Cmd {
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
         super.validatePageInfo(reqJson);
-        Assert.hasKeyAndValue(reqJson,"communityId","为包含小区");
+        super.validateProperty(context);
+        Assert.hasKeyAndValue(reqJson, "communityId", "为包含小区");
         String endTime = reqJson.getString("endTime");
         if (!StringUtil.isEmpty(endTime) && !endTime.contains(":")) {
             endTime += " 23:59:59";
@@ -54,15 +53,12 @@ public class QueryPayFeeDetailCmd extends Cmd {
         reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth() + "");
 
 
-
-        ResultVo resultVo =queryPayFeeDetailInnerServiceSMOImpl.query(reportFeeMonthStatisticsDto);
+        ResultVo resultVo = queryPayFeeDetailInnerServiceSMOImpl.query(reportFeeMonthStatisticsDto);
 
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
 
         context.setResponseEntity(responseEntity);
 
 
-
-
     }
 }

+ 36 - 0
service-report/src/main/java/com/java110/report/smo/impl/QueryPayFeeDetailInnerServiceSMOImpl.java

@@ -2,6 +2,8 @@ package com.java110.report.smo.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.PageDto;
+import com.java110.dto.community.CommunityDto;
+import com.java110.dto.repair.RepairDto;
 import com.java110.dto.reportFee.ReportFeeMonthStatisticsPrepaymentDto;
 import com.java110.dto.reportFee.ReportFeeMonthStatisticsPrepaymentTotalDto;
 import com.java110.dto.fee.FeeConfigDto;
@@ -10,6 +12,7 @@ import com.java110.dto.owner.OwnerRoomRelDto;
 import com.java110.dto.reportFee.ReportFeeMonthStatisticsDto;
 import com.java110.dto.reportFee.ReportFeeMonthStatisticsTotalDto;
 import com.java110.dto.room.RoomDto;
+import com.java110.intf.community.ICommunityV1InnerServiceSMO;
 import com.java110.intf.community.IRepairInnerServiceSMO;
 import com.java110.intf.community.IRoomInnerServiceSMO;
 import com.java110.intf.community.IRoomV1InnerServiceSMO;
@@ -67,6 +70,9 @@ public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailI
     @Autowired
     private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl;
 
+    @Autowired
+    private ICommunityV1InnerServiceSMO communityV1InnerServiceSMOImpl;
+
     /**
      * 查询缴费明细
      *
@@ -110,12 +116,42 @@ public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailI
 
         //todo 计算房屋面积 和车位信息
         computeRoomAndParkingSpace(reportFeeMonthStatisticsDtos);
+        refreshCommunityName(reportFeeMonthStatisticsDtos);
 
 
         resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportFeeMonthStatisticsDtos, reportFeeMonthStatisticsTotalDto);
         return resultVo;
     }
 
+    private void refreshCommunityName(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) {
+        if(ListUtil.isNull(reportFeeMonthStatisticsDtos)){
+            return;
+        }
+
+        List<String> communityIds = new ArrayList<>();
+        for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
+            communityIds.add(reportFeeMonthStatisticsDto.getCommunityId());
+        }
+
+        if(ListUtil.isNull(communityIds)){
+            return ;
+        }
+        CommunityDto communityDto = new CommunityDto();
+        communityDto.setCommunityIds(communityIds.toArray(new String[communityIds.size()]));
+        List<CommunityDto> communityDtos = communityV1InnerServiceSMOImpl.queryCommunitys(communityDto);
+        if(ListUtil.isNull(communityDtos)){
+            return;
+        }
+        for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
+            for (CommunityDto tCommunityDto : communityDtos) {
+                if (!reportFeeMonthStatisticsDto.getCommunityId().equals(tCommunityDto.getCommunityId())) {
+                    continue;
+                }
+                reportFeeMonthStatisticsDto.setCommunityName(tCommunityDto.getName());
+            }
+        }
+    }
+
     private void computeRoomAndParkingSpace(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) {
 
         List<String> payerObjIds = new ArrayList<>();