ソースを参照

风险管理5月19日提交代码-liu.bolan

Liu.bolan 4 年 前
コミット
a44c8d0fe0
16 ファイル変更665 行追加66 行削除
  1. 2 0
      RMA/app/src/main/AndroidManifest.xml
  2. 27 3
      RMA/app/src/main/java/cn/muchinfo/rma/business/report/ReportManager.kt
  3. 32 6
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ExposureReportData.kt
  4. 6 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ReportCommonDetailData.kt
  5. 5 2
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/SpotGoodsPriceData.kt
  6. 4 5
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/AccountManagerActivity.kt
  7. 4 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/AccountManagerViewModel.kt
  8. 3 15
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/BuySellInventoryActivity.kt
  9. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/ProductionInventoryActivity.kt
  10. 38 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryActivity.kt
  11. 78 12
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryViewModel.kt
  12. 200 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/reportdetail/RecordDetailsAdapter.java
  13. 217 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/reportdetail/ReportCommonDetailsActivity.kt
  14. 44 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/reportdetail/ReportCommonDetailsViewModel.kt
  15. 2 8
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/AddTradingLoginRoleActivity.kt
  16. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/spotmarket/AddSpotMarketPriceActivity.kt

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

@@ -265,6 +265,8 @@
         <activity android:name=".view.base.home.rolemanagement.AddTradingLoginRoleActivity"/>
 
         <activity android:name=".view.base.home.rolemanagement.ResetAccountPasswordActivity"/>
+
+        <activity android:name=".view.base.home.reportquery.reportdetail.ReportCommonDetailsActivity"/>
     </application>
 
 </manifest>

+ 27 - 3
RMA/app/src/main/java/cn/muchinfo/rma/business/report/ReportManager.kt

