Browse Source

风险管理6月25日提交代码-liu.bolan-千海金

Liu.bolan 4 years ago
parent
commit
976904922a
30 changed files with 299 additions and 83 deletions
  1. 2 0
      RMA/app/src/main/AndroidManifest.xml
  2. 2 7
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AccountData.kt
  3. 4 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ContractTradeDetailData.kt
  4. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ContractTradeOrderDetailData.kt
  5. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/PayOrderData.kt
  6. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt
  7. 153 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/InformationDetailsActivity.kt
  8. 1 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/SeaKingMainFragment.kt
  9. 5 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/AddCastSurelyActivity.kt
  10. 14 5
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/CastSurelyDetailsActivity.kt
  11. 4 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/CastSurelyDetailsViewHolder.kt
  12. 4 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/MyCastSurelyViewHolder.kt
  13. 12 7
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/MyCastSurelyViewModel.kt
  14. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/pickup/PickUpGoodsActivity.kt
  15. 14 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/AddWithDrawActivity.kt
  16. 0 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/WithDrawManagementActivity.kt
  17. 6 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/PlatinumTreasureFragment.kt
  18. 3 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/PlatinumTreasureViewModel.kt
  19. 4 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/adapter/PlatnumTreasureAdapter.java
  20. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/CancellationsViewHolder.kt
  21. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/DealViewHolder.kt
  22. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/FinancialViewHolder.kt
  23. 3 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/MoneyFlowingVIewHolder.kt
  24. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/NoPayViewHolder.kt
  25. 37 14
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PlatinumBuyOrSellUI.kt
  26. 0 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PlatinumMoneyUI.kt
  27. 5 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PlatinumPositionUI.kt
  28. 3 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PositionDetailsActivity.kt
  29. 3 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PositionViewHolder.kt
  30. 7 6
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/qhjhome/QhjInformationViewHolder.kt

+ 2 - 0
RMA/app/src/main/AndroidManifest.xml

@@ -340,6 +340,8 @@
         <activity android:name=".view.base.platinumtreasure.activity.PlatnumMoneyActivity"/>
 
         <activity android:name=".view.base.platinumtreasure.PlatinumTrasureDetailsActivity"/>
+
+        <activity android:name=".view.base.home.InformationDetailsActivity"/>
     </application>
 
 </manifest>

+ 2 - 7
RMA/app/src/main/java/cn/muchinfo/rma/global/data/AccountData.kt

