liusheng
2023-10-16 08f0193d8bbd4dd9f68706ac1313f564b7219f95
代码提交
已修改9个文件
98 ■■■■ 文件已修改
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFunddetail.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFunddetailShared.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceDonatebaseinfoMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceRelativesconfirmationMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceFunddetailMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceFunddetailSharedMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFunddetail.java
@@ -337,7 +337,7 @@
     * 附件文件地址
     */
    @ApiModelProperty("发票文件地址")
    private String invoiceFiles;
    private String invoicefiles;
    /**
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFunddetailShared.java
@@ -119,7 +119,7 @@
     * 附件文件地址
     */
    @ApiModelProperty("发票文件地址")
    private String invoiceFiles;
    private String invoicefiles;
    /**
     * 工作单位
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceDonatebaseinfoMapper.java
@@ -5,18 +5,20 @@
import java.util.Date;
import java.util.List;
import com.ruoyi.project.domain.ServiceDonatebaseinfo;
import com.ruoyi.project.domain.vo.TimeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
 * 捐献基础Mapper接口
 *
 *
 * @author ruoyi
 * @date 2021-11-13
 */
public interface ServiceDonatebaseinfoMapper extends BaseMapper<ServiceDonatebaseinfo>
{
@Mapper
public interface ServiceDonatebaseinfoMapper extends BaseMapper<ServiceDonatebaseinfo> {
    /**
     * 查询捐献基础列表
     *
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceRelativesconfirmationMapper.java
@@ -2,19 +2,22 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import com.ruoyi.project.domain.ServiceRelativesconfirmation;
import com.ruoyi.project.domain.vo.RelativeConfirmationVO;
import com.ruoyi.project.domain.vo.TimeVO;
import org.apache.ibatis.annotations.Mapper;
/**
 * 捐献亲属确认Mapper接口
 *
 *
 * @author ruoyi
 * @date 2021-11-15
 */
public interface ServiceRelativesconfirmationMapper extends BaseMapper<ServiceRelativesconfirmation>
{
@Mapper
public interface ServiceRelativesconfirmationMapper extends BaseMapper<ServiceRelativesconfirmation> {
    /**
     * 查询捐献亲属确认列表
     *
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
@@ -659,8 +659,8 @@
    }
    @Override
    public List<SpFinancialExpensesFundOut> getListBypower(String PAUSERNO, Integer PAFUNDTYPE, String PAAPPLICANT, String PAAPPLICATIONBEGTIME, String PAAPPLICATIONENDTIME, String PADEPARTMENT, Integer CHECKFLAG, Integer APPLYTYPE,Integer CHECKSTATUS) {
        return serviceFundMapper.getListBypower(PAUSERNO, PAFUNDTYPE, PAAPPLICANT, PAAPPLICATIONBEGTIME, PAAPPLICATIONENDTIME, PADEPARTMENT, CHECKFLAG, APPLYTYPE,CHECKSTATUS);
    public List<SpFinancialExpensesFundOut> getListBypower(String PAUSERNO, Integer PAFUNDTYPE, String PAAPPLICANT, String PAAPPLICATIONBEGTIME, String PAAPPLICATIONENDTIME, String PADEPARTMENT, Integer CHECKFLAG, Integer APPLYTYPE, Integer CHECKSTATUS) {
        return serviceFundMapper.getListBypower(PAUSERNO, PAFUNDTYPE, PAAPPLICANT, PAAPPLICATIONBEGTIME, PAAPPLICATIONENDTIME, PADEPARTMENT, CHECKFLAG, APPLYTYPE, CHECKSTATUS);
    }
    @Override
@@ -770,8 +770,24 @@
        String filePath = RuoYiConfig.getUploadPath();
        String strFUrl = "http://129.88.242.39:8899/seeyon/rest/attachment?token=" + strRes;
        List<RbDetailFile> parseArray2 = new ArrayList<>();
        List<RbDetailFile> invoicefilesList = new ArrayList<>();
        //普通附件
        List<RbDetailFile> parseArray = JSON.parseArray(remShare.getAnnexfiles(), RbDetailFile.class);
        log.info("parseArray的值 : {}", parseArray);
        //发票附件
        List<RbDetailFile> invoicefilesArray = JSON.parseArray(remShare.getInvoicefiles(), RbDetailFile.class);
        log.info("parseArray的值 : {}, invoicefilesArray的值 : {},", parseArray, invoicefilesArray);
        //普通附件
        uploadFile(filePath, strFUrl, parseArray2, parseArray, remShare, "1");
        //发票附件
        uploadFile(filePath, strFUrl, invoicefilesList, invoicefilesArray, remShare, "2");
        return 0;
    }
    private Integer uploadFile(String filePath, String strFUrl, List<RbDetailFile> parseArray2, List<RbDetailFile> parseArray, ServiceFunddetailShared remShare, String flag) {
        if (!CollectionUtils.isEmpty(parseArray)) {
            for (int i = 0; i < parseArray.size(); i++) {
                RbDetailFile rbDetailFile = parseArray.get(i);
@@ -787,7 +803,7 @@
                    String struploadResult = HttpClientKit.sendPostWithFile(filetest, strFUrl);
                    log.info("第三方传回的数据: {}", struploadResult);
                    if (StringUtils.isEmpty(struploadResult)) {
                        log.info("HttpClientKit.sendPostWithFile 请求为空了 filetest:{},  strFUrl:{} ", filetest, strFUrl);
                        log.error("HttpClientKit.sendPostWithFile 请求为空了 filetest:{},  strFUrl:{} ", filetest, strFUrl);
                        return 0;
                    }
                    //获取fileid
@@ -803,12 +819,17 @@
                }
                parseArray2.add(rbDetailFile);
            }
            remShare.setAnnexfiles(JSON.toJSONString(parseArray2));
            if (flag.equals("1")) {
                //如果flag为1,则是普通
                remShare.setAnnexfiles(JSON.toJSONString(parseArray2));
            } else if (flag.equals("2")) {
                //如果flag为2,则是发票
                remShare.setInvoicefiles(JSON.toJSONString(parseArray2));
            }
            log.info("ServiceReimbursementdetailShared 是否加上了fileid : {}", remShare);
        }
        return 0;
    }
//    int uploadOAFileAndUpdateDb(ServiceFundShared remShare) {
//        //上传OA文件
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFunddetailServiceImpl.java
@@ -256,6 +256,8 @@
        //用于临时保存已经算好的"费用详情数据"
        List<ServiceFunddetail> temporarySave = new ArrayList<>();
        //保存总税前金额(用于更新fund表里的)
        BigDecimal pretaxcost = BigDecimal.valueOf(0.00);
        for (ServiceFunddetail serviceFunddetail : serviceFunddetails) {
            //获取当月的第一天
            Date firstDay = Date.from(LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).atStartOfDay(ZoneId.systemDefault()).toInstant());
@@ -278,9 +280,9 @@
            //判断临时集合temporarySave中,有没有已经算过的数据
            if (CollectionUtils.isNotEmpty(temporarySave)) {
                for (ServiceFunddetail serviceFunddetail1 : temporarySave) {
                    //如果本次的”人员类型“、”受益人编号“在临时集合中存在,则将集合数据中的该受益人的,税前、税金、税后,和总的相加,并将老的覆盖
                    //如果本次的”人员类型“、”身份证号“在临时集合中存在,则将集合数据中的该受益人的,税前、税金、税后,和总的相加,并将老的覆盖
                    // if (serviceFunddetail1.getApplytype().equals(serviceFunddetail.getApplytype()) && serviceFunddetail1.getBeneficiaryno().equals(serviceFunddetail.getBeneficiaryno())) {
                    if (serviceFunddetail1.getBeneficiaryno().equals(serviceFunddetail.getBeneficiaryno())) {
                    if (serviceFunddetail1.getIdcardno().equals(serviceFunddetail.getIdcardno())) {
                        //将集合数据中的该受益人的,税前、税金、税后,和总的相加
                        BigDecimal amounts = BigDecimal.valueOf(taxSum.getAmounts()).add(new BigDecimal(String.valueOf(serviceFunddetail1.getAmount())));
                        BigDecimal taxAmounts = BigDecimal.valueOf(taxSum.getTaxAmounts()).add(new BigDecimal(String.valueOf(serviceFunddetail1.getTaxamount())));
@@ -313,6 +315,7 @@
                serviceFunddetail3.setTaxTime(new Date());
                // 将该条数据更新
                updateById(serviceFunddetail3);
                pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail.getAmount()));
                // 把该数据,放到临时的集合中
                temporarySave.add(serviceFunddetail3);
            } else if (serviceFunddetail.getServicesscopename().contains("税后")) {
@@ -334,10 +337,16 @@
                serviceFunddetail3.setTaxTime(new Date());
                // 将该条数据更新
                updateById(serviceFunddetail3);
                pretaxcost = pretaxcost.add(BigDecimal.valueOf(serviceFunddetail3.getAmount()));
                // 把该数据,放到临时的集合中
                temporarySave.add(serviceFunddetail3);
            }
        }
        ServiceFund serviceFund = new ServiceFund();
        serviceFund.setPretaxcost(pretaxcost.doubleValue());
        serviceFund.setId(serviceFunddetails.get(0).getFundid());
        serviceFundMapper.updateById(serviceFund);
        return true;
    }
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java
@@ -205,8 +205,8 @@
    }
    @Override
    public List<SpFinancialExpensesReimbursementOut> getListBypower(String PAUSERNO, Integer PAFUNDTYPE, String PAAPPLICANT, String PAAPPLICATIONBEGTIME, String PAAPPLICATIONENDTIME, String PADEPARTMENT, Integer CHECKFLAG, Integer APPLYTYPE,Integer CHECKSTATUS) {
        return serviceReimbursementMapper.getListBypower(PAUSERNO, PAFUNDTYPE, PAAPPLICANT, PAAPPLICATIONBEGTIME, PAAPPLICATIONENDTIME, PADEPARTMENT, CHECKFLAG, APPLYTYPE,CHECKSTATUS);
    public List<SpFinancialExpensesReimbursementOut> getListBypower(String PAUSERNO, Integer PAFUNDTYPE, String PAAPPLICANT, String PAAPPLICATIONBEGTIME, String PAAPPLICATIONENDTIME, String PADEPARTMENT, Integer CHECKFLAG, Integer APPLYTYPE, Integer CHECKSTATUS) {
        return serviceReimbursementMapper.getListBypower(PAUSERNO, PAFUNDTYPE, PAAPPLICANT, PAAPPLICATIONBEGTIME, PAAPPLICATIONENDTIME, PADEPARTMENT, CHECKFLAG, APPLYTYPE, CHECKSTATUS);
    }
    @Override
@@ -251,7 +251,21 @@
        String strFUrl = "http://129.88.242.39:8899/seeyon/rest/attachment?token=" + strRes;
        List<RbDetailFile> parseArray2 = new ArrayList<>();
        List<RbDetailFile> invoicefilesList = new ArrayList<>();
        //普通文件上传
        List<RbDetailFile> parseArray = JSON.parseArray(remShare.getAnnexfiles(), RbDetailFile.class);
        //发票文件上传
        List<RbDetailFile> invoicefilesArray = JSON.parseArray(remShare.getInvoicefiles(), RbDetailFile.class);
        //普通附件
        uploadFile(filePath, strFUrl, parseArray2, parseArray, remShare, "1");
        //发票附件
        uploadFile(filePath, strFUrl, invoicefilesList, invoicefilesArray, remShare, "2");
        return 0;
    }
    private Integer uploadFile(String filePath, String strFUrl, List<RbDetailFile> parseArray2, List<RbDetailFile> parseArray, ServiceReimbursementdetailShared remShare, String flag) {
        if (!CollectionUtils.isEmpty(parseArray)) {
            for (int i = 0; i < parseArray.size(); i++) {
                RbDetailFile rbDetailFile = parseArray.get(i);
@@ -287,7 +301,14 @@
                parseArray2.add(rbDetailFile);
            }
        }
        remShare.setAnnexfiles(JSON.toJSONString(parseArray2));
        if (flag.equals("1")) {
            //如果flag为1,则是普通
            remShare.setAnnexfiles(JSON.toJSONString(parseArray2));
        } else if (flag.equals("2")) {
            //如果flag为2,则是发票
            remShare.setInvoicefiles(JSON.toJSONString(parseArray2));
        }
        log.info("ServiceReimbursementdetailShared 是否加上了fileid : {}", remShare);
        return 0;
    }
ruoyi-project/src/main/resources/mapper/project/ServiceFunddetailMapper.xml
@@ -57,7 +57,7 @@
        <result property="subjecttype" column="subjecttype"/>
        <result property="subjecttypename" column="subjecttypename"/>
        <result property="annexfiles" column="AnnexFiles"/>
        <result property="invoiceFiles" column="InvoiceFiles"/>
        <result property="invoicefiles" column="InvoiceFiles"/>
        <result property="taxTime" column="tax_time"/>
        <result property="jxrq" column="jxrq"/>
ruoyi-project/src/main/resources/mapper/project/ServiceFunddetailSharedMapper.xml
@@ -31,7 +31,7 @@
        <result property="annexbankcard" column="AnnexBankCard"/>
        <result property="annexregistform" column="AnnexRegistForm"/>
        <result property="annexfiles" column="AnnexFiles"/>
        <result property="invoiceFiles" column="InvoiceFiles"/>
        <result property="invoicefiles" column="InvoiceFiles"/>
        <result property="quantity" column="Quantity"/>
        <result property="price" column="Price"/>
        <result property="amount" column="Amount"/>