@@ -124,8 +124,8 @@ class ReportManager {
     }
 
     /**
-     * 查询敞口日报表(菜单:报表查询/敞口报表/敞口日报表)
-     * @param params Map<String, String> userid : 用户ID / tradedate : 交易日(格式:yyyyMMdd)
+     * 查询敞口周期报表(报表/敞口报表/周(月、季、年)报表)
+     * @param params Map<String, String> userid : 用户ID / cycletype : 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】 / cycletime : 周期时间 月(YYYYMM) 季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
      * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<ExposureReportData>?, [@kotlin.ParameterName] Error?, Unit>
      */
     fun qryReportDayExposure(
@@ -133,7 +133,31 @@ class ReportManager {
         responseBack: (isSuccess: Boolean, respData: List<ExposureReportData>?, error: Error?) -> Unit
     ){
         MyOkHttpUtils().query(
-            URL = SPUtils.getInstance().getString(Constant.goCommonSearchUrl) + "/Ermcp/QryReportDayExposure",
+            URL = SPUtils.getInstance().getString(Constant.goCommonSearchUrl) + "/Ermcp3/QryReportAreaExpourse",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<ExposureReportData>>>(){
+                override fun onResponse(response: BaseResult<List<ExposureReportData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+
+            }
+        )
+    }
+
+    /**
+     * 查询敞口日报表
+     */
+    fun qryReckonAreaExpourse(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<ExposureReportData>?, error: Error?) -> Unit
+    ){
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance().getString(Constant.goCommonSearchUrl) + "/Ermcp3/QryReckonAreaExpourse",
             params = params,
             type = "1",
             callback = object : ResponseCallback<BaseResult<List<ExposureReportData>>>(){

+ 32 - 6
RMA/app/src/main/java/cn/muchinfo/rma/global/data/ExposureReportData.kt

@@ -1,15 +1,15 @@
 package cn.muchinfo.rma.global.data
 
 /**
- * 敞口报表-日报表
+ * 敞口报表数据
  */
 data class ExposureReportData(
     val areauserid : String? = "",//所属机构
     val buyfutureqty : String? = "",//买入期货数量
     val buyplanqty : String? = "",//采购计划数量
     val buypricedqty : String? = "",//采购合同已定价数量
-    val diffFutuQty : String? = "",//今日变动量(期货) = (买入 - 买入期初) - (卖出 - 卖出期初)
-    val diffSpotQty : String? = "",//今日变动量(现货) = 现货数量 - 期初现货数量
+    val diffFutuQty : String? = "",//变动量(期货)
+    val diffSpotQty : String? = "",//变动量(现货)
     val enumdicname : String? = "",//单位名称
     val middlegoodscode : String? = "",//套保品种代码
     val middlegoodshedgeratio : String? = "",//应套保比例
@@ -18,7 +18,7 @@ data class ExposureReportData(
     val needhedgeexposoure : String? = "",//应套保敞口
     val needhedgeratio : String? = "",//应套保敞口比例
     val oriTotalFutuQty : String? = "",//期初期货数量=期初买入期货数量-期初卖出期货数量
-    val oriTotalSpotQty : String? = "",//期初现货数量=(期初销售计划数量-期初销售合同已定价数量)-(期初采购计划数量-期初采购合同已定价数量)
+    val oriTotalSpotQty : String? = "",//期初现货头寸总量
     val oribuyfutureqty : String? = "",//期初买入期货数量
     val oribuyplanqty : String? = "",//期初采购计划数量
     val oribuypricedqty : String? = "",//期初采购合同已定价数量
@@ -29,10 +29,36 @@ data class ExposureReportData(
     val sellfutureqty : String? = "",//卖出期货数量
     val sellplanqty : String? = "",//销售计划数量
     val sellpricedqty : String? = "",//销售合同已定价数量
-    val totalexposure : String? = "",//总敞口
+    val totalexposure : String? = "",//实时总敞口(总敞口)
     val totalfutureqty : String? = "",//期货数量
     val totalhedgeratio : String? = "",//敞口比例
     val totalneedhedgeqty : String? = "",//期货应套保量
     val totalspotqty : String? = "",//现货数量
-    var rightData : List<String>? = arrayListOf()//组装的右侧数据
+    var rightData : List<String>? = arrayListOf(),//组装的右侧数据
+    val accountid : String? = "",//期货账户ID (作废, 默认为0)
+    val accountname : String? = "",//机构名称
+    val arbitrageqty : String? = "",//套利量
+    val cycletime : String? = "",//周期时间 月(YYYYMM) 季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
+    val cycletype : String? = "",//周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
+    val diffexposure : String? = "",//变动量(套保敞口)
+    val diffhedgeqty : String? = "",//变动量(现货应套保总量)
+    val diffmgqtya : String? = "",//套保变动量
+    val diffmgqtyb : String? = "",//套利变动量
+    val diffqty : String? = "",//变动量(总敞口)
+    val hedgeqty : String? = "",//套保量
+    val mgneedhedgeratio : String? = "",//套保比例(套保品的)
+    val middlgoodscode : String? = "",//套保商品代码
+    val needarbitrageqty : String? = "",//应套利量
+    val needarbitrageratio : String? = "",//套利比例(套保品的)
+    val needhedgeqty : String? = "",//应套保量
+    val oriarbitrageqty : String? = "",//期初套利量
+    val orihedgeqty : String? = "",//期初套保量
+    val orineedarbitrageqty : String? = "",//期初应套利量
+    val orineedhedgeexposoure : String? = "",//期初应套保敞口
+    val orineedhedgeqty : String? = "",//期初应套保量
+    val oritotalexposure : String? = "",//期初实时总敞口
+    val oritotalfutureqty : String? = "",//期初期货头寸总量
+    val oritotalneedhedgeqty : String? = "",//期初应套保总量
+    val unitid : String? = "",//单位id
+    val updatetime : String? = ""//更新时间
 )

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

@@ -0,0 +1,6 @@
+package cn.muchinfo.rma.global.data
+
+data class ReportCommonDetailData(
+    var leftContent : String = "",
+    var rightData : List<String>? = arrayListOf()//组装的右侧数据
+)

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

@@ -50,7 +50,8 @@ data class SpotGoodsPriceData(
     val wrstandardid : String? = "",//现货品类ID(通用则为0)
     val wrstandardname : String? = "", //品类名称
     val logid : String? = "",//logid
-    var isClick : Int = 0//是否点击展开
+    var isClick : Int = 0,//是否点击展开
+    val currencyname: String? = ""//结算币种名称
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
@@ -75,7 +76,8 @@ data class SpotGoodsPriceData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
-        parcel.readInt()
+        parcel.readInt(),
+        parcel.readString()
     ) {
     }
 
@@ -103,6 +105,7 @@ data class SpotGoodsPriceData(
         parcel.writeString(wrstandardname)
         parcel.writeString(logid)
         parcel.writeInt(isClick)
+        parcel.writeString(currencyname)
     }
 
     override fun describeContents(): Int {

+ 4 - 5
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/AccountManagerActivity.kt

@@ -70,7 +70,6 @@ class AccountManagerActivity : BaseActivity<AccountManagerViewModel>() {
 
     val dialog by lazy { createLoadingDialog(hintStr = "请求中...") }
 
-
     //viewpager的适配器
     private var newPagerAdapter : PagerAdapter? = null
 
@@ -279,7 +278,7 @@ class LoginAccountManager(
 //                bindTaskStatus(viewModule.status)
                 swipeToLoadLayout {
                     swipeToLayout = this
-                    setEnableRefresh(true)
+                    setEnableRefresh(false)
                     setEnableLoadMore(false)
                     setOnRefreshListener {
                         viewModel.queryBusinessAccMgrLoginUser()
@@ -394,7 +393,7 @@ class TradingAccountManager(
 //                bindTaskStatus(viewModule.status)
                 swipeToLoadLayout {
                     swipeToLayout = this
-                    setEnableRefresh(true)
+                    setEnableRefresh(false)
                     setEnableLoadMore(false)
                     setOnRefreshListener {
                         viewModel.queryTradingAccMgrLoginUser()
@@ -546,7 +545,7 @@ class ManagerAccountUI(
 //                bindTaskStatus(viewModule.status)
                 swipeToLoadLayout {
                     swipeToLayout = this
-                    setEnableRefresh(true)
+                    setEnableRefresh(false)
                     setEnableLoadMore(false)
                     setOnRefreshListener {
                         viewModel.queryManagerAccMgrLoginUser()
@@ -696,7 +695,7 @@ class FuturesAccountManager(
 //                bindTaskStatus(viewModule.status)
                 swipeToLoadLayout {
                     swipeToLayout = this
-                    setEnableRefresh(true)
+                    setEnableRefresh(false)
                     setEnableLoadMore(false)
                     setOnRefreshListener {
                         viewModel.queryAccMgrTaaccount()

+ 4 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/AccountManagerViewModel.kt

@@ -6,6 +6,7 @@ import cn.muchinfo.rma.global.data.*
 import cn.muchinfo.rma.netManage.base.InteractiveException
 import cn.muchinfo.rma.protobuf.protoclasses.ManageServiceMI2
 import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.autoWidget.remove
 import cn.muchinfo.rma.view.base.BaseViewModel
 import kotlinx.coroutines.GlobalScope
 import kotlinx.coroutines.launch
@@ -53,7 +54,7 @@ class AccountManagerViewModel : BaseViewModel(){
         }
         MyApplication.getInstance()?.accountManager?.queryAccMgrLoginUser(params = params){isSuccess, respData, error ->
             if (isSuccess){
-                accountManagerList.postValue(respData)
+                accountManagerList.postValue(respData?.remove { it.accountstatus == "6" })
             }
         }
     }
@@ -67,7 +68,7 @@ class AccountManagerViewModel : BaseViewModel(){
         }
         MyApplication.getInstance()?.accountManager?.queryAccMgrLoginUser(params = params){isSuccess, respData, error ->
             if (isSuccess){
-                tradingAccountManagerList.postValue(respData)
+                tradingAccountManagerList.postValue(respData?.remove { it.accountstatus == "6" })
             }
         }
     }
@@ -81,7 +82,7 @@ class AccountManagerViewModel : BaseViewModel(){
         }
         MyApplication.getInstance()?.accountManager?.queryAccMgrLoginUser(params = params){isSuccess, respData, error ->
             if (isSuccess){
-                managerAccountManagerList.postValue(respData)
+                managerAccountManagerList.postValue(respData?.remove { it.accountstatus == "6" })
             }
         }
     }

+ 3 - 15
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/BuySellInventoryActivity.kt

@@ -447,11 +447,7 @@ class BuySellInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                         }.lparams(matchParent, autoSize(60))
 
                          view {
-                             if (type == "3"){
-                                 visibility = View.VISIBLE
-                             }else{
-                                 visibility = View.GONE
-                             }
+
                             background = resources.getDrawable(R.color.rma_hint_line_color_eee)
                         }.lparams(matchParent, autoSize(1)) {
                             marginStart = autoSize(36)
@@ -460,11 +456,7 @@ class BuySellInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                         }
 
                         textView {
-                            if (type == "3"){
-                                visibility = View.VISIBLE
-                            }else{
-                                visibility = View.GONE
-                            }
+
                             text = "待审核登记信息:"
                             textColorInt = R.color.rma_blue_color
                             textSizeAuto = 34
@@ -476,11 +468,7 @@ class BuySellInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
 
                         linearLayout {
                             gravity = Gravity.CENTER_VERTICAL
-                            if (type == "3"){
-                                visibility = View.VISIBLE
-                            }else{
-                                visibility = View.GONE
-                            }
+
                             linearLayout {
                                 textView {
                                     text = "审核人"

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/ProductionInventoryActivity.kt

@@ -102,7 +102,7 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
 
 
                         textView {
-                            text = "合同基本信息:"
+                            text = "待审核登记信息:"
                             textColorInt = R.color.rma_blue_color
                             textSizeAuto = 34
                         }.lparams(wrapContent, wrapContent) {

+ 38 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryActivity.kt

@@ -692,6 +692,9 @@ class ExposureReportUI(
     lateinit var horScrollview: CustomHorizontalScrollView
     lateinit var recyclerView: RecyclerView
 
+    /** 选择的交易用户 **/
+    val selectTransactionUser : MutableLiveData<SelectData> = MutableLiveData()
+
     val topAdapter by lazy {
         TopTabAdpater(activity)
     }
@@ -716,6 +719,9 @@ class ExposureReportUI(
         if (null != horScrollview) horScrollview.onTouchEvent(event)
     }
 
+    init {
+        viewModel.queryTradingAccMgrLoginUser(tradedate = tradedate)
+    }
 
     @RequiresApi(Build.VERSION_CODES.N)
     val root = _FrameLayout(activity).apply {
@@ -735,7 +741,7 @@ class ExposureReportUI(
                     }
                     emptyView()
 
-                }.lparams(autoSize(288), autoSize(67)) {
+                }.lparams(0, autoSize(67),1f) {
                     marginStart = autoSize(36)
                 }
 
@@ -765,25 +771,48 @@ class ExposureReportUI(
                     imageView {
                         imageResource = R.mipmap.rma_search_by_time
                     }.lparams(autoSize(38), autoSize(38))
-                }.lparams(autoSize(370), autoSize(67)) {
-                    marginStart = autoSize(12)
+                }.lparams(0, autoSize(67),1f) {
+                    marginStart = autoSize(36)
+                    marginEnd = autoSize(36)
                 }
 
+            }.lparams(matchParent, autoSize(100))
+
+
+            linearLayout {
                 textView {
                     onThrottleFirstClick {
-                        viewModel.qryReportDayExposure(tradedate = tradedate.replace("-", ""))
+                        activity.creatBottomSheetDialog("请选择指定交易用户", viewModel.getCanSelectTradingAccount()) {
+                            selectTransactionUser.postValue(this)
+                        }
+                    }
+                    selectTransactionUser.bindOptional(context){
+                        text = it?.value
                     }
                     gravity = Gravity.CENTER
+                    text = "请选择交易用户"
+                    textColorInt = R.color.rma_black_33
+                    textSizeAuto = 31
+                }.lparams(0, autoSize(67),1f){
+                    marginStart = autoSize(36)
+                }
+                textView {
                     backgroundDrawable = createCommonBottomRoundBg(color = "#2481DD", corner = 5)
+                    onThrottleFirstClick {
+                        viewModel.qryReportAreaExpourse(cycletime = tradedate.replace("-", ""),cycletype = "",userid = selectTransactionUser.value?.id ?: "")
+                    }
+                    gravity = Gravity.CENTER_VERTICAL
                     text = "查询"
-                    textSizeAuto = 31
                     textColorInt = R.color.white
-                }.lparams(autoSize(144), autoSize(67)) {
-                    marginStart = autoSize(12)
+                    textSizeAuto = 31
+                }.lparams(0, autoSize(67),1f){
+                    marginStart = autoSize(36)
+                    marginEnd = autoSize(36)
                 }
 
             }.lparams(matchParent, autoSize(100))
-            viewModel.queryTitle(Constant.table_mobile_report_expose, tradedate.replace("-", ""))
+
+            viewModel.queryTitle(tableKey = Constant.table_mobile_report_expose, cycletime = tradedate.replace("-", ""),cycletype = "",userid = selectTransactionUser.value?.id ?: "")
             contentAdapter.setOnContentScrollListener(this@ExposureReportUI)
             linearLayout {
                 linearLayout {
@@ -846,7 +875,7 @@ class ExposureReportUI(
                         /**
                          * 下拉刷新
                          */
-                        viewModel.qryReportDayExposure(tradedate = tradedate.replace("-", ""))
+                        viewModel.qryReportAreaExpourse(cycletime = tradedate.replace("-", ""),cycletype = "",userid = selectTransactionUser.value?.id ?: "")
                     }
                     setEnableScrollContentWhenLoaded(false)
                     setEnableLoadMoreWhenContentNotFull(false)

+ 78 - 12
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryViewModel.kt

@@ -134,6 +134,11 @@ class ReportQueryViewModel : BaseViewModel(){
     val ermcp3GoodsbrandDataList : MutableLiveData<List<Ermcp3GoodsbrandData>> = MutableLiveData()
 
     /**
+     * 交易账号列表
+     */
+    val tradingAccountManagerList : MutableLiveData<List<AccMgrLoginUserData>> = MutableLiveData()
+
+    /**
      * 查询财务日报表(菜单:报表查询/财务报表/日报表)
      * @param tradedate String
      */
@@ -218,13 +223,14 @@ class ReportQueryViewModel : BaseViewModel(){
     }
 
     /**
-     * 查询敞口日报表(菜单:报表查询/敞口报表/敞口日报表)
+     * 查询敞口周期报表(报表/敞口报表/周(月、季、年)报表)
      * @param tradedate String
      */
-    fun qryReportDayExposure(tradedate: String){
+    fun qryReportAreaExpourse(cycletime: String,cycletype : String,userid : String){
         val params = mutableMapOf<String, String>().apply {
-            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
-            put("tradedate", tradedate)
+            put("userid", userid)
+            put("cycletime", cycletime)
+            put("cycletype",cycletype)
         }
 
         MyApplication.getInstance()?.reportManager?.qryReportDayExposure(params = params){isSuccess, respData, error ->
@@ -235,6 +241,24 @@ class ReportQueryViewModel : BaseViewModel(){
     }
 
     /**
+     * 敞口报表第三步先查询日报表(进入页面默认查询日报表)
+     * 查询敞口日报表
+     * @param tradedate String
+     */
+    fun qryReckonAreaExpourse(tradedate: String,userid : String){
+        val params = mutableMapOf<String, String>().apply {
+            put("userid", userid)
+            put("tradedate", tradedate)
+        }
+
+        MyApplication.getInstance()?.reportManager?.qryReckonAreaExpourse(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                exposureReportDataList.postValue(getReportDayExposureRightData(respData ?: arrayListOf()))
+            }
+        }
+    }
+
+    /**
      * 查询现货日报表(菜单:报表查询/现货报表/现货日报表)
      * @param tradedate String
      */
@@ -324,12 +348,42 @@ class ReportQueryViewModel : BaseViewModel(){
         }
     }
 
+    /**
+     * 敞口报表第一步先查询交易用户
+     * 查询账户管理登录账号(账户管理/交易账号)
+     */
+    fun queryTradingAccMgrLoginUser(tradedate : String){
+        val params = mutableMapOf<String, String>().apply {
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("querytype", "2")
+        }
+        MyApplication.getInstance()?.accountManager?.queryAccMgrLoginUser(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                tradingAccountManagerList.postValue(respData)
+                queryTitle(tableKey = Constant.table_mobile_report_expose,cycletime = tradedate.replace("-", ""),userid = respData?.get(0)?.roleid ?: "",cycletype = "")
+            }
+        }
+    }
+
+    /**
+     * 获取可供选择的交易用户列表
+     * @return List<SelectData>
+     */
+    fun getCanSelectTradingAccount() : List<SelectData>{
+        val selectDataList = arrayListOf<SelectData>()
+        tradingAccountManagerList.value?.forEach {
+            selectDataList.add(SelectData(id = it.roleid ?: "",value = it.rolename ?: ""))
+        }
+        return selectDataList
+    }
+
 
     /**
+     * 敞口报表第二步先查询列头
      * 敞口报表列表头部数据
      * @param tableKey String
      */
-    fun queryTitle(tableKey: String,tradedate : String) {
+    fun queryTitle(tableKey: String,cycletime: String,cycletype : String,userid : String) {
         val params = mutableMapOf<String, String>().apply {
             put("tableKey", tableKey)
             put("tableType", "3")
@@ -341,7 +395,7 @@ class ReportQueryViewModel : BaseViewModel(){
                     t1.orderindex?.toInt()?.minus(t2.orderindex?.toInt() ?: 0) ?: 0
                 })
                 exposureReportTitle.postValue(newlist)
-                qryReportDayExposure(tradedate = tradedate)
+                qryReckonAreaExpourse(tradedate = cycletime,userid = userid)
             }
         }
     }
@@ -355,12 +409,24 @@ class ReportQueryViewModel : BaseViewModel(){
         val newList = arrayListOf<ExposureReportData>()
         respData.forEach {
             val newRightData = arrayListOf<String>()
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.totalspotqty),2) + it.enumdicname + "\n" + it.middlegoodshedgeratio?.toPercentage())
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.totalneedhedgeqty),2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.totalfutureqty,2) + it.enumdicname)
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.needhedgeexposoure),2) + it.enumdicname + "\n" + it.needhedgeratio?.toPercentage())
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.totalexposure),2) + it.enumdicname + "\n" +it.totalhedgeratio?.toPercentage())
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.oriTotalSpotQty),2) + it.enumdicname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.diffSpotQty),2) + it.enumdicname)
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.oriTotalFutuQty),2) + it.enumdicname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.diffFutuQty),2) + it.enumdicname)
+            //'套保量/\n 套利量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.hedgeqty),2) + it.enumdicname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.arbitrageqty),2) + it.enumdicname)
+            //'现货总量/\n 变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.totalspotqty),2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.diffhedgeqty,2) + it.enumdicname)
+            //'套保变动量/\n 套利变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.diffmgqtya),2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.diffmgqtyb,2) + it.enumdicname)
+            //'套保比例/\n 套利比例 '
+            newRightData.add(it.mgneedhedgeratio?.toPercentage() + "\n" +it.needarbitrageratio?.toPercentage())
+            //'应套保量/\n 应套利量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.needhedgeqty),2) + it.enumdicname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.needarbitrageqty),2) + it.enumdicname)
+            //'现货应套保总量/\n 变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.totalneedhedgeqty),2) + it.enumdicname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.diffhedgeqty),2) + it.enumdicname)
+            //'期货总量/\n 变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.totalfutureqty),2) + it.enumdicname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.diffFutuQty),2) + it.enumdicname)
+            //'套保敞口/\n 变动量 '
+            newRightData.add(it.needhedgeexposoure + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.diffexposure),2) + it.enumdicname)
+            //'总敞口/\n 变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.totalexposure),2) + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.diffqty),2) + it.enumdicname)
             val newData = it.copy(rightData = newRightData)
             newList.add(newData)
         }

