This commit is contained in:
邹宗楠
2025-09-03 11:38:17 +08:00
parent bc4d31baee
commit cda85c0d98
3 changed files with 31 additions and 0 deletions

View File

@@ -1201,13 +1201,26 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
saleInfoList = append(saleInfoList, v)
}
// 门店服务费
feeList, _ := dao.GetStoreServerFee(db, storeIDList, fromTime, toTime, statusList, true)
// 门店账号支出
fineList, _ := dao.StatisticsFineFee(db, fromTime, toTime, storeIDList)
for _, v := range saleInfoList {
for _, f := range feeList {
if v.StoreID == f.JxStoreID && v.VendorID == f.VendorID {
v.ServerFee = f.ServerFee
}
}
for _, vf := range fineList {
if v.StoreID == vf.StoreID && v.VendorID == vf.VendorID {
switch vf.BillType {
case 21:
v.PromotionFee += vf.SettleAmount
default:
v.FineFee += vf.SettleAmount
}
}
}
}
return saleInfoList, err
}