Prechádzať zdrojové kódy

风险管理11月16日提交代码-liu.bolan-风管bug

Liu.bolan 4 rokov pred
rodič
commit
4fe9272c97

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

@@ -7,7 +7,7 @@ object Constant {
      * 获取基础url的接口
      */
 //    const val baseurl = "http://103.40.249.123:38280/cfg?key=mtp_20" // 天津麦顿
-    const val baseurl = "http://103.40.249.123:28280/cfg?key=mtp_20"//云融大宗
+//    const val baseurl = "http://103.40.249.123:28280/cfg?key=mtp_20"//云融大宗
 //    const val baseurl = "http://103.40.249.123:8280/cfg?key=mtp_20"//千海金外盘
 //    const val baseurl = "http://103.40.249.127:28280/cfg?key=mtp_20"
 
@@ -17,7 +17,7 @@ object Constant {
 //    const val baseurl = "http://192.168.31.104:8080/cfg?key=test_104"//李倩云融 18611112222
 //    const val baseurl = "http://192.168.31.203:8080/cfg?key=test_203"//李倩云融 18611112222
 //
-//    const val baseurl = "http://192.168.31.204:8080/cfg?key=test_204"// 瑶姐 云融 190000000001 123456
+    const val baseurl = "http://192.168.31.204:8080/cfg?key=test_204"// 瑶姐 云融 190000000001 123456
 //    const val baseurl = "http://192.168.31.205:8080/cfg?key=test_205"// 瑶姐 云融 190000000001 123456
 
 //    const val baseurl = "http://192.168.31.175:8080/cfg?key=test_175" // 8888  123123

+ 104 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/SpotWareHouseActivity.kt

@@ -26,14 +26,14 @@ import cn.muchinfo.rma.view.base.home.reportquery.adapter.FanacelReportContentAd
 import cn.muchinfo.rma.view.base.procurement.TopTabAdpater
 import cn.muchinfo.rma.view.eventbus.EventConstent
 import cn.muchinfo.rma.view.eventbus.MessageEvent
-import com.blankj.utilcode.util.AppUtils
-import com.blankj.utilcode.util.ConvertUtils
-import com.blankj.utilcode.util.SizeUtils
+import com.blankj.utilcode.util.*
 import com.qmuiteam.qmui.util.QMUIDisplayHelper
 import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
 import com.qmuiteam.qmui.widget.tab.QMUITabSegment
+import mtp.polymer.com.autowidget.dialog.creatBottomSheetDialog
 import mtp.polymer.com.autowidget.dialog.createLoadingDialog
 import mtp.polymer.com.autowidget.dialog.createWarningDialog
+import mtp.polymer.com.autowidget.dialog.showDataSelectDialog
 import mtp.polymer.com.autowidget.utils.bindTaskStatus
 import org.greenrobot.eventbus.EventBus
 
@@ -654,6 +654,12 @@ class AreCancelledUI(private val activity : AppCompatActivity,private val viewMo
         )
     }
 
+    //开始日期
+    val startData : MutableLiveData<String> = MutableLiveData<String>().apply { value = "" }
+
+    //结束日期
+    val endData : MutableLiveData<String> = MutableLiveData<String>().apply { value = "" }
+
     override fun onScroll(event: MotionEvent?) {
         //处理单个item滚动时,顶部tab需要联动
         if (null != horScrollview) horScrollview.onTouchEvent(event)
@@ -662,6 +668,101 @@ class AreCancelledUI(private val activity : AppCompatActivity,private val viewMo
     @RequiresApi(Build.VERSION_CODES.N)
     val root = _FrameLayout(activity).apply {
         verticalLayout {
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    onThrottleFirstClick {
+                        activity.showDataSelectDialog(type = "1") {
+                            startData.postValue(this)
+                        }
+                    }
+                    backgroundResource = R.drawable.rma_time_click_bg
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        startData.bindOptional(context){
+                            text = it
+                        }
+                        text = "开始日期"
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(18)
+                    }
+                    emptyView()
+
+                    imageView {
+                        imageResource = R.mipmap.rma_search_by_time
+                    }.lparams(autoSize(38), autoSize(38)){
+                        marginEnd = autoSize(10)
+                    }
+
+                }.lparams(0, autoSize(67),1f) {
+                    marginStart = autoSize(36)
+                }
+
+                textView {
+                    text = "-"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent){
+                    marginStart = autoSize(30)
+                    marginEnd = autoSize(30)
+                }
+
+                linearLayout {
+                    onThrottleFirstClick {
+                        activity.showDataSelectDialog(type = "1") {
+                            endData.postValue(this)
+                        }
+                    }
+                    backgroundResource = R.drawable.rma_time_click_bg
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        endData.bindOptional(context){
+                            text = it
+                        }
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(18)
+                    }
+
+                    emptyView()
+
+                    imageView {
+                        imageResource = R.mipmap.rma_search_by_time
+                    }.lparams(autoSize(38), autoSize(38))
+                }.lparams(0, autoSize(67),1f) {
+                    marginStart = autoSize(36)
+                    marginEnd = autoSize(36)
+                }
+
+
+                textView {
+                    setPadding(20,0,20,0)
+                    backgroundDrawable = createCommonBottomRoundBg(color = "#2481DD", corner = 5)
+                    onThrottleFirstClick {
+                        if (startData.value.isNullOrEmpty()){
+                            ToastUtils.showLong("请选择开始日期")
+                            return@onThrottleFirstClick
+                        }
+                        if (endData.value.isNullOrEmpty()){
+                            ToastUtils.showLong("请选择结束时间")
+                            return@onThrottleFirstClick
+                        }
+                        viewModel.queryAreCancelWrPosition(begindate = startData.value ?: "",enddate = endData.value ?: "")
+                    }
+                    gravity = Gravity.CENTER
+                    text = "查询"
+                    textColorInt = R.color.white
+                    textSizeAuto = 31
+                }.lparams(wrapContent, autoSize(67)) {
+                    marginStart = autoSize(32)
+                    marginEnd = autoSize(32)
+                }
+            }.lparams(matchParent, autoSize(100))
+
             viewModel.showCancelDialog.bindOptional(context){
                 if (it == true){
                     activity.createWarningDialog {

+ 7 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/SpotWareHouseViewModel.kt

@@ -589,11 +589,17 @@ class SpotWareHouseViewModel : BaseViewModel(){
     /**
      * 查询挂单
      */
-    fun queryAreCancelWrPosition(){
+    fun queryAreCancelWrPosition(begindate : String = "",enddate : String = ""){
         val params = mutableMapOf<String,String>().apply {
             put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("querytype","2")
             put("haswr","1")
+            if (begindate.isNotEmpty()){
+                put("begindate",begindate)
+            }
+            if (enddate.isNotEmpty()){
+                put("enddate",enddate)
+            }
         }
         MyApplication.getInstance()?.warehouseManager?.queryWrOrderDetail(params = params){isSuccess, respData, error ->
             if (isSuccess){

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

@@ -18,7 +18,6 @@ import androidx.viewpager.widget.ViewPager
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.data.*
-import cn.muchinfo.rma.global.database.DataBase
 import cn.muchinfo.rma.global.toPercentage
 import cn.muchinfo.rma.global.toWanPercentage
 import cn.muchinfo.rma.lifecycle.bindOptional
@@ -26,11 +25,9 @@ import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
 import cn.muchinfo.rma.view.autoWidget.view.MangeNumberEditText2
 import cn.muchinfo.rma.view.base.BaseActivity
-import cn.muchinfo.rma.view.base.app.FutureConstent
 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 cn.muchinfo.rma.view.base.home.spotmarket.SpotMarketPriceViewHolder
 import cn.muchinfo.rma.view.eventbus.EventConstent
 import cn.muchinfo.rma.view.eventbus.MessageEvent
 import cn.muchinfo.rma.view.eventbus.QuoteMessageEvent
@@ -55,6 +52,7 @@ import org.jetbrains.anko.support.v4.viewPager
 /**
  * 华南顺通  买卖大厅
  */
+@Suppress("DEPRECATION")
 class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
 
     lateinit var segment: QMUITabSegment
@@ -73,7 +71,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
     val orderQuoteData by lazy { intent.getParcelableExtra<OrderQuoteData>("data") as OrderQuoteData }
 
     //涨跌幅
-    lateinit var applies : TextView
+    lateinit var applies: TextView
 
     /** 用于订阅行情的唯一标识 */
     val thisTag by lazy {
@@ -219,7 +217,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
             viewModel.resetAccountData()
             viewModel.querydetailsWarehouseWrPosition(orderQuoteData)
             background = resources.getDrawable(R.color.white)
-            viewModel.getFinancingSelectData(orderQuoteData)
+            viewModel.getFinancingSelectData(orderQuoteData, pricetype ?: "")
             openDialogByListed()
             //头部标题
             linearLayout {
@@ -263,7 +261,6 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
 
                 emptyView()
 
-
                 imageView {
                     onThrottleFirstClick {
                         if (pricetype == "1") {//一口价
@@ -291,7 +288,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                     onThrottleFirstClick {
                         val intent = Intent()
                         intent.putExtra("data", orderQuoteData)
-                        intent.putExtra("isCircle","0")
+                        intent.putExtra("isCircle", "0")
                         intent.putExtra("type", type)
                         intent.putExtra("goodsId", orderQuoteData.goodsid)
                         intent.setClass(context, BusinessHallDetailsActivity::class.java)
@@ -529,24 +526,26 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                         emptyView()
 
                         textView {
-                            viewModel.quoteDayData.bindOptional(context){
+                            viewModel.quoteDayData.bindOptional(context) {
                                 val riseFall = it?.getPrice()?.minus(it.presettle)
-                                if (riseFall ?: 0.0 > 0.0){
+                                if (riseFall ?: 0.0 > 0.0) {
                                     textColorInt = R.color.rma_red_color
                                     applies.textColorInt = R.color.rma_red_color
-                                }else if (riseFall ?: 0.0 < 0.0){
+                                } else if (riseFall ?: 0.0 < 0.0) {
                                     textColorInt = R.color.rma_green_color
                                     applies.textColorInt = R.color.rma_green_color
-                                }else{
+                                } else {
                                     textColorInt = R.color.rma_black_33
                                     applies.textColorInt = R.color.rma_black_33
                                 }
-                                if (it?.presettle == 0.0){
+                                if (it?.presettle == 0.0) {
                                     applies.text = "-"
-                                }else{
-                                    applies.text = NumberUtils.roundNum(riseFall?.div(it.presettle)?.times(100) ?: 0.0,2) + "%"
+                                } else {
+                                    applies.text = NumberUtils.roundNum(
+                                        riseFall?.div(it.presettle)?.times(100) ?: 0.0, 2
+                                    ) + "%"
                                 }
-                                text = NumberUtils.roundNum(it?.getPrice() ?: 0.0,2)
+                                text = NumberUtils.roundNum(it?.getPrice() ?: 0.0, 2)
                             }
                             textSizeAuto = 29
                             textColorInt = R.color.rma_black_33
@@ -635,10 +634,10 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                 gravity = Gravity.CENTER_HORIZONTAL
                 imageView {
                     viewModel.priceUpDown.bindOptional(context) {
-                        if (it == true) {//收起
-                            imageResource = R.mipmap.yrdz_up_icon
+                        imageResource = if (it == true) {//收起
+                            R.mipmap.yrdz_up_icon
                         } else {
-                            imageResource = R.mipmap.yrdz_down_icon
+                            R.mipmap.yrdz_down_icon
                         }
                     }
                     imageResource = R.mipmap.yrdz_down_icon
@@ -725,10 +724,10 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
 
                 chartview {
                     viewModel.priceUpDown.bindOptional(context) {
-                        if (it == true) {//收起
-                            visibility = View.VISIBLE
+                        visibility = if (it == true) {//收起
+                            View.VISIBLE
                         } else {
-                            visibility = View.GONE
+                            View.GONE
                         }
                     }
                     visibility = View.GONE
@@ -873,10 +872,10 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                 itemView()
 
                 linearLayout {
-                    if (buySelldata.buyorsell == "0") {
-                        visibility = View.GONE
+                    visibility = if (buySelldata.buyorsell == "0") {
+                        View.GONE
                     } else {
-                        visibility = View.VISIBLE
+                        View.VISIBLE
                     }
                     gravity = Gravity.CENTER_VERTICAL
                     onThrottleFirstClick {
@@ -903,7 +902,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                             maxpickNumber.postValue(
                                 Math.min(
                                     it?.enableqty?.toDouble() ?: 0.0,
-                                    buySelldata?.orderqty?.toDouble() ?: 0.0
+                                    buySelldata.orderqty?.toDouble() ?: 0.0
                                 )
                             )
                             text = it?.ladingbillid + "(" + it?.enableqty + it?.enumdicname + ")"
@@ -1116,8 +1115,11 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
 
                     textView {
                         one_delisting_amount = this
-                        text = buySelldata.fixedprice?.toDouble()?.times(buySelldata.delistminqty?.toDouble() ?: 1.0).toString() + "(需履约保证金" + NumberUtils.roundNum(
-                            buySelldata.fixedprice?.toDouble()?.times(buySelldata.delistminqty?.toDouble() ?: 1.0)?.times(
+                        text = buySelldata.fixedprice?.toDouble()
+                            ?.times(buySelldata.delistminqty?.toDouble() ?: 1.0)
+                            .toString() + "(需履约保证金" + NumberUtils.roundNum(
+                            buySelldata.fixedprice?.toDouble()
+                                ?.times(buySelldata.delistminqty?.toDouble() ?: 1.0)?.times(
                                 marginValue
                             ) ?: 0.0, 2
                         ) + ")"
@@ -1280,10 +1282,10 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                         }
                         gravity = Gravity.CENTER
                         backgroundResource = R.drawable.qhj_main_blue_bg
-                        if (buySelldata.buyorsell == "0") {
-                            text = "卖出"
+                        text = if (buySelldata.buyorsell == "0") {
+                            "卖出"
                         } else {
-                            text = "买入"
+                            "买入"
                         }
                         textSizeAuto = 38
                         textColorInt = R.color.white
@@ -1646,7 +1648,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                 linearLayout {
                     gravity = Gravity.CENTER_VERTICAL
                     textView {
-                        text = "估算价"
+                        text = "估算价"
                         textSizeAuto = 34
                         textColorInt = R.color.rma_hint_text_color_ccc
                     }.lparams(autoSize(214), wrapContent) {
@@ -1679,7 +1681,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                 linearLayout {
                     gravity = Gravity.CENTER_VERTICAL
                     textView {
-                        text = "估算额"
+                        text = "估算额"
                         textSizeAuto = 34
                         textColorInt = R.color.rma_hint_text_color_ccc
                     }.lparams(autoSize(214), wrapContent) {
@@ -1698,7 +1700,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                                     text = NumberUtils.roundNum(
                                         floatDelistingAmount ?: 0.0,
                                         2
-                                    ) + "(履约保证金" + NumberUtils.roundNum(
+                                    ) + "(履约保证金" + NumberUtils.roundNum(
                                         floatDelistingAmount?.times(
                                             marginValue
                                         ) ?: 0.0, 2
@@ -1909,7 +1911,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
     ) {
 
         val dialog1 by lazy {
-            SelectFincningDialog(this@BusinessHallActivity, viewModel, data)
+            SelectFincningDialog(pricetype, this@BusinessHallActivity, viewModel, data)
         }
 
         /** 摘牌数量 **/
@@ -1929,10 +1931,21 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
 
         lateinit var one_seekbar: SeekBar
 
+        lateinit var float_total_amount : TextView//估算金额
+
+        //浮动价挂牌金额
+        val listed_price: MutableLiveData<Double> = MutableLiveData()
+
         createCustomDialog(cancelable = false) { dialog ->
             selectAccountData.postValue(GlobalDataCollection.instance?.accountData)
             backgroundColor = Color.parseColor("#5f000000")
             maxpickNumber.postValue(buyOrSelldata.orderqty?.toDouble())
+            viewModel.quoteDayData.bindOptional(context) {
+                //行情下发计算挂牌金额 = (基差价格+期货合约价)
+                listed_price.postValue(
+                    buyOrSelldata.pricemove.toString().toDouble().plus(it?.getPrice() ?: 0.0)
+                )
+            }
             verticalLayout {
                 backgroundDrawable = createRoundRectDrawable("#ffffff", 24)
 
@@ -2001,7 +2014,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                             itemView()
 
                             linearLayout {
-                                visibility = if (type == "1") {
+                                visibility = if (pricetype == "1") {
                                     View.VISIBLE
                                 } else {
                                     View.GONE
@@ -2051,6 +2064,34 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                             itemView()
 
                             linearLayout {
+                                visibility = if (pricetype == "2") {
+                                    View.VISIBLE
+                                } else {
+                                    View.GONE
+                                }
+                                gravity = Gravity.CENTER_VERTICAL
+                                linearLayout {
+                                    textView {
+                                        text = "估算价"
+                                        textSizeAuto = 34
+                                        textColorInt = R.color.rma_hint_text_color_ccc
+                                    }.lparams(wrapContent, wrapContent) {
+                                        marginStart = autoSize(36)
+                                    }
+                                }.lparams(autoSize(250), wrapContent)
+
+                                textView {
+                                    listed_price.bindOptional(context) {
+                                        text = NumberUtils.roundNum(it ?: 0.0, 2)
+                                    }
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.buy_hall_color
+                                }.lparams(wrapContent, wrapContent)
+                            }.lparams(matchParent, autoSize(143))
+
+                            itemView()
+
+                            linearLayout {
                                 gravity = Gravity.CENTER_VERTICAL
                                 linearLayout {
                                     textView {
@@ -2103,14 +2144,19 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                                             onePriceInputNumberEdittext = this
                                             setOnTextChangeListener { view, value ->
                                                 if (value.isNullOrEmpty().not()) {
+                                                    viewModel.quoteDayData.postValue(viewModel.quoteDayData.value)
                                                     float_delisting_amount.text =
                                                         NumberUtils.roundNum(
                                                             buyOrSelldata.fixedprice?.toDouble()
                                                                 ?.times(value.toString().toDouble())
                                                                 ?: 0.0, 2
                                                         )
-                                                    if (viewModel.slectfinancingData.value?.accountid.isNullOrEmpty().not()){
-                                                        viewModel.slectfinancingData.postValue(viewModel.slectfinancingData.value)//为驱动履约保证金再次变化数额
+                                                    if (viewModel.slectfinancingData.value?.accountid.isNullOrEmpty()
+                                                            .not()
+                                                    ) {
+                                                        viewModel.slectfinancingData.postValue(
+                                                            viewModel.slectfinancingData.value
+                                                        )//为驱动履约保证金再次变化数额
                                                     }
                                                     one_seekbar.progress = value.toDouble()
                                                         .div(maxpickNumber.value ?: 0.0)
@@ -2235,6 +2281,45 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
 
                             linearLayout {
                                 gravity = Gravity.CENTER_VERTICAL
+                                if (pricetype == "2"){
+                                    visibility = View.VISIBLE
+                                }else{
+                                    visibility = View.GONE
+                                }
+                                textView {
+                                    text = "估算金额"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(autoSize(214), wrapContent) {
+                                    marginStart = autoSize(36)
+                                }
+
+                                textView {
+                                    text = "--"
+                                    listed_price.bindOptional(context) {
+                                        val floatDelistingAmount =
+                                            it?.times(
+                                                onePriceInputNumberEdittext.text.toString().toDouble()
+                                            )
+                                        if (floatDelistingAmount != 0.0) {
+                                            text = NumberUtils.roundNum(
+                                                floatDelistingAmount ?: 0.0, 2
+                                            )
+                                        }
+                                    }
+                                    float_total_amount = this
+                                    textSizeAuto = 29
+                                    textColorInt = R.color.rma_black_33
+                                }.lparams(wrapContent, wrapContent)
+                            }.lparams(matchParent, autoSize(143))
+
+                            linearLayout {
+                                if (pricetype == "1"){
+                                    visibility = View.VISIBLE
+                                }else{
+                                    visibility = View.GONE
+                                }
+                                gravity = Gravity.CENTER_VERTICAL
                                 textView {
                                     text = "摘牌金额"
                                     textSizeAuto = 34
@@ -2268,13 +2353,13 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
 
                                 textView {
                                     viewModel.slectfinancingData.bindOptional(context) {
-                                        if (float_delisting_amount.text.toString()
+                                        if (float_total_amount.text.toString()
                                                 .isNullOrEmpty()
                                         ) {
                                             text = "--"
                                         } else {
                                             text = NumberUtils.roundNum(
-                                                float_delisting_amount.text.toString().toDouble()
+                                                float_total_amount.text.toString().toDouble()
                                                     .times(it?.marginratio?.toDouble() ?: 0.0), 2
                                             )
                                         }

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

@@ -159,13 +159,23 @@ class BusinessHallViewModel : BaseViewModel(){
     }
 
     //查询融资选择方案
-    fun getFinancingSelectData(data: OrderQuoteData){
+    fun getFinancingSelectData(data: OrderQuoteData,pricetype: String){
         val params = mutableMapOf<String,String>().apply {
             put("wrfactortypeid",data.wrfactortypeid ?: "")
         }
         MyApplication.getInstance()?.warehouseManager?.queryFaProductDetail(params = params){isSuccess, respData, error ->
             if (isSuccess){
-                financingSelectDataList.postValue(respData)
+                if (pricetype == "2"){
+                    val newDataList = arrayListOf<FaProductDetailData>()
+                    respData?.forEach {
+                        if (it.isautoloan == "1"){
+                            newDataList.add(it)
+                        }
+                    }
+                    financingSelectDataList.postValue(newDataList)
+                }else{
+                    financingSelectDataList.postValue(respData)
+                }
             }
         }
     }

+ 8 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/SelectFincningDialog.kt

@@ -1,5 +1,6 @@
 package cn.muchinfo.rma.view.base.warehousereceipt
 
+import android.annotation.SuppressLint
 import android.graphics.Color
 import android.view.Gravity
 import androidx.appcompat.app.AppCompatActivity
@@ -21,6 +22,7 @@ import mtp.polymer.com.autowidget.dialog.createCustomDialog
 import org.jetbrains.anko.*
 
 fun AppCompatActivity.SelectFincningDialog(
+    priceType : String,
     activity: AppCompatActivity,
     viewModel: BusinessHallViewModel,
     data: OrderQuoteData
@@ -34,7 +36,8 @@ fun AppCompatActivity.SelectFincningDialog(
         BaseAdapter { _, _ ->
             SelectFincningViewHolder(
                 activity,
-                viewModel
+                viewModel,
+                data
             )
         }
 
@@ -153,11 +156,13 @@ fun AppCompatActivity.SelectFincningDialog(
 
 class SelectFincningViewHolder(
     private val activity: AppCompatActivity,
-    private val viewModel: BusinessHallViewModel
+    private val viewModel: BusinessHallViewModel,
+    private val orderQuoteData: OrderQuoteData
 ) : BaseViewHolder<FaProductDetailData>(activity) {
 
     override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
 
+    @SuppressLint("SetTextI18n")
     override fun _FrameLayout.createContentView() {
         verticalLayout {
             onThrottleFirstClick {
@@ -246,7 +251,7 @@ class SelectFincningViewHolder(
                             }else if (it?.interestratemode == "2"){
                                 text = it.interestrate?.toWanPercentage()
                             }else if (it?.interestratemode == "3"){//固定值
-                                text = NumberUtils.roundNum(it.interestrate,2)
+                                text = NumberUtils.roundNum(it.interestrate,2) + "元/" + orderQuoteData?.enumdicname
                             }
                         }
                         textSizeAuto = 32

+ 8 - 7
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/WarehouseReceiptFragment.kt

@@ -1,3 +1,5 @@
+@file:Suppress("DEPRECATION")
+
 package cn.muchinfo.rma.view.base.warehousereceipt
 
 import android.content.Intent
@@ -207,7 +209,6 @@ class WarehouseReceiptFragment : BaseFragment<WarehouseReceiptViewModel>(){
                             intent.setClass(context, TradeCircleListedingActivity::class.java)
                             ActivityUtils.startActivity(intent)
                         }
-
                         viewModel.resetSelectContent()
                     }
                 }
@@ -351,7 +352,7 @@ class OnePriceUI(private val fragment : Fragment,private val viewModel: Warehous
                 onePriceAdapter.setOnContentScrollListener(this@OnePriceUI)
                 inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
                     horScrollview = this
-                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY -> //代码重复,可以抽取/////
+                    setOnCustomScrollChangeListener { _, scrollX, _, _, _ -> //代码重复,可以抽取/////
                         onePriceAdapter.offestX = scrollX
                         val viewHolderCacheList: List<OnePriceAdapter.ItemViewHolder> =
                             onePriceAdapter.viewHolderCacheList
@@ -426,10 +427,10 @@ class OnePriceUI(private val fragment : Fragment,private val viewModel: Warehous
                             override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
                                 super.onScrollStateChanged(recyclerView, newState)
                                 // DES: 找出当前可视Item位置
-                                val linearLayoutManager = dataRecyclerview!!.layoutManager as LinearLayoutManager
-                                if (newState == RecyclerView.SCROLL_STATE_IDLE) {// 这个判断是当recyclerview不滚动时
-
-                                }
+                                val linearLayoutManager = dataRecyclerview.layoutManager as LinearLayoutManager
+//                                if (newState == RecyclerView.SCROLL_STATE_IDLE) {// 这个判断是当recyclerview不滚动时
+//
+//                                }
                             }
                         })
                     }
@@ -518,7 +519,7 @@ class FloatingPriceUI(private val fragment : Fragment,private val viewModel: War
                 floatPriceAdapter.setOnContentScrollListener(this@FloatingPriceUI)
                 inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
                     horScrollview = this
-                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY -> //代码重复,可以抽取/////
+                    setOnCustomScrollChangeListener { _, scrollX, _, _, _ -> //代码重复,可以抽取/////
                         floatPriceAdapter.offestX = scrollX
                         val viewHolderCacheList: List<FloatPriceAdapter.ItemViewHolder> =
                             floatPriceAdapter.viewHolderCacheList