+ 200 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/reportdetail/RecordDetailsAdapter.java

@@ -0,0 +1,200 @@
+package cn.muchinfo.rma.view.base.home.reportquery.reportdetail;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.blankj.utilcode.util.ActivityUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.AreaStockReportData;
+import cn.muchinfo.rma.global.data.ReportCommonDetailData;
+import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
+import cn.muchinfo.rma.view.base.app.Constant;
+import cn.muchinfo.rma.view.base.home.inventory.inventorymanager.InventoryDetailsActivity;
+import cn.muchinfo.rma.view.base.procurement.RightScrollAdapter;
+
+/**
+ * 用于库存管理当前库存的列表adapter
+ */
+public class RecordDetailsAdapter extends RecyclerView.Adapter<RecordDetailsAdapter.ItemViewHolder> {
+
+    private Context context;
+    private List<ReportCommonDetailData> datas;
+    private int index = -1;
+    private int position = -1;
+    private List<ItemViewHolder> mViewHolderList = new ArrayList<>();
+    public int offestX = 0;
+    private OnContentScrollListener onContentScrollListener;
+    private String querytype = "1";
+    private String querydate;
+
+
+    public interface OnContentScrollListener {
+        void onScroll(MotionEvent event);
+    }
+
+    public void setOnContentScrollListener(OnContentScrollListener onContentScrollListener) {
+        this.onContentScrollListener = onContentScrollListener;
+    }
+
+    public RecordDetailsAdapter(Context context) {
+        this.context = context;
+    }
+
+    public void setDatas(List<ReportCommonDetailData> datas) {
+        this.datas = datas;
+        notifyDataSetChanged();
+    }
+
+    /**
+     * 设置是日报表还是月报表 1是日报表 2是月报表
+     * @param querytype
+     */
+    public void setquerytype(String querytype){
+        this.querytype = querytype;
+    }
+
+    /**
+     * 设置查询的时间
+     * @param querydate
+     */
+    public void setquerydate(String querydate){
+        this.querydate = querydate;
+    }
+
+    private void setPosition(int position){
+        if (this.position == position) {
+            this.position = -1;
+            notifyItemChanged(index);
+        } else {
+            this.position = position;
+            notifyItemChanged(position);
+        }
+    }
+
+    @NonNull
+    @Override
+    public ItemViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
+        View view = LayoutInflater.from(context).inflate(R.layout.layout_item_inventory_current, viewGroup, false);
+        return new ItemViewHolder(view);
+    }
+
+    @SuppressLint("SetTextI18n")
+    @Override
+    public void onBindViewHolder(@NonNull final ItemViewHolder itemViewHolder, int i) {
+        this.index = i;
+        itemViewHolder.exposure_tvLeftTitle.setText(datas.get(i).getLeftContent());
+        //右边滑动部分
+        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
+        linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        itemViewHolder.exposure_rvItemRight.setLayoutManager(linearLayoutManager);
+        itemViewHolder.exposure_rvItemRight.setHasFixedSize(true);
+        RightScrollAdapter rightScrollAdapter = new RightScrollAdapter(context);
+        rightScrollAdapter.setDatas(datas.get(i).getRightData());
+        itemViewHolder.exposure_rvItemRight.setAdapter(rightScrollAdapter);
+        //缓存当前holder
+        if (!mViewHolderList.contains(itemViewHolder)) {
+            mViewHolderList.add(itemViewHolder);
+        }
+        if (i == this.position){
+            itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
+            itemViewHolder.exposure_allView.setVisibility(View.VISIBLE);
+        }else {
+            itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.white));
+            itemViewHolder.exposure_allView.setVisibility(View.GONE);
+        }
+
+        itemViewHolder.exposure_all_click_View.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+
+            }
+        });
+
+        //入库明细
+        itemViewHolder.futures_subsidiary.setOnClickListener(view -> {
+
+        });
+        //出库明细
+        itemViewHolder.place_the_order.setOnClickListener(view -> {
+
+        });
+
+        itemViewHolder.exposure_horItemScrollview.setEventListener(event -> {
+            if (null != onContentScrollListener) onContentScrollListener.onScroll(event);
+        });
+        //由于viewHolder的缓存,在1级缓存取出来是2个viewholder,并且不会被重新赋值,所以这里需要处理缓存的viewholder的位移
+        itemViewHolder.exposure_horItemScrollview.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+            @Override
+            public void onGlobalLayout() {
+                if (!itemViewHolder.isLayoutFinish()) {
+                    itemViewHolder.exposure_horItemScrollview.scrollTo(offestX, 0);
+                    itemViewHolder.setLayoutFinish(true);
+                }
+            }
+        });
+    }
+
+    @Override
+    public int getItemCount() {
+        return null == datas ? 0 : datas.size();
+    }
+
+    public List<ItemViewHolder> getViewHolderCacheList() {
+        return mViewHolderList;
+    }
+
+    public int getOffestX() {
+        return offestX;
+    }
+
+    public static class ItemViewHolder extends RecyclerView.ViewHolder {
+        LinearLayout exposure_roots_view;//根部布局
+        TextView futures_subsidiary;//
+        TextView place_the_order;//
+        LinearLayout exposure_allView;//隐藏的底部操作空间
+        LinearLayout exposure_all_click_View;//item左侧点击控件
+        TextView exposure_tvLeftTitle;//左边
+        TextView exposure_tv_left_bottom_title;//合同编号
+        RecyclerView exposure_rvItemRight;//右方的列表
+        public CustomHorizontalScrollView exposure_horItemScrollview;//右方的滑动控件
+        private boolean isLayoutFinish;//自定义字段,用于标记layout
+
+        public boolean isLayoutFinish() {
+            return isLayoutFinish;
+        }
+
+        public void setLayoutFinish(boolean layoutFinish) {
+            isLayoutFinish = layoutFinish;
+        }
+
+        public ItemViewHolder(@NonNull View itemView) {
+            super(itemView);
+            futures_subsidiary = itemView.findViewById(R.id.futures_subsidiary);
+            place_the_order = itemView.findViewById(R.id.place_the_order);
+            exposure_tvLeftTitle = itemView.findViewById(R.id.exposure_tv_left_title);
+            exposure_rvItemRight = itemView.findViewById(R.id.exposure_rv_item_right);
+            exposure_horItemScrollview = itemView.findViewById(R.id.exposure_hor_item_scrollview);
+            exposure_allView = itemView.findViewById(R.id.exposure_all_view);
+            exposure_tv_left_bottom_title = itemView.findViewById(R.id.exposure_tv_left_bottom_title);
+            exposure_all_click_View = itemView.findViewById(R.id.exposure_all_click_View);
+            exposure_roots_view = itemView.findViewById(R.id.exposure_roots_view);
+        }
+    }
+}

