This commit is contained in:
linfso 2025-05-15 06:33:00 +08:00
parent c4bc4266a3
commit 26906d64c3
6 changed files with 145 additions and 14 deletions

View File

@ -106,21 +106,7 @@ public class EmisSettleBillController extends BaseController
return getDataTable(list);
}
/**
* 收款统计
* @param emisSettleBill
* @return
*/
@GetMapping("/queryPayBackStatList")
public TableDataInfo queryPayBackStatList(EmisSettleBill emisSettleBill)
{
startPage();
setPrivParams(emisSettleBill);
List<Map> list = emisSettleBillService.queryPayBackStatList(emisSettleBill);
return getDataTable(list);
}
@ -300,6 +286,25 @@ public class EmisSettleBillController extends BaseController
return AjaxResult.success(result);
}
/**
* 收款统计
* @param emisSettleBill
* @return
*/
@GetMapping("/queryPayBackStatList")
public TableDataInfo queryPayBackStatList(EmisSettleBill emisSettleBill)
{
startPage();
setPrivParams(emisSettleBill);
List<Map> list = emisSettleBillService.queryPayBackStatList(emisSettleBill);
return getDataTable(list);
}
/**
* 新增运单总账单
*/

View File

@ -92,6 +92,18 @@ public class EmisSettlePayRecordController extends BaseController
return getDataTable(list);
}
/**
* 收款统计Map
*/
@GetMapping("/getSettlePayStatInfoMap")
public AjaxResult getSettlePayStatInfoMap(EmisSettlePayRecord emisSettlePayRecord)
{
setPrivParams(emisSettlePayRecord);
Map rstMap = emisSettlePayRecordService.getSettlePayStatInfoMap(emisSettlePayRecord);
return AjaxResult.success("查询成功",rstMap);
}
@GetMapping("/queryPayBackRecordList")
public TableDataInfo queryPayBackRecordList(EmisSettlePayRecord emisSettlePayRecord)
{
@ -115,6 +127,9 @@ public class EmisSettlePayRecordController extends BaseController
}
/**
* 检查是否重复
*

View File

@ -41,6 +41,8 @@ public interface EmisSettlePayRecordMapper extends BaseMapper<EmisSettlePayRecor
*/
public List<EmisSettlePayRecord> selectEmisSettlePayRecordList(EmisSettlePayRecord emisSettlePayRecord);
public Map getSettlePayStatInfoMap(EmisSettlePayRecord emisSettlePayRecord);
public List<EmisSettlePayRecord> selectSettlePayRecordListBySettleBillNo(String settleBillNo);

View File

@ -40,6 +40,8 @@ public interface IEmisSettlePayRecordService
*/
public List<EmisSettlePayRecord> selectEmisSettlePayRecordList(EmisSettlePayRecord emisSettlePayRecord);
public Map getSettlePayStatInfoMap(EmisSettlePayRecord emisSettlePayRecord);
public List<PayBackRecordDtl> queryPayBackRecordList(EmisSettlePayRecord emisSettlePayRecord);
public List<PayBackRecordDtl> queryNoPayBackRecordList(EmisSettlePayRecord emisSettlePayRecord);

View File

