1
zj
2024-08-15 171628f9a463f5af3ce55d897fa37b1b80ea4e8b
src/main/java/project/project/web/admin/AdminContractOrderController.java
@@ -126,7 +126,7 @@
             * 计算全仓收益 保证金
             */
            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){
@@ -134,7 +134,7 @@
               }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);
@@ -289,18 +289,15 @@
             * 计算全仓收益 保证金
             */
            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) {