java110
2023-06-29 b173d31976fc4731b7c247d4038de92134eba317
Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
1个文件已添加
6个文件已修改
86 ■■■■ 已修改文件
java110-db/src/main/resources/mapper/report/BaseDataStatisticsServiceDaoImplMapper.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/report/ReportFeeStatisticsServiceDaoImplMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/cmd/fee/PayMonthFeeCmd.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeDetailOwnerCmd.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeDetailRoomCmd.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/smo/impl/GeneratorOweFeeInnerServiceSMOImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/report/BaseDataStatisticsServiceDaoImplMapper.xml
@@ -9,11 +9,14 @@
        select count(1) count
        from building_room t
        left join building_unit bu on t.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 building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0'
        left join building_owner bo on borr.owner_id = bo.owner_id and bo.status_cd = '0'
        inner join building_unit bu on t.unit_id = bu.unit_id and bu.status_cd = '0'
        inner join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
        <if test="ownerId != null and ownerId != ''">
            inner join building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0'
            left join building_owner bo on borr.owner_id = bo.member_id and bo.status_cd = '0'
        </if>
        where 1=1
        and t.status_cd = '0'
        <if test="floorId != null and floorId != ''">
            and f.floor_id = #{floorId}
        </if>
@@ -58,10 +61,10 @@
        t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea,
        f.floor_num floorNum,bu.unit_num unitNum,bo.name ownerName,bo.owner_id ownerId,bo.link
        from building_room t
        left join building_unit bu on t.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 building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0'
        left join building_owner bo on borr.owner_id = bo.owner_id and bo.status_cd = '0'
        inner join building_unit bu on t.unit_id = bu.unit_id and bu.status_cd = '0'
        inner join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
        inner join building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0'
        left join building_owner bo on borr.owner_id = bo.member_id and bo.status_cd = '0'
        where 1=1
        <if test="floorId != null and floorId != ''">
            and f.floor_id = #{floorId}
java110-db/src/main/resources/mapper/report/ReportFeeStatisticsServiceDaoImplMapper.xml
@@ -337,7 +337,7 @@
        and pf.payer_obj_type = '3333'
        and t.community_id= #{communityId}
        and t.cur_month_time &lt; #{endDate}
        and (t.receivable_amount - t.received_amount - t.discount_amount) > 0
        and t.detail_id = '-1'
        group by a.room_id
        ) a
    </select>
service-fee/src/main/java/com/java110/fee/cmd/fee/PayMonthFeeCmd.java
New file
@@ -0,0 +1,40 @@
package com.java110.fee.cmd.fee;
import com.alibaba.fastjson.JSONArray;
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.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import java.text.ParseException;
/**
 * 按月交费
 */
@Java110Cmd(serviceCode = "fee.payMonthFee")
public class PayMonthFeeCmd extends Cmd {
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息");
        Assert.hasKeyAndValue(reqJson, "primeRate", "未包含支付方式");
        if (!reqJson.containsKey("selectMonthIds")) {
            throw new CmdException("未包含缴费月份");
        }
        JSONArray selectMonthIds = reqJson.getJSONArray("selectMonthIds");
        if (selectMonthIds == null || selectMonthIds.size() < 1) {
            throw new CmdException("未包含缴费月份");
        }
        // todo 检查是否跳月了
    }
    @Override
    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
    }
}
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
@@ -402,6 +402,7 @@
    /**
     * 前台查询分页查询
     *
     * @param reportFeeMonthStatisticsDto
     * @return
     */
@@ -992,16 +993,16 @@
    }
    private void freshReportOweDay(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) {
        int day = 0;
        for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
            try {
                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                int day = DateUtil.daysBetween(DateUtil.getDateFromString(format.format(new Date()), DateUtil.DATE_FORMATE_STRING_A), DateUtil.getDateFromString(reportFeeMonthStatisticsDto.getFeeCreateTime(),
                        DateUtil.DATE_FORMATE_STRING_A));
                day = DateUtil.daysBetween(DateUtil.getDateFromStringA(reportFeeMonthStatisticsDto.getDeadlineTime()),
                        DateUtil.getDateFromStringA(reportFeeMonthStatisticsDto.getFeeCreateTime()));
                reportFeeMonthStatisticsDto.setOweDay(day);
            } catch (Exception e) {
                logger.error("计算欠费天数失败", e);
            }
        }
    }
service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeDetailOwnerCmd.java
@@ -105,17 +105,19 @@
            return datas;
        }
        BigDecimal oweFee = new BigDecimal(0.00);
        BigDecimal receivedFee = new BigDecimal(0.00);
        BigDecimal oweFee = null;
        BigDecimal receivedFee = null;
        for (int dataIndex = 0; dataIndex < datas.size(); dataIndex++) {
            data = datas.getJSONObject(dataIndex);
            oweFee = new BigDecimal(0.00);
            receivedFee = new BigDecimal(0.00);
            for (Map info : infos) {
                if (!data.get("ownerId").toString().equals(info.get("ownerId"))) {
                    continue;
                }
                oweFee = oweFee.add(new BigDecimal(info.get("oweFee").toString()));
                receivedFee = oweFee.add(new BigDecimal(info.get("receivedFee").toString()));
                receivedFee = receivedFee.add(new BigDecimal(info.get("receivedFee").toString()));
                data.put("oweFee" + info.get("feeTypeCd").toString(), info.get("oweFee"));
                data.put("receivedFee" + info.get("feeTypeCd").toString(), info.get("receivedFee"));
                data.put("objName", info.get("objName"));
service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeDetailRoomCmd.java
@@ -112,9 +112,11 @@
            return datas;
        }
        BigDecimal oweFee = new BigDecimal(0.00);
        BigDecimal receivedFee = new BigDecimal(0.00);
        BigDecimal oweFee = null;
        BigDecimal receivedFee = null;
        for(int dataIndex = 0; dataIndex < datas.size();dataIndex ++){
            oweFee = new BigDecimal(0.00);
            receivedFee = new BigDecimal(0.00);
            data = datas.getJSONObject(dataIndex);
            for(Map info : infos){
                if(!data.get("roomId").toString().equals(info.get("objId"))){
service-report/src/main/java/com/java110/report/smo/impl/GeneratorOweFeeInnerServiceSMOImpl.java
@@ -241,7 +241,7 @@
    }
    @Override
    public int computeOweFee(FeeDto feeDto) {
    public int computeOweFee(@RequestBody FeeDto feeDto) {
        //刷入欠费金额
        computeFeeSMOImpl.computeEveryOweFee(feeDto);