chengf
2025-08-19 c7255cb752c12bf5c0c5e2b8bac0ad82d4cdf71b
费用报表0819
18个文件已修改
1个文件已添加
528 ■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/fee/FeeDto.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/fee/FeePrintPageTemplateDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/dev/DictV1ServiceDaoImplMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/fee/FeePrintPageTemplateV1ServiceDaoImplMapper.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/fee/ReportFeeServiceDaoImplMapper.xml 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-interface/src/main/java/com/java110/intf/fee/IReportFeeInnerServiceSMO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/cmd/smallProgram/QuerySmallProgramAllAdvertCmd.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/smo/impl/SmallProgramAdvertServiceSMOImpl.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/cmd/fee/ReportFeeCmd.java 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/cmd/feePrintPage/ListFeePrintPageCmd.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/cmd/feePrintPage/ListFeePrintPageListCmd.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/dao/IReportFeeServiceDao.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/dao/impl/IReportFeeServiceDaoImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/smo/impl/ReportFeeInnerServiceSMOImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-job/src/main/java/com/java110/job/importData/adapt/ImportCarHistoryFeeDetailQueueDataAdapt.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-job/src/main/java/com/java110/job/importData/adapt/ImportHistoryFeeDetailQueueDataAdapt.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/cmd/owner/SaveOwnerCmd.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/fee/FeeDto.java
@@ -187,6 +187,10 @@
    private double[] report;
    private int[] yearArr;
    private List repostList;
    public String getAmount() {
        return amount;
    }
@@ -211,7 +215,7 @@
        this.feeTypeCd = feeTypeCd;
    }
