|
@@ -31,6 +31,7 @@ import org.jeecg.modules.ctop.service.IAdvertiserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
@@ -123,6 +124,7 @@ public class FinancePaymentRechargeApplicationServiceImpl extends ServiceImpl<Fi
|
|
|
//添加充值账户信息
|
|
|
List<FinancePaymentRechargeAccount> accountList = new ArrayList<>();
|
|
|
String accountIds = "";
|
|
|
+ BigDecimal displayAmount = new BigDecimal("0");
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
JSONObject obj = list.getJSONObject(i);
|
|
|
FinancePaymentRechargeAccount account = new FinancePaymentRechargeAccount();
|
|
@@ -135,12 +137,14 @@ public class FinancePaymentRechargeApplicationServiceImpl extends ServiceImpl<Fi
|
|
|
}
|
|
|
account.setCashAmount(obj.getBigDecimal("cashAmount"));
|
|
|
account.setReceivedAmount(obj.getBigDecimal("receivedAmount"));
|
|
|
+ displayAmount.add(obj.getBigDecimal("receivedAmount"));
|
|
|
account.setRebateType(obj.getString("rebateType"));
|
|
|
account.setRebateRate(obj.getDouble("rebateRate"));
|
|
|
accountList.add(account);
|
|
|
accountIds += obj.getLong("accountId") + ",";
|
|
|
}
|
|
|
rechargeAccountService.saveBatch(accountList);
|
|
|
+ data.put("displayAmount", displayAmount);
|
|
|
//消息通知内容
|
|
|
String message = null;
|
|
|
List<SysUser> users = null;
|
|
@@ -204,6 +208,8 @@ public class FinancePaymentRechargeApplicationServiceImpl extends ServiceImpl<Fi
|
|
|
|
|
|
this.updateById(recharge);
|
|
|
|
|
|
+ BigDecimal displayAmount = new BigDecimal("0");
|
|
|
+
|
|
|
//添加充值账户信息
|
|
|
List<FinancePaymentRechargeAccount> accountList = new ArrayList<>();
|
|
|
String accountIds = "";
|
|
@@ -219,6 +225,7 @@ public class FinancePaymentRechargeApplicationServiceImpl extends ServiceImpl<Fi
|
|
|
}
|
|
|
account.setCashAmount(obj.getBigDecimal("cashAmount"));
|
|
|
account.setReceivedAmount(obj.getBigDecimal("receivedAmount"));
|
|
|
+ displayAmount.add(obj.getBigDecimal("receivedAmount"));
|
|
|
account.setRebateType(obj.getString("rebateType"));
|
|
|
account.setRebateRate(obj.getDouble("rebateRate"));
|
|
|
accountList.add(account);
|
|
@@ -226,6 +233,8 @@ public class FinancePaymentRechargeApplicationServiceImpl extends ServiceImpl<Fi
|
|
|
}
|
|
|
rechargeAccountService.delByRechargeId(recharge.getId());
|
|
|
rechargeAccountService.saveBatch(accountList);
|
|
|
+
|
|
|
+ data.put("displayAmount", displayAmount);
|
|
|
//消息通知内容
|
|
|
String message = null;
|
|
|
List<SysUser> users = null;
|
|
@@ -265,6 +274,7 @@ public class FinancePaymentRechargeApplicationServiceImpl extends ServiceImpl<Fi
|
|
|
if (!Check.isNull(amount)) {
|
|
|
oldData.put("accountIds", amount.getString("accountIds"));
|
|
|
oldData.put("totalAmount", amount.getString("cashAmount"));
|
|
|
+ oldData.put("displayAmount", amount.getString("displayAmount"));
|
|
|
}
|
|
|
String message = messageTemplate.getFinancePaymentApplicationMJRechargeMessage(oldData);
|
|
|
List<SysUser> users = userService.getUserListByRoleId(MEIDA_MANAGER_ROLE_ID);
|
|
@@ -280,6 +290,17 @@ public class FinancePaymentRechargeApplicationServiceImpl extends ServiceImpl<Fi
|
|
|
}
|
|
|
this.updateById(recharge);
|
|
|
poolService.reduce(oldRecharge, null);
|
|
|
+
|
|
|
+ JSONObject oldData = JSONObject.parseObject(JSONObject.toJSONString(oldRecharge)).toJavaObject(JSONObject.class);
|
|
|
+ JSONObject amount = rechargeAccountService.queryAmounts(recharge.getId());
|
|
|
+ if (!Check.isNull(amount)) {
|
|
|
+ oldData.put("accountIds", amount.getString("accountIds"));
|
|
|
+ oldData.put("totalAmount", amount.getString("cashAmount"));
|
|
|
+ oldData.put("displayAmount", amount.getString("displayAmount"));
|
|
|
+ }
|
|
|
+ String message = messageTemplate.getRechargedSuccessfullyMessage(oldData);
|
|
|
+ sendMessageService.sendMessage(oldRecharge.getApplicanterId(), message);
|
|
|
+
|
|
|
} else if ("5".equals(auditStatus)) {
|
|
|
if ("4".equals(recharge.getAuditStatus())) {
|
|
|
poolService.add(oldRecharge, null);
|