|
@@ -215,10 +215,21 @@ public class ManagementInfoServiceImpl implements ManagementInfoService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public HashMap<String, Object> storeDetailBillingStatistics(String storeId) {
|
|
public HashMap<String, Object> storeDetailBillingStatistics(String storeId) {
|
|
|
|
|
+ int freeze = 0;
|
|
|
|
|
+ //查询冻结配置
|
|
|
|
|
+ SystemConfigVo systemConfigVo = storeDictService.getConfig("freeze");
|
|
|
|
|
+ if(systemConfigVo != null){
|
|
|
|
|
+ String freezeFlag = systemConfigVo.getConfigValue1();
|
|
|
|
|
+ String freezeDay = systemConfigVo.getConfigValue2();
|
|
|
|
|
+ if(StringUtils.isNotBlank(freezeFlag) && freezeFlag.equals("1") && StringUtils.isNotBlank(freezeDay)){
|
|
|
|
|
+ freeze = Integer.parseInt(freezeDay);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 获取当前日期
|
|
// 获取当前日期
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
// 计算三天前的日期
|
|
// 计算三天前的日期
|
|
|
- LocalDate threeDaysAgo = currentDate.minusDays(3);
|
|
|
|
|
|
|
+ LocalDate threeDaysAgo = currentDate.minusDays(freeze);
|
|
|
// 设置时间为当天的 0 点
|
|
// 设置时间为当天的 0 点
|
|
|
LocalDateTime threeDaysAgoMidnight = threeDaysAgo.atStartOfDay();
|
|
LocalDateTime threeDaysAgoMidnight = threeDaysAgo.atStartOfDay();
|
|
|
|
|
|
|
@@ -243,11 +254,15 @@ public class ManagementInfoServiceImpl implements ManagementInfoService {
|
|
|
.eq(StoreIncomeDetailsRecord::getStoreId, storeId)
|
|
.eq(StoreIncomeDetailsRecord::getStoreId, storeId)
|
|
|
);
|
|
);
|
|
|
Double storeIncomeDetailsCount = 0d;
|
|
Double storeIncomeDetailsCount = 0d;
|
|
|
|
|
+ Double storeIncomeDetailsNoCashCount = 0d;
|
|
|
|
|
+
|
|
|
for (StoreIncomeDetailsRecord storeIncomeDetailsRecord : storeIncomeDetailsRecords) {
|
|
for (StoreIncomeDetailsRecord storeIncomeDetailsRecord : storeIncomeDetailsRecords) {
|
|
|
|
|
+ if(storeIncomeDetailsRecord.getCashOutId() == null || storeIncomeDetailsRecord.getCashOutId() == 0){
|
|
|
|
|
+ storeIncomeDetailsNoCashCount += storeIncomeDetailsRecord.getMoney();
|
|
|
|
|
+ }
|
|
|
storeIncomeDetailsCount += storeIncomeDetailsRecord.getMoney();
|
|
storeIncomeDetailsCount += storeIncomeDetailsRecord.getMoney();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
//存入已付款金额
|
|
//存入已付款金额
|
|
|
result.put("allOrderAmount", allOrderAmount.getAllOrderAmount());
|
|
result.put("allOrderAmount", allOrderAmount.getAllOrderAmount());
|
|
|
//存入总交易金额
|
|
//存入总交易金额
|
|
@@ -256,15 +271,22 @@ public class ManagementInfoServiceImpl implements ManagementInfoService {
|
|
|
result.put("orderTransactionNumber", orderTransactionNumber.getOrderTransactionNumber());
|
|
result.put("orderTransactionNumber", orderTransactionNumber.getOrderTransactionNumber());
|
|
|
//存入核验金额
|
|
//存入核验金额
|
|
|
result.put("verificationAmount", verificationAmount.getVerificationAmount());
|
|
result.put("verificationAmount", verificationAmount.getVerificationAmount());
|
|
|
-
|
|
|
|
|
//已提现金额
|
|
//已提现金额
|
|
|
result.put("totalWithdrawalAmount", totalWithdrawalAmount.getTotalWithdrawalAmount());
|
|
result.put("totalWithdrawalAmount", totalWithdrawalAmount.getTotalWithdrawalAmount());
|
|
|
|
|
|
|
|
//冻结金额
|
|
//冻结金额
|
|
|
- result.put("freezeAmounts", storeIncomeDetailsCount);
|
|
|
|
|
|
|
+ if(freeze == 0){
|
|
|
|
|
+ //冻结金额
|
|
|
|
|
+ result.put("freezeAmounts", 0);
|
|
|
|
|
+ //冻结待提现金额
|
|
|
|
|
+ result.put("unwithdrawnAmountsFrozen", 0);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //冻结金额
|
|
|
|
|
+ result.put("freezeAmounts", storeIncomeDetailsCount);
|
|
|
|
|
+ //冻结待提现金额
|
|
|
|
|
+ result.put("unwithdrawnAmountsFrozen", storeIncomeDetailsNoCashCount);
|
|
|
|
|
|
|
|
- //冻结待提现金额
|
|
|
|
|
- result.put("unwithdrawnAmountsFrozen", storeIncomeDetailsCount);
|
|
|
|
|
|
|
+ }
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|