chengf
2025-09-05 cf7052bd8f8516516d6f424b4df35c6329ee1d16
报表完善0905
8个文件已修改
3个文件已添加
296 ■■■■ 已修改文件
java110-db/src/main/resources/mapper/fee/ReportFeeServiceDaoImplMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/store/ContractServiceDaoImplMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-acct/src/main/java/com/java110/acct/payment/adapt/fuiou/FuiouPaymentFactoryAdapt.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/importData/adapt/ImportContractDataCleaningAdapt.java 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/smo/assetImport/impl/AssetImportSMOImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/cmd/fee/ReportFeeCmd.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/feeMonth/PayFeeMonthImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-job/src/main/java/com/java110/job/export/adapt/ReportPropertyFeesAdapt.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-job/src/main/java/com/java110/job/importData/adapt/ImportHistoryFeeDetailQueueDataAdapt.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot/src/main/resources/application-dev-local.yml 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot/src/main/resources/application.yml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/fee/ReportFeeServiceDaoImplMapper.xml
@@ -10,7 +10,7 @@
        ROUND(
        CASE
        WHEN SUM(CASE WHEN f.detail_year BETWEEN ${startYear} AND ${endYear} THEN f.receivable_amount ELSE 0 END) = 0 THEN 0
        ELSE SUM(CASE WHEN f.detail_year BETWEEN ${startYear} AND ${endYear} AND f.detail_id != -1 THEN d.received_amount ELSE 0 END)
        ELSE SUM(CASE WHEN f.detail_year BETWEEN ${startYear} AND ${endYear} AND f.detail_id != -1 THEN f.received_amount ELSE 0 END)
        / SUM(CASE WHEN f.detail_year BETWEEN ${startYear} AND ${endYear} THEN f.receivable_amount ELSE 0 END) * 100
        END, 2
        ) AS '当年收缴率',
@@ -23,7 +23,7 @@
        <foreach collection="yearList" item="year" separator=",">
            <if test="year != endYear">  <!-- 排除最后一年,最后一年单独处理为“当年实缴” -->
                ROUND(SUM(CASE
                WHEN YEAR(d.create_time) = ${year} AND f.detail_id != -1 THEN d.received_amount
                WHEN YEAR(d.create_time) = ${year} AND f.detail_id != -1 THEN f.received_amount
                ELSE 0
                END), 2) AS '${year}年实缴'
            </if>
@@ -40,7 +40,7 @@
            ELSE 0 END), 2) AS '当年${month}月实缴'
        </foreach>,
        ROUND(AVG(CASE WHEN f.detail_year BETWEEN ${startYear} AND ${endYear} THEN f.receivable_amount ELSE NULL END), 2) AS '每月费用',
        ROUND(SUM(CASE WHEN f.detail_year BETWEEN ${startYear} AND ${endYear} THEN f.receivable_amount ELSE 0 END) / COUNT(DISTINCT CASE WHEN f.detail_year BETWEEN 2018 AND 2025 THEN CONCAT(f.detail_year, '-', f.detail_month) END), 2) AS '每月费用',
        COUNT(DISTINCT CASE WHEN f.detail_year BETWEEN ${startYear} AND ${endYear} THEN CONCAT(f.detail_year, '-', f.detail_month) END) AS '应收月份数',
        CASE
java110-db/src/main/resources/mapper/store/ContractServiceDaoImplMapper.xml
@@ -260,7 +260,7 @@
            , t.c_partya_id= #{cPartyaId}
        </if>
        <if test="communityId != null and communityId != ''">
            and t.community_id = #{communityId}
            , t.community_id = #{communityId}
        </if>
        where 1=1
        <if test="contractId !=null and contractId != ''">
service-acct/src/main/java/com/java110/acct/payment/adapt/fuiou/FuiouPaymentFactoryAdapt.java
@@ -229,7 +229,7 @@
            paramMap.put("order_amt", PayUtil.moneyToIntegerStr(payAmount));
            paramMap.put("mchnt_order_no", orderNum);
            paramMap.put("txn_begin_ts", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_DEFAULT));
            paramMap.put("goods_des", "cesdasw");
            paramMap.put("goods_des", feeName);
            paramMap.put("term_id", "abcdefgh");
            paramMap.put("term_ip", PayUtil.getLocalIp());
            paramMap.put("notify_url", notifyUrl + "?wId=" + WechatFactory.getWId(smallWeChatDto.getAppId()));
