zhou.xiaoning 3 年之前
父節點
當前提交
7a13ad1308

+ 9 - 0
RMA/.idea/misc.xml

@@ -3,6 +3,10 @@
   <component name="DesignSurface">
     <option name="filePathToZoomLevelMap">
       <map>
+        <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/app/src/main/res/drawable/__picker_camera.xml" value="0.4083333333333333" />
+        <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/app/src/main/res/drawable/__picker_delete.xml" value="0.4083333333333333" />
+        <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/app/src/main/res/drawable/ic_rma_change_img.xml" value="0.4083333333333333" />
+        <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/app/src/main/res/drawable/nav_refresh.xml" value="0.4083333333333333" />
         <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/app/src/main/res/layout/activity_chart.xml" value="0.4466666666666667" />
         <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/app/src/main/res/layout/activity_tjmd_chart.xml" value="0.4466666666666667" />
         <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/app/src/main/res/layout/activity_yrdz_chart.xml" value="0.39010416666666664" />
@@ -10,6 +14,11 @@
         <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/app/src/main/res/layout/chart_info_layout_tjmd.xml" value="0.39010416666666664" />
         <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/app/src/main/res/layout/contract_layout_item_content.xml" value="0.5541666666666667" />
         <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/app/src/main/res/layout/exposure_report_layout_item_content.xml" value="0.4125" />
+        <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/chart/src/main/res/drawable/chart_click_submit.xml" value="0.4083333333333333" />
+        <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/chart/src/main/res/drawable/load_corners_submit.xml" value="0.4083333333333333" />
+        <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/chart/src/main/res/drawable/load_corners_submit_p.xml" value="0.4083333333333333" />
+        <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/chart/src/main/res/drawable/load_corners_submit_un.xml" value="0.4083333333333333" />
+        <entry key="..\:/Repo/MyGogs/Muchinfo/MTP2.0_RMA/RMA/chart/src/main/res/layout/chart_attorn.xml" value="0.3921875" />
       </map>
     </option>
   </component>

+ 2 - 2
RMA/app/build.gradle

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

+ 2 - 2
RMA/app/src/main/java/cn/muchinfo/rma/business/future/FutureManager.kt

