Ver Fonte

解决部分bug:解决风险率四舍五入问题

yu.jie há 3 anos atrás
pai
commit
2a1f64dc92

+ 5 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/HnstMainFragment.kt

@@ -811,9 +811,11 @@ class HnstMainFragment : BaseFragment<HnstMainViewmodel>() {
                                             if (worth != 0.0) {
                                                 risk = it?.usedmargin?.div(worth) ?: 0.0
                                             }
-                                            text = NumberUtils.roundNum(
-                                                NumberUtils.doubleDistortion(risk.toString()), 4
-                                            ).toPercentage2()
+//                                            text = NumberUtils.roundNum(
+//                                                NumberUtils.doubleDistortion(risk.toString()), 4
+//                                            ).toPercentage2()
+
+                                            text = risk.toString().toPercentage2()
                                         } else {
                                             text = "****"
                                         }