public String getSecondaryFeeTypeCd() {
    public String getSecondaryFeeTypeCd() {
        return secondaryFeeTypeCd;
    }
@@ -926,4 +930,20 @@
    public void setReport(double[] report) {
        this.report = report;
    }
    public int[] getYearArr() {
        return yearArr;
    }
    public void setYearArr(int[] yearArr) {
        this.yearArr = yearArr;
    }
    public List getRepostList() {
        return repostList;
    }
    public void setRepostList(List repostList) {
        this.repostList = repostList;
    }
}
java110-bean/src/main/java/com/java110/dto/fee/FeePrintPageTemplateDto.java
@@ -25,6 +25,15 @@
    private String statusCd = "0";
    private Integer isDefault;
    public Integer getIsDefault() {
        return isDefault;
    }
    public void setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
    }
    public String getName() {
        return name;
java110-db/src/main/resources/mapper/dev/DictV1ServiceDaoImplMapper.xml
@@ -39,7 +39,7 @@
        <if test="tableName !=null and tableName != ''">
            and t.table_name= #{tableName}
        </if>
        order by t.create_time desc
        order by t.id
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
java110-db/src/main/resources/mapper/fee/FeePrintPageTemplateV1ServiceDaoImplMapper.xml
@@ -6,16 +6,16 @@
    <!-- 保存收据模板信息 add by wuxw 2018-07-03 -->
    <insert id="saveFeePrintPageTemplateInfo" parameterType="Map">
        insert into fee_print_page_template(
        name,template_id,url
        name,template_id,url,is_default
        ) values (
        #{name},#{templateId},#{url}
        #{name},#{templateId},#{url},#{isDefault}
        )
    </insert>
    <!-- 查询收据模板信息 add by wuxw 2018-07-03 -->
    <select id="getFeePrintPageTemplateInfo" parameterType="Map" resultType="Map">
        select t.name,t.status_cd,t.status_cd statusCd,t.template_id,t.template_id templateId,t.url
        select t.name,t.status_cd,t.status_cd statusCd,t.template_id,t.template_id templateId,t.url,t.is_default isDefault
        from fee_print_page_template t
        where 1 =1
        <if test="name !=null and name != ''">
@@ -29,6 +29,9 @@
        </if>
        <if test="url !=null and url != ''">
            and t.url= #{url}
        </if>
        <if test="isDefault !=null and isDefault != ''">
            and t.is_default= #{isDefault}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
@@ -50,6 +53,9 @@
        <if test="url !=null and url != ''">
            , t.url= #{url}
        </if>
        <if test="isDefault !=null and isDefault != ''">
            , t.is_default= #{isDefault}
        </if>
        where 1=1
        <if test="templateId !=null and templateId != ''">
            and t.template_id= #{templateId}
@@ -71,6 +77,9 @@
        <if test="templateId !=null and templateId != ''">
            and t.template_id= #{templateId}
        </if>
        <if test="isDefault !=null and isDefault != ''">
            and t.is_default= #{isDefault}
        </if>
        <if test="url !=null and url != ''">
            and t.url= #{url}
        </if>
java110-db/src/main/resources/mapper/fee/ReportFeeServiceDaoImplMapper.xml
@@ -220,15 +220,179 @@
        AND td.status_cd = pf.fee_type_cd
        WHERE
        pfd.status_cd = '0'
--         AND pfd.community_id = '2025062600070012'
        AND pfd.community_id = #{communityId}
        GROUP BY
        td.name,
        pf.fee_type_cd,
        pfd.community_id,
        YEAR(pfd.create_time)  -- 按年份分组
        ORDER BY
        pf.fee_type_cd,
        td.name,
        YEAR(pfd.create_time);
    </select>
    <select id="repostInFeeTwo" resultType="java.util.Map">
        select
            td1.`name` as '费用类型',
            t.fee_type_cd as '费用类型编码',
    YEAR(t.start_time) as '统计周期',
    -- 每月费用月份数
    MAX(CASE
        WHEN YEAR(t.start_time) = YEAR(bc.create_time) THEN
            12 - MONTH(bc.create_time) + 1  -- 第一年月份数
        ELSE 12  -- 后续年份
    END) as '每月费用月份数',
    -- 当年应缴总金额
    ROUND(SUM(
        CASE
            WHEN t.fee_flag = '1003006' THEN  -- 周期性费用
                ROUND(
                    (CASE
                        WHEN t.fee_flag = '1003006' THEN
                            ROUND(
                                (
                                    TIMESTAMPDIFF(MONTH, t.start_time, LAST_DAY(pfa1.`value`))
                                    + CASE
                                        WHEN DAY(pfa1.`value`) = DAY(LAST_DAY(pfa1.`value`)) THEN 1
                                        ELSE DAY(pfa1.`value`) / DAY(LAST_DAY(pfa1.`value`))
                                    END
                                    / COALESCE(pfc.payment_cycle, 1)
                                ),
                                2
                            )
                        ELSE 0
                    END)
                    *
                    (CASE
                        WHEN pfc.computing_formula = '1001' THEN
                            ROUND(
                                (CASE
                                    WHEN t.payer_obj_type = 3333 THEN COALESCE(br.built_up_area, 0)
                                    WHEN t.payer_obj_type = 6666 THEN COALESCE(ps.area, 0)
                                    ELSE 0
                                END * COALESCE(pfc.square_price, 0) + COALESCE(pfc.additional_amount, 0)),
                                6
                            )
                        WHEN pfc.computing_formula IN ('2002', '3003', '1101', '1102') THEN
                            ROUND(COALESCE(pfc.additional_amount, 0), 6)
                        WHEN pfc.computing_formula = '4004' THEN
                            ROUND(
                                CASE WHEN t.amount = -1 THEN 0 ELSE COALESCE(t.amount, 0) END,
                                6
                            )
                        ELSE 0
                    END),
                    pfc.decimal_place
                )
            WHEN t.fee_flag = '2006012' THEN  -- 一次性费用
                CASE
                    WHEN pfc.computing_formula = '1001' THEN
                        ROUND(
                            (CASE
                                WHEN t.payer_obj_type = 3333 THEN COALESCE(br.built_up_area, 0)
                                WHEN t.payer_obj_type = 6666 THEN COALESCE(ps.area, 0)
                                ELSE 0
                            END * COALESCE(pfc.square_price, 0) + COALESCE(pfc.additional_amount, 0)),
                            pfc.decimal_place
                        )
                    WHEN pfc.computing_formula IN ('2002', '3003', '1101', '1102') THEN
                        ROUND(COALESCE(pfc.additional_amount, 0), pfc.decimal_place)
                    WHEN pfc.computing_formula = '4004' THEN
                        ROUND(
                            CASE WHEN t.amount = -1 THEN 0 ELSE COALESCE(t.amount, 0) END,
                            pfc.decimal_place
                        )
                    ELSE 0
                END
            ELSE 0
        END
    ), 2) as '当年应缴总金额',
    -- 新增:每月费用 = 当年应缴总金额 / 每月费用月份数
    ROUND(
        SUM(
            CASE
                WHEN t.fee_flag = '1003006' THEN
                    ROUND(
                        (CASE
                            WHEN t.fee_flag = '1003006' THEN
                                ROUND(
                                    (
                                        TIMESTAMPDIFF(MONTH, t.start_time, LAST_DAY(pfa1.`value`))
                                        + CASE
                                            WHEN DAY(pfa1.`value`) = DAY(LAST_DAY(pfa1.`value`)) THEN 1
                                            ELSE DAY(pfa1.`value`) / DAY(LAST_DAY(pfa1.`value`))
                                        END
                                        / COALESCE(pfc.payment_cycle, 1)
                                    ),
                                    2
                                )
                            ELSE 0
                        END)
                        *
                        (CASE
                            WHEN pfc.computing_formula = '1001' THEN
                                ROUND(
                                    (CASE
                                        WHEN t.payer_obj_type = 3333 THEN COALESCE(br.built_up_area, 0)
                                        WHEN t.payer_obj_type = 6666 THEN COALESCE(ps.area, 0)
                                        ELSE 0
                                    END * COALESCE(pfc.square_price, 0) + COALESCE(pfc.additional_amount, 0)),
                                    6
                                )
                            WHEN pfc.computing_formula IN ('2002', '3003', '1101', '1102') THEN
                                ROUND(COALESCE(pfc.additional_amount, 0), 6)
                            WHEN pfc.computing_formula = '4004' THEN
                                ROUND(
                                    CASE WHEN t.amount = -1 THEN 0 ELSE COALESCE(t.amount, 0) END,
                                    6
                                )
                            ELSE 0
                        END),
                        pfc.decimal_place
                    )
                WHEN t.fee_flag = '2006012' THEN
                    CASE
                        WHEN pfc.computing_formula = '1001' THEN
                            ROUND(
                                (CASE
                                    WHEN t.payer_obj_type = 3333 THEN COALESCE(br.built_up_area, 0)
                                    WHEN t.payer_obj_type = 6666 THEN COALESCE(ps.area, 0)
                                    ELSE 0
                                END * COALESCE(pfc.square_price, 0) + COALESCE(pfc.additional_amount, 0)),
                                pfc.decimal_place
                            )
                        WHEN pfc.computing_formula IN ('2002', '3003', '1101', '1102') THEN
                            ROUND(COALESCE(pfc.additional_amount, 0), pfc.decimal_place)
                        WHEN pfc.computing_formula = '4004' THEN
                            ROUND(
                                CASE WHEN t.amount = -1 THEN 0 ELSE COALESCE(t.amount, 0) END,
                                pfc.decimal_place
                            )
                        ELSE 0
                    END
                ELSE 0
            END
        ) / MAX(CASE
            WHEN YEAR(t.start_time) = YEAR(bc.create_time) THEN
                12 - MONTH(bc.create_time) + 1
            ELSE 12
        END),
        2
    ) as '每月费用(合计/月份数)'
        from pay_fee t
            inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
            inner join business_community bc on t.community_id = bc.community_id
            left join t_dict td1 on pfc.fee_type_cd = td1.status_cd and td1.table_name = 'pay_fee_config' and td1.table_columns = 'fee_type_cd'
            left join pay_fee_attrs pfa1 on t.fee_id = pfa1.fee_id and pfa1.spec_cd = '390010' and pfa1.status_cd = '0'
            left join building_room br on t.payer_obj_type = 3333 and t.payer_obj_id = br.room_id and br.status_cd = '0'
            left join owner_car oc on t.payer_obj_type = 6666 and t.payer_obj_id = oc.car_id and oc.status_cd = '0'
            left join parking_space ps on oc.ps_id = ps.ps_id and ps.status_cd = '0'
        where 1 = 1
          and t.status_cd = 0
          and t.community_id = #{communityId}
          and pfc.community_id in (#{communityId}, '9999')
        group by td1.`name`, t.fee_type_cd, YEAR(t.start_time)
        order by t.fee_type_cd,YEAR(t.start_time) desc, td1.`name`
    </select>
</mapper>
java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
@@ -6,9 +6,9 @@
    <!-- 保存业主信息 add by wuxw 2018-07-03 -->
    <insert id="saveBusinessOwnerInfo" parameterType="Map">
        insert into business_building_owner(operate, sex, name, link, remark, owner_id, b_id, user_id, age, member_id,
                                            owner_type_cd, community_id, id_card, state, owner_flag, address)
                                            owner_type_cd, community_id, id_card, state, owner_flag, address,other_address)
        values (#{operate}, #{sex}, #{name}, #{link}, #{remark}, #{ownerId}, #{bId}, #{userId}, #{age}, #{memberId},
                #{ownerTypeCd}, #{communityId}, #{idCard}, #{state}, #{ownerFlag}, #{address})
                #{ownerTypeCd}, #{communityId}, #{idCard}, #{state}, #{ownerFlag}, #{address},#{otherAddress})
    </insert>
    <!-- 查询业主信息(Business) add by wuxw 2018-07-03 -->
@@ -354,6 +354,9 @@
        <if test="address !=null and address != ''">
            , t.address= #{address}
        </if>
        <if test="otherAddress !=null and otherAddress != ''">
            ,t.other_address= #{otherAddress}
        </if>
        <if test="remark !=null and remark != ''">
            , t.remark= #{remark}
        </if>
java110-interface/src/main/java/com/java110/intf/fee/IReportFeeInnerServiceSMO.java
@@ -15,4 +15,6 @@
@RequestMapping("/reportFeeMonthStatisticsApi")
public interface IReportFeeInnerServiceSMO {
    List<Map> repostPaidInFee(FeeQueryParams feeQueryParams);
    List<Map> repostPaidInFeeTwo(FeeQueryParams feeQueryParams);
}
service-common/src/main/java/com/java110/common/cmd/smallProgram/QuerySmallProgramAllAdvertCmd.java
@@ -24,6 +24,7 @@
import com.java110.doc.annotation.Java110ParamDoc;
import com.java110.doc.annotation.Java110ParamsDoc;
import com.java110.dto.smallProgramAdvert.QuertAdvertDto;
import com.java110.dto.smallProgramAdvert.SmallProgramAdvertDto;
import com.java110.intf.common.ISmallProgramAdvertServiceSMO;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
@@ -35,6 +36,8 @@
import org.springframework.http.ResponseEntity;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
@@ -79,6 +82,14 @@
        quertAdvertDto.setRow(10000);
        quertAdvertDto.setStatus(1);
        ResultVo resultVo = smallProgramAdvertService.querySmallAdverts(quertAdvertDto);
        Object object = resultVo.getData();
        if(object != null){
            List<SmallProgramAdvertDto> smallProgramAdvertListDtoList = (List<SmallProgramAdvertDto>)object;
            List<SmallProgramAdvertDto> sortedByAsc = smallProgramAdvertListDtoList.stream()
                    .sorted((p1, p2) -> Integer.compare(p1.getSort(), p2.getSort()))
                    .collect(Collectors.toList());
            resultVo.setData(sortedByAsc);
        }
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
        cmdDataFlowContext.setResponseEntity(responseEntity);
    }
service-common/src/main/java/com/java110/common/smo/impl/SmallProgramAdvertServiceSMOImpl.java
@@ -11,6 +11,7 @@
import com.java110.dto.user.UserDto;
import com.java110.intf.common.ISmallProgramAdvertServiceSMO;
import com.java110.intf.user.IUserInnerServiceSMO;
import com.java110.utils.cache.MappingCache;
import com.java110.utils.constant.ResponseConstant;
import com.java110.utils.exception.BusinessException;
import com.java110.utils.exception.DAOException;
@@ -87,6 +88,9 @@
    @Override
    public void saveSmallAdverts(SmallProgramAdvert smallProgramAdvert) {
        if(!StringUtils.isEmpty(smallProgramAdvert.getOssUrl())){
            smallProgramAdvert.setOssUrl(getPath() + smallProgramAdvert.getOssUrl());
        }
        smallProgramAdvertServiceDao.saveSmallProgramAdvertInfo(BeanConvertUtil.beanCovertMap(smallProgramAdvert));
    }
@@ -100,25 +104,31 @@
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getPosition())){
                smallProgramAdvert.setPosition(smallProgramAdvertSaveDto.getPosition());
            }
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getAdvertsName())){
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getAdvertsName()) &&
                    !smallProgramAdvert.getAdvertsName().equals(smallProgramAdvertSaveDto.getAdvertsName())){
                smallProgramAdvert.setAdvertsName(smallProgramAdvertSaveDto.getAdvertsName());
            }
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getPicUrl())){
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getPicUrl()) &&
                    !smallProgramAdvert.getPicUrl().equals(smallProgramAdvertSaveDto.getPicUrl())){
                smallProgramAdvert.setPicUrl(smallProgramAdvertSaveDto.getPicUrl());
            }
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getOssUrl())){
                smallProgramAdvert.setOssUrl(smallProgramAdvertSaveDto.getOssUrl());
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getOssUrl()) &&
                    !smallProgramAdvert.getOssUrl().equals(smallProgramAdvertSaveDto.getOssUrl())){
                smallProgramAdvert.setOssUrl(getPath() + smallProgramAdvertSaveDto.getOssUrl());
            }
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getUrl())){
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getUrl()) &&
                    !smallProgramAdvert.getUrl().equals(smallProgramAdvertSaveDto.getUrl())){
                smallProgramAdvert.setUrl(smallProgramAdvertSaveDto.getUrl());
            }
            if(smallProgramAdvertSaveDto.getSort() != null){
                smallProgramAdvert.setSort(smallProgramAdvertSaveDto.getSort());
            }
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getSupplierName())){
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getSupplierName()) &&
                    !smallProgramAdvert.getSupplierName().equals(smallProgramAdvertSaveDto.getSupplierName())){
                smallProgramAdvert.setSupplierName(smallProgramAdvertSaveDto.getSupplierName());
            }
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getDesc())){
            if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getDesc()) &&
                    !smallProgramAdvert.getDesc().equals(smallProgramAdvertSaveDto.getDesc())){
                smallProgramAdvert.setDesc(smallProgramAdvertSaveDto.getDesc());
            }
            smallProgramAdvert.setUpdateTime(new Date());
