wuxw
2024-04-06 337da4d0752ddbdad2611da1ba7d904e80755744
优化修改费用项代码
2个文件已修改
19 ■■■■ 已修改文件
java110-db/src/main/resources/mapper/fee/FeeConfigServiceDaoImplMapper.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/cmd/returnPayFee/UpdateReturnPayFeeCmd.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/fee/FeeConfigServiceDaoImplMapper.xml
@@ -142,7 +142,7 @@
        t.payment_cd,t.payment_cycle,t.payment_cd paymentCd,t.payment_cycle paymentCycle,
        t.computing_formula_text,t.computing_formula_text computingFormulaText,t.deduct_from,t.deduct_from
        deductFrom,td4.name computingFormulaName,t.pay_online payOnline,t.scale,t.decimal_place decimalPlace,t.units,
        t.prepayment_period,t.prepayment_period prepaymentPeriod
        t.prepayment_period,t.prepayment_period prepaymentPeriod,t.state
        from pay_fee_config t
        left join t_dict td1 on t.fee_type_cd = td1.status_cd and td1.table_name = 'pay_fee_config' and
        td1.table_columns = 'fee_type_cd'
@@ -217,6 +217,9 @@
        <if test="prepaymentPeriod !=null and prepaymentPeriod != ''">
            and t.prepayment_period = #{prepaymentPeriod}
        </if>
        <if test="state !=null and state != ''">
            and t.state = #{state}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
@@ -276,6 +279,9 @@
        </if>
        <if test="prepaymentPeriod !=null and prepaymentPeriod != ''">
            , t.prepayment_period = #{prepaymentPeriod}
        </if>
        <if test="state !=null and state != ''">
            , t.state = #{state}
        </if>
        where 1=1
        <if test="configId !=null and configId != ''">
@@ -356,6 +362,9 @@
        <if test="prepaymentPeriod !=null and prepaymentPeriod != ''">
            and t.prepayment_period = #{prepaymentPeriod}
        </if>
        <if test="state !=null and state != ''">
            and t.state = #{state}
        </if>
    </select>
    <!-- 保存费用配置信息 add by wuxw 2018-07-03 -->
@@ -364,10 +373,10 @@
                                   is_default, config_id, fee_flag, fee_name,
                                   start_time, end_time, community_id, b_id, bill_type, payment_cd, payment_cycle,
                                   computing_formula_text, deduct_from, pay_online, scale, decimal_place, units,
                                   prepayment_period)
                                   prepayment_period,state)
        values (#{feeTypeCd}, #{computingFormula}, #{additionalAmount}, '0', #{squarePrice}, #{isDefault}, #{configId},
                #{feeFlag}, #{feeName}, #{startTime}, #{endTime}, #{communityId}, '-1', #{billType}, #{paymentCd},
                #{paymentCycle}, #{computingFormulaText}, #{deductFrom}, #{payOnline}, #{scale}, #{decimalPlace},
                #{units}, #{prepaymentPeriod})
                #{units}, #{prepaymentPeriod},#{state})
    </insert>
</mapper>
service-fee/src/main/java/com/java110/fee/cmd/returnPayFee/UpdateReturnPayFeeCmd.java
@@ -173,8 +173,8 @@
        Assert.hasKeyAndValue(reqJson, "state", "state不能为空");
        Assert.hasKeyAndValue(reqJson, "feeId", "feeId不能为空");
        if (reqJson.containsKey("cycles")) {
            String cycles = reqJson.getString("cycles");
            if (!cycles.startsWith("-")) {
            double cycles = reqJson.getDouble("cycles");
            if (cycles < 0) {
                throw new IllegalArgumentException("退费周期必须负数");// 这里必须传入负数,否则费用自动相加不会退费
            }
        }