| | |
| | | /** |
| | | * 预支金额 |
| | | */ |
| | | @ApiModelProperty("税前总金额") |
| | | @Excel(name = "税前总金额") |
| | | private Double allAmount; |
| | | |
| | | /** |
| | | * 预支金额 |
| | | */ |
| | | @ApiModelProperty("预支金额") |
| | | @Excel(name = "预支金额") |
| | | private Double prepaidamount; |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | xhMap.put(serviceFunddetail.getIdcardno(), maxXH); |
| | | } |
| | | //查出税前、税、税后的总额(不包含本次) |
| | | logger.info("taxMoneyVO入参的值 : {}", taxMoneyVO); |
| | | TaxMoneySumEO taxSum = serviceFunddetailMapper.getTaxSum(taxMoneyVO); |
| | | logger.info("查询的taxSum的值 : {}", taxSum); |
| | | if (ObjectUtils.isEmpty(taxSum)) { |
| | |
| | | taxSum.setTaxAmounts(taxAmounts.doubleValue()); |
| | | taxSum.setTaxedAmounts(TaxedAmounts.doubleValue()); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | //记录一下这个税前总额 |
| | | serviceFunddetail.setAllAmount(taxSum.getAmounts()); |
| | | |
| | | if (serviceFunddetail.getXh() == null) { |
| | | serviceFunddetail.setXh(maxXH); |
| | | } |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | 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()); |
| | |
| | | <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, |
| | |
| | | <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> |
| | |
| | | a.subjecttype, |
| | | a.dept_id, |
| | | a.dept_name, |
| | | a.all_amount, |
| | | a.subjecttypename |
| | | from service_funddetail a, |
| | | service_fund b |
| | |
| | | and a.del_flag != 1 |
| | | and b.id != #{fundID} |
| | | and b.fundtaxtime |
| | | < #{taxTime} |
| | | <= #{taxTime} |
| | | and b.fundtaxtime >= #{firstDay} |
| | | and b.del_flag != 1 |
| | | and b.ApplyType in (1 |
| | |
| | | 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> |