| | |
| | | * 计算全仓收益 保证金 |
| | | */ |
| | | double profit = 0; |
| | | List<ContractOrder> contractOrders = contractOrderService.findSubmitted(this.getLoginPartyId(), null, null); |
| | | List<ContractOrder> contractOrders = contractOrderService.findSubmitted(map.get("party_id").toString(), null, null); |
| | | for (int f = 0; f < contractOrders.size(); f++) { |
| | | ContractOrder close_line = contractOrders.get(f); |
| | | if(close_line.getProfit() > 0){ |
| | |
| | | }else{ |
| | | profit = Arith.add(profit, close_line.getDeposit()); |
| | | } } |
| | | Wallet wallet = this.walletService.saveWalletByPartyId(this.getLoginPartyId()); |
| | | Wallet wallet = this.walletService.saveWalletByPartyId(map.get("party_id").toString()); |
| | | double totleMoney = wallet.getMoney(); |
| | | profit = Arith.add(profit,totleMoney); |
| | | |
| | |
| | | * 计算全仓收益 保证金 |
| | | */ |
| | | double profit = 0; |
| | | List<ContractOrder> contractOrders = contractOrderService.findSubmitted(this.getLoginPartyId(), null, null); |
| | | List<ContractOrder> contractOrders = contractOrderService.findSubmitted(map.get("party_id").toString(), null, null); |
| | | for (int f = 0; f < contractOrders.size(); f++) { |
| | | ContractOrder close_line = contractOrders.get(f); |
| | | if(close_line.getProfit() > 0){ |
| | | profit = Arith.add(profit, Arith.add(close_line.getProfit(), close_line.getDeposit())); |
| | | }else{ |
| | | profit = Arith.add(profit, close_line.getDeposit()); |
| | | } |
| | | } |
| | | Wallet wallet = this.walletService.saveWalletByPartyId(this.getLoginPartyId()); |
| | | double totleMoney = wallet.getMoney(); |
| | | profit = Arith.add(profit,totleMoney); |
| | | } } |
| | | Wallet wallet = this.walletService.saveWalletByPartyId(map.get("party_id").toString()); |
| | | |
| | | |
| | | if (map.get("direction") != null) { |