@ -92,6 +92,12 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
return emisSettlePayRecordMapper.selectEmisSettlePayRecordList(emisSettlePayRecord);
}
@Override
public Map getSettlePayStatInfoMap(EmisSettlePayRecord emisSettlePayRecord)
{
return emisSettlePayRecordMapper.getSettlePayStatInfoMap(emisSettlePayRecord);
}
@Override
public List<PayBackRecordDtl> queryPayBackRecordList(EmisSettlePayRecord emisSettlePayRecord)
{

View File

@ -85,6 +85,107 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, pay_id, pay_type, rec_type, pay_man, pay_man_code, settle_bill_no, bl_audit, audit_date, audit_man_code, audit_site_code, customer_code, customer_name, pay_money, pay_status, pay_status_desc, break_type, break_reason, break_emp_code, rec_man_code, settle_type, refund_date, refund_man_code, refund_seq, refund_mode, refund_money, refund_reason, refund_remark, refund_op_man_code, refund_register_site_code, refund_register_man_code, satisfy_money, satisfy_reason, allowance_money, allowance_reason, deduction_money, deduction_reason, other_money, other_reason, trade_date, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_settle_pay_record
</sql>
<select id="getSettlePayStatInfoMap" parameterType="EmisSettlePayRecord" resultType="map">
select sum(pay_money) as totalPayMoney
from emis_settle_pay_record
<where>
del_flag='0'
<if test="id != null "> and id = #{id}</if>
<if test="payId != null and payId != ''"> and pay_id = #{payId}</if>
<if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
<if test="recType != null and recType != ''"> and rec_type = #{recType}</if>
<if test="payMan != null and payMan != ''"> and pay_man like concat('%', #{payMan}, '%')</if>
<if test="payManCode != null and payManCode != ''"> and pay_man_code like concat('%', #{payManCode}, '%')</if>
<if test="blAudit != null and blAudit != ''"> and bl_audit = #{blAudit}</if>
<if test="auditDate != null "> and audit_date = #{auditDate}</if>
<if test="auditManCode != null and auditManCode != ''"> and audit_man_code = #{auditManCode}</if>
<if test="auditSiteCode != null and auditSiteCode != ''"> and audit_site_code = #{auditSiteCode}</if>
<if test="customerCode != null and customerCode != ''"> and customer_code = #{customerCode}</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="payMoney != null "> and pay_money = #{payMoney}</if>
<if test="payStatus != null and payStatus != ''"> and pay_status = #{payStatus}</if>
<if test="payStatusDesc != null and payStatusDesc != ''"> and pay_status_desc like concat('%', #{payStatusDesc}, '%')</if>
<if test="breakType != null and breakType != ''"> and break_type = #{breakType}</if>
<if test="breakReason != null and breakReason != ''"> and break_reason like concat('%', #{breakReason}, '%')</if>
<if test="breakEmpCode != null and breakEmpCode != ''"> and break_emp_code = #{breakEmpCode}</if>
<if test="recManCode != null and recManCode != ''"> and rec_man_code = #{recManCode}</if>
<if test="settleType != null and settleType != ''"> and settle_type = #{settleType}</if>
<if test="refundDate != null "> and refund_date = #{refundDate}</if>
<if test="refundManCode != null and refundManCode != ''"> and refund_man_code = #{refundManCode}</if>
<if test="refundSeq != null and refundSeq != ''"> and refund_seq = #{refundSeq}</if>
<if test="refundMode != null and refundMode != ''"> and refund_mode = #{refundMode}</if>
<if test="refundMoney != null "> and refund_money = #{refundMoney}</if>
<if test="refundReason != null and refundReason != ''"> and refund_reason like concat('%', #{refundReason}, '%')</if>
<if test="refundRemark != null and refundRemark != ''"> and refund_remark like concat('%', #{refundRemark}, '%')</if>
<if test="refundOpManCode != null and refundOpManCode != ''"> and refund_op_man_code = #{refundOpManCode}</if>
<if test="refundRegisterSiteCode != null and refundRegisterSiteCode != ''"> and refund_register_site_code = #{refundRegisterSiteCode}</if>
<if test="refundRegisterManCode != null and refundRegisterManCode != ''"> and refund_register_man_code = #{refundRegisterManCode}</if>
<if test="satisfyMoney != null "> and satisfy_money = #{satisfyMoney}</if>
<if test="satisfyReason != null and satisfyReason != ''"> and satisfy_reason like concat('%', #{satisfyReason}, '%')</if>
<if test="allowanceMoney != null "> and allowance_money = #{allowanceMoney}</if>
<if test="allowanceReason != null and allowanceReason != ''"> and allowance_reason = #{allowanceReason}</if>
<if test="deductionMoney != null "> and deduction_money = #{deductionMoney}</if>
<if test="deductionReason != null and deductionReason != ''"> and deduction_reason = #{deductionReason}</if>
<if test="otherMoney != null "> and other_money = #{otherMoney}</if>
<if test="otherReason != null and otherReason != ''"> and other_reason like concat('%', #{otherReason}, '%')</if>
<if test="tradeDate != null "> and trade_date = #{tradeDate}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != ''">
and create_time <![CDATA[ >= ]]> #{params.beginCreateTime}
</if>
<if test="params.endCreateTime != null and params.endCreateTime != ''">
and create_time <![CDATA[ <= ]]> #{params.endCreateTime}
</if>
<if test="params.beginTradeDate != null and params.beginTradeDate != ''">
and trade_date <![CDATA[ >= ]]> #{params.beginTradeDate}
</if>
<if test="params.endTradeDate != null and params.endTradeDate != ''">
and trade_date <![CDATA[ <= ]]> #{params.endTradeDate}
</if>
<if test="params.billCode != null and params.billCode != ''">
and pay_id in(
select pay_id from emis_settle_pay_rel espr
where espr.del_flag='0'
and FIND_IN_SET(espr.`bill_code`,#{params.billCode})
)
</if>
<if test="settleBillNo != null and settleBillNo != ''">
and pay_id in(
select pay_id from emis_settle_pay_bill_rel espbr
where espbr.del_flag='0'
and FIND_IN_SET(espbr.settle_bill_no,#{settleBillNo})
)
</if>
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and settle_bill_no in(
select bill_no from emis_settle_sub_bill b where del_flag='0'
and (
b.salesmen=#{params.privEmpName}
or b.payee=#{params.privEmpName}
or b.salesmen in(
select salesmen from emis_salesmen_rel esr where esr.del_flag='0' and esr.bl_open='1' and now() <![CDATA[ >= ]]> esr.start_date and now() <![CDATA[ <= ]]> esr.end_date and esr.sales_ass=#{params.privEmpName}
)
)
)
</if>
</where>
</select>
<select id="selectEmisSettlePayRecordList" parameterType="EmisSettlePayRecord" resultMap="EmisSettlePayRecordResult">
<include refid="selectEmisSettlePayRecordVo"/>
<where>