@@ -139,13 +139,8 @@ open class AccountData(
                     GlobalDataCollection.instance?.goodsInfoAndQuotesList?.find { data ->
                         data.outgoodscode == goodsInfoData.goodscode
                     }?.quoteDayData
-                valueOfposition += quoteDayData?.ask?.times(
-                    it?.curpositionqty?.toDouble()?.div(
-                        Math.pow(
-                            10.0,
-                            goodsInfoData.qtydecimalplace.toDouble()
-                        )
-                    ) ?: 0.0
+                valueOfposition += quoteDayData?.bid?.times(
+                    it?.curpositionqty?.toDouble() ?: 0.0
                 ) ?: 0.0
                 /** 计算融资额 **/
                 val qhjContractDetailsDataArrayList = GlobalDataCollection.instance?.qhjContractDetailsDataArrayList

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

@@ -16,6 +16,7 @@ data class ContractTradeDetailData(
     val closefeealgorithm : String? = "",//平仓手续费收取方式 1:比率 2:固定
     val closememberchargevalue : String? = "",//平仓会员手续费设置值
     val closepl : String? = "",//平仓盈亏
+    val enumdicname : String? = "",//单位
     val closepl2 : String? = "",//平仓盈亏[逐笔]
     val closeqty : String?  ="",//平仓数量(先建后平操作 需要记录)
     val creditamount : String?  ="",//授信金额
@@ -104,6 +105,7 @@ data class ContractTradeDetailData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
         parcel.readString()
     ) {
     }
@@ -118,6 +120,7 @@ data class ContractTradeDetailData(
         parcel.writeString(closefeealgorithm)
         parcel.writeString(closememberchargevalue)
         parcel.writeString(closepl)
+        parcel.writeString(enumdicname)
         parcel.writeString(closepl2)
         parcel.writeString(closeqty)
         parcel.writeString(creditamount)
@@ -173,4 +176,5 @@ data class ContractTradeDetailData(
         }
     }
 
+
 }

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

@@ -25,6 +25,7 @@ data class ContractTradeOrderDetailData(
     val closeunfreezecharge : String? = "",//平仓解冻手续费(先建后平操作,需要记录)
     val delistingtype : String? = "",//摘牌类型 - 1:价格最优 2:点选成交
     val freezecharge : String? = "",//冻结手续费
+    val enumdicname : String? = "",//单位
     val freezemargin : String? = "",//冻结保证金(冻结交易金额)
     val gcaccountid : String? = "",//账户ID[合约币种]
     val goodscode : String? = "",//商品代码
@@ -146,6 +147,7 @@ data class ContractTradeOrderDetailData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
         parcel.readInt(),
         parcel.readString(),
         parcel.readString()
@@ -171,6 +173,7 @@ data class ContractTradeOrderDetailData(
         parcel.writeString(closeunfreezecharge)
         parcel.writeString(delistingtype)
         parcel.writeString(freezecharge)
+        parcel.writeString(enumdicname)
         parcel.writeString(freezemargin)
         parcel.writeString(gcaccountid)
         parcel.writeString(goodscode)

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

@@ -13,6 +13,7 @@ data class PayOrderData(
     val goodscode : String? = "",//商品代码
     val goodsid : String? = "",//商品ID
     val goodsname : String? = "",//商品名称
+    val enumdicname : String? = "",//单位
     val marketid : String? = "",//市场ID
     val offamount : String? = "",//优惠金额
     val operatetype : String? = "",//买委托操作类型 - 1:正常下单 16:融资买入
@@ -51,6 +52,7 @@ data class PayOrderData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
         parcel.readInt(),
         parcel.readString()
     ) {
@@ -63,6 +65,7 @@ data class PayOrderData(
         parcel.writeString(goodscode)
         parcel.writeString(goodsid)
         parcel.writeString(goodsname)
+        parcel.writeString(enumdicname)
         parcel.writeString(marketid)
         parcel.writeString(offamount)
         parcel.writeString(operatetype)

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

@@ -10,9 +10,9 @@ object Constant {
 //    const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"
 //    const val baseurl = "http://192.168.31.114:8080/cfg?key=test_114" // shenzhen01  123123
 //    const val baseurl = "http://192.168.31.220:8080/cfg?key=test_220"//李倩
-//        const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"//李倩千海金
+        const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"//李倩千海金
 //      const val baseurl = "http://192.168.30.211:8080/cfg?key=test_211"// 瑶姐
-          const val baseurl = "http://192.168.31.107:8080/cfg?key=test_107"// 瑶姐 千海金
+//          const val baseurl = "http://192.168.31.107:8080/cfg?key=test_107"// 瑶姐 千海金
 //    const val baseurl = "http://192.168.31.175:8080/cfg?key=test_175" // 8888  123123
 //    const val baseurl = "http://192.168.31.223:8080/cfg?key=test_223"
 //    const val baseurl = "http://192.168.31.174:8080/cfg?key=test_174"// 邓工

+ 153 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/InformationDetailsActivity.kt

@@ -0,0 +1,153 @@
+package cn.muchinfo.rma.view.base.home
+
+import android.graphics.Picture
+import android.os.Bundle
+import android.widget.LinearLayout
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.SiteColumnDetailData
+import cn.muchinfo.rma.global.toShowTime
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.autoWidget.utils.HtmlUtils
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.app.Constant
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import com.blankj.utilcode.util.*
+import com.tencent.smtt.sdk.WebChromeClient
+import com.tencent.smtt.sdk.WebSettings
+import com.tencent.smtt.sdk.WebView
+import com.tencent.smtt.sdk.WebViewClient
+import org.jetbrains.anko.custom.ankoView
+import org.jetbrains.anko.matchParent
+import org.jetbrains.anko.textView
+import org.jetbrains.anko.verticalLayout
+import org.jetbrains.anko.wrapContent
+
+/**
+ * 资讯详情
+ */
+class InformationDetailsActivity : BaseActivity<HomeViewModel>(){
+
+    lateinit var itemView1: X5WebView
+
+    //传过来的详情
+    val data by lazy { intent.getParcelableExtra<SiteColumnDetailData>("data") as SiteColumnDetailData }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "资讯详情"
+                }
+            }
+
+            textView {
+                text = data.title
+                textSizeAuto = 36
+                textColorInt = R.color.rma_black_33
+            }.lparams(wrapContent, wrapContent){
+                marginStart = autoSize(36)
+                topMargin = autoSize(30)
+            }
+
+            textView {
+                text = data.publishdate
+                textSizeAuto = 26
+                textColorInt = R.color.rma_hint_text_color_ccc
+            }.lparams(wrapContent, wrapContent){
+                marginStart = autoSize(36)
+                topMargin = autoSize(15)
+            }
+
+            itemView()
+
+            ankoView({ X5WebView(context) }, theme = 0) {
+                itemView1 = this
+                var isLoadingOver = false
+
+                try {
+                    val newContent = HtmlUtils.replaceHtmlTag(data.context, "img", "src", "src=\"" + SPUtils.getInstance().getString(Constant.openApiUrl), "\"")
+                    loadData(newContent, "text/html", "utf-8")
+//                                Handler().postDelayed({
+//                                    loadDataWithBaseURL(null, HtmlFormat.getNewContent(newContent),"text/html","utf-8",null)
+//                                },100)
+
+                } catch (e: Exception) {
+                    e.printStackTrace()
+                }
+                settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.SINGLE_COLUMN
+                settings.cacheMode = WebSettings.LOAD_NO_CACHE
+                settings.setUserAgentString("user-agent-string")
+                settings.setBuiltInZoomControls(false)
+                settings.setSupportZoom(false)
+                settings.setDisplayZoomControls(false)
+                setWebChromeClient(object : WebChromeClient() {
+                    override fun onReceivedTitle(view: WebView?, title: String?) {
+
+                    }
+
+                    override fun onProgressChanged(webView: WebView, progress: Int) {
+                        if ((progress >= 100)) {
+                            isLoadingOver = true
+                        }
+                    }
+                })
+                setWebViewClient(object : WebViewClient(){
+                    override fun onPageFinished(view: WebView?, p1: String?) {
+                        super.onPageFinished(view, p1)
+                        //修改图片大小
+                        val screenWidth = ScreenUtils.getScreenWidth().toString()
+//                        val width =  SizeUtils.dp2px(50f).toString()
+//                        val width2 =  SizeUtils.px2dp(screenWidth.toFloat()).toString()
+                        LogUtils.eTag("contentHeight111112",screenWidth)
+                        val javascript = "javascript:function ResizeImages() {" +
+                                "var myimg,oldwidth;" +
+                                "var maxwidth = document.body.clientWidth;" +
+                                "for(i=0;i <document.images.length;i++){" +
+                                "myimg = document.images[i];" +
+                                "if(myimg.width > "+screenWidth+"){" +
+                                "oldwidth = myimg.width;" +
+                                "myimg.width ="+screenWidth+";" +
+                                "}" +
+                                "}" +
+                                "}";
+                        view?.loadUrl(javascript);
+                        view?.loadUrl("javascript:ResizeImages();")
+
+                        itemView1.layoutParams = LinearLayout.LayoutParams(matchParent, autoSize(view?.contentHeight?.div(0.9)?.toFloat()!!))
+                    }
+                })
+
+//                setWebChromeClient(object : WebChromeClient(){
+//                    override fun onProgressChanged(p0: WebView?, p1: Int) {
+//                        super.onProgressChanged(p0, p1)
+//                        if (p1 == 100){
+//                            LogUtils.eTag("contentHeight111113", p0?.contentHeight)
+//                            itemView1.layoutParams = LinearLayout.LayoutParams(matchParent, autoSize(p0?.contentHeight?.div(0.9)?.toFloat()!!))
+//                        }
+//                    }
+//                })
+
+//                setPictureListener(object : WebView.PictureListener {
+//                    var previousHeight = 0
+//                    override fun onNewPicture(p0: WebView?, p1: Picture?) {
+//                        val hight = p0?.contentHeight
+//                        if (isLoadingOver) {
+//                            previousHeight = hight ?: 0
+////                                    itemView1.layoutParams = LinearLayout.LayoutParams(matchParent, autoSize(SizeUtils.dp2px(previousHeight.toFloat().times(scale))))
+////                                    itemView1.layoutParams = LinearLayout.LayoutParams(matchParent, autoSize(previousHeight.times(scale).times(0.85)))
+//                            LogUtils.eTag("contentHeight11111", "scale=====" + scale + "-------" + previousHeight.toString() + "======" + SizeUtils.dp2px(previousHeight?.toFloat()
+//                                ?: 0f))
+//                            isLoadingOver = false
+//                        }
+//                        if (previousHeight == hight) return
+//                    }
+//
+//                })
+            }.lparams(matchParent, wrapContent)
+        }
+    }
+
+}

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

@@ -131,12 +131,11 @@ class SeaKingMainFragment : BaseFragment<SeaKingMainViewModel>() {
                                         textView {
                                             if (GlobalDataCollection.instance?.loginQueryData?.userInfo?.userinfotype == 1){//个人
                                                 text =
-                                                    GlobalDataCollection.instance?.loginQueryData?.userInfo?.mobile2
+                                                    GlobalDataCollection.instance?.loginQueryData?.userInfo?.nickname
                                             }else{//企业
                                                 text =
                                                     GlobalDataCollection.instance?.loginQueryData?.userInfo?.customername
                                             }
-
                                             textSizeAuto = 36
                                             textColorInt = R.color.rma_black_33
                                         }.lparams(wrapContent, wrapContent) {

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

@@ -10,6 +10,7 @@ import android.widget.EditText
 import androidx.lifecycle.MutableLiveData
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.GoodsExInfoData
 import cn.muchinfo.rma.global.data.RStrategyData
 import cn.muchinfo.rma.global.data.account.loginQeruy.GoodsInfo
 import cn.muchinfo.rma.global.database.DataBase
@@ -128,6 +129,9 @@ class AddCastSurelyActivity : BaseActivity<MyCastSurelyViewModel>() {
         super.onCreate(savedInstanceState)
         EventBus.getDefault().register(this)
         verticalLayout {
+            if (type == "1"){
+                viewModel.goodsexinfo.postValue(GoodsExInfoData())
+            }
             initData()
             viewModel.isCastSureData.bindOptional(context){//从交易页面进入的定投页,若是针对此商品已进行了定投策略,则该页面为修改定投,并在此进行赋值
                 selectPayType.postValue(SelectData(id = it?.regularlymode ?: "1", value = if (it?.regularlymode == "1"){"按重量定投"}else{"按金额定投"}))
@@ -168,7 +172,7 @@ class AddCastSurelyActivity : BaseActivity<MyCastSurelyViewModel>() {
                             selectGoodsInfoList.add(it)
                         }
                     }
-                    creatGoodsInfoBottomSheetDialog("请选择商品", viewModel.getCanAddCastSureList()) {
+                    creatGoodsInfoBottomSheetDialog("请选择商品", viewModel.getCanAddCastSureList()) {
                         viewModel.goodsInfoData.postValue(this)
                         viewModel.queryGoodsEx(this.goodsid.toString())
                         viewModel.queryQuoteDay(

+ 14 - 5
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/CastSurelyDetailsActivity.kt

@@ -11,6 +11,7 @@ import cn.muchinfo.rma.global.MTPEnums
 import cn.muchinfo.rma.global.data.RSTriggerLogData
 import cn.muchinfo.rma.global.data.RStrategyData
 import cn.muchinfo.rma.global.database.DataBase
+import cn.muchinfo.rma.global.utils.TimeUtils
 import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
@@ -178,7 +179,7 @@ class CastSurelyDetailsActivity : BaseActivity<MyCastSurelyViewModel>() {
 
                         textView {
                             val qtydecimalplace = DataBase.getInstance().goodsInfoDao().getGoodsInfo(data?.goodsid?.toInt() ?: 0).qtydecimalplace
-                            text = NumberUtils.roundNum(data?.triggertotalqty?.toDouble()?.times(qtydecimalplace).toString(),qtydecimalplace)
+                            text = NumberUtils.roundNum(data?.triggertotalqty?.toDouble()?.div(Math.pow(10.0,qtydecimalplace.toDouble())).toString(),qtydecimalplace)
                             textColorInt = R.color.rma_black_33
                             textSizeAuto = 36
                             typeface = Typeface.defaultFromStyle(Typeface.BOLD)
@@ -212,12 +213,20 @@ class CastSurelyDetailsActivity : BaseActivity<MyCastSurelyViewModel>() {
                     background = createRoundRectDrawable("#E5EFF5", 3)
                     gravity = Gravity.CENTER_VERTICAL
                     textView {
+                        text = "定投计划"
+                        textSizeAuto = 28
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+
+                    textView {
                         val qtydecimalplace = DataBase.getInstance().goodsInfoDao().getGoodsInfo(data.goodsid?.toInt() ?: 0).qtydecimalplace
                         if (data.regularlystrategystatus == "1"){//1:正常 2:暂停 3:终止
-                            if (data.regularlymode == "1"){//按数量
-                                text = data.nexttriggerdate + "(" + data.regularlycyclevalue + ")将从余额扣款定投" + data.nexttriggerqty?.toDouble()?.times(qtydecimalplace) + data.enumdicname
+                            if (data?.regularlymode == "1"){//按数量
+                                text = viewModel.getCastSureRegularlyCycleValueName(data.regularlycycle ?: "",data.regularlycyclevalue ?: "") + "定投" + data.nexttriggerqty?.toDouble()?.div(Math.pow(10.0,qtydecimalplace.toDouble())) + data.enumdicname
                             }else{//按金额
-                                text = data.nexttriggerdate + "(" + data.regularlycyclevalue + ")将从余额扣款定投" + NumberUtils.roundNum(data.nexttriggeramount,2)
+                                text = viewModel.getCastSureRegularlyCycleValueName(data.regularlycycle ?: "",data.regularlycyclevalue ?: "") + "定投" + NumberUtils.roundNum(data.nexttriggeramount,2) + "元"
                             }
                         }else if (data.regularlystrategystatus == "2"){
                             text = "定投已暂停"
@@ -227,7 +236,7 @@ class CastSurelyDetailsActivity : BaseActivity<MyCastSurelyViewModel>() {
                         textColorInt = R.color.rma_zhushi_text_color
                         textSizeAuto = 31
                     }.lparams(wrapContent, wrapContent){
-                        autoSize(13)
+                        marginStart = autoSize(15)
                     }
 
                     emptyView()

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

@@ -4,10 +4,12 @@ import android.view.Gravity
 import androidx.appcompat.app.AppCompatActivity
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.data.RSTriggerLogData
+import cn.muchinfo.rma.global.database.DataBase
 import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.autoSize
 import cn.muchinfo.rma.view.autoWidget.textColorInt
 import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
 import cn.muchinfo.rma.view.base.home.contract.emptyView
 import mtp.polymer.com.autowidget.adapter.BaseViewHolder
 import org.jetbrains.anko.*
@@ -20,7 +22,8 @@ class CastSurelyDetailsViewHolder(private val activity: AppCompatActivity,privat
              gravity = Gravity.CENTER_VERTICAL
              textView {
                  data.bindOptional(context){
-                     text = it?.triggertradedate + "   " + it?.triggerqty + it?.enumdicname + "(" + it?.triggeramount + ")"
+                     val goodsinfo = DataBase.getInstance().goodsInfoDao().getGoodsInfo(it?.goodsid?.toInt() ?: 0)
+                     text = it?.triggertime + "   " + NumberUtils.roundNum(it?.triggerqty?.toDouble()?.div(Math.pow(10.0,goodsinfo.qtydecimalplace?.toDouble() ?: 1.0)).toString(),goodsinfo.qtydecimalplace) + it?.enumdicname + "(" + it?.triggeramount + "元)"
                  }
                  textSizeAuto = 31
                  textColorInt = R.color.text_hint_color_two

+ 4 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/MyCastSurelyViewHolder.kt

@@ -1,5 +1,6 @@
 package cn.muchinfo.rma.view.base.main.castsurely
 
+import android.annotation.SuppressLint
 import android.content.Intent
 import android.graphics.Typeface
 import android.view.Gravity
@@ -31,6 +32,7 @@ import org.jetbrains.anko.*
 class MyCastSurelyViewHolder(private val activity : AppCompatActivity,private val viewModel : MyCastSurelyViewModel,private val type : String) : BaseViewHolder<RStrategyData>(activity){
     override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
 
+    @SuppressLint("SetTextI18n")
     override fun _FrameLayout.createContentView() {
         verticalLayout {
             onThrottleFirstClick {
@@ -142,9 +144,9 @@ class MyCastSurelyViewHolder(private val activity : AppCompatActivity,private va
                             val qtydecimalplace = DataBase.getInstance().goodsInfoDao().getGoodsInfo(it?.goodsid?.toInt() ?: 0).qtydecimalplace
                             if (type == "1"){
                                 if (it?.regularlymode == "1"){//按数量
-                                    text = TimeUtils.formatTime2(it.nexttriggerdate,"yyyy-MM-dd") + "(" + viewModel.getCastSureRegularlyCycleValueName(it?.regularlycycle ?: "",it?.regularlycyclevalue ?: "") + ")将从余额扣款定投" + it?.nexttriggerqty?.toDouble()?.times(qtydecimalplace) + it?.enumdicname
+                                    text = viewModel.getCastSureRegularlyCycleValueName(it.regularlycycle ?: "",it.regularlycyclevalue ?: "") + "定投" + it.nexttriggerqty?.toDouble()?.div(Math.pow(10.0,qtydecimalplace.toDouble())) + it.enumdicname
                                 }else{//按金额
-                                    text = TimeUtils.formatTime2(it?.nexttriggerdate,"yyyy-MM-dd") + "(" + viewModel.getCastSureRegularlyCycleValueName(it?.regularlycycle ?: "",it?.regularlycyclevalue ?: "") + ")将从余额扣款定投" + NumberUtils.roundNum(it?.nexttriggeramount,2) + "元"
+                                    text = viewModel.getCastSureRegularlyCycleValueName(it?.regularlycycle ?: "",it?.regularlycyclevalue ?: "") + "定投" + NumberUtils.roundNum(it?.nexttriggeramount,2) + "元"
                                 }
                             }else{
                                 text = "定投已终止"

+ 12 - 7
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/MyCastSurelyViewModel.kt

@@ -10,6 +10,7 @@ import cn.muchinfo.rma.view.MyApplication
 import cn.muchinfo.rma.view.autoWidget.toArrayList
 import cn.muchinfo.rma.view.base.BaseViewModel
 import com.blankj.utilcode.util.LogUtils
+import com.blankj.utilcode.util.TimeUtils
 import kotlinx.coroutines.GlobalScope
 import kotlinx.coroutines.launch
 import mtp.polymer.com.autowidget.utils.TaskUiModel
@@ -93,18 +94,18 @@ class MyCastSurelyViewModel : BaseViewModel(){
         var returnValue : String = ""
         if (regularlycycle == "1"){//周
             if (regularlycyclevalue == "1"){
-                returnValue = "周一"
+                returnValue = "周一"
             }else if (regularlycyclevalue == "2"){
-                returnValue = "周二"
+                returnValue = "周二"
             }else if (regularlycyclevalue == "3"){
-                returnValue = "周三"
+                returnValue = "周三"
             }else if (regularlycyclevalue == "4"){
-                returnValue = "周四"
+                returnValue = "周四"
             }else if (regularlycyclevalue == "5"){
-                returnValue = "周五"
+                returnValue = "周五"
             }
         }else{//月
-            returnValue = regularlycyclevalue + "号"
+            returnValue = "每月" + regularlycyclevalue + "号"
         }
         return returnValue
     }
@@ -229,7 +230,11 @@ class MyCastSurelyViewModel : BaseViewModel(){
         }
         MyApplication.getInstance()?.moneyManager?.queryRSTriggerLog(params = params) { isSuccess, respData, error ->
             if (isSuccess) {
-                castSurelyLogDataList.postValue(respData)
+                val newList = respData?.toArrayList()
+                newList?.sortWith(Comparator { t1, t2 ->
+                    (TimeUtils.string2Millis(t2.triggertime) - TimeUtils.string2Millis(t1.triggertime)).toInt()
+                })
+                castSurelyLogDataList.postValue(newList)
             }
         }
     }

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

@@ -104,7 +104,7 @@ class PickUpGoodsActivity : BaseActivity<PickUpGoodsViewModel>(){
 
                     textView {
                         val goodsInfo = DataBase.getInstance().goodsInfoDao().getGoodsInfo(data.goodsid?.toInt() ?: 0)
-                        text = NumberUtils.doubleDistortion(data.enableqty?.toDouble()?.times(goodsInfo.agreeunit).toString()) + "g"
+                        text = NumberUtils.doubleDistortion(data.enableqty?.toDouble()?.times(goodsInfo.agreeunit).toString())
                         textSizeAuto = 41
                         textColorInt = R.color.rma_black_33
                     }.lparams(wrapContent, wrapContent){

+ 14 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/AddWithDrawActivity.kt

@@ -61,6 +61,9 @@ class AddWithDrawActivity : BaseActivity<WithDrawManagementViewModel>(){
                 context,
                 viewModel.loadingDialogStatus
             )
+            if (type == "2"){
+                selectBnak.postValue(BankInfoData(bankid = data.bankid,bankname = data.bankname))
+            }
             viewModel.queryCusBankSignBank()
             viewModel.queryBankInfo()
             background = resources.getDrawable(R.color.rma_item_bg)
@@ -69,9 +72,9 @@ class AddWithDrawActivity : BaseActivity<WithDrawManagementViewModel>(){
                 commonLeftButton()
                 commonTitle {
                     if (type == "1"){
-                        text = "新增账户管理"
+                        text = "添加提现账户"
                     }else{
-                        text = "修改账户管理"
+                        text = "修改提现账户"
                     }
                 }
             }
@@ -223,8 +226,15 @@ class AddWithDrawActivity : BaseActivity<WithDrawManagementViewModel>(){
                         if (check().not()){
                             return@onThrottleFirstClick
                         }
-                        viewModel.requeryT2bBankSignReq(req = getReqInfo(operateType = 1)){
-                            ToastUtils.showLong("签约成功")
+
+                        if (type == "1"){
+                            viewModel.requeryT2bBankSignReq(req = getReqInfo(operateType = 1)){
+                                finish()
+                            }
+                        }else{
+                            viewModel.requeryT2bBankSignReq(req = getReqInfo(operateType = 2)){
+                                finish()
+                            }
                         }
                     }
                     gravity = Gravity.CENTER

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

@@ -80,7 +80,6 @@ class WithDrawManagementActivity : BaseActivity<WithDrawManagementViewModel>() {
                                 BankChildAccName = data.bankaccountname ?: "",
                                 TradeDate = viewModel.cusBankSignBankDataList.value?.tradedate ?: ""
                             ){
-                                ToastUtils.showLong("解约成功")
                                 viewModel.userCollectConfigData.postValue(BankAccountSignData())
                             }
                         }

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

@@ -63,6 +63,7 @@ class PlatinumTreasureFragment : BaseFragment<PlatinumTreasureViewModel>() , Pla
     fun onQuoteMessageEvent(quoteMessageEvent: QuoteMessageEvent) {
             /** 行情推送过来的goodsid **/
             quoteMessageEvent.goodsid.forEach { goodid ->
+                LogUtils.eTag("dadafafsjhdkjahkjdhak",goodid)
                 //找到相应商品信息
                 val goodsInfo = viewModel.demoList.value?.find { it.goodsid == goodid }
                 val goodsInfo2 =  viewModel.demoList.value?.find { it.relatedgoodsid == goodid }
@@ -86,7 +87,11 @@ class PlatinumTreasureFragment : BaseFragment<PlatinumTreasureViewModel>() , Pla
         savedInstanceState: Bundle?
     ): View? {
         return UI {
-            viewModel.initData(tag = thisTag ?: "")
+            viewModel.initData(tag = thisTag ?: ""){isCompleted, err ->
+                 if (isCompleted){
+                     platnumTreasureAdapter.notifyDataSetChanged()
+                 }
+            }
             verticalLayout {
                 linearLayout {
                     background = resources.getDrawable(R.color.main_title_bg_color)

+ 3 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/PlatinumTreasureViewModel.kt

@@ -29,7 +29,7 @@ class PlatinumTreasureViewModel : BaseViewModel(){
 
     }
 
-    fun initData(tag: String){
+    fun initData(tag: String,callback: (isCompleted: Boolean, err: Error?) -> Unit){
         val list = arrayListOf<GoodsInfo>()
         val allList = DataBase.getInstance().goodsInfoDao().all
         allList.forEach {
@@ -40,11 +40,11 @@ class PlatinumTreasureViewModel : BaseViewModel(){
         demoList.postValue(list)
         if (list.size > 10){
             queryQuoteDay(tag,0,10,list){isCompleted, err ->
-
+                callback(isCompleted, err)
             }
         }else{
             queryQuoteDay(tag,0,list.size,list){isCompleted, err ->
-
+                callback(isCompleted, err)
             }
         }
 

+ 4 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/adapter/PlatnumTreasureAdapter.java

@@ -166,7 +166,7 @@ public class PlatnumTreasureAdapter extends RecyclerView.Adapter<PlatnumTreasure
             highRightData.setColorType("1");
             //最低价
             QHjRightData lowestRightData = new QHjRightData();
-            lowestRightData.setValue(NumberUtils.roundNum(NumberUtils.doubleDistortion(String.valueOf(relateQuoteDayData.getLowest())),2));
+            lowestRightData.setValue(NumberUtils.roundNum(NumberUtils.doubleDistortion(String.valueOf(relateQuoteDayData.getLowest())),data.getDecimalplace()));
             double lowestRightDatColor = relateQuoteDayData.getLowest() - relateQuoteDayData.getPreclose();
             if (lowestRightDatColor > 0){
                 lowestRightData.setColorType("3");
@@ -178,7 +178,7 @@ public class PlatnumTreasureAdapter extends RecyclerView.Adapter<PlatnumTreasure
             lowestRightData.setColorType("1");
             //昨收价
             QHjRightData yesCloseRightData = new QHjRightData();
-            yesCloseRightData.setValue(NumberUtils.roundNum(NumberUtils.doubleDistortion(String.valueOf(relateQuoteDayData.getPreclose())),2));
+            yesCloseRightData.setValue(NumberUtils.roundNum(NumberUtils.doubleDistortion(String.valueOf(relateQuoteDayData.getPreclose())),data.getDecimalplace()));
             yesCloseRightData.setColorType("1");
             //行情时间
             QHjRightData timeRightData = new QHjRightData();
@@ -189,8 +189,8 @@ public class PlatnumTreasureAdapter extends RecyclerView.Adapter<PlatnumTreasure
             }
             timeRightData.setColorType("1");
             if (relateQuoteDayData.getLast() != 0 && relateQuoteDayData.getPreclose() != 0) {
-                String textUpDown = NumberUtils.roundNum(NumberUtils.doubleDistortion(String.valueOf((relateQuoteDayData.getPrice() - relateQuoteDayData.getPreclose()))),2);//涨跌
-                String textApplies = NumberUtils.roundNum(String.valueOf((((relateQuoteDayData.getPrice() - relateQuoteDayData.getPreclose()) / relateQuoteDayData.getPrice()) * 100)),2);//涨跌幅
+                String textUpDown = NumberUtils.roundNum(NumberUtils.doubleDistortion(String.valueOf((relateQuoteDayData.getPrice() - relateQuoteDayData.getPresettle()))),2);//涨跌
+                String textApplies = NumberUtils.roundNum(String.valueOf((((relateQuoteDayData.getPrice() - relateQuoteDayData.getPresettle()) / relateQuoteDayData.getPresettle()) * 100)),2);//涨跌幅
                 riseFallData.setValue(textUpDown);
                 appliesData.setValue(textApplies + "%");
                 if (Double.valueOf(textUpDown) > 0){

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

@@ -70,7 +70,7 @@ class CancellationsViewHolder(private val activity: AppCompatActivity,private va
                     gravity = Gravity.CENTER
                     textView {
                         data.bindOptional(context){
-                            text = NumberUtils.doubleDistortion(it?.orderqty?.toDouble()?.toString())
+                            text = NumberUtils.doubleDistortion(it?.orderqty?.toDouble()?.toString()) + it?.enumdicname
                         }
                         textSizeAuto = 31
                         textColorInt = R.color.rma_black_33

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

@@ -76,7 +76,7 @@ class DealViewHolder(
                 //数量
                 textView {
                     data.bindOptional(context) {
-                        text = NumberUtils.doubleDistortion(it?.tradeqty?.toDouble().toString())
+                        text = NumberUtils.doubleDistortion(it?.tradeqty?.toDouble().toString()) + it?.enumdicname
                     }
                     textSizeAuto = 31
                     textColorInt = R.color.rma_black_33

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

@@ -84,7 +84,7 @@ class FinancialViewHolder(private val activity : AppCompatActivity,private val v
                     textView {
                         data.bindOptional(context){
                             val goodsInfo = DataBase.getInstance().goodsInfoDao().getGoodsInfo(it?.goodsid?.toInt() ?: 0)
-                            text = NumberUtils.roundNum(it?.wrqty?.toDouble()?.div(goodsInfo.decimalplace ?: 2).toString(),0)
+                            text = NumberUtils.roundNum(it?.wrqty,goodsInfo.qtydecimalplace) + it?.enumdicname
                         }
                         textSizeAuto = 31
                         textColorInt = R.color.rma_red_color

+ 3 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/MoneyFlowingVIewHolder.kt

@@ -6,6 +6,7 @@ import androidx.appcompat.app.AppCompatActivity
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.data.AmountLogData
 import cn.muchinfo.rma.global.toShowTime
+import cn.muchinfo.rma.global.toShowTime2
 import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.autoSize
 import cn.muchinfo.rma.view.autoWidget.textColorInt
@@ -32,7 +33,7 @@ class MoneyFlowingVIewHolder(private val activity : AppCompatActivity,private va
                     gravity = Gravity.LEFT
                     textView {
                         data.bindOptional(context){
-                            text = it?.createtime?.toShowTime()
+                            text = it?.createtime?.toShowTime2()
                         }
                         textSizeAuto = 31
                         textColorInt = R.color.rma_black_33
@@ -40,11 +41,10 @@ class MoneyFlowingVIewHolder(private val activity : AppCompatActivity,private va
                         topMargin = autoSize(30)
                         marginStart = autoSize(36)
                     }
-                }.lparams(0, autoSize(96),1f)
+                }.lparams(0, autoSize(96),2f)
 
                 verticalLayout {
                     gravity = Gravity.CENTER
-                    visibility = View.GONE
                     textView {
                         data.bindOptional(context){
                             text = it?.OPERATETYPENAME

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

@@ -86,7 +86,7 @@ class NoPayViewHolder(private val activity : AppCompatActivity,private val viewM
                     textView {
                          data.bindOptional(context){
                              val goodsInfo = DataBase.getInstance().goodsInfoDao().getGoodsInfo(it?.goodsid?.toInt() ?: 0)
-                             text = NumberUtils.doubleDistortion(it?.tradeqty?.toDouble()?.div(Math.pow(10.0,goodsInfo.qtydecimalplace?.toDouble())).toString())
+                             text = NumberUtils.doubleDistortion(it?.tradeqty).toString() + it?.enumdicname
                          }
                         textSizeAuto = 31
                         textColorInt = R.color.rma_black_33

+ 37 - 14
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PlatinumBuyOrSellUI.kt

@@ -108,7 +108,7 @@ class PlatinumBuyOrSellUI(
     }
 
     //刷新单据
-    fun refresh(quoteMessageEvent: QuoteMessageEvent){
+    fun refresh(quoteMessageEvent: QuoteMessageEvent) {
         /** 行情推送过来的goodsid **/
         quoteMessageEvent.goodsid.forEach { goodid ->
             //找到相应商品信息
@@ -238,7 +238,9 @@ class PlatinumBuyOrSellUI(
 
                             //行情变化后根据不同的价格类型分别对赋值
                             viewModel.quoteDayData.bindOptional(context) {
-                                if (trade_price_edittext.text.toString().isNullOrEmpty() || trade_price_edittext.text.toString() == "0") {
+                                if (trade_price_edittext.text.toString()
+                                        .isNullOrEmpty() || trade_price_edittext.text.toString() == "0"
+                                ) {
                                     if (type == "1") {
                                         setText(
                                             NumberUtils.roundNum(
@@ -267,7 +269,7 @@ class PlatinumBuyOrSellUI(
                     linearLayout {
                         gravity = Gravity.CENTER_VERTICAL
                         onThrottleFirstClick {
-                            if (type == "2"){
+                            if (type == "2") {
                                 return@onThrottleFirstClick
                             }
                             val selectDataList = arrayListOf(
@@ -290,7 +292,7 @@ class PlatinumBuyOrSellUI(
                         }
 
                         imageView {
-                            if (type == "2"){
+                            if (type == "2") {
                                 visibility = View.GONE
                             }
                             imageResource = R.mipmap.qhj_trade_numberamout_select
@@ -304,7 +306,7 @@ class PlatinumBuyOrSellUI(
                             setOnTextChangeListener { view, value ->
 
                             }
-                            viewModel.goodsInfoData.bindOptional(context){
+                            viewModel.goodsInfoData.bindOptional(context) {
                                 setDecimal(it?.qtydecimalplace ?: 1)
                             }
                             setText("0")
@@ -314,9 +316,15 @@ class PlatinumBuyOrSellUI(
                                     GlobalDataCollection.instance?.goodsExInfoDataArrayList?.find { it.goodsid == data?.goodsid.toString() }
                                 if (goodsExData?.goodsid?.isNotEmpty() == true) {
                                     if (selectPayType.value?.id == "1") {//按数量
-                                        setMin(goodsExData.regularlybuyminqty?.toDouble()?.div(Math.pow(10.0,data?.qtydecimalplace?.toDouble() ?: 2.0)) ?: 0.0)
-                                        setStep(goodsExData.regularlybuyminqty?.toDouble()?.div(Math.pow(10.0,data?.qtydecimalplace?.toDouble() ?: 2.0)) ?: 0.01)
-                                        setText(goodsExData.regularlybuyminqty?.toDouble()?.div(Math.pow(10.0,data?.qtydecimalplace?.toDouble() ?: 2.0)).toString())
+                                        setMin(
+                                            goodsExData.regularlybuyminqty?.toDouble() ?: 1.0
+                                        )
+                                        setStep(
+                                            goodsExData.regularlybuyminqty?.toDouble() ?: 1.0
+                                        )
+                                        setText(
+                                            goodsExData.regularlybuyminqty?.toDouble().toString()
+                                        )
                                     } else {//按金额
                                         setMin(goodsExData.regularlybuyminamount?.toDouble() ?: 0.0)
                                         setStep(
@@ -358,7 +366,7 @@ class PlatinumBuyOrSellUI(
                                 viewModel.quoteDayData.bindOptional(context) {
                                     text = NumberUtils.roundNum(
                                         NumberUtils.doubleDistortion(it?.ask.toString()),
-                                        2
+                                        viewModel.goodsInfoData.value?.decimalplace ?: 2
                                     )//卖一
                                 }
                                 text = "0"
@@ -386,7 +394,7 @@ class PlatinumBuyOrSellUI(
                                 viewModel.quoteDayData.bindOptional(context) {
                                     text = NumberUtils.roundNum(
                                         NumberUtils.doubleDistortion(it?.bid.toString()),
-                                        2
+                                        viewModel.goodsInfoData.value?.decimalplace ?: 2
                                     )//买一
                                 }
                                 text = "0"
@@ -413,10 +421,15 @@ class PlatinumBuyOrSellUI(
                     }
                     textView {
                         onThrottleFirstClick {
-                            if (trade_price_edittext.text.toString().toDouble() < viewModel.goodsExData.value?.minamount?.toDouble() ?: 0.0){
-                                ToastUtils.showLong("最小交易金额不能小于" + viewModel.goodsExData.value?.minamount)
-                                return@onThrottleFirstClick
+                            if (selectPayType.value?.id == "2") {
+                                if (trade_number_or_amount.text.toString()
+                                        .toDouble() < viewModel.goodsExData.value?.minamount?.toDouble() ?: 0.0
+                                ) {
+                                    ToastUtils.showLong("最小交易金额不能小于" + viewModel.goodsExData.value?.minamount)
+                                    return@onThrottleFirstClick
+                                }
                             }
+
                             creatOrderDetailsDialog(
                                 type = "1",
                                 orderPrice = trade_price_edittext.text.toString(),
@@ -450,6 +463,15 @@ class PlatinumBuyOrSellUI(
 
                         }
                         onThrottleFirstClick {
+                            if (selectPayType.value?.id == "2") {
+                                if (trade_number_or_amount.text.toString()
+                                        .toDouble() < viewModel.goodsExData.value?.minamount?.toDouble() ?: 0.0
+                                ) {
+                                    ToastUtils.showLong("最小交易金额不能小于" + viewModel.goodsExData.value?.minamount)
+                                    return@onThrottleFirstClick
+                                }
+                            }
+
                             creatOrderDetailsDialog(
                                 type = "3",
                                 orderPrice = trade_price_edittext.text.toString(),
@@ -479,10 +501,11 @@ class PlatinumBuyOrSellUI(
 
                     textView {
                         onThrottleFirstClick {
+
                             val intent = Intent()
                             intent.putExtra("goodsId", goodsId)
                             intent.putExtra("outGoodsCode", outGoodsCode)
-                            intent.putExtra("type","3")
+                            intent.putExtra("type", "3")
                             intent.setClass(context, AddCastSurelyActivity::class.java)
                             ActivityUtils.startActivity(intent)
                         }

+ 0 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PlatinumMoneyUI.kt

@@ -357,7 +357,6 @@ class MoneyFlowingUI(private val activity: AppCompatActivity,private val viewMod
                 }.lparams(0, autoSize(96),1f)
 
                 verticalLayout {
-                    visibility = View.GONE
                     gravity = Gravity.CENTER
                     textView {
                         text = "操作类型"

+ 5 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PlatinumPositionUI.kt

@@ -6,6 +6,7 @@ import android.view.ViewGroup
 import androidx.viewpager.widget.PagerAdapter
 import androidx.viewpager.widget.ViewPager
 import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.data.ContractTradeOrderDetailData
 import cn.muchinfo.rma.global.data.ContractTradePositionData
 import cn.muchinfo.rma.global.data.QhjContractDetailsData
@@ -51,8 +52,10 @@ class PlatinumPositionUI(private val activity: PlatinumTradeActivity,private val
     fun initDataTitle() {
         newTabsArray.add("持仓汇总")
         uiList.add(positionUI.root)
-        newTabsArray.add("融资明细")
-        uiList.add(financingUI.root)
+        if (GlobalDataCollection.instance?.loginQueryData?.userInfo?.userinfotype == 2){
+            newTabsArray.add("融资明细")
+            uiList.add(financingUI.root)
+        }
         newPagerAdapter = object : PagerAdapter() {
 
             override fun getPageTitle(position: Int): CharSequence? = newTabsArray[position]

+ 3 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PositionDetailsActivity.kt

@@ -204,21 +204,15 @@ class PositionDetailsActivity : BaseActivity<PlatinumTradeViewModel>() {
                         if (differencePrice > 0) {
                             textColorInt = R.color.rma_red_color
                             proportion_Text.textColorInt = R.color.rma_red_color
-                            proportion_Text.text = 1.minus(
-                                data.averageprice?.toDouble()?.minus(differencePrice)
-                                    ?.div(data.averageprice?.toDouble() ?: 1.0) ?: 0.0
-                            )?.toString()?.toPercentage()
+                            proportion_Text.text = NumberUtils.roundNum(differencePrice.times(data.curpositionqty?.toDouble() ?: 0.0).toString(),2)
                         } else if (differencePrice < 0) {
                             textColorInt = R.color.rma_green_color
                             proportion_Text.textColorInt = R.color.rma_green_color
-                            proportion_Text.text = 1.minus(
-                                data.averageprice?.toDouble()?.plus(differencePrice)
-                                    ?.div(data.averageprice?.toDouble() ?: 1.0) ?: 0.0
-                            )?.toString()?.toPercentage()
+                            proportion_Text.text = NumberUtils.roundNum(differencePrice.times(data.curpositionqty?.toDouble() ?: 0.0).toString(),2)
                         } else {
                             textColorInt = R.color.rma_black_33
                             proportion_Text.textColorInt = R.color.rma_black_33
-                            proportion_Text.text = "0.0%"
+                            proportion_Text.text = "0.0"
                         }
 
                     }

+ 3 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PositionViewHolder.kt

@@ -75,7 +75,7 @@ class PositionViewHolder(
                                 GlobalDataCollection.instance?.goodsInfoAndQuotesList?.find { data ->
                                     data.outgoodscode == goodsInfoData.goodscode
                                 }?.quoteDayData
-                            text = NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteDayData?.ask?.times(
+                            text = NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteDayData?.bid?.times(
                                 it?.curpositionqty?.toDouble() ?: 0.0
                             ).toString()),2)
                         }
@@ -148,7 +148,7 @@ class PositionViewHolder(
                         data.bindOptional(context) {
                             val goodsInfoData = DataBase.getInstance().goodsInfoDao()
                                 .getGoodsInfo(it?.goodsid?.toInt() ?: 0)
-                            text = it?.curpositionqty
+                            text = it?.curpositionqty + it?.goodunit
 
                         }
                         textSizeAuto = 31
@@ -161,7 +161,7 @@ class PositionViewHolder(
                         data.bindOptional(context) {
                             val goodsInfoData = DataBase.getInstance().goodsInfoDao()
                                 .getGoodsInfo(it?.goodsid?.toInt() ?: 0)
-                            text = it?.enableqty
+                            text = it?.enableqty + it?.goodunit
 
                         }
                         textSizeAuto = 31

+ 7 - 6
RMA/app/src/main/java/cn/muchinfo/rma/view/base/qhjhome/QhjInformationViewHolder.kt

@@ -16,6 +16,7 @@ import cn.muchinfo.rma.view.autoWidget.onThrottleFirstClick
 import cn.muchinfo.rma.view.autoWidget.textColorInt
 import cn.muchinfo.rma.view.autoWidget.textSizeAuto
 import cn.muchinfo.rma.view.base.home.HomeViewModel
+import cn.muchinfo.rma.view.base.home.InformationDetailsActivity
 import com.blankj.utilcode.util.ActivityUtils
 import mtp.polymer.com.autowidget.adapter.BaseViewHolder
 import mtp.polymer.com.information_management.hnstocks.message.MessageDetailsActivity
@@ -31,10 +32,10 @@ class QhjInformationViewHolder(
         verticalLayout {
 
             onThrottleFirstClick {
-//                val intent = Intent()
-//                intent.putExtra("data",data.value)
-//                intent.setClass(context, MessageDetailsActivity::class.java)
-//                ActivityUtils.startActivity(intent)
+                val intent = Intent()
+                intent.putExtra("data",data.value)
+                intent.setClass(context, InformationDetailsActivity::class.java)
+                ActivityUtils.startActivity(intent)
             }
 
             linearLayout {
@@ -81,12 +82,12 @@ class QhjInformationViewHolder(
                 maxLines = 1
                 ellipsize = TextUtils.TruncateAt.END
                 data.bindOptional(context){
-                    text = it?.context
+                    text = it?.brief
                 }
                 textColorInt = R.color.text_hint_color_two
                 textSizeAuto = 26
             }.lparams(matchParent, wrapContent) {
-                marginStart = autoSize(102)
+                marginStart = autoSize(36)
                 topMargin = autoSize(20)
             }
             view { }.lparams(autoSize(1), 0, 1f)