| | |
| | | fee = holdOrderEntity.getOpeningFeeAmount(); |
| | | } |
| | | |
| | | BigDecimal rewardRatio = profitOrLoss.divide(bondAmount, 4, BigDecimal.ROUND_DOWN); |
| | | |
| | | log.info("fee:{}", fee); |
| | | ContractOrderEntity contractOrderEntity = ContractHoldOrderEntityMapper.INSTANCE.holdOrderToOrder(holdOrderEntity); |
| | | contractOrderEntity.setId(null); |
| | |
| | | contractOrderEntity.setClosingType(closingType); |
| | | contractOrderEntity.setSymbolCnt(closeCnt); |
| | | contractOrderEntity.setRewardAmount(profitOrLoss); |
| | | contractOrderEntity.setRewardRatio(rewardRatio); |
| | | contractOrderEntity.setBondAmount(bondAmount); |
| | | contractOrderEntity.setClosingTime(new Date()); |
| | | contractOrderEntity.setClosingFeeAmount(fee); |