Simon Zhou 3 лет назад
Родитель
Сommit
fe24031844

+ 6 - 6
RMA/.idea/deploymentTargetDropDown.xml

@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="deploymentTargetDropDown">
-    <targetSelectedWithDropDown>
+    <runningDeviceTargetSelectedWithDropDown>
       <Target>
-        <type value="QUICK_BOOT_TARGET" />
+        <type value="RUNNING_DEVICE_TARGET" />
         <deviceKey>
           <Key>
-            <type value="VIRTUAL_DEVICE_PATH" />
-            <value value="C:\Users\zhoux\.android\avd\Pixel_4_XL_API_30.avd" />
+            <type value="SERIAL_NUMBER" />
+            <value value="9HQDU19321012176" />
           </Key>
         </deviceKey>
       </Target>
-    </targetSelectedWithDropDown>
-    <timeTargetWasSelectedWithDropDown value="2022-02-24T06:17:57.595727800Z" />
+    </runningDeviceTargetSelectedWithDropDown>
+    <timeTargetWasSelectedWithDropDown value="2022-03-03T07:13:28.801450900Z" />
   </component>
 </project>

+ 0 - 1
RMA/.idea/gradle.xml

@@ -7,7 +7,6 @@
         <option name="testRunner" value="GRADLE" />
         <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
-        <option name="gradleJvm" value="Embedded JDK" />
         <option name="modules">
           <set>
             <option value="$PROJECT_DIR$" />

+ 1 - 1
RMA/.idea/misc.xml

@@ -22,7 +22,7 @@
       </map>
     </option>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/build/classes" />
   </component>
   <component name="ProjectType">

+ 2 - 2
RMA/app/build.gradle

@@ -19,8 +19,8 @@ android {
         applicationId "cn.muchinfo.rma"
         minSdkVersion 24
         targetSdkVersion 30
-        versionCode 50049
-        versionName "5.0.49"
+        versionCode 50050
+        versionName "5.0.50"
         multiDexEnabled true
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         //指定room.schemaLocation生成的文件路径

+ 3 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/utils/NumberUtils.java

@@ -62,7 +62,9 @@ public class NumberUtils {
     }
 
     public static String roundNum(double string, int num) {
-        return roundNum(String.valueOf(string), num);
+        java.text.NumberFormat nf = java.text.NumberFormat.getInstance();
+        nf.setGroupingUsed(false);
+        return roundNum(nf.format(string), num);
     }
 
     public static int power(int a, int b) {

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/tjmd/TjmdHomeViewModel.kt

@@ -187,7 +187,7 @@ class TjmdHomeViewModel : BaseViewModel(){
                     if (s > wrAverageTradePriceMax) wrAverageTradePriceMax = s.toFloat()
                 }
                 // 顺序排列
-                wrAverageTradePriceDataList.postValue(respData?.sortedBy { it?.getTime() })
+                wrAverageTradePriceDataList.postValue(respData?.sortedBy { it.getTime() })
             }
 
         }

+ 12 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/yrdzpurchase/swaps/delisting/SwapsDelistingActivity.kt

@@ -29,6 +29,7 @@ import cn.muchinfo.rma.view.base.future.trade.itemView
 import cn.muchinfo.rma.view.base.home.contract.emptyView
 import cn.muchinfo.rma.view.base.home.contract.verticalEmptyView
 import com.blankj.utilcode.util.ToastUtils
+import com.desfate.chart.util.LogUtils
 import com.desfate.chart.util.MathUtil
 import kotlinx.android.synthetic.main.list_head.view.*
 import mtp.polymer.com.autowidget.dialog.creatAccountDataSheetDialog
@@ -534,7 +535,17 @@ class SwapsDelistingActivity : BaseActivity<SwapsDelistingViewModel>(){
                                 }else{
                                     val numberInput = onePriceInputNumberEdittext.text.toString().toDouble()
                                     if (priceType.value == 1){//市价计算
-                                        text = NumberUtils.roundNum(viewModel.quoteDayData.value?.getPrice()?.times(numberInput)?.times(goodsInfo.agreeunit) ?: 0.0,2) + "  需履约保证金 :" + infoc?.getMargainValue(amout = viewModel.quoteDayData.value?.getPrice()?.times(numberInput)?.times(goodsInfo.agreeunit) ?: 0.0,number = numberInput ?: 0.0,goodsid = goodsId ?: "0")
+                                        val money = viewModel.quoteDayData.value?.getPrice()?.times(numberInput)?.times(goodsInfo.agreeunit)
+                                        if (money == null) {
+                                            LogUtils.e("aaaaa", viewModel.quoteDayData.value?.getPrice().toString())
+                                            LogUtils.e("aaaaa", numberInput.toString())
+
+                                            ToastUtils.showLong("初始化数据异常,请重试")
+                                            finish()
+
+                                            return@bindOptional
+                                        }
+                                        text = NumberUtils.roundNum(money ?: 0.0,2) + "  需履约保证金 :" + infoc?.getMargainValue(amout = viewModel.quoteDayData.value?.getPrice()?.times(numberInput)?.times(goodsInfo.agreeunit) ?: 0.0,number = numberInput ?: 0.0,goodsid = goodsId ?: "0")
                                     }else{//限价计算
                                         if (limit_price_edittext.text.toString().isNullOrEmpty()){
                                             text = "--"