@@ -218,10 +218,10 @@ class FutureManager {
                                 it.isAccessible = true
                                 when (it.name) {
                                     "totalturnover" -> { // 总金额
-                                        goodsQuoteTik[it.name]?.toDouble()?.let { value ->
+                                        goodsQuoteTik[it.name]?.toDouble()?.times(10.0.pow(-goodsInfoAndQuote.goodsInfo.decimalplace)).let { value ->
                                             it.setDouble(
                                                 goodsInfoAndQuote.quoteDayData,
-                                                value
+                                                value!!
                                             )
                                         }
                                     }

+ 5 - 0
RMA/app/src/main/java/cn/muchinfo/rma/global/data/QuoteDayData.kt

@@ -137,6 +137,11 @@ data class QuoteDayData(
 
 ) {
 
+//    fun getRealTotalTurnover(decimalplace: Int): Double {
+//        return totalturnover
+//        // return totalturnover.times(Math.pow(0.1, decimalplace.toDouble()))
+//    }
+
     fun getPrice() : Double{
         var price = 0.0
         if (last != 0.0){

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

@@ -40,7 +40,7 @@ object Constant {
 
 //    const val baseurl = "http://218.17.158.45:21001/cfg?key=test_139"// 邓工139外网环境 2100000003/123456
 //    const val baseurl = "http://192.168.31.176:8080/cfg?key=test_176" // 邓工 新会陈皮
-//    const val baseurl = "http://192.168.31.137:8080/cfg?key=test_137" // 麦顿
+//    const val baseurl = "http://192.168.31.139:8080/cfg?key=test_139" // 麦顿
 
     /**
      * 用sp存储基础url的key

+ 2 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/ContractOrdersViewModel.kt

@@ -345,6 +345,8 @@ class ContractOrdersViewModel : BaseViewModel(){
             newRightData.add(it.tradeqty.toString())
             //成交金额
             newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.tradeamount),2))
+            //平仓盈亏
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.closepl),2))
             //手续费
             newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.charge),2))
             //成交单号

+ 15 - 10
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractPositionContentAdapter.java

@@ -241,17 +241,22 @@ public class ContractPositionContentAdapter extends RecyclerView.Adapter<Contrac
             QHjRightData profitData = new QHjRightData();
             profitData.setValue(Profit);
 
-            String textUpDown = NumberUtils.roundNum(NumberUtils.doubleDistortion(String.valueOf((quoteDayData.getPrice() - quoteDayData.getPresettle()))), 2);//涨跌
-            if (Double.valueOf(textUpDown) > 0) {
-
-                profitData.setColorType("3");
-            } else if (Double.valueOf(textUpDown) < 0) {
-
-                profitData.setColorType("2");
-            } else {
-
-                profitData.setColorType("1");
+//            String textUpDown = NumberUtils.roundNum(NumberUtils.doubleDistortion(String.valueOf((quoteDayData.getPrice() - quoteDayData.getPresettle()))), 2);//涨跌
+//            if (Double.valueOf(textUpDown) > 0) {
+//
+//                profitData.setColorType("3");
+//            } else if (Double.valueOf(textUpDown) < 0) {
+//
+//                profitData.setColorType("2");
+//            } else {
+//
+//                profitData.setColorType("1");
+//            }
+            profitData.setColorType("1");
+            if (!Profit.equals("--")) {
+                profitData.setColorType(Double.parseDouble(Profit) > 0 ? "3" : "2");
             }
+
             rightData.add(directionData);
             rightData.add(curpositionqtyData);
             rightData.add(enableqtyData);

+ 41 - 23
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reference/ReferenceAdapter.java

@@ -18,6 +18,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
 import com.blankj.utilcode.util.ActivityUtils;
+import com.blankj.utilcode.util.SPUtils;
 import com.blankj.utilcode.util.ToastUtils;
 
 import java.util.ArrayList;
@@ -33,6 +34,7 @@ import cn.muchinfo.rma.global.database.DataBase;
 import cn.muchinfo.rma.global.utils.TimeUtils;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
 import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils;
+import cn.muchinfo.rma.view.base.app.Constant;
 import cn.muchinfo.rma.view.base.chart.ChartActivity;
 import cn.muchinfo.rma.view.base.platinumtreasure.PlatinumTrasureDetailsActivity;
 import cn.muchinfo.rma.view.base.platinumtreasure.adapter.QHjRightData;
@@ -137,11 +139,13 @@ public class ReferenceAdapter extends RecyclerView.Adapter<ReferenceAdapter.Item
 //            askData.setColorType(String.valueOf(quoteDayData.getColorByPresettleReturnInt()));
             rightData.add(askData);
 
-            // 卖量取卖一量
-            QHjRightData askNumberData = new QHjRightData();
-            askNumberData.setValue(String.valueOf(quoteDayData.getAskvolume()));
-            askNumberData.setColorType("1");
-            rightData.add(askNumberData);
+            if (!SPUtils.getInstance().getString(Constant.oem).equals("tjmd")) {
+                // 卖量取卖一量
+                QHjRightData askNumberData = new QHjRightData();
+                askNumberData.setValue(String.valueOf(quoteDayData.getAskvolume()));
+                askNumberData.setColorType("1");
+                rightData.add(askNumberData);
+            }
 
             //买价取买一价
             QHjRightData bidData = new QHjRightData();
@@ -154,11 +158,13 @@ public class ReferenceAdapter extends RecyclerView.Adapter<ReferenceAdapter.Item
 //            bidData.setColorType(String.valueOf(quoteDayData.getColorByPresettleReturnInt()));
             rightData.add(bidData);
 
-            //买量取买一量
-            QHjRightData biNumberData = new QHjRightData();
-            biNumberData.setValue(String.valueOf(quoteDayData.getBidvolume()));
-            biNumberData.setColorType("1");
-            rightData.add(biNumberData);
+            if (!SPUtils.getInstance().getString(Constant.oem).equals("tjmd")) {
+                //买量取买一量
+                QHjRightData biNumberData = new QHjRightData();
+                biNumberData.setValue(String.valueOf(quoteDayData.getBidvolume()));
+                biNumberData.setColorType("1");
+                rightData.add(biNumberData);
+            }
 
             //最新价
             QHjRightData newPriceData = new QHjRightData();
@@ -283,7 +289,7 @@ public class ReferenceAdapter extends RecyclerView.Adapter<ReferenceAdapter.Item
             if (quoteDayData.getPrice() == 0.0){
                 amplitudeValue = "--";
             }else {
-                amplitudeValue = NumberUtils.roundNum(String.valueOf(((quoteDayData.getHighest() - quoteDayData.getLowest()) / quoteDayData.getPrice()) * 100),2) + "%";
+                amplitudeValue = NumberUtils.roundNum(String.valueOf(((quoteDayData.getHighest() - quoteDayData.getLowest()) / quoteDayData.getPresettle()) * 100),2) + "%";
             }
             amplitude.setValue(amplitudeValue);
             amplitude.setColorType("1");
@@ -306,20 +312,32 @@ public class ReferenceAdapter extends RecyclerView.Adapter<ReferenceAdapter.Item
             //金额
             QHjRightData money = new QHjRightData();
             money.setValue(NumberUtils.turnoverShort(String.valueOf(quoteDayData.getTotalturnover())));
+//            money.setValue(NumberUtils.turnoverShort(String.valueOf(quoteDayData.getRealTotalTurnover(data.getDecimalplace()))));
             money.setColorType("1");
 
-            rightData.add(riseFallData);//涨跌
-            rightData.add(appliesData);//涨跌幅
-            rightData.add(openRightData);//今开
-            rightData.add(yesCloseRightData);//昨收
-            rightData.add(lowestRightData);//最低
-            rightData.add(highRightData);//最高
-            rightData.add(amplitude);//振幅
-            rightData.add(allAmount);//总量
-            rightData.add(nowquantity);//现量
-            rightData.add(position);//持仓量
-            rightData.add(growing);//日增
-            rightData.add(money);//金额
+            if (!SPUtils.getInstance().getString(Constant.oem).equals("tjmd")) {
+                rightData.add(riseFallData);//涨跌
+                rightData.add(appliesData);//涨跌幅
+                rightData.add(openRightData);//今开
+                rightData.add(yesCloseRightData);//昨收
+                rightData.add(lowestRightData);//最低
+                rightData.add(highRightData);//最高
+                rightData.add(amplitude);//振幅
+                rightData.add(allAmount);//总量
+                rightData.add(nowquantity);//现量
+                rightData.add(position);//持仓量
+                rightData.add(growing);//日增
+                rightData.add(money);//金额
+            } else {
+                rightData.add(riseFallData);//涨跌
+                rightData.add(appliesData);//涨跌幅
+                rightData.add(openRightData);//今开
+                rightData.add(yesCloseRightData);//昨收
+                rightData.add(lowestRightData);//最低
+                rightData.add(highRightData);//最高
+                rightData.add(amplitude);//振幅
+                rightData.add(money);//金额
+            }
         }
         ContractTradePositionData positionData = null;
         List<ContractTradePositionData> positionDataList = GlobalDataCollection.Companion.getInstance().getContractTradePositionDataArrayList();

+ 45 - 39
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/WithdrawalActivity.kt

@@ -490,19 +490,21 @@ class MoneyOutUI(
 
             verticalEmptyView()
 
-            linearLayout {
-                gravity = Gravity.CENTER_VERTICAL
-                textView {
-                    textSizeAuto = 31
-                    textColorInt = R.color.text_hint_color_two
-                    text =
-                        "提现时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue(
-                            "013"
-                        )
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(36)
-                }
-            }.lparams(matchParent, autoSize(100))
+            if (SPUtils.getInstance().getString(Constant.oem) != "tjmd") {
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        textSizeAuto = 31
+                        textColorInt = R.color.text_hint_color_two
+                        text =
+                            "提现时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue(
+                                "013"
+                            )
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(matchParent, autoSize(100))
+            }
 
             linearLayout {
                 background = resources.getDrawable(R.color.white)
@@ -665,19 +667,21 @@ class MoneyInOnlineUI(
 
             verticalEmptyView()
 
-            linearLayout {
-                gravity = Gravity.CENTER_VERTICAL
-                textView {
-                    textSizeAuto = 31
-                    textColorInt = R.color.text_hint_color_two
-                    text =
-                        "充值时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue(
-                            "013"
-                        )
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(36)
-                }
-            }.lparams(matchParent, autoSize(100))
+            if (SPUtils.getInstance().getString(Constant.oem) != "tjmd") {
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        textSizeAuto = 31
+                        textColorInt = R.color.text_hint_color_two
+                        text =
+                            "充值时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue(
+                                "013"
+                            )
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(matchParent, autoSize(100))
+            }
 
             viewModel.payInfoRequest.bindOptional(context) {
                 LogUtils.eTag("asdhasgfjahsdha", it)
@@ -1074,19 +1078,21 @@ class MoneyInOutlineUI(
 
             verticalEmptyView()
 
-            linearLayout {
-                gravity = Gravity.CENTER_VERTICAL
-                textView {
-                    textSizeAuto = 31
-                    textColorInt = R.color.text_hint_color_two
-                    text =
-                        "充值时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue(
-                            "013"
-                        )
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(36)
-                }
-            }.lparams(matchParent, autoSize(100))
+            if (SPUtils.getInstance().getString(Constant.oem) != "tjmd") {
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        textSizeAuto = 31
+                        textColorInt = R.color.text_hint_color_two
+                        text =
+                            "充值时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue(
+                                "013"
+                            )
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(matchParent, autoSize(100))
+            }
 
             linearLayout {
                 background = resources.getDrawable(R.color.white)

+ 9 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/reference/ReferenceFragment.kt

@@ -9,11 +9,13 @@ import cn.muchinfo.rma.R
 import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseFragment
+import cn.muchinfo.rma.view.base.app.Constant
 import cn.muchinfo.rma.view.base.home.reference.ReferenceAdapter
 import cn.muchinfo.rma.view.base.home.reference.ReferenceViewModel
 import cn.muchinfo.rma.view.base.procurement.TopTabYrdzAdpater
 import cn.muchinfo.rma.view.eventbus.QuoteMessageEvent
 import com.blankj.utilcode.util.LogUtils
+import com.blankj.utilcode.util.SPUtils
 import org.greenrobot.eventbus.EventBus
 import org.greenrobot.eventbus.Subscribe
 import org.greenrobot.eventbus.ThreadMode
@@ -136,7 +138,7 @@ class ReferenceFragment : BaseFragment<ReferenceViewModel>() , ReferenceAdapter.
                             }
                         }
                         relativeLayout {
-                            recyclerView {//待点价头部右侧数据
+                            recyclerView { // 列头
                                 val linearLayoutManager = LinearLayoutManager(context)
                                 linearLayoutManager.orientation = LinearLayoutManager.HORIZONTAL
                                 layoutManager = linearLayoutManager
@@ -150,7 +152,11 @@ class ReferenceFragment : BaseFragment<ReferenceViewModel>() , ReferenceAdapter.
 //                                }
 //                                topAdapter.setDatas(titleStringList)
 //                            }
-                            topAdapter.setDatas(arrayListOf("卖价","卖量","买价","买量","最新价","涨跌","幅度","今开","昨结","最低","最高","振幅","总量","现量","持仓量","日增","金额"))
+                            if (SPUtils.getInstance().getString(Constant.oem) != "tjmd") {
+                                topAdapter.setDatas(arrayListOf("卖价","卖量","买价","买量","最新价","涨跌","幅度","今开","昨结","最低","最高","振幅","总量","现量","持仓量","日增","金额"))
+                            } else {
+                                topAdapter.setDatas(arrayListOf("卖价","买价","最新价","涨跌","幅度","今开","昨结","最低","最高","振幅","金额"))
+                            }
                         }
                     }.lparams(matchParent, matchParent)
                 }.lparams(matchParent, autoSize(100))
@@ -184,7 +190,7 @@ class ReferenceFragment : BaseFragment<ReferenceViewModel>() , ReferenceAdapter.
                         setEnableScrollContentWhenLoaded(false)
                         setEnableLoadMoreWhenContentNotFull(false)
 
-                        recyclerView {//待点价列表
+                        recyclerView { // 数据
                             dataRecyclerview = this
                             background = resources.getDrawable(R.color.white)
                             adapter = referenceAdapter

+ 21 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallActivity.kt

@@ -41,6 +41,7 @@ import com.qmuiteam.qmui.widget.tab.QMUITabSegment
 import mtp.polymer.com.autowidget.adapter.BaseAdapter
 import mtp.polymer.com.autowidget.dialog.*
 import mtp.polymer.com.autowidget.utils.bindTaskStatus
+import mtp.polymer.com.autowidget.utils.showLoading
 import org.greenrobot.eventbus.EventBus
 import org.greenrobot.eventbus.Subscribe
 import org.greenrobot.eventbus.ThreadMode
@@ -281,6 +282,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
 
                 emptyView()
 
+                // 挂牌
                 imageView {
                     onThrottleFirstClick {
                         if (pricetype == "1") {//一口价
@@ -304,6 +306,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                     marginEnd = autoSize(36)
                 }
 
+                // 详情
                 imageView {
                     onThrottleFirstClick {
                         val intent = Intent()
@@ -318,6 +321,20 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                 }.lparams(autoSize(45), autoSize(45)) {
                     marginEnd = autoSize(36)
                 }
+
+                // 刷新
+//                imageView {
+//                    onThrottleFirstClick {
+//                        viewModel.querySellDataList(sellHallUI.type, sellHallUI.pricetype, orderQuoteData)
+//                        viewModel.queryBuyDataList(buyHallUI.type, buyHallUI.pricetype, orderQuoteData)
+//
+//                        ToastUtils.showLong("刷新成功")
+//                    }
+//                    imageResource = R.mipmap.refresh_a
+//                }.lparams(autoSize(45), autoSize(45)) {
+//                    marginEnd = autoSize(36)
+//                }
+
             }.lparams(matchParent, autoSize(120))
 
             linearLayout {
@@ -2652,8 +2669,8 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
 class SellHallUI(
     private val activity: AppCompatActivity,
     private val viewModel: BusinessHallViewModel,
-    private val type: String,
-    private val pricetype: String,
+    public val type: String,
+    public val pricetype: String,
     private val data: OrderQuoteData
 ) {
 
@@ -2763,8 +2780,8 @@ class SellHallUI(
 class BuyHallUI(
     private val activity: AppCompatActivity,
     private val viewModel: BusinessHallViewModel,
-    private val type: String,
-    private val pricetype: String,
+    public val type: String,
+    public val pricetype: String,
     private val data: OrderQuoteData
 ) {
 

+ 7 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/yrdzpurchase/swaps/TransferSwapsAdapter.java

@@ -110,7 +110,9 @@ public class TransferSwapsAdapter extends RecyclerView.Adapter<TransferSwapsAdap
         }
 
         itemViewHolder.tvLeftTitle.setText(datas.get(i).getGoodsname());
-        itemViewHolder.tv_left_title_two.setText(quoteGoodsListData.getRefgoodsname());
+        if (quoteGoodsListData != null) {
+            itemViewHolder.tv_left_title_two.setText(quoteGoodsListData.getRefgoodsname());
+        }
         //右边滑动部分
         LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
         linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
@@ -124,8 +126,10 @@ public class TransferSwapsAdapter extends RecyclerView.Adapter<TransferSwapsAdap
         List<GoodsInfoAndQuotes> quotesList = GlobalDataCollection.Companion.getInstance().getGoodsInfoAndQuotesList();//获取盘面信息列表
         for (int j = 0; j < quotesList.size(); j++) {
             if (quotesList.get(j) != null) {
-                if (Objects.equals(quoteGoodsListData.getRefgoodscode(), quotesList.get(j).getOutgoodscode())) {
-                    quoteDayData = quotesList.get(j).getQuoteDayData();//赋值当前商品的盘面信息
+                if (quoteGoodsListData != null) {
+                    if (Objects.equals(quoteGoodsListData.getRefgoodscode(), quotesList.get(j).getOutgoodscode())) {
+                        quoteDayData = quotesList.get(j).getQuoteDayData();//赋值当前商品的盘面信息
+                    }
                 }
             }
         }

+ 16 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/yrdzpurchase/swaps/business/SwapsBusinessHallActivity.kt

@@ -33,6 +33,7 @@ import cn.muchinfo.rma.view.eventbus.QuoteMessageEvent
 import com.blankj.utilcode.util.ActivityUtils
 import com.blankj.utilcode.util.ConvertUtils
 import com.blankj.utilcode.util.LogUtils
+import com.blankj.utilcode.util.ToastUtils
 import com.qmuiteam.qmui.util.QMUIDisplayHelper
 import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
 import com.qmuiteam.qmui.widget.tab.QMUITabSegment
@@ -46,7 +47,7 @@ import org.jetbrains.anko.*
 import org.jetbrains.anko.support.v4.viewPager
 
 /**
- * 合约市场买卖大厅
+ * (掉期交易)合约市场买卖大厅
  */
 class SwapsBusinessHallActivity : BaseActivity<SwapsBusinessHallViewModel>() {
 
@@ -221,6 +222,18 @@ class SwapsBusinessHallActivity : BaseActivity<SwapsBusinessHallViewModel>() {
 
                 emptyView()
 
+                // 刷新
+                imageView {
+                    onThrottleFirstClick {
+                        viewModel.querySellDataList(sellHallUI.goodsId)
+                        viewModel.queryBuyDataList(buyHallUI.goodsId)
+
+                        ToastUtils.showLong("刷新成功")
+                    }
+                    imageResource = R.mipmap.refresh_a
+                }.lparams(autoSize(45), autoSize(45)) {
+                    marginEnd = autoSize(36)
+                }
 
                 imageView {
                     onThrottleFirstClick {
@@ -388,7 +401,7 @@ class SwapsBusinessHallActivity : BaseActivity<SwapsBusinessHallViewModel>() {
 class SwapsSellHallUI(
     private val activity: AppCompatActivity,
     private val viewModel: SwapsBusinessHallViewModel,
-    private val goodsId: String,
+    public val goodsId: String,
     private val goodsCode: String,
     private val quoteGoodsListData : QuoteGoodsListData
 ) {
@@ -496,7 +509,7 @@ class SwapsSellHallUI(
 class SwapsBuyHallUI(
     private val activity: AppCompatActivity,
     private val viewModel: SwapsBusinessHallViewModel,
-    private val goodsId: String,
+    public val goodsId: String,
     private val goodsCode: String,
     private val quoteGoodsListData : QuoteGoodsListData
 ) {

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

@@ -548,7 +548,11 @@ class SwapsDelistingActivity : BaseActivity<SwapsDelistingViewModel>(){
                             if (onePriceInputNumberEdittext.text.toString().isNullOrEmpty()){
                                 numberInput = 0.0
                             }else{
-                                numberInput = onePriceInputNumberEdittext.text.toString().toDouble()
+                                if (GlobalDataCollection.instance?.loginQueryData?.userInfo?.usertype == 2) { //登录用户为掉期交易商时只能整单摘
+                                    numberInput = data.orderqty?.toDouble() ?: 0.0
+                                } else {
+                                    numberInput = onePriceInputNumberEdittext.text.toString().toDouble()
+                                }
                             }
                             val amout = data.orderprice?.toDouble()?.times(numberInput)?.times(goodsInfo.agreeunit)
                             val infoc = viewModel.tjmdTodayAccountMarginData.value?.infoc

+ 7 - 0
RMA/app/src/main/res/drawable/nav_refresh.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_pressed="true" android:drawable="@mipmap/refresh_a" />
+    <item android:drawable="@mipmap/refresh_a" />
+
+</selector>

+ 15 - 13
RMA/app/src/main/res/layout/chart_info_layout_tjmd.xml

@@ -63,16 +63,17 @@
         <RelativeLayout
             android:id="@+id/business_value"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content">
+            android:layout_height="wrap_content"
+            android:visibility="gone">
 
             <TextView
                 android:id="@+id/business_value_title"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_alignParentStart="true"
-                android:textSize="12sp"
+                android:text="成交量"
                 android:textColor="@color/rma_black_33"
-                android:text="成交量" />
+                android:textSize="12sp" />
 
             <TextView
                 android:id="@+id/business_value_value"
@@ -87,7 +88,8 @@
         <RelativeLayout
             android:id="@+id/holder_amount"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content">
+            android:layout_height="wrap_content"
+            android:visibility="gone">
 
             <TextView
                 android:id="@+id/holder_amount_title"
@@ -269,16 +271,16 @@
             android:id="@+id/trading_limit"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:visibility="invisible">
+            android:visibility="gone">
 
             <TextView
                 android:id="@+id/trading_limit_title"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_alignParentStart="true"
+                android:text="涨&#8195;停"
                 android:textColor="@color/rma_black_33"
-                android:textSize="12sp"
-                android:text="涨&#8195;停" />
+                android:textSize="12sp" />
 
             <TextView
                 android:id="@+id/trading_limit_value"
@@ -294,16 +296,16 @@
             android:id="@+id/drop_limit"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:visibility="invisible">
+            android:visibility="gone">
 
             <TextView
                 android:id="@+id/drop_limit_title"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:textSize="12sp"
                 android:layout_alignParentStart="true"
+                android:text="跌&#8195;停"
                 android:textColor="@color/rma_black_33"
-                android:text="跌&#8195;停" />
+                android:textSize="12sp" />
 
             <TextView
                 android:id="@+id/drop_limit_value"
@@ -400,7 +402,7 @@
             android:id="@+id/sell_amount"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:visibility="invisible" >
+            android:visibility="gone" >
 
             <TextView
                 android:id="@+id/sell_amount_title"
@@ -433,9 +435,9 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_alignParentStart="true"
+                android:text="买&#8195;量"
                 android:textColor="@color/rma_black_33"
-                android:textSize="12sp"
-                android:text="买&#8195;量" />
+                android:textSize="12sp" />
 
             <TextView
                 android:id="@+id/buy_amount_present"

二進制
RMA/app/src/main/res/mipmap-hdpi/refresh_a.png