liusheng
2023-05-08 12b5083aa7816e4b2305bf96e53fd4fda30144a7
差旅报销-->下载里的备注
已修改5个文件
105 ■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceReimbursementpayeeMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceReimbursementpayeeService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementpayeeServiceImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementpayeeMapper.xml 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
@@ -56,6 +56,9 @@
    private IServiceReimbursementService serviceReimbursementService;
    @Autowired
    private IServiceReimbursementpayeeService reimbursementpayeeService;
    @Autowired
    private IServiceReimbursementSharedService serviceReimbursementServiceShare;
    @Autowired
@@ -696,6 +699,8 @@
        ServiceReimbursementEo serviceReimbursementEo = new ServiceReimbursementEo();
        serviceReimbursementEo.setId(id);
        List<ServiceReimbursementEo> rdInfoByItem = serviceReimbursementService.getRDInfoByItem(serviceReimbursementEo);
        //获取报销支付信息
        List<ServiceReimbursementpayee> reimbursementpayeeInfo = reimbursementpayeeService.getReimbursementpayeeInfo(serviceReimbursementEo);
        Map<String, List<ServiceReimbursementEo>> listMap = rdInfoByItem.stream()
                .collect(Collectors.groupingBy(ServiceReimbursementEo::getPersontype));
@@ -794,17 +799,10 @@
        dataMap.put("JEDS", convert(allMoney.doubleValue()) + "整");
        String remark = "";
        remark += rdInfoByItem.get(0).getCosttypename() == null ? "" : rdInfoByItem.get(0).getCosttypename() + "(";
        remark += rdInfoByItem.get(0).getTravelers() == null ? "" : rdInfoByItem.get(0).getTravelers() + ": ";
        remark += rdInfoByItem.get(0).getIdcardno() == null ? "" : rdInfoByItem.get(0).getIdcardno() + "; ";
        remark += rdInfoByItem.get(0).getDepositbank() == null ? "" : rdInfoByItem.get(0).getDepositbank() + ": ";
        remark += rdInfoByItem.get(0).getBankcardno() == null ? "" : rdInfoByItem.get(0).getBankcardno() + ")";
        remark += "\n";
        remark += rdInfoByItem.get(0).getRemark() == null ? "" : rdInfoByItem.get(0).getRemark();
        for (ServiceReimbursementpayee serviceReimbursementpayee : reimbursementpayeeInfo) {
            remark += "<w:br/> "+PersonType.getInfoByCode(serviceReimbursementpayee.getPersontype())+ "(" + serviceReimbursementpayee.getPersonname() + " " + serviceReimbursementpayee.getAmount();
            remark += " 元; " + serviceReimbursementpayee.getBankname() + ": " + serviceReimbursementpayee.getBankcardno() + ") 备注: " + serviceReimbursementpayee.getRemark();
        }
        dataMap.put("BXBZ", remark);
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceReimbursementpayeeMapper.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import com.ruoyi.project.domain.ServiceReimbursementEo;
import com.ruoyi.project.domain.ServiceReimbursementpayee;
/**
@@ -20,4 +22,14 @@
     * @return 差旅报销付款信息集合
     */
    public List<ServiceReimbursementpayee> selectServiceReimbursementpayeeList(ServiceReimbursementpayee serviceReimbursementpayee);
    /**
     * 获取报销支付信息
     * @param serviceReimbursementEo
     * @return
     */
    public List<ServiceReimbursementpayee> getReimbursementpayeeInfo(ServiceReimbursementEo serviceReimbursementEo);
}
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceReimbursementpayeeService.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.project.domain.ServiceReimbursementEo;
import com.ruoyi.project.domain.ServiceReimbursementpayee;
/**
@@ -20,4 +21,11 @@
     * @return 差旅报销付款信息集合
     */
    public List<ServiceReimbursementpayee> queryList(ServiceReimbursementpayee serviceReimbursementpayee);
    /**
     * 获取报销支付信息
     * @param serviceReimbursementEo
     * @return
     */
    public List<ServiceReimbursementpayee> getReimbursementpayeeInfo(ServiceReimbursementEo serviceReimbursementEo);
}
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementpayeeServiceImpl.java
@@ -1,14 +1,20 @@
package com.ruoyi.project.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.domain.ServiceReimbursementEo;
import com.ruoyi.project.domain.ServiceReimbursementpayeeShared;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.ArrayList;
import java.util.Map;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.mapper.ServiceReimbursementpayeeMapper;
import com.ruoyi.project.domain.ServiceReimbursementpayee;
@@ -21,9 +27,9 @@
 * @date 2023-04-20
 */
