liusheng
12 小时以前 3326b8c5a5b9a2133729e4cce8298cb549995f45
代码提交
已修改4个文件
36 ■■■■ 文件已修改
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFunddetail.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundtaxServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceFunddetailMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFunddetail.java
@@ -198,6 +198,13 @@
    /**
     * 预支金额
     */
    @ApiModelProperty("税前总金额")
    @Excel(name = "税前总金额")
    private Double allAmount;
    /**
     * 预支金额
     */
    @ApiModelProperty("预支金额")
    @Excel(name = "预支金额")
    private Double prepaidamount;
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java
@@ -1,6 +1,7 @@
package com.ruoyi.project.service.impl;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.ZoneId;
@@ -349,11 +350,10 @@
                taxMoneyVO.setTaxTime(new Date());
            }
            taxMoneyVO.setFirstDay(firstDay);
            // 获取该身份证号在本月的所有记录
            taxMoneyVO.setFundID(serviceFunddetail.getFundid());
            taxMoneyVO.setIDCard(serviceFunddetail.getIdcardno());
            if (serviceFunddetail.getXh() != null) {
//                taxMoneyVO.setXh(serviceFunddetail.getXh());
                //这个序号,有可能是之前版税的序号,在这里不能再用了
                serviceFunddetail.setXh(null);
                taxMoneyVO.setXh(maxXH);
                xhMap.put(serviceFunddetail.getIdcardno(), maxXH);
@@ -362,6 +362,7 @@
                xhMap.put(serviceFunddetail.getIdcardno(), maxXH);
            }
            //查出税前、税、税后的总额(不包含本次)
            logger.info("taxMoneyVO入参的值 : {}", taxMoneyVO);
            TaxMoneySumEO taxSum = serviceFunddetailMapper.getTaxSum(taxMoneyVO);
            logger.info("查询的taxSum的值 : {}", taxSum);
            if (ObjectUtils.isEmpty(taxSum)) {
@@ -383,9 +384,11 @@
                        taxSum.setTaxAmounts(taxAmounts.doubleValue());
                        taxSum.setTaxedAmounts(TaxedAmounts.doubleValue());
                    }
                    continue;
                }
            }
            //记录一下这个税前总额
            serviceFunddetail.setAllAmount(taxSum.getAmounts());
            if (serviceFunddetail.getXh() == null) {
                serviceFunddetail.setXh(maxXH);
            }
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundtaxServiceImpl.java
@@ -15,10 +15,12 @@
import com.ruoyi.project.service.IServiceFunddetailService;
import com.ruoyi.project.service.IServiceFundtaxService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Comparator;
import java.util.List;
/**
@@ -176,6 +178,10 @@
        serviceFund.setFundTaxId(fundTaxVO.getFundTaxId());
        serviceFund.setDel_flag(0);
        List<ServiceFund> serviceFunds = serviceFundService.selectServiceFundList(serviceFund);
        if (CollectionUtils.isEmpty(serviceFunds)) {
            //根据id排序(升序)
            serviceFunds.sort(Comparator.comparing(ServiceFund::getId));
        }
        for (ServiceFund serviceFund1 : serviceFunds) {
            ServiceFunddetail serviceFunddetail = new ServiceFunddetail();
            serviceFunddetail.setFundid(serviceFund1.getId());
ruoyi-project/src/main/resources/mapper/project/ServiceFunddetailMapper.xml
@@ -65,12 +65,14 @@
        <result property="deptId" column="dept_id"/>
        <result property="deptName" column="dept_name"/>
        <result property="xh" column="xh"/>
        <result property="allAmount" column="all_amount"/>
    </resultMap>
    <sql id="selectServiceFunddetailVo">
        select ID,
               fundID,
               xh,
               all_amount,
               InfoId,
               DonorNo,
               dept_id,
@@ -150,6 +152,7 @@
            <if test="fundid != null and fundid != '' ">and fundID = #{fundid}</if>
            <if test="deptId != null  ">and dept_id = #{deptId}</if>
            <if test="deptName != null and deptName != '' ">and dept_name = #{deptName}</if>
            <if test="allAmount != null ">and all_amount = #{allAmount}</if>
        </where>
    </select>
@@ -245,6 +248,7 @@
        a.subjecttype,
        a.dept_id,
        a.dept_name,
        a.all_amount,
        a.subjecttypename
        from service_funddetail a,
        service_fund b
@@ -285,7 +289,7 @@
          and a.del_flag != 1
          and b.id != #{fundID}
          and b.fundtaxtime
         &lt; #{taxTime}
            &lt;= #{taxTime}
          and b.fundtaxtime >= #{firstDay}
          and b.del_flag != 1
          and b.ApplyType in (1
@@ -312,9 +316,9 @@
        and del_flag=0
    </select>
    <select id="getListBySpStatBonus" statementType="CALLABLE"
            resultType="com.ruoyi.project.domain.SpStatBonus">
        call `SP_STAT_BONUS`(#{PABEGTIME,mode=IN,jdbcType=VARCHAR},#{PAENDTIME,mode=IN,jdbcType=VARCHAR},#{PADEPTNO,mode=IN,jdbcType=VARCHAR},#{PAUSERNO,mode=IN,jdbcType=VARCHAR},#{PABONUSTYPE,mode=IN,jdbcType=VARCHAR})
    </select>
    <!--    <select id="getListBySpStatBonus" statementType="CALLABLE"-->
    <!--            resultType="com.ruoyi.project.domain.SpStatBonus">-->
    <!--        call `SP_STAT_BONUS`(#{PABEGTIME,mode=IN,jdbcType=VARCHAR},#{PAENDTIME,mode=IN,jdbcType=VARCHAR},#{PADEPTNO,mode=IN,jdbcType=VARCHAR},#{PAUSERNO,mode=IN,jdbcType=VARCHAR},#{PABONUSTYPE,mode=IN,jdbcType=VARCHAR})-->
    <!--    </select>-->
</mapper>