+ 217 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/reportdetail/ReportCommonDetailsActivity.kt

@@ -0,0 +1,217 @@
+package cn.muchinfo.rma.view.base.home.reportquery.reportdetail
+
+import android.os.Bundle
+import android.view.Gravity
+import android.view.MotionEvent
+import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.RecyclerView
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.procurement.TopTabAdpater
+import com.blankj.utilcode.util.SizeUtils
+import org.jetbrains.anko.*
+
+//报表明细列表的通用activity
+class ReportCommonDetailsActivity : BaseActivity<ReportCommonDetailsViewModel>() , RecordDetailsAdapter.OnContentScrollListener{
+
+    //页面标题
+    private val title by lazy {
+        intent.getStringExtra("title")
+    }
+
+    //页面头部显示的日期时间
+    private val time by lazy {
+        intent.getStringExtra("time")
+    }
+
+    //页面头部显示交易用户
+    private val transaction by lazy {
+        intent.getStringExtra("transaction")
+    }
+
+    //该页面需要请求的列头
+    private val tabtitle by lazy {
+        intent.getStringExtra("tabtitle")
+    }
+
+    //列表头部表头adapter
+    val topAdapter by lazy {
+        TopTabAdpater(this)
+    }
+
+    //列表内容adapter
+    val contentAdapter by lazy {
+        RecordDetailsAdapter(this)
+    }
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+    lateinit var horScrollview: CustomHorizontalScrollView
+    lateinit var recyclerView: RecyclerView
+
+    //数据初始化
+    fun initData(){
+        viewModel.queryTitle(tabName = tabtitle ?: "")
+    }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = title
+                }
+            }
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    text = "日期:"
+                    textColorInt = R.color.white
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent){
+                    marginStart = autoSize(36)
+                }
+                textView {
+                    text = time
+                    textSizeAuto = 31
+                    textColorInt = R.color.white
+                }.lparams(wrapContent, wrapContent){
+                    marginStart = autoSize(15)
+                }
+
+                textView {
+                    text = "交易用户:"
+                    textSizeAuto = 31
+                    textColorInt = R.color.white
+                }.lparams(wrapContent, wrapContent){
+                    marginStart = autoSize(36)
+                }
+
+                textView {
+                    text = transaction
+                    textSizeAuto = 31
+                    textColorInt = R.color.white
+                }.lparams(wrapContent, wrapContent){
+                    marginStart = autoSize(15)
+                }
+            }.lparams(matchParent, autoSize(80))
+
+
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                    textView {//待点价头部左侧数据
+                        viewModel.exposureReportTitle.bindOptional(context) {
+                            text = it?.get(0)?.columntitle?.replace("\\n", "\n") ?: ""
+                        }
+                        textColorStr = "#AAAAAA"
+                        textSizeAuto = 24
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(30)
+                    }
+                }.lparams(autoSize(SizeUtils.dp2px(135f)), autoSize(100))
+
+                inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
+                    horScrollview = this
+                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY -> //代码重复,可以抽取/////
+                        contentAdapter.offestX = scrollX
+                        val viewHolderCacheList: List<RecordDetailsAdapter.ItemViewHolder> =
+                            contentAdapter.viewHolderCacheList
+
+                        if (null != viewHolderCacheList) {
+                            val size = viewHolderCacheList.size
+                            for (i in 0 until size) {
+                                viewHolderCacheList[i].exposure_horItemScrollview.scrollTo(
+                                    scrollX,
+                                    0
+                                )
+                            }
+                        }
+                    }
+                    relativeLayout {
+                        recyclerView {//待点价头部右侧数据
+                            val linearLayoutManager = LinearLayoutManager(context)
+                            linearLayoutManager.orientation = LinearLayoutManager.HORIZONTAL
+                            layoutManager = linearLayoutManager
+                            background = resources.getDrawable(R.color.white)
+                            adapter = topAdapter
+                        }
+                        viewModel.exposureReportTitle.bindOptional(context) {
+                            val titleStringList = arrayListOf<String>()
+                            it?.subList(1, it.size)?.forEach { data ->
+                                titleStringList.add(data.columntitle?.replace("\\n", "\n") ?: "")
+                            }
+                            topAdapter.setDatas(titleStringList)
+                        }
+                    }
+                }.lparams(matchParent, matchParent)
+            }.lparams(matchParent, autoSize(100))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        /**
+                         * 下拉刷新
+                         */
+//                        viewModel.qryReportAreaExpourse(cycletime = tradedate.replace("-", ""),cycletype = "",userid = selectTransactionUser.value?.id ?: "")
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    recyclerView {//待点价列表
+                        background = resources.getDrawable(R.color.white)
+                        adapter = contentAdapter
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
+                                super.onScrolled(recyclerView, dx, dy)
+                                val viewHolderCacheList: List<RecordDetailsAdapter.ItemViewHolder> =
+                                    contentAdapter.viewHolderCacheList
+                                if (null != viewHolderCacheList) {
+                                    val size = viewHolderCacheList.size
+                                    for (i in 0 until size) {
+                                        viewHolderCacheList[i].exposure_horItemScrollview.scrollTo(
+                                            contentAdapter.getOffestX(),
+                                            0
+                                        )
+                                    }
+                                }
+                            }
+                        })
+                    }
+
+
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.exposureReportDataList.bindOptional(context) {
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+//                        mHeadHeaderHSView.scrollTo(scrollXView,scrollYView)
+                    }
+                    statusLayout.showSuccess()
+                    contentAdapter.setDatas(it)
+                }
+            }
+        }
+    }
+
+    override fun onScroll(event: MotionEvent?) {
+        //处理单个item滚动时,顶部tab需要联动
+        if (null != horScrollview) horScrollview.onTouchEvent(event)
+    }
+
+}