@Service
public class ServiceReimbursementpayeeServiceImpl extends ServiceImpl<ServiceReimbursementpayeeMapper, ServiceReimbursementpayee> implements IServiceReimbursementpayeeService
{
public class ServiceReimbursementpayeeServiceImpl extends ServiceImpl<ServiceReimbursementpayeeMapper, ServiceReimbursementpayee> implements IServiceReimbursementpayeeService {
    @Autowired
    private ServiceReimbursementpayeeMapper serviceReimbursementpayeeMapper;
    /**
     * 查询差旅报销付款信息列表
@@ -73,4 +79,12 @@
        return this.list(wrappers);
    }
    @Override
    public List<ServiceReimbursementpayee> getReimbursementpayeeInfo(ServiceReimbursementEo serviceReimbursementEo) {
        if (ObjectUtils.isEmpty(serviceReimbursementEo.getId())) {
            return null;
        }
        return serviceReimbursementpayeeMapper.getReimbursementpayeeInfo(serviceReimbursementEo);
    }
}
ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementpayeeMapper.xml
@@ -27,10 +27,30 @@
    </resultMap>
    <sql id="selectServiceReimbursementpayeeVo">
        select id, rbid, orderno, persontype, personname, bankname, bankcardno, amount, phone, familyrelations, paiddate, remark, del_flag, create_by, create_time, update_by, update_time, uploadflag, uploadtime from service_reimbursementpayee
        select id,
               rbid,
               orderno,
               persontype,
               personname,
               bankname,
               bankcardno,
               amount,
               phone,
               familyrelations,
               paiddate,
               remark,
               del_flag,
               create_by,
               create_time,
               update_by,
               update_time,
               uploadflag,
               uploadtime
        from service_reimbursementpayee
    </sql>
    <select id="selectServiceReimbursementpayeeList" parameterType="ServiceReimbursementpayee" resultMap="ServiceReimbursementpayeeResult">
    <select id="selectServiceReimbursementpayeeList" parameterType="ServiceReimbursementpayee"
            resultMap="ServiceReimbursementpayeeResult">
        <include refid="selectServiceReimbursementpayeeVo"/>
        <where>
            <if test="rbid != null "> and rbid = #{rbid}</if>
@@ -48,4 +68,25 @@
        </where>
    </select>
    <select id="getReimbursementpayeeInfo" resultType="com.ruoyi.project.domain.ServiceReimbursementpayee">
        SELECT b.personname as personname,b.bankname as bankname,b.bankcardno as bankcardno,b.amount as
        amount,b.persontype as persontype,b.paiddate as paiddate,b.Remark as remark from service_reimbursement
        a,service_reimbursementpayee b where a.id=b.RBID and a.del_flag!=1 and b.del_flag!=1
        <if test="id != null">
            and a.id = #{id}
        </if>
        <if test='username != null and username != ""'>
            and a.UserName=#{username}
        </if>
        <if test='recordstatus != null and recordstatus != ""'>
            and a.FlowLevel=#{recordstatus}
        </if>
        <if test='starttime != null and endtime != ""'>
            and a.create_time BETWEEN #{starttime} AND #{endtime}
        </if>
        ORDER BY a.id desc
    </select>
</mapper>