Browse Source

20260414 业绩调整优化

lijianlin/feature-20260401-现金管理四期
wangguorui 7 hours ago
parent
commit
56833f274a
  1. 6
      src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java
  2. 2
      src/main/resources/cashMapper/CashCollectionMapper.xml
  3. 2
      src/main/resources/cashMapper/CashRefundMapper.xml

6
src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java

@ -792,10 +792,12 @@ public class CashCollectionServiceImpl implements CashCollectionService {
String remark;
if (adjustedValue > 0) {
// Positive value: row to column (转出方 to 转入方)
remark = fromName + "→" + toName + "调整金额:" + adjustedValue;
double amountInYuan = adjustedValue / 100.0;
remark = fromName + "→" + toName + "调整金额:" + amountInYuan;
} else {
// Negative value: column to row (转入方 to 转出方)
remark = toName + "→" + fromName + "调整金额:" + -adjustedValue;
double amountInYuan = (-adjustedValue) / 100.0;
remark = toName + "→" + fromName + "调整金额:" + amountInYuan;
}
// Create CashRecord objects and call mapper adjust method twice

2
src/main/resources/cashMapper/CashCollectionMapper.xml

@ -329,7 +329,7 @@
<select id="performanceSelect" resultType="com.example.demo.domain.vo.cash.PerformanceVO" parameterType="com.example.demo.domain.DTO.PerformanceDTO">
<!-- 原始收款记录 -->
select cr.pay_time,cr.order_code,m2.name as receivedMarketName,m1.name as performanceMarketName,cr.name,cr.jwcode,cr.goods_name,cr.remark,cr.good_num,cr.pay_type,r2.rate_name as receivedCurrency,cr.payment_amount/100 as payment_amount,cr.handling_charge/100 as handling_charge,cr.received_amount/100 as received_amount
select cr.pay_time,cr.order_code,m2.name as receivedMarketName,m1.name as performanceMarketName,cr.name,cr.jwcode,cr.goods_name,cr.remark,cr.good_num,cr.pay_type,r2.rate_name as receivedCurrency,cr.payment_amount/100 as payment_amount,IFNULL(cr.handling_charge/100, 0) as handling_charge,cr.received_amount/100 as received_amount
from cash_record_collection cr
left join market m1 on m1.id = cr.performance_market
left join market m2 on m2.id = cr.received_market

2
src/main/resources/cashMapper/CashRefundMapper.xml

@ -465,7 +465,7 @@
ROUND(crc.payment_amount / 100.0, 2) as paymentAmount,
crc.received_currency,
ROUND(crc.received_amount / 100.0, 2) as receivedAmount,
ROUND(crc.handling_charge / 100.0, 2) as handlingCharge,
ROUND(IFNULL(crc.handling_charge, 0) / 100.0, 2) as handlingCharge,
ROUND(crc.permanent_gold / 100.0, 2) as permanentGold,
ROUND(crc.free_gold / 100.0, 2) as freeGold,
crc.pay_type,

Loading…
Cancel
Save