+ 44 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/reportdetail/ReportCommonDetailsViewModel.kt

@@ -0,0 +1,44 @@
+package cn.muchinfo.rma.view.base.home.reportquery.reportdetail
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.data.ColumnsData
+import cn.muchinfo.rma.global.data.ReportCommonDetailData
+import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.autoWidget.toArrayList
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+//报表明细列表的通用viewmodel
+class ReportCommonDetailsViewModel : BaseViewModel(){
+
+    /**
+     * 头部数据
+     */
+    val exposureReportTitle: MutableLiveData<List<ColumnsData>> = MutableLiveData()
+
+    /**
+     * 内容数据
+     */
+    val exposureReportDataList : MutableLiveData<List<ReportCommonDetailData>> = MutableLiveData()
+
+    /**
+     * 请求该页面的列头
+     * @param tabName String
+     */
+    fun queryTitle(tabName : String){
+        val params = mutableMapOf<String, String>().apply {
+            put("tableKey", tabName)
+            put("tableType", "3")
+        }
+        MyApplication.getInstance()?.commonManager?.queryTableDefine(params = params) { isSuccess, respData, error ->
+            if (isSuccess) {
+                val newlist = respData?.get(0)?.columns?.toArrayList()
+                newlist?.sortWith(Comparator { t1, t2 ->
+                    t1.orderindex?.toInt()?.minus(t2.orderindex?.toInt() ?: 0) ?: 0
+                })
+                exposureReportTitle.postValue(newlist)
+                //TODO 根据不同的taName进行不同的接口调用
+            }
+        }
+    }
+
+}