@@ -131,6 +141,17 @@
        }
    }
    private String getPath(){
        String path = "";
        String endPoint = MappingCache.getValue("OSS", "endpoint");
        String bucketName = MappingCache.getValue("OSS", "bucketName");
        //解析endPoint
        String[] endpoints = endPoint.split("//");
        endPoint = endpoints[1];
        path = "https://" + bucketName +"." + endPoint + "/hc/";
        return path;
    }
    @Override
    @Transactional
    public void updateSmallAdvertsStatus(SmallProgramAdvertSaveDto smallProgramAdvertSaveDto,String userId) {
service-fee/src/main/java/com/java110/fee/cmd/fee/ReportFeeCmd.java
@@ -22,10 +22,7 @@
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
@Java110Cmd(serviceCode = "fee.reportFeeCmd")
public class ReportFeeCmd extends Cmd {
@@ -56,49 +53,93 @@
        int currentYear = java.time.Year.now().getValue();
        feeQueryParams.setEndYear(currentYear + 2);
        int endYear = feeQueryParams.getEndYear();
        List<Map> result = reportFeeInnerServiceSMOImpl.repostPaidInFee(feeQueryParams);
        List<Map> resultTwo =  reportFeeInnerServiceSMOImpl.repostPaidInFeeTwo(feeQueryParams);
        DictDto dictDto = new DictDto();
        dictDto.setTableName("pay_fee_config");
        dictDto.setTableColumns("fee_type_cd");
        List<DictDto> dictDtos = dictV1InnerServiceSMOImpl.queryDicts(dictDto);
        int doYear = endYear - startYear;
        List<List<FeeDto>> reportFeeDtoLists = new ArrayList<>();
        List<List<FeeDto>> reportFeeDtoLists = new LinkedList<>();
        reportFeeDtoLists.add(new LinkedList<FeeDto>());
        reportFeeDtoLists.add(new LinkedList<FeeDto>());
        reportFeeDtoLists.add(new LinkedList<FeeDto>());
        reportFeeDtoLists.add(new LinkedList<FeeDto>());
        int ind = 1;
        for (DictDto dictDto1 : dictDtos) {//类型
            List<FeeDto> reportFeeDtos = new ArrayList<>();
            for (int i = startYear; i <= endYear; i++) {
                for (Map map : result) {
                    FeeDto feeDto = new FeeDto();
                    if (map.get("统计周期")!=null&&map.get("统计周期").equals(i)&&map.get("费用类型编码").equals(dictDto1.getStatusCd())){
                        feeDto.setCurYear((i)+"");
                        feeDto.setFeeTypeCdName(map.get("费用类型名称")+"");
                        double[] doubles = new double[doYear];
                        for (int j = startYear ; j <= endYear ; j++) {
                            if(map.get((j)+"年收费金额(元)")!=null){
                                doubles[j-startYear] = ((BigDecimal)map.get((j)+"年收费金额(元)")).doubleValue();
            List<FeeDto> reportFeeDtos = new LinkedList<>();
            FeeDto feeDto = new FeeDto();
            LinkedList<FeeDto> feeDtos = new LinkedList<>();
            reportFeeDtoLists.add(feeDtos);
            for (int i = startYear; i <= endYear; i++) {//年份
                double[] doubles = new double[doYear+12+1+5];
                feeDto = new FeeDto();
                //0~5
                if(resultTwo != null){
                    for (Map map : resultTwo) {
                        if(map.isEmpty()){
                            break;
                        }
                        else if (map.get("统计周期")!=null&&map.get("统计周期").equals(i)&&map.get("费用类型编码").equals(dictDto1.getStatusCd())){
                            feeDto.setCurYear((i)+"");
                            feeDto.setFeeTypeCdName(map.get("费用类型")+"");
                            doubles[0] = map.get("当年应缴总金额") == null ? 0 : (double) map.get("当年应缴总金额");
                            doubles[1] = map.get("每月费用(合计/月份数)") == null ? 0 : (double) map.get("每月费用(合计/月份数)");
                            doubles[2] = map.get("每月费用月份数") == null ? 0 : ((Long) map.get("每月费用月份数")).intValue();
                        }
                    }
                }
                if(result != null){
                    for (Map map : result) {//类型+年份
                        if(map.isEmpty()){
                            break;
                        }
                        //5 ~ 25
                        else if (map.get("统计周期")!=null&&map.get("统计周期").equals(i)&&map.get("费用类型编码").equals(dictDto1.getStatusCd())){
                            for (int j = startYear ; j <= endYear ; j++) {// 5~(endYear - startYear + 5) = 5 ~ 13
                                if(map.get((j)+"年收费金额(元)")!=null){
                                    feeDto.setCurYear((i)+"");
                                    feeDto.setFeeTypeCdName(map.get("费用类型名称") == null ? null : map.get("费用类型名称")+"");
                                    doubles[j-startYear+5] = ((BigDecimal)map.get((j)+"年收费金额(元)")).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
                                }
                                for (int x = 1 ;x <= 12 ;x++ ){// (endYear - startYear + 6) ~ (endYear - startYear + 6 + 12) = 13 ~ 25
                                    if (map.get((currentYear)+"年"+x+"月收费金额(元)")!=null){
                                        feeDto.setCurYear((i)+"");
                                        feeDto.setFeeTypeCdName(map.get("费用类型名称") == null ? null : map.get("费用类型名称")+"");
                                        doubles[endYear - startYear + x +5] = ((BigDecimal)map.get((currentYear)+"年"+x+"月收费金额(元)")).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
                                    }
                                }
                            }
                        }
                        feeDto.setReport(doubles);
                        reportFeeDtos.add(feeDto);
                    }
//                    if(startYear == currentYear){
//                        for (int x = 1 ; x <= 12 ; x++){
//                            feeDto = new FeeDto();
//                            feeDto.setCurYear(startYear+"/"+x);
//                            feeDto.setFeeTypeCdName(dictDto1.getName());
//                            if(map.get(startYear + "年" + x + "月收费金额(元)")!=null){
//                                d
//                            }
//                        }
//                    }
                }
                if(feeDto.getCurYear() != null){
                    feeDto.setReport(doubles);
                    reportFeeDtos.add(feeDto);
                }
            }
            if (ind == 3 || ind == 7){
                reportFeeDtoLists.add(new LinkedList<>());
            }
            reportFeeDtoLists.add(reportFeeDtos);
            if(ind == 1 || ind == 2){
                reportFeeDtoLists.add(new LinkedList<>());
            }
            ind ++;
        }
        int[] arr = new int[endYear - startYear + 1];
        for (int i = startYear; i <= endYear; i++) {
            arr[i-startYear] = i;
        }
        FeeDto feeDto = new FeeDto();
        feeDto.setRepostList(reportFeeDtoLists);
        feeDto.setYearArr(arr);
        ResultVo resultVo = new ResultVo(reportFeeDtoLists);
        ResultVo resultVo = new ResultVo(feeDto);
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
service-fee/src/main/java/com/java110/fee/cmd/feePrintPage/ListFeePrintPageCmd.java
@@ -20,6 +20,8 @@
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.event.cmd.Cmd;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.dto.fee.FeePrintPageTemplateDto;
import com.java110.intf.fee.IFeePrintPageTemplateV1InnerServiceSMO;
import com.java110.intf.fee.IFeePrintPageV1InnerServiceSMO;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.BeanConvertUtil;
@@ -32,6 +34,7 @@
import org.springframework.http.HttpStatus;
import org.slf4j.Logger;
import com.java110.core.log.LoggerFactory;
import org.springframework.util.CollectionUtils;
/**
@@ -50,6 +53,8 @@
  private static Logger logger = LoggerFactory.getLogger(ListFeePrintPageCmd.class);
    @Autowired
    private IFeePrintPageV1InnerServiceSMO feePrintPageV1InnerServiceSMOImpl;
    @Autowired
    private IFeePrintPageTemplateV1InnerServiceSMO feePrintPageTemplateV1InnerServiceSMOImpl;
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
@@ -69,6 +74,23 @@
               feePrintPageDtos = feePrintPageV1InnerServiceSMOImpl.queryFeePrintPages(feePrintPageDto);
           } else {
               feePrintPageDtos = new ArrayList<>();
               FeePrintPageTemplateDto feePrintPageTemplateDto = new FeePrintPageTemplateDto();
               feePrintPageTemplateDto.setRow(50);
               feePrintPageTemplateDto.setPage(1);
               feePrintPageTemplateDto.setIsDefault(1);
               List<FeePrintPageTemplateDto> feePrintPageTemplateDtos = feePrintPageTemplateV1InnerServiceSMOImpl.queryFeePrintPageTemplates(feePrintPageTemplateDto);
               if(!CollectionUtils.isEmpty(feePrintPageTemplateDtos)){
                   FeePrintPageDto feePrintDto= new FeePrintPageDto();
                   feePrintDto.setPageId(feePrintPageTemplateDtos.get(0).getTemplateId());
                   feePrintDto.setCommunityId(feePrintPageDto.getCommunityId());
                   feePrintDto.setPageName(feePrintPageTemplateDtos.get(0).getName());
                   feePrintDto.setPageUrl(feePrintPageTemplateDtos.get(0).getTemplateId());
                   feePrintDto.setState("T");
                   feePrintDto.setTemplateName(feePrintPageTemplateDtos.get(0).getName());
                   feePrintDto.setUrl(feePrintPageTemplateDtos.get(0).getUrl());
                   feePrintPageDtos.add(feePrintDto);
                   count = 1;
               }
           }
           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, feePrintPageDtos);
service-fee/src/main/java/com/java110/fee/cmd/feePrintPage/ListFeePrintPageListCmd.java
New file
@@ -0,0 +1,81 @@
/*
 * Copyright 2017-2020 吴学文 and java110 team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.java110.fee.cmd.feePrintPage;
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.core.log.LoggerFactory;
import com.java110.dto.fee.FeePrintPageDto;
import com.java110.intf.fee.IFeePrintPageV1InnerServiceSMO;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import java.util.ArrayList;
import java.util.List;
/**
 * 类表述:查询
 * 服务编码:feePrintPage.listFeePrintPage
 * 请求路劲:/app/feePrintPage.ListFeePrintPage
 * add by 吴学文 at 2021-09-16 22:26:04 mail: 928255095@qq.com
 * open source address: https://gitee.com/wuxw7/MicroCommunity
 * 官网:http://www.homecommunity.cn
 * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
 * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
 */
@Java110Cmd(serviceCode = "feePrintPage.listFeePrintPageList")
public class ListFeePrintPageListCmd extends Cmd {
  private static Logger logger = LoggerFactory.getLogger(ListFeePrintPageListCmd.class);
    @Autowired
    private IFeePrintPageV1InnerServiceSMO feePrintPageV1InnerServiceSMOImpl;
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
        super.validatePageInfo(reqJson);
    }
    @Override
    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
           FeePrintPageDto feePrintPageDto = BeanConvertUtil.covertBean(reqJson, FeePrintPageDto.class);
           int count = feePrintPageV1InnerServiceSMOImpl.queryFeePrintPagesCount(feePrintPageDto);
           List<FeePrintPageDto> feePrintPageDtos = null;
           if (count > 0) {
               feePrintPageDtos = feePrintPageV1InnerServiceSMOImpl.queryFeePrintPages(feePrintPageDto);
           } else {
               feePrintPageDtos = new ArrayList<>();
           }
           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, feePrintPageDtos);
           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
           cmdDataFlowContext.setResponseEntity(responseEntity);
    }
}
service-fee/src/main/java/com/java110/fee/dao/IReportFeeServiceDao.java
@@ -8,4 +8,6 @@
public interface IReportFeeServiceDao {
    List<Map> repostPaidInFee(FeeQueryParams feeQueryParams);
    List<Map> repostPaidInFeeTwo(FeeQueryParams feeQueryParams);
}
service-fee/src/main/java/com/java110/fee/dao/impl/IReportFeeServiceDaoImpl.java
@@ -40,4 +40,24 @@
        params.put("yearList", yearList);
        return sqlSessionTemplate.selectList("reportFeeServiceDaoImpl.repostInFee", params);
    }
    @Override
    public List<Map> repostPaidInFeeTwo(FeeQueryParams feeQueryParams) {
        List<Integer> yearList = new ArrayList<>();
        for (int year = feeQueryParams.getStartYear(); year <= feeQueryParams.getEndYear(); year++) {
            yearList.add(year);
        }
        List<String> monthList = IntStream.rangeClosed(1, 12)
                .mapToObj(month -> String.format("%02d", month))
                .collect(Collectors.toList());
        Map<String, Object> params = new HashMap<>();
        params.put("communityId", feeQueryParams.getCommunityId());
        params.put("startYear", feeQueryParams.getStartYear());
        params.put("monthList", monthList);
        params.put("endYear", feeQueryParams.getEndYear());
        params.put("yearList", yearList);
        return sqlSessionTemplate.selectList("reportFeeServiceDaoImpl.repostInFeeTwo", params);
    }
}
service-fee/src/main/java/com/java110/fee/smo/impl/ReportFeeInnerServiceSMOImpl.java
@@ -24,4 +24,8 @@
    public List<Map> repostPaidInFee(FeeQueryParams feeQueryParams) {
        return iReportFeeServiceDao.repostPaidInFee(feeQueryParams);
    }
    @Override
    public List<Map> repostPaidInFeeTwo(FeeQueryParams feeQueryParams) {
        return iReportFeeServiceDao.repostPaidInFeeTwo(feeQueryParams);
    }
}
service-job/src/main/java/com/java110/job/importData/adapt/ImportCarHistoryFeeDetailQueueDataAdapt.java
@@ -85,7 +85,7 @@
        importCarFeeDetails(importRoomFees.get(0).getStoreId(), importRoomFees.get(0).getUserId(), importRoomFees, importRoomFees.get(0).getBatchId());
    }
    private void importCarFeeDetails(String storeId, String userId, List<ImportRoomFee> importCarFees, String batchId) {
    public void importCarFeeDetails(String storeId, String userId, List<ImportRoomFee> importCarFees, String batchId) {
        importCarFees = ownerCarInnerServiceSMOImpl.freshCarIds(importCarFees);
        for (ImportRoomFee importCarFee : importCarFees) {
service-job/src/main/java/com/java110/job/importData/adapt/ImportHistoryFeeDetailQueueDataAdapt.java
@@ -206,9 +206,10 @@
        }
        importFeeDetails(importRoomFees.get(0).getStoreId(), importRoomFees.get(0).getUserId(), importRoomFees, importRoomFees.get(0).getBatchId());
//        ImportCarHistoryFeeDetailQueueDataAdapt importCarHistoryFeeDetailQueueDataAdapt = new ImportCarHistoryFeeDetailQueueDataAdapt();
//        importCarHistoryFeeDetailQueueDataAdapt.importCarFeeDetails(importRoomFees.get(0).getStoreId(), importRoomFees.get(0).getUserId(), importRoomFees, importRoomFees.get(0).getBatchId());
//
//
    }
service-user/src/main/java/com/java110/user/cmd/owner/SaveOwnerCmd.java
@@ -136,7 +136,7 @@
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
        Assert.jsonObjectHaveKey(reqJson, "name", "请求报文中未包含name");
        Assert.jsonObjectHaveKey(reqJson, "userId", "请求报文中未包含userId");
        Assert.jsonObjectHaveKey(reqJson, "link", "请求报文中未包含link");
//        Assert.jsonObjectHaveKey(reqJson, "link", "请求报文中未包含link");
        Assert.jsonObjectHaveKey(reqJson, "sex", "请求报文中未包含sex");
        Assert.jsonObjectHaveKey(reqJson, "communityId", "请求报文中未包含communityId");
        Assert.jsonObjectHaveKey(reqJson, "personType", "请求报文中未包含personType");
@@ -157,13 +157,15 @@
            return;
        }
        //获取手机号(判断手机号是否重复)
        String link = reqJson.getString("link");
        OwnerDto ownerDto = new OwnerDto();
        ownerDto.setLink(link);
        ownerDto.setCommunityId(reqJson.getString("communityId"));
        List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryAllOwners(ownerDto);
        Assert.listIsNull(ownerDtos, "手机号重复,请重新输入");
        String link = reqJson.getString("link");
        if(StringUtils.isNotEmpty(link)){
            OwnerDto ownerDto = new OwnerDto();
            ownerDto.setLink(link);
            ownerDto.setCommunityId(reqJson.getString("communityId"));
            List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryAllOwners(ownerDto);
            Assert.listIsNull(ownerDtos, "手机号重复,请重新输入");
        }
    }
    @Override
springboot/src/main/resources/application.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active:  dev
    active:  devlocal
#  docker build -t lx .