@@ -258,7 +258,7 @@
        paramMap.put("order_amt", PayUtil.moneyToIntegerStr(payAmount));
        paramMap.put("mchnt_order_no", orderNum);
        paramMap.put("txn_begin_ts", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_DEFAULT));
        paramMap.put("goods_des", "cesdasw");
        paramMap.put("goods_des", feeName);
        paramMap.put("term_id", "abcdefgh");
        paramMap.put("term_ip", PayUtil.getLocalIp());
        paramMap.put("notify_url", notifyUrl + "?wId=" + WechatFactory.getWId(smallWeChatDto.getAppId()));
service-api/src/main/java/com/java110/api/importData/adapt/ImportContractDataCleaningAdapt.java
New file
@@ -0,0 +1,105 @@
package com.java110.api.importData.adapt;
import com.alibaba.fastjson.JSONObject;
import com.java110.api.importData.DefaultImportDataAdapt;
import com.java110.api.importData.IImportDataCleaningAdapt;
import com.java110.dto.PropertyWhiteListFlowDto;
import com.java110.dto.system.ComponentValidateResult;
import com.java110.intf.fee.IPayFeeBatchV1InnerServiceSMO;
import com.java110.intf.user.IUserInnerServiceSMO;
import com.java110.utils.util.Assert;
import com.java110.utils.util.ImportExcelUtils;
import com.java110.utils.util.StringUtil;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service("importContractDataCleaning")
public class ImportContractDataCleaningAdapt extends DefaultImportDataAdapt implements IImportDataCleaningAdapt {
    @Autowired
    private IPayFeeBatchV1InnerServiceSMO payFeeBatchV1InnerServiceSMOImpl;
    @Autowired
    private IUserInnerServiceSMO userInnerServiceSMOImpl;
    @Override
    public List analysisExcel(Workbook workbook, JSONObject paramIn, ComponentValidateResult result) throws Exception {
        generatorBatch(paramIn);
        List<PropertyWhiteListFlowDto> whiteLists = new ArrayList<PropertyWhiteListFlowDto>();
        //获取车辆信息
        getPropertyWhiteListFlowDtos(workbook, whiteLists);
        for (PropertyWhiteListFlowDto whiteList : whiteLists){
            whiteList.setCommunityId(paramIn.getString("communityId"));
        }
        return whiteLists;
    }
    private void getPropertyWhiteListFlowDtos(Workbook workbook, List<PropertyWhiteListFlowDto> whiteLists) {
        Sheet sheet = null;
        sheet = ImportExcelUtils.getSheet(workbook, "白单流水(归档数据)");
        List<Object[]> oList = ImportExcelUtils.listFromSheet(sheet);
        PropertyWhiteListFlowDto white = null;
        for (int osIndex = 0; osIndex < oList.size(); osIndex++) {
            Object[] os = oList.get(osIndex);
            if (osIndex == 0) { // 第一行是 头部信息 直接跳过
                continue;
            }
            if (StringUtil.isNullOrNone(os[0])) {
                continue;
            }
            Assert.hasValue(os[0], (osIndex + 1) + "行收费日期不能为空");
            white = new PropertyWhiteListFlowDto();
            String chargeTime = excelDoubleToDate(os[0].toString());
            String changeStart = os[21] == null ? null : excelDoubleToDate(os[21].toString());
            String changeEnd = os[22] == null ? null : excelDoubleToDate(os[22].toString());
            String bankDepositDate =  os[8] == null ? null : excelDoubleToDate(os[8].toString());
            String inputTime = null;
            if(os[16] != null){
                inputTime = excelDoubleToDate(os[16].toString().split("\\.")[0]);
            }
            white.setChargeTime(chargeTime);
            white.setInvoiceReceiptNo(os[1] == null ? null : os[1].toString());
            white.setRoomId(os[2] == null ? null : os[2].toString());
            white.setPropertyAddress(os[3] == null ? null : os[3].toString());
            white.setDoorRoomNum(os[4] == null ? null : os[4].toString());
            white.setSecondaryFeeTypeCd(os[5] == null ? null : os[5].toString());
            white.setChargeAmount(os[6] == null ? null : os[6].toString());
            white.setCharger(os[7] == null ? null : os[7].toString());
            white.setBankDepositDate(bankDepositDate);
            white.setBankDepositor(os[9] == null ? null : os[9].toString());
            white.setSplitBankDepositAmount(os[10] == null ? null : os[10].toString());
            white.setBankDepositAmount(os[11] == null ? null : os[11].toString());
            white.setCheckAmount(os[12] == null ? null : os[12].toString());
            white.setWhiteListArchiveNo(os[13] == null ? null : os[13].toString());
            white.setSheetCount(os[14] == null ? null : os[14].toString());
            white.setFinancialReceiver(os[15] == null ? null : os[15].toString());
            white.setInputTime(inputTime);
            white.setInputPerson(os[17] == null ? null : os[17].toString());
            white.setOrderNo(os[18] == null ? null : os[18].toString());
            white.setLicensePlate(os[19] == null ? null : os[19].toString());
            white.setCategory22(os[20] == null ? null : os[20].toString());
            white.setChargeStart(changeStart);
            white.setChargeEnd(changeEnd);
            white.setRow(osIndex + 1);
            whiteLists.add(white);
        }
    }
    /**
     * 生成批次号
     *
     * @param reqJson
     */
}
service-api/src/main/java/com/java110/api/smo/assetImport/impl/AssetImportSMOImpl.java
@@ -32,6 +32,7 @@
import org.slf4j.Logger;
import com.java110.core.log.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@@ -59,7 +60,8 @@
    /**
     * 导入最大行数
     */
    public static final int MAX_LINE = 10000;
    @Value("${import.line.max}")
    public int MAX_LINE;
    /**
     * 导入最大行数
service-fee/src/main/java/com/java110/fee/cmd/fee/ReportFeeCmd.java
@@ -157,6 +157,22 @@
        double[] col4Fee = new double[doYear - 1 + 20];
        double[] colByCar = new double[doYear - 1 + 20];
        double[] colByOther = new double[doYear - 1 + 20];
        LinkedList carFeeList = new LinkedList();
        FeeDto fee = new FeeDto();
        fee.setCurYear("停车费合计(3+...+7)");
        fee.setReport(colByCar);
        fee.setRow(0);
        carFeeList.add(fee);
        LinkedList otherFeeList = new LinkedList();
        FeeDto fee2 = new FeeDto();
        fee2.setCurYear("其他类合计(8+...+22)");
        fee2.setReport(colByOther);
        fee2.setRow(0);
        otherFeeList.add(fee2);
        reportFeeDtoLists.add(col1);
        reportFeeDtoLists.add(col2);
        reportFeeDtoLists.add(col2);
@@ -205,12 +221,12 @@
                        for(int i = 0 ; i < doubles.length ; i++){
                            if(i == 3){
                                if (doubles[i] != 0){
                                    col1Fee[i] = (doubles[i]+col1Fee[i])/2;
                                    col2Fee[i] = (doubles[i]+col2Fee[i])/2;
                                    col1Fee[i] = doubleUse((doubles[i]+col1Fee[i])/2);
                                    col2Fee[i] = doubleUse((doubles[i]+col2Fee[i])/2);
                                }
                            }else{
                                col1Fee[i] = doubleUse(doubles[i]+col1Fee[i]);
                                col2Fee[i] = doubleUse(doubles[i]+col1Fee[i]);
                                col2Fee[i] = doubleUse(doubles[i]+col2Fee[i]);
                            }
                        }
                    }
@@ -218,24 +234,24 @@
                        for(int i = 0 ; i < doubles.length ; i++){
                            if(i == 3){
                                if (doubles[i] != 0){
                                    col1Fee[i] = (doubles[i]+col1Fee[i])/2;
//                                    col2Fee[i] = (doubles[i]+col2Fee[i])/2;
                                    col1Fee[i] = doubleUse((doubles[i]+col1Fee[i])/2);
                                    colByCar[i] = doubleUse((doubles[i]+colByCar[i])/2);
                                }
                            }else{
                                col1Fee[i] = doubleUse(doubles[i]+col1Fee[i]);
//                                col2Fee[i] += doubleUse(doubles[i]);
                                colByCar[i] = doubleUse(colByCar[i] + doubles[i]);
                            }
                        }
                    }else{
                        for(int i = 0 ; i < doubles.length ; i++){
                            if(i == 3){
                                if (doubles[i] != 0){
                                    col1Fee[i] = (doubles[i]+col1Fee[i])/2;
//                                    col2Fee[i] = (doubles[i]+col2Fee[i])/2;
                                    col1Fee[i] = doubleUse((doubles[i]+col1Fee[i])/2);
                                    colByOther[i] = doubleUse((doubles[i]+colByOther[i])/2);
                                }
                            }else{
                                col1Fee[i] = doubleUse(doubles[i]+col1Fee[i]);
//                                col2Fee[i] += doubleUse(doubles[i]);
                                colByOther[i] = doubleUse(colByOther[i] + doubles[i]);
                            }
                        }
                    }
@@ -265,7 +281,7 @@
                    if(map.get("费用所属年份").equals(i+"") && map.get("fee_type_cd").equals(dictDto1.getStatusCd())){
                        double[] doubles = new double[doYear - 1 + 20];
                        doubles[0] = doubleUse(((BigDecimal) map.get("该年应缴总额")).doubleValue());
                        doubles[1] = doubleUse(((BigDecimal) map.get("每月费用")).doubleValue());
                        doubles[1] = map.get("每月费用") == null ? 0 : doubleUse(((BigDecimal) map.get("每月费用")).doubleValue());
                        doubles[2] = doubleUse(((Long) map.get("应收月份数")).doubleValue());
                        doubles[3] = doubleUse(((BigDecimal) map.get("当年收缴率")).doubleValue());
                        doubles[4] = doubleUse(((BigDecimal) map.get("折扣金额")).doubleValue());
@@ -318,20 +334,16 @@
                reportFeeDtoLists.add(linkedList);
            }
            if (ind == 3){
                LinkedList linkedList = new LinkedList();
                FeeDto feeDto1 = new FeeDto();
                feeDto1.setCurYear("停车费合计(3+...+7)");
                feeDto1.setReport(colByCar);
                linkedList.add(feeDto1);
                reportFeeDtoLists.add(linkedList);
//                fee.setCurYear("停车费合计(3+...+7)");
//                fee.setReport(colByCar);
//                carFeeList.add(fee);
                reportFeeDtoLists.add(carFeeList);
            }
            if (ind == 8){
                LinkedList linkedList = new LinkedList();
                FeeDto feeDto1 = new FeeDto();
                feeDto1.setCurYear("其他类合计(8+...+22)");
                feeDto1.setReport(colByOther);
                linkedList.add(feeDto1);
                reportFeeDtoLists.add(linkedList);
//                fee2.setCurYear("其他类合计(8+...+22)");
//                fee2.setReport(colByOther);
//                otherFeeList.add(fee2);
                reportFeeDtoLists.add(otherFeeList);
            }
            ind ++;
        }
service-fee/src/main/java/com/java110/fee/feeMonth/PayFeeMonthImpl.java
@@ -226,7 +226,7 @@
    private void maxMonthDateToDeadlineTimeData(FeeDto feeDto, PayFeeMonthOwnerDto payFeeMonthOwnerDto, Double feePrice) {
        //todo 处理已经交过费的记录处理
        payFeeMonthHelp.waitDispersedFeeDetail(feeDto, payFeeMonthOwnerDto, feePrice);
//        payFeeMonthHelp.waitDispersedFeeDetail(feeDto, payFeeMonthOwnerDto, feePrice);
        //todo 处理 endTime 到 deadlineTime 的费用
service-job/src/main/java/com/java110/job/export/adapt/ReportPropertyFeesAdapt.java
New file
@@ -0,0 +1,15 @@
package com.java110.job.export.adapt;
import com.java110.dto.data.ExportDataDto;
import com.java110.job.export.IExportDataAdapt;
import org.springframework.stereotype.Service;
import java.text.ParseException;
@Service("reportPropertyFees")
public class ReportPropertyFeesAdapt implements IExportDataAdapt {
    @Override
    public Object exportData(ExportDataDto exportDataDto) throws ParseException {
        return null;
    }
}
service-job/src/main/java/com/java110/job/importData/adapt/ImportHistoryFeeDetailQueueDataAdapt.java
@@ -169,7 +169,7 @@
                carInout.setInTime(JSONObject.parseObject(assetImportLogDetailDto.getContent().toString()).getString("chargeStart"));
                carInout.setStatusCd("0");
                carInout.setCreateTime(JSONObject.parseObject(assetImportLogDetailDto.getContent().toString()).getString("inputTime"));
                carInout.setCreateTime(JSONObject.parseObject(assetImportLogDetailDto.getContent().toString()).getString("chargeTime"));
                carInout.setbId(JSONObject.parseObject(assetImportLogDetailDto.getContent().toString()).getString("batchId"));
                carInout.setInoutId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_inoutId));
@@ -207,7 +207,7 @@
                importRoomFee.setDetailId(assetImportLogDetailDto.getDetailId());
                importRoomFee.setStartTime(data.getString("chargeStart"));
                importRoomFee.setEndTime(data.getString("chargeEnd").split(" ")[0]+" 23:59:59");
                importRoomFee.setCreateTime(data.getString("inputTime"));
                importRoomFee.setCreateTime(data.getString("chargeTime"));
                importRoomFee.setReceivableAmount(data.getString("bankDepositAmount"));
                importRoomFee.setAmount(data.getString("chargeAmount"));
                importRoomFee.setStaffName(data.getString("charger"));
@@ -226,7 +226,7 @@
                importRoomFee.setDetailId(assetImportLogDetailDto.getDetailId());
                importRoomFee.setStartTime(data.getString("chargeStart"));
                importRoomFee.setEndTime(data.getString("chargeEnd").split(" ")[0]+" 23:59:59");
                importRoomFee.setCreateTime(data.getString("inputTime"));
                importRoomFee.setCreateTime(data.getString("chargeTime"));
                importRoomFee.setReceivableAmount(data.getString("bankDepositAmount"));
                importRoomFee.setAmount(data.getString("chargeAmount"));
                importRoomFee.setCarNum(data.getString("licensePlate"));
@@ -245,7 +245,7 @@
                importRoomFee.setDetailId(assetImportLogDetailDto.getDetailId());
                importRoomFee.setStartTime(data.getString("chargeStart"));
                importRoomFee.setEndTime(data.getString("chargeEnd").split(" ")[0]+" 23:59:59");
                importRoomFee.setCreateTime(data.getString("inputTime"));
                importRoomFee.setCreateTime(data.getString("chargeTime"));
                importRoomFee.setReceivableAmount(data.getString("bankDepositAmount"));
                importRoomFee.setAmount(data.getString("chargeAmount"));
                importRoomFee.setStaffName(data.getString("charger"));
springboot/src/main/resources/application-dev-local.yml
New file
@@ -0,0 +1,89 @@
server:
  port: 8008
  tomcat:
    uri-encoding: UTF-8
fuiou:
  pay:
    unified-order-url: https://aipay-cloud.fuioupay.com/aggregatePay/preCreate
    wx-order-url: https://aipay-cloud.fuioupay.com/aggregatePay/wxPreCreate
    env: dev
spring:
  servlet:
    multipart:
      maxFileSize: 50MB
      maxRequestSize: 50MB
  profiles:
    active: share
  http:
    encoding:
      charset: UTF-8
      enabled: true
      force: true
  application:
    name: boot-service
  redis:
    database: 0
    host: 139.196.252.132
    port: 6379
    password: hc
    pool:
      max-active: 300
      max-wait: 3000
      max-idle: 50
      min-idle: 20
      timeout: 0
  activiti:
    database-schema-update: false
  datasource:
    url: jdbc:mysql://139.196.252.132:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
    username: TT
    password: hc12345678
    type: com.alibaba.druid.pool.DruidDataSource
    driver-class-name: com.mysql.cj.jdbc.Driver
    druid:
      initial-size: 5
      max-active: 10
      min-idle: 5
      max-wait: 60000
feign:
  client:
    config:
      default:
        connect-timeout: 10000
        read-timeout: 20000
#============== kafka ===================
kafka:
  consumer:
    zookeeper:
      connect: dev.zk.java110.com:2181
    servers: dev.kafka.java110.com:9092
    enable:
      auto:
        commit: true
    session:
      timeout: 6000
    auto:
      commit:
        interval: 100
      offset:
        reset: latest
    topic: test
    group:
      id: communityBusinessStatus
    concurrency: 10
  producer:
    zookeeper:
      connect: dev.zk.java110.com:2181
    servers: dev.kafka.java110.com:9092
    retries: 0
    batch:
      size: 4096
    linger: 1
    buffer:
      memory: 40960
springboot/src/main/resources/application.yml
@@ -1,7 +1,10 @@
spring:
  profiles:
    active: dev
    active: dev-local
import:
  line:
    max: 10000
#  docker build -t lx .
#