+ 2 - 8
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/AddTradingLoginRoleActivity.kt

@@ -170,7 +170,6 @@ class AddTradingLoginRoleActivity : BaseActivity<RoleSetViewModel>() {
                             gravity = Gravity.CENTER_VERTICAL
 
                             textView {
-                                visibility = View.INVISIBLE
                                 text = "*"
                                 textColorInt = R.color.rma_star_color
                                 textSizeAuto = 31
@@ -188,7 +187,7 @@ class AddTradingLoginRoleActivity : BaseActivity<RoleSetViewModel>() {
                             editText {
                                 isEnabled = type == "1" || type == "3"
                                 if (type != "1") {
-                                    setText(data1.rolename)
+                                    setText(data1.logincode)
                                 }
                                 login_account = this
                                 hint = "请输入登录账号"
@@ -210,7 +209,6 @@ class AddTradingLoginRoleActivity : BaseActivity<RoleSetViewModel>() {
                             gravity = Gravity.CENTER_VERTICAL
 
                             textView {
-                                visibility = View.INVISIBLE
                                 text = "*"
                                 textColorInt = R.color.rma_star_color
                                 textSizeAuto = 31
@@ -254,7 +252,6 @@ class AddTradingLoginRoleActivity : BaseActivity<RoleSetViewModel>() {
                                 visibility = View.VISIBLE
                             }
                             textView {
-                                visibility = View.INVISIBLE
                                 text = "*"
                                 textColorInt = R.color.rma_star_color
                                 textSizeAuto = 31
@@ -294,7 +291,6 @@ class AddTradingLoginRoleActivity : BaseActivity<RoleSetViewModel>() {
                             gravity = Gravity.CENTER_VERTICAL
 
                             textView {
-                                visibility = View.INVISIBLE
                                 text = "*"
                                 textColorInt = R.color.rma_star_color
                                 textSizeAuto = 31
@@ -315,7 +311,7 @@ class AddTradingLoginRoleActivity : BaseActivity<RoleSetViewModel>() {
                                 if (type != "1") {
                                     setText(data1.mobile)
                                 }
-                                hint = "非必填,用于找回密码"
+                                hint = "用于找回密码"
                                 background = null
                                 inputType = EditorInfo.TYPE_CLASS_PHONE
 //                    setDecimalInputType()
@@ -337,7 +333,6 @@ class AddTradingLoginRoleActivity : BaseActivity<RoleSetViewModel>() {
                             gravity = Gravity.CENTER_VERTICAL
 
                             textView {
-                                visibility = View.INVISIBLE
                                 text = "*"
                                 textColorInt = R.color.rma_star_color
                                 textSizeAuto = 31
@@ -471,7 +466,6 @@ class AddTradingLoginRoleActivity : BaseActivity<RoleSetViewModel>() {
                                 }
                             }
                             textView {
-                                visibility = View.INVISIBLE
                                 text = "*"
                                 textColorInt = R.color.rma_star_color
                                 textSizeAuto = 31

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

@@ -65,10 +65,10 @@ class AddSpotMarketPriceActivity : BaseActivity<SpotMarketPriceViewModel>(){
     fun initData(){
         if (type == "2"){
             viewModel.queryDeliveryGoodsDetails(deliverygoodsid = data.deliverygoodsid ?: "")
-            selectDeliveryGoods.postValue(SelectData(id = data.deliverygoodsid ?: "",value = data?.deliverygoodsname ?: ""))
+            selectDeliveryGoods.postValue(SelectData(id = data.deliverygoodsid ?: "",value = data.deliverygoodsname ?: ""))
             selectCategory.postValue(SelectData(id = data.wrstandardid ?: "",value = data.wrstandardname ?: ""))
             selectBrand.postValue(SelectData(id = data.spotgoodsbrandid ?: "",value = data.brandname ?: ""))
-            selelctCurreryId.postValue(SelectData(id = data.currencyid ?: "",value = ""))
+            selelctCurreryId.postValue(SelectData(id = data.currencyid ?: "",value = data.currencyname ?: ""))
         }
         viewModel.queryDeliveryGoods()
 //        viewModel.queryGoodsWrstandard()