yu.jie 3 éve
szülő
commit
6f4be26762

+ 37 - 8
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/account/RydzAccountActivity.kt

@@ -415,14 +415,45 @@ class MoneyInfoUI(
                      * 余额=可用+冻结;
                      */
                     viewModel.usedAccountData.bindOptional(context) {
+//                        if (it?.valueOfposition_keep_watch_profit_and_loss ?: 0.0 > 0) {
+//                            val parmasvalue =
+//                                GlobalDataCollection.instance?.getSystemParamsValue("143")
+//                            if (parmasvalue == "1") {
+//                                text = NumberUtils.roundNum(
+//                                    NumberUtils.doubleDistortion(
+//                                        it?.canUserAmount?.plus(it.valueOfposition_keep_watch_profit_and_loss)
+//                                            ?.toString()
+//                                    ), 2
+//                                )
+//                            } else if (parmasvalue == "0") {
+//                                text = NumberUtils.roundNum(
+//                                    NumberUtils.doubleDistortion(it?.canUserAmount?.toString()),
+//                                    2
+//                                )
+//                            }
+//                        } else {
+//                            text = NumberUtils.roundNum(
+//                                NumberUtils.doubleDistortion(
+//                                    it?.canUserAmount?.plus(it.valueOfposition_keep_watch_profit_and_loss)
+//                                        ?.toString()
+//                                ), 2
+//                            )
+//                        }
+//                        val freezeAmount = it?.freezemargin?.plus(it.otherfreezemargin)?.plus(it.freezecharge)?.plus(it.outamountfreeze)//冻结金额
+//                        val balance = it?.currentbalance?.minus(freezeAmount ?: 0.0)//
+//                        text = NumberUtils.roundNum(NumberUtils.doubleDistortion(balance?.toString()),2)
+
                         if (it?.valueOfposition_keep_watch_profit_and_loss ?: 0.0 > 0) {
                             val parmasvalue =
-                                GlobalDataCollection.instance?.getSystemParamsValue("143")
+                                GlobalDataCollection.instance?.getSystemParamsValue(
+                                    "113"
+                                )
                             if (parmasvalue == "1") {
                                 text = NumberUtils.roundNum(
                                     NumberUtils.doubleDistortion(
-                                        it?.canUserAmount?.plus(it.valueOfposition_keep_watch_profit_and_loss)
-                                            ?.toString()
+                                        it?.canUserAmount?.plus(
+                                            it.valueOfposition_keep_watch_profit_and_loss
+                                        )?.toString()
                                     ), 2
                                 )
                             } else if (parmasvalue == "0") {
@@ -434,14 +465,12 @@ class MoneyInfoUI(
                         } else {
                             text = NumberUtils.roundNum(
                                 NumberUtils.doubleDistortion(
-                                    it?.canUserAmount?.plus(it.valueOfposition_keep_watch_profit_and_loss)
-                                        ?.toString()
+                                    it?.canUserAmount?.plus(
+                                        it.valueOfposition_keep_watch_profit_and_loss
+                                    )?.toString()
                                 ), 2
                             )
                         }
-//                        val freezeAmount = it?.freezemargin?.plus(it.otherfreezemargin)?.plus(it.freezecharge)?.plus(it.outamountfreeze)//冻结金额
-//                        val balance = it?.currentbalance?.minus(freezeAmount ?: 0.0)//
-//                        text = NumberUtils.roundNum(NumberUtils.doubleDistortion(balance?.toString()),2)
                     }
                     textSizeAuto = 36
                     textColorInt = R.color.rma_black_33

+ 29 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/yrdzpurchase/listed/PurchaseListedActivity.kt

@@ -479,7 +479,35 @@ class SellListedUI(
             textView {
                 visibility = View.GONE
                 viewModel.usedAccountData.bindOptional(context) {
-                    text = "可用资金" + NumberUtils.roundNum(it?.canUserAmount.toString(), 2)
+                    if (it?.valueOfposition_keep_watch_profit_and_loss ?: 0.0 > 0) {
+                        val parmasvalue =
+                            GlobalDataCollection.instance?.getSystemParamsValue(
+                                "113"
+                            )
+                        if (parmasvalue == "1") {
+                            text = "可用资金" +NumberUtils.roundNum(
+                                NumberUtils.doubleDistortion(
+                                    it?.canUserAmount?.plus(
+                                        it.valueOfposition_keep_watch_profit_and_loss
+                                    )?.toString()
+                                ), 2
+                            )
+                        } else if (parmasvalue == "0") {
+                            text = "可用资金" +NumberUtils.roundNum(
+                                NumberUtils.doubleDistortion(it?.canUserAmount?.toString()),
+                                2
+                            )
+                        }
+                    } else {
+                        text = "可用资金" +NumberUtils.roundNum(
+                            NumberUtils.doubleDistortion(
+                                it?.canUserAmount?.plus(
+                                    it.valueOfposition_keep_watch_profit_and_loss
+                                )?.toString()
+                            ), 2
+                        )
+                    }
+//                    text = "可用资金" + NumberUtils.roundNum(it?.canUserAmount.toString(), 2)
                 }
                 textSizeAuto = 29
                 textColorInt = R.color.rma_black_33