|
|
@@ -556,23 +556,39 @@ class MoneyInfoUI(
|
|
|
GlobalDataCollection.instance?.getSystemParamsValue(
|
|
|
"087"
|
|
|
)
|
|
|
- var worth = 0.0
|
|
|
- if (parmasvalue == "1") {//1.风险净值=期末余额+市值+浮动盈亏(收益权)-其他冻结-出金冻结
|
|
|
- worth = it?.currentbalance?.plus(
|
|
|
- it.valueOfposition
|
|
|
- )?.plus(it.valueOfposition_keep_watch_profit_and_loss)
|
|
|
- ?.minus(it.otherfreezemargin)
|
|
|
- ?.minus(it.outamountfreeze) ?: 0.0
|
|
|
-
|
|
|
-
|
|
|
- } else {//0.净值=期末余额+浮动盈亏(收益权)-其他冻结-出金冻结
|
|
|
- worth = it?.currentbalance?.plus(it.valueOfposition_keep_watch_profit_and_loss)
|
|
|
- ?.minus(it.otherfreezemargin)
|
|
|
- ?.minus(it.outamountfreeze) ?: 1.0
|
|
|
- }
|
|
|
+// var worth = 0.0
|
|
|
+// if (parmasvalue == "1") {//1.风险净值=期末余额+市值+浮动盈亏(收益权)-其他冻结-出金冻结
|
|
|
+// worth = it?.currentbalance?.plus(
|
|
|
+// it.valueOfposition
|
|
|
+// )?.plus(it.valueOfposition_keep_watch_profit_and_loss)
|
|
|
+// ?.minus(it.otherfreezemargin)
|
|
|
+// ?.minus(it.outamountfreeze) ?: 0.0
|
|
|
+//
|
|
|
+//
|
|
|
+// } else {//0.净值=期末余额+浮动盈亏(收益权)-其他冻结-出金冻结
|
|
|
+// worth = it?.currentbalance?.plus(it.valueOfposition_keep_watch_profit_and_loss)
|
|
|
+// ?.minus(it.otherfreezemargin)
|
|
|
+// ?.minus(it.outamountfreeze) ?: 1.0
|
|
|
+// }
|
|
|
+ val worth: Double
|
|
|
+ worth =
|
|
|
+ if (parmasvalue == "1") {//1.风险净值=期末余额+市值+浮动盈亏(收益权)-其他冻结-出金冻结
|
|
|
+ it?.currentbalance?.plus(
|
|
|
+ it.valueOfposition
|
|
|
+ )
|
|
|
+ ?.plus(it.valueOfposition_keep_watch_profit_and_loss)
|
|
|
+ ?.minus(it.otherfreezemargin)
|
|
|
+ ?.minus(it.outamountfreeze) ?: 0.0
|
|
|
+
|
|
|
+
|
|
|
+ } else {//0.净值=期末余额+浮动盈亏(收益权)-其他冻结-出金冻结
|
|
|
+ it?.currentbalance?.plus(it.valueOfposition_keep_watch_profit_and_loss)
|
|
|
+ ?.minus(it.otherfreezemargin)
|
|
|
+ ?.minus(it.outamountfreeze) ?: 1.0
|
|
|
+ }
|
|
|
|
|
|
var risk = 0.0
|
|
|
- if (it?.valueOfposition != 0.0) {
|
|
|
+ if (worth != 0.0) {
|
|
|
risk = it?.usedmargin?.div(worth) ?: 0.0
|
|
|
}
|
|
|
text =
|