demand: TMS系统 - 客户账单管理 - 财务开票处理 - 定制导出性能优化

committer: heyu
This commit is contained in:
aike 2025-11-07 11:36:40 +08:00
parent 945a731c35
commit 768c33a255
3 changed files with 680 additions and 339 deletions

View File

@ -16,6 +16,7 @@ import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xdadan.erp.emis.domain.EmisSettleInvoiceRel;
import com.xdadan.erp.emis.domain.EmisSettlePayRel;
import org.apache.ibatis.annotations.Param;
/**
* @ClassName EmisSettlePayRelMapper
* @Description <p> 支付子账单关联表 Mapper 接口 </p>
@ -33,6 +34,14 @@ public interface EmisSettlePayRelMapper extends BaseMapper<EmisSettlePayRel>
public List<EmisSettlePayRel> selectHasPayListBySettleBillNo(String settleBillNo);
/**
* 根据账单号列表查询支付关联记录
*
* @param settleBillNoList 账单号列表
* @return 支付关联记录列表
*/
public List<EmisSettlePayRel> selectHasPayListBySettleBillNoList(@Param("settleBillNoList") List<String> settleBillNoList);
public List<Map> selectHasPayMapList(String settleBillNo);
/**

View File

@ -79,6 +79,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</select>
<select id="selectHasPayListBySettleBillNoList" parameterType="List" resultMap="EmisSettlePayRelWithSubBillResult">
select distinct a.id, a.pay_id, a.bill_no, a.pay_money, a.del_flag, a.create_by, a.create_time,
a.update_by, a.update_time, a.create_site, a.update_site
from emis_settle_pay_rel a
inner join emis_settle_pay_record b on a.pay_id = b.pay_id and b.del_flag = '0'
inner join emis_settle_pay_bill_rel espbr on a.pay_id = espbr.pay_id and espbr.del_flag = '0'
inner join emis_settle_sub_bill essb on a.bill_no = essb.bill_no and essb.del_flag = '0'
where a.del_flag = '0'
<if test="settleBillNoList != null and settleBillNoList.size() > 0">
and espbr.settle_bill_no in
<foreach item="settleBillNo" collection="settleBillNoList" open="(" separator="," close=")">
#{settleBillNo}
</foreach>
and essb.settle_bill_no in
<foreach item="settleBillNo" collection="settleBillNoList" open="(" separator="," close=")">
#{settleBillNo}
</foreach>
</if>
</select>
<select id="selectHasPayMapList" parameterType="String" resultType="map">
select a.bill_no as billNo, sum(a.pay_money) sumMoney