Forráskód Böngészése

风险管理4月14日提交代码-liu.bolan

Liu.bolan 4 éve
szülő
commit
b436764495
29 módosított fájl, 1639 hozzáadás és 86 törlés
  1. 1 0
      RMA/.idea/gradle.xml
  2. 1 0
      RMA/app/build.gradle
  3. BIN
      RMA/app/libs/InfoCollection_single_release_v1.5-2019-08-01.aar
  4. 5 0
      RMA/app/src/main/AndroidManifest.xml
  5. 157 0
      RMA/app/src/main/java/cn/muchinfo/rma/business/account/AccountManager.kt
  6. 0 44
      RMA/app/src/main/java/cn/muchinfo/rma/business/role/RoleManager.kt
  7. 22 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/StringUtils.kt
  8. 26 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AccMgrLoginUserData.kt
  9. 17 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AccMgrMainAccountInfoData.kt
  10. 96 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AccMgrRoleMenuData.kt
  11. 161 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AccMgrTaAccountInfoData.kt
  12. 19 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AccMgrTaaccountData.kt
  13. 397 31
      RMA/app/src/main/java/cn/muchinfo/rma/protobuf/protoclasses/SystemMI1.java
  14. 0 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/MyApplication.kt
  15. 6 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/HomeFragment.kt
  16. 229 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/AccountManagerActivity.kt
  17. 52 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/AccountManagerViewModel.kt
  18. 92 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/accountviewholder/AccountManagerViewHolder.kt
  19. 166 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/accountviewholder/AccountUserViewHolder.kt
  20. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/NewCommodityInformationActivity.kt
  21. 121 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/NewCommodityInformationViewModel.kt
  22. 13 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/newhedge/HedgeFutureViewHolder.kt
  23. 13 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/newhedge/HedgeSpotViewHolder.kt
  24. 11 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/newhedge/NewHedgeSpeciesViewHolder.kt
  25. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/RoleSetViewModel.kt
  26. 12 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ProcurementFragment.kt
  27. 12 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/sale/SaleFragment.kt
  28. 8 0
      RMA/app/src/main/res/drawable/rma_list_item_nouse_bg.xml
  29. BIN
      RMA/app/src/main/res/mipmap-xhdpi/rma_account_add.png

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

@@ -12,6 +12,7 @@
           <set>
             <option value="$PROJECT_DIR$" />
             <option value="$PROJECT_DIR$/app" />
+            <option value="$PROJECT_DIR$/chart" />
           </set>
         </option>
         <option name="resolveModulePerSourceSet" value="false" />

+ 1 - 0
RMA/app/build.gradle

@@ -73,6 +73,7 @@ dependencies {
     androidTestImplementation 'androidx.test.ext:junit:1.1.1'
     androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
     implementation files('libs/easypermissions-release.aar')
+    implementation files('libs/InfoCollection_single_release_v1.5-2019-08-01.aar')
     implementation 'io.coil-kt:coil:1.0.0-rc3'
     implementation 'com.afollestad.material-dialogs:lifecycle:3.1.1'
     implementation 'com.afollestad.material-dialogs:core:3.1.1'

BIN
RMA/app/libs/InfoCollection_single_release_v1.5-2019-08-01.aar


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

@@ -16,6 +16,9 @@
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
     <uses-permission android:name="android.permission.NFC" />
+    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+    ​<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
 
     <uses-feature android:name="android.hardware.nfc.hce" />
     <uses-permission android:name="org.simalliance.openmobileapi.SMARTCARD" />
@@ -231,6 +234,8 @@
 
         <activity android:name=".view.base.home.commodity.newcommodity.NewCommodityInformationActivity"/>
 
+        <activity android:name=".view.base.home.accountmanager.AccountManagerActivity"/>
+
     </application>
 
 </manifest>

+ 157 - 0
RMA/app/src/main/java/cn/muchinfo/rma/business/account/AccountManager.kt

@@ -3,6 +3,7 @@ package cn.muchinfo.rma.business.account
 import cn.muchinfo.rma.business.account.adapter.AccountAdapter
 import cn.muchinfo.rma.business.commodity.adapter.CommodityAdapter
 import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.*
 import cn.muchinfo.rma.global.data.account.LoginQueryData
 import cn.muchinfo.rma.netManage.base.ResponseCallback
 import cn.muchinfo.rma.netManage.utils.MyOkHttpUtils
@@ -328,4 +329,160 @@ class AccountManager {
         )
     }
 
+    /**
+     * 查询账户管理登录账号(账户管理/登录账号)
+     * userid 用户ID
+     */
+    fun queryAccMgrLoginUser(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<AccMgrLoginUserData>?, error: Error?) -> Unit
+    ){
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Ermcp/QueryAccMgrLoginUser",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<AccMgrLoginUserData>>>() {
+                override fun onResponse(response: BaseResult<List<AccMgrLoginUserData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+    /**
+     * 查询账户管理主账号详情(账户管理/期货主账号详情)
+     * userid 用户ID
+     * accountid 主账号id
+     */
+    fun queryAccMgrMainAccountInfo(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<AccMgrMainAccountInfoData>?, error: Error?) -> Unit
+    ){
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Ermcp/QueryAccMgrMainAccountInfo",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<AccMgrMainAccountInfoData>>>() {
+                override fun onResponse(response: BaseResult<List<AccMgrMainAccountInfoData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+    /**
+     * 查询账户管理角色设置(账户管理/角色设置)
+     * @param params Map<String, String>
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<AccMgrRoleData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryAccMgrRole(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<AccMgrRoleData>?, error: Error?) -> Unit
+    ) {
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Ermcp/QueryAccMgrRole",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<AccMgrRoleData>>>() {
+                override fun onResponse(response: BaseResult<List<AccMgrRoleData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+    /**
+     * 查询账户管理角色详情(账户管理/角色设置/角色详情)
+     * @param params Map<String, String> userid 用户ID roleid 角色id(可多个,逗号隔开)
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<AccMgrRoleData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryAccMgrRoleMenu(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<AccMgrRoleData>?, error: Error?) -> Unit
+    ) {
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Ermcp/QueryAccMgrRoleMenu",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<AccMgrRoleData>>>() {
+                override fun onResponse(response: BaseResult<List<AccMgrRoleData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+    /**
+     * 查询账户管理角色详情(账户管理/角色设置/角色详情)
+     * @param params Map<String, String> userid 用户ID accountid 账号id
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<AccMgrRoleData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryAccMgrTaAccountInfo(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<AccMgrTaAccountInfoData>?, error: Error?) -> Unit
+    ) {
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Ermcp/QueryAccMgrTaAccountInfo",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<AccMgrTaAccountInfoData>>>() {
+                override fun onResponse(response: BaseResult<List<AccMgrTaAccountInfoData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+
+    /**
+     * 查询账户管理期货账号(账户管理/期货账号)
+     * @param params Map<String, String> userid 用户ID
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<AccMgrRoleData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryAccMgrTaaccount(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<AccMgrTaaccountData>?, error: Error?) -> Unit
+    ) {
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Ermcp/QueryAccMgrTaaccount",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<AccMgrTaaccountData>>>() {
+                override fun onResponse(response: BaseResult<List<AccMgrTaaccountData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
 }

+ 0 - 44
RMA/app/src/main/java/cn/muchinfo/rma/business/role/RoleManager.kt

@@ -1,44 +0,0 @@
-package cn.muchinfo.rma.business.role
-
-import cn.muchinfo.rma.global.data.AccMgrRoleData
-import cn.muchinfo.rma.global.data.ContractData
-import cn.muchinfo.rma.netManage.base.ResponseCallback
-import cn.muchinfo.rma.netManage.utils.MyOkHttpUtils
-import cn.muchinfo.rma.view.base.app.BaseResult
-import cn.muchinfo.rma.view.base.app.Constant
-import com.blankj.utilcode.util.SPUtils
-import okhttp3.Call
-import java.lang.Exception
-
-/**
- * 账户管理的manager
- */
-class RoleManager {
-
-    /**
-     * 查询账户管理角色设置(账户管理/角色设置)
-     * @param params Map<String, String>
-     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<AccMgrRoleData>?, [@kotlin.ParameterName] Error?, Unit>
-     */
-    fun queryAccMgrRole(
-        params: Map<String, String>,
-        responseBack: (isSuccess: Boolean, respData: List<AccMgrRoleData>?, error: Error?) -> Unit
-    ) {
-        MyOkHttpUtils().query(
-            URL = SPUtils.getInstance()
-                .getString(Constant.goCommonSearchUrl) + "/Ermcp/QueryAccMgrRole",
-            params = params,
-            type = "1",
-            callback = object : ResponseCallback<BaseResult<List<AccMgrRoleData>>>() {
-                override fun onResponse(response: BaseResult<List<AccMgrRoleData>>?, id: Int) {
-                    responseBack(true, response?.data, null)
-                }
-
-                override fun onError(call: Call?, e: Exception?, id: Int) {
-                    responseBack(false, null, Error(e?.message))
-                }
-            }
-        )
-    }
-
-}

+ 22 - 0
RMA/app/src/main/java/cn/muchinfo/rma/global/StringUtils.kt

@@ -197,4 +197,26 @@ fun String.warehousestatus() : String{
     return str
 }
 
+/**
+ * 登录账户状态 - 1:正常 2:冻结 3:无效
+ */
+fun String.loginstatus() : String{
+    if (this.isNullOrEmpty()){
+        return "--"
+    }
+    var str = ""
+    when {
+        this == "1" -> {
+            str = "正常"
+        }
+        this == "2" -> {
+            str = "冻结"
+        }
+        this == "3" -> {
+            str = "无效"
+        }
+    }
+    return str
+}
+
 

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

@@ -0,0 +1,26 @@
+package cn.muchinfo.rma.global.data
+
+/**
+ * 账户管理登录账号(账户管理/登录账号)
+ */
+data class AccMgrLoginUserData(
+    val rolename : String? = "",//角色名称
+    val userlist : List<Userlist>? = arrayListOf(),//用户列表
+    val usertype : String? = "",//用户类型 2-机构 7-企业成员(云平台)
+    var isSelect : Int = 0//是否展开
+)
+
+data class Userlist(
+    val accountname : String = "",//用户名称
+    val clientroleid : String = "",//角色id(usertype=2)
+    val createtime : String = "",//创建时间
+    val loginstatus : String = "",//登录账户状态 - 1:正常 2:冻结 3:无效
+    val memberuserid : String = "",//所属会员id
+    val modifytime : String = "",//修改时间
+    val rolename : String = "",//角色名称
+    val rolestatus : String = "",//角色状态 1-启用 2-停用
+    val roletype : String = "",//角色类型(逗号隔开,如22,23), 22:业务员 23:跟单员 24:交易员
+    val userid : String = "",//用户id
+    val usertype : String = "",//用户类型 - 1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)
+    var isSelect: Int = 0//是否点击展开
+)

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

@@ -0,0 +1,17 @@
+package cn.muchinfo.rma.global.data
+
+/**
+ * 账户管理主账号详情(账户管理/期货主账号详情)
+ */
+data class AccMgrMainAccountInfoData(
+    val accountid : String? = "",//账号id
+    val appid : String? = "",//AppID
+    val authcode : String? = "",//授权码
+    val brokerid : String? = "",//经纪商id
+    val fcid : String? = "",//期货公司id
+    val fcname : String? = "",//期货公司代码
+    val hedgeaccountcode : String? = "",//外部账号代码
+    val hedgeaccountpwd : String? = "",//密码
+    val ismain : String? = "",//是否主账号
+    val relateduserid : String? = ""//关联用户id
+)

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

@@ -0,0 +1,96 @@
+package cn.muchinfo.rma.global.data
+
+import android.os.Parcel
+import android.os.Parcelable
+
+/**
+ * 账户管理角色详情(账户管理/角色设置/角色详情
+ */
+data class AccMgrRoleMenuData(
+    val menu : List<RoleSonMenuData>? = arrayListOf(),
+    val subMenu : List<RoleSonMenuData>? = arrayListOf()
+) : Parcelable{
+    constructor(parcel: Parcel) : this(
+        parcel.createTypedArrayList(RoleSonMenuData),
+        parcel.createTypedArrayList(RoleSonMenuData)
+    ) {
+    }
+
+    override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeTypedList(menu)
+        parcel.writeTypedList(subMenu)
+    }
+
+    override fun describeContents(): Int {
+        return 0
+    }
+
+    companion object CREATOR : Parcelable.Creator<AccMgrRoleMenuData> {
+        override fun createFromParcel(parcel: Parcel): AccMgrRoleMenuData {
+            return AccMgrRoleMenuData(parcel)
+        }
+
+        override fun newArray(size: Int): Array<AccMgrRoleMenuData?> {
+            return arrayOfNulls(size)
+        }
+    }
+
+}
+
+data class RoleSonMenuData(
+    val iconame : String? = "",
+    val menutype : String? = "",
+    val parentcode : String? = "",
+    val remark : String? = "",
+    val resourcecode : String? = "",
+    val resourcelevel : String? = "",
+    val resourcename : String? = "",
+    val roleid : String? = "",
+    val sort : String? = "",
+    val url : String? = "",
+    val userid : String? = ""
+) : Parcelable{
+    constructor(parcel: Parcel) : this(
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString()
+    ) {
+    }
+
+    override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeString(iconame)
+        parcel.writeString(menutype)
+        parcel.writeString(parentcode)
+        parcel.writeString(remark)
+        parcel.writeString(resourcecode)
+        parcel.writeString(resourcelevel)
+        parcel.writeString(resourcename)
+        parcel.writeString(roleid)
+        parcel.writeString(sort)
+        parcel.writeString(url)
+        parcel.writeString(userid)
+    }
+
+    override fun describeContents(): Int {
+        return 0
+    }
+
+    companion object CREATOR : Parcelable.Creator<RoleSonMenuData> {
+        override fun createFromParcel(parcel: Parcel): RoleSonMenuData {
+            return RoleSonMenuData(parcel)
+        }
+
+        override fun newArray(size: Int): Array<RoleSonMenuData?> {
+            return arrayOfNulls(size)
+        }
+    }
+
+}

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

@@ -0,0 +1,161 @@
+package cn.muchinfo.rma.global.data
+
+import android.os.Parcel
+import android.os.Parcelable
+
+/**
+ * 账户管理授信(账户管理/账户设置/授信)
+ */
+data class AccMgrTaAccountInfoData(
+    val accountid : String? = "",//资金账户ID
+    val accountname : String? = "",//账户名称
+    val balance : String? = "",//期初余额
+    val capitalbalance : String? = "",//本金余额[外部子账户实际出入金余额]
+    val closepl : String? = "",//今日平仓盈亏
+    val creditdecrease : String? = "",//今日授信减少
+    val creditincrease : String? = "",//今日授信增加
+    val curdebt : String? = "",//期末欠款
+    val currencyid : String? = "",//货币ID
+    val currentbalance : String? = "",//期末余额
+    val freezecharge : String? = "",//手续费冻结
+    val freezemargin : String? = "",//冻结保证金
+    val fromaccountid : String? = "",//所属上级账户
+    val inamount : String? = "",//今日入金金额(包括三方入金)
+    val ismain : String? = "",//是否母账号 0:不是母账户 1:是母账户
+    val mortgagecredit : String? = "",//授信金额
+    val oridebt : String? = "",//期初欠款
+    val orifreezecharge : String? = "",//期初手续费冻结
+    val orifreezemargin : String? = "",//期初冻结保证金
+    val orimortgagecredit : String? = "",//期初授信金额
+    val oriothercredit : String? = "",//期初其它授信金额
+    val oriotherfreezemargin : String? = "",//期初其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)
+    val orioutamountfreeze : String? = "",//期初出金冻结
+    val oriusedmargin : String? = "",//期初占用保证金
+    val othercredit : String? = "",//其它授信金额
+    val othercreditdecrease : String? = "",//今日其它授信减少
+    val othercreditincrease : String? = "",//今日其它授信增加
+    val otherfreezemargin : String? = "",//其他冻结保证金(交割买方冻结 申购冻结 全款买入 商城买入)
+    val outamount : String? = "",//今日出金金额(包括三方出金)
+    val outamountfreeze : String? = "",//出金冻结
+    val outthreshold : String? = "",//出金阈值
+    val parentaccountid : String? = "",//所属根账号
+    val paycharge : String? = "",//今日手续费支出
+    val relateduserid : String? = "",//关联用户
+    val signstatus : String? = "",//签约状态 - 1:未签约 2:签约待审核 3:签约中 4:已签约 5:解约待审核 6:解约中 7:已解约 8:已解绑 9:绑卡中
+    val sublevelpath : String? = "",//账号层级路径(逗号分隔,首尾加逗号)
+    val taaccounttype : String? = "",//账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号
+    val thirdinamount : String? = "",//今日三方入金
+    val thirdoutamount : String? = "",//今日三方出金
+    val tradestatus : String? = "",//交易状态 - 1:正常 2:受限 3:冻结 4:禁止建仓(人工受限) 5:禁止交易(人工冻结) 6:待激活 7:已注销
+    val transferamount : String? = "",//今日划转金额(母子账号资金划转,从划入账号为正,从账号划出为负)
+    val usedmargin : String? = "",//占用保证金
+    val userid : String? = ""//用户ID
+) : Parcelable{
+    constructor(parcel: Parcel) : this(
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString()
+    ) {
+    }
+
+    override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeString(accountid)
+        parcel.writeString(accountname)
+        parcel.writeString(balance)
+        parcel.writeString(capitalbalance)
+        parcel.writeString(closepl)
+        parcel.writeString(creditdecrease)
+        parcel.writeString(creditincrease)
+        parcel.writeString(curdebt)
+        parcel.writeString(currencyid)
+        parcel.writeString(currentbalance)
+        parcel.writeString(freezecharge)
+        parcel.writeString(freezemargin)
+        parcel.writeString(fromaccountid)
+        parcel.writeString(inamount)
+        parcel.writeString(ismain)
+        parcel.writeString(mortgagecredit)
+        parcel.writeString(oridebt)
+        parcel.writeString(orifreezecharge)
+        parcel.writeString(orifreezemargin)
+        parcel.writeString(orimortgagecredit)
+        parcel.writeString(oriothercredit)
+        parcel.writeString(oriotherfreezemargin)
+        parcel.writeString(orioutamountfreeze)
+        parcel.writeString(oriusedmargin)
+        parcel.writeString(othercredit)
+        parcel.writeString(othercreditdecrease)
+        parcel.writeString(othercreditincrease)
+        parcel.writeString(otherfreezemargin)
+        parcel.writeString(outamount)
+        parcel.writeString(outamountfreeze)
+        parcel.writeString(outthreshold)
+        parcel.writeString(parentaccountid)
+        parcel.writeString(paycharge)
+        parcel.writeString(relateduserid)
+        parcel.writeString(signstatus)
+        parcel.writeString(sublevelpath)
+        parcel.writeString(taaccounttype)
+        parcel.writeString(thirdinamount)
+        parcel.writeString(thirdoutamount)
+        parcel.writeString(tradestatus)
+        parcel.writeString(transferamount)
+        parcel.writeString(usedmargin)
+        parcel.writeString(userid)
+    }
+
+    override fun describeContents(): Int {
+        return 0
+    }
+
+    companion object CREATOR : Parcelable.Creator<AccMgrTaAccountInfoData> {
+        override fun createFromParcel(parcel: Parcel): AccMgrTaAccountInfoData {
+            return AccMgrTaAccountInfoData(parcel)
+        }
+
+        override fun newArray(size: Int): Array<AccMgrTaAccountInfoData?> {
+            return arrayOfNulls(size)
+        }
+    }
+
+}

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

@@ -0,0 +1,19 @@
+package cn.muchinfo.rma.global.data
+
+/**
+ * 账户管理期货账号(账户管理/期货账号)
+ */
+data class AccMgrTaaccountData(
+    val mainAcc : AccMgrTaaccountSonData? = AccMgrTaaccountSonData(),
+    val subacclist : List<AccMgrTaaccountSonData>? = arrayListOf()//子账户列表
+)
+
+data class AccMgrTaaccountSonData(
+    val accountid : String? = "",//账户id
+    val accountname : String? = "",//账户名称
+    val currencyid : String? = "",//币种id
+    val ismain : String? = "",//是否主账户 0-否 1-是
+    val parentaccountid : String? = "",//父账户id
+    val relateduserid : String? = "",//关联userid
+    val tradestatus : String? = ""//交易状态 - 1:正常 2:受限 3:冻结 4:禁止建仓(人工受限) 5:禁止交易(人工冻结) 6:待激活 7:已注销
+)

+ 397 - 31
RMA/app/src/main/java/cn/muchinfo/rma/protobuf/protoclasses/SystemMI1.java

@@ -352,6 +352,54 @@ public final class SystemMI1 {
      */
     com.google.protobuf.ByteString
         getLoginCodeBytes();
+
+    /**
+     * <pre>
+     * 终端系统信息
+     * </pre>
+     *
+     * <code>optional bytes ClientSystemInfo = 14;</code>
+     * @return Whether the clientSystemInfo field is set.
+     */
+    boolean hasClientSystemInfo();
+    /**
+     * <pre>
+     * 终端系统信息
+     * </pre>
+     *
+     * <code>optional bytes ClientSystemInfo = 14;</code>
+     * @return The clientSystemInfo.
+     */
+    com.google.protobuf.ByteString getClientSystemInfo();
+
+    /**
+     * <pre>
+     * 终端AppID
+     * </pre>
+     *
+     * <code>optional string ClientAppID = 15;</code>
+     * @return Whether the clientAppID field is set.
+     */
+    boolean hasClientAppID();
+    /**
+     * <pre>
+     * 终端AppID
+     * </pre>
+     *
+     * <code>optional string ClientAppID = 15;</code>
+     * @return The clientAppID.
+     */
+    java.lang.String getClientAppID();
+    /**
+     * <pre>
+     * 终端AppID
+     * </pre>
+     *
+     * <code>optional string ClientAppID = 15;</code>
+     * @return The bytes for clientAppID.
+     */
+    com.google.protobuf.ByteString
+        getClientAppIDBytes();
   }
   /**
    * <pre>
@@ -378,6 +426,8 @@ public final class SystemMI1 {
       deviceID_ = "";
       environmentInfo_ = "";
       loginCode_ = "";
+      clientSystemInfo_ = com.google.protobuf.ByteString.EMPTY;
+      clientAppID_ = "";
     }
 
     @java.lang.Override
@@ -492,6 +542,17 @@ public final class SystemMI1 {
               loginCode_ = bs;
               break;
             }
+            case 114: {
+              bitField0_ |= 0x00002000;
+              clientSystemInfo_ = input.readBytes();
+              break;
+            }
+            case 122: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+              bitField0_ |= 0x00004000;
+              clientAppID_ = bs;
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -1151,6 +1212,93 @@ public final class SystemMI1 {
       }
     }
 
+    public static final int CLIENTSYSTEMINFO_FIELD_NUMBER = 14;
+    private com.google.protobuf.ByteString clientSystemInfo_;
+    /**
+     * <pre>
+     * 终端系统信息
+     * </pre>
+     *
+     * <code>optional bytes ClientSystemInfo = 14;</code>
+     * @return Whether the clientSystemInfo field is set.
+     */
+    @java.lang.Override
+    public boolean hasClientSystemInfo() {
+      return ((bitField0_ & 0x00002000) != 0);
+    }
+    /**
+     * <pre>
+     * 终端系统信息
+     * </pre>
+     *
+     * <code>optional bytes ClientSystemInfo = 14;</code>
+     * @return The clientSystemInfo.
+     */
+    @java.lang.Override
+    public com.google.protobuf.ByteString getClientSystemInfo() {
+      return clientSystemInfo_;
+    }
+
+    public static final int CLIENTAPPID_FIELD_NUMBER = 15;
+    private volatile java.lang.Object clientAppID_;
+    /**
+     * <pre>
+     * 终端AppID
+     * </pre>
+     *
+     * <code>optional string ClientAppID = 15;</code>
+     * @return Whether the clientAppID field is set.
+     */
+    @java.lang.Override
+    public boolean hasClientAppID() {
+      return ((bitField0_ & 0x00004000) != 0);
+    }
+    /**
+     * <pre>
+     * 终端AppID
+     * </pre>
+     *
+     * <code>optional string ClientAppID = 15;</code>
+     * @return The clientAppID.
+     */
+    @java.lang.Override
+    public java.lang.String getClientAppID() {
+      java.lang.Object ref = clientAppID_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        com.google.protobuf.ByteString bs = 
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
+          clientAppID_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <pre>
+     * 终端AppID
+     * </pre>
+     *
+     * <code>optional string ClientAppID = 15;</code>
+     * @return The bytes for clientAppID.
+     */
+    @java.lang.Override
+    public com.google.protobuf.ByteString
+        getClientAppIDBytes() {
+      java.lang.Object ref = clientAppID_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        clientAppID_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
     private byte memoizedIsInitialized = -1;
     @java.lang.Override
     public final boolean isInitialized() {
@@ -1204,6 +1352,12 @@ public final class SystemMI1 {
       if (((bitField0_ & 0x00001000) != 0)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 13, loginCode_);
       }
+      if (((bitField0_ & 0x00002000) != 0)) {
+        output.writeBytes(14, clientSystemInfo_);
+      }
+      if (((bitField0_ & 0x00004000) != 0)) {
+        com.google.protobuf.GeneratedMessageV3.writeString(output, 15, clientAppID_);
+      }
       unknownFields.writeTo(output);
     }
 
@@ -1257,6 +1411,13 @@ public final class SystemMI1 {
       if (((bitField0_ & 0x00001000) != 0)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, loginCode_);
       }
+      if (((bitField0_ & 0x00002000) != 0)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(14, clientSystemInfo_);
+      }
+      if (((bitField0_ & 0x00004000) != 0)) {
+        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, clientAppID_);
+      }
       size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
@@ -1337,6 +1498,16 @@ public final class SystemMI1 {
         if (!getLoginCode()
             .equals(other.getLoginCode())) return false;
       }
+      if (hasClientSystemInfo() != other.hasClientSystemInfo()) return false;
+      if (hasClientSystemInfo()) {
+        if (!getClientSystemInfo()
+            .equals(other.getClientSystemInfo())) return false;
+      }
+      if (hasClientAppID() != other.hasClientAppID()) return false;
+      if (hasClientAppID()) {
+        if (!getClientAppID()
+            .equals(other.getClientAppID())) return false;
+      }
       if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
@@ -1401,6 +1572,14 @@ public final class SystemMI1 {
         hash = (37 * hash) + LOGINCODE_FIELD_NUMBER;
         hash = (53 * hash) + getLoginCode().hashCode();
       }
+      if (hasClientSystemInfo()) {
+        hash = (37 * hash) + CLIENTSYSTEMINFO_FIELD_NUMBER;
+        hash = (53 * hash) + getClientSystemInfo().hashCode();
+      }
+      if (hasClientAppID()) {
+        hash = (37 * hash) + CLIENTAPPID_FIELD_NUMBER;
+        hash = (53 * hash) + getClientAppID().hashCode();
+      }
       hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
@@ -1569,6 +1748,10 @@ public final class SystemMI1 {
         bitField0_ = (bitField0_ & ~0x00000800);
         loginCode_ = "";
         bitField0_ = (bitField0_ & ~0x00001000);
+        clientSystemInfo_ = com.google.protobuf.ByteString.EMPTY;
+        bitField0_ = (bitField0_ & ~0x00002000);
+        clientAppID_ = "";
+        bitField0_ = (bitField0_ & ~0x00004000);
         return this;
       }
 
@@ -1653,6 +1836,14 @@ public final class SystemMI1 {
           to_bitField0_ |= 0x00001000;
         }
         result.loginCode_ = loginCode_;
+        if (((from_bitField0_ & 0x00002000) != 0)) {
+          to_bitField0_ |= 0x00002000;
+        }
+        result.clientSystemInfo_ = clientSystemInfo_;
+        if (((from_bitField0_ & 0x00004000) != 0)) {
+          to_bitField0_ |= 0x00004000;
+        }
+        result.clientAppID_ = clientAppID_;
         result.bitField0_ = to_bitField0_;
         onBuilt();
         return result;
@@ -1757,6 +1948,14 @@ public final class SystemMI1 {
           loginCode_ = other.loginCode_;
           onChanged();
         }
+        if (other.hasClientSystemInfo()) {
+          setClientSystemInfo(other.getClientSystemInfo());
+        }
+        if (other.hasClientAppID()) {
+          bitField0_ |= 0x00004000;
+          clientAppID_ = other.clientAppID_;
+          onChanged();
+        }
         this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
@@ -3026,6 +3225,172 @@ public final class SystemMI1 {
         onChanged();
         return this;
       }
+
+      private com.google.protobuf.ByteString clientSystemInfo_ = com.google.protobuf.ByteString.EMPTY;
+      /**
+       * <pre>
+       * 终端系统信息
+       * </pre>
+       *
+       * <code>optional bytes ClientSystemInfo = 14;</code>
+       * @return Whether the clientSystemInfo field is set.
+       */
+      @java.lang.Override
+      public boolean hasClientSystemInfo() {
+        return ((bitField0_ & 0x00002000) != 0);
+      }
+      /**
+       * <pre>
+       * 终端系统信息
+       * </pre>
+       *
+       * <code>optional bytes ClientSystemInfo = 14;</code>
+       * @return The clientSystemInfo.
+       */
+      @java.lang.Override
+      public com.google.protobuf.ByteString getClientSystemInfo() {
+        return clientSystemInfo_;
+      }
+      /**
+       * <pre>
+       * 终端系统信息
+       * </pre>
+       *
+       * <code>optional bytes ClientSystemInfo = 14;</code>
+       * @param value The clientSystemInfo to set.
+       * @return This builder for chaining.
+       */
+      public Builder setClientSystemInfo(com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00002000;
+        clientSystemInfo_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 终端系统信息
+       * </pre>
+       *
+       * <code>optional bytes ClientSystemInfo = 14;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearClientSystemInfo() {
+        bitField0_ = (bitField0_ & ~0x00002000);
+        clientSystemInfo_ = getDefaultInstance().getClientSystemInfo();
+        onChanged();
+        return this;
+      }
+
+      private java.lang.Object clientAppID_ = "";
+      /**
+       * <pre>
+       * 终端AppID
+       * </pre>
+       *
+       * <code>optional string ClientAppID = 15;</code>
+       * @return Whether the clientAppID field is set.
+       */
+      public boolean hasClientAppID() {
+        return ((bitField0_ & 0x00004000) != 0);
+      }
+      /**
+       * <pre>
+       * 终端AppID
+       * </pre>
+       *
+       * <code>optional string ClientAppID = 15;</code>
+       * @return The clientAppID.
+       */
+      public java.lang.String getClientAppID() {
+        java.lang.Object ref = clientAppID_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            clientAppID_ = s;
+          }
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <pre>
+       * 终端AppID
+       * </pre>
+       *
+       * <code>optional string ClientAppID = 15;</code>
+       * @return The bytes for clientAppID.
+       */
+      public com.google.protobuf.ByteString
+          getClientAppIDBytes() {
+        java.lang.Object ref = clientAppID_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          clientAppID_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <pre>
+       * 终端AppID
+       * </pre>
+       *
+       * <code>optional string ClientAppID = 15;</code>
+       * @param value The clientAppID to set.
+       * @return This builder for chaining.
+       */
+      public Builder setClientAppID(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00004000;
+        clientAppID_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 终端AppID
+       * </pre>
+       *
+       * <code>optional string ClientAppID = 15;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearClientAppID() {
+        bitField0_ = (bitField0_ & ~0x00004000);
+        clientAppID_ = getDefaultInstance().getClientAppID();
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 终端AppID
+       * </pre>
+       *
+       * <code>optional string ClientAppID = 15;</code>
+       * @param value The bytes for clientAppID to set.
+       * @return This builder for chaining.
+       */
+      public Builder setClientAppIDBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00004000;
+        clientAppID_ = value;
+        onChanged();
+        return this;
+      }
       @java.lang.Override
       public final Builder setUnknownFields(
           final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -14574,42 +14939,43 @@ public final class SystemMI1 {
   static {
     java.lang.String[] descriptorData = {
       "\n\017SystemMI1.proto\022\tSystemMI1\032\014Common.pro" +
-      "to\032\017PublicMI1.proto\"\210\002\n\010LoginReq\022\034\n\006Head" +
+      "to\032\017PublicMI1.proto\"\267\002\n\010LoginReq\022\034\n\006Head" +
       "er\030\001 \001(\0132\014.MessageHead\022\017\n\007LoginID\030\002 \001(\004\022" +
       "\020\n\010LoginPWD\030\003 \001(\t\022\021\n\tLoginType\030\004 \001(\r\022\022\n\n" +
       "ClientType\030\005 \001(\r\022\017\n\007Version\030\006 \001(\t\022\023\n\013Mob" +
       "ilePhone\030\007 \001(\t\022\014\n\004GUID\030\010 \001(\t\022\017\n\007LoginIp\030" +
       "\t \001(\t\022\021\n\tLoginPort\030\n \001(\r\022\020\n\010DeviceID\030\013 \001" +
       "(\t\022\027\n\017EnvironmentInfo\030\014 \001(\t\022\021\n\tLoginCode" +
-      "\030\r \001(\t\"\330\002\n\010LoginRsp\022\034\n\006Header\030\001 \001(\0132\014.Me" +
-      "ssageHead\022\017\n\007RetCode\030\002 \001(\005\022\017\n\007RetDesc\030\003 " +
-      "\001(\t\022\017\n\007LoginID\030\004 \001(\004\022\025\n\rLoginUserType\030\005 " +
-      "\001(\r\022\025\n\rAccountStatus\030\006 \001(\r\022\016\n\006UserID\030\007 \001" +
-      "(\r\022\024\n\014MemberUserID\030\010 \001(\r\022\022\n\nAccountIDs\030\t" +
-      " \003(\004\022\r\n\005Token\030\n \001(\t\022\022\n\nSystemTime\030\013 \001(\004\022" +
-      "\025\n\rHasUpdatedPwd\030\014 \001(\r\022\023\n\013PwdWrongCnt\030\r " +
-      "\001(\r\022\027\n\017PwdWrongLockCnt\030\016 \001(\r\022\030\n\020LoginLoc" +
-      "kHourNum\030\017 \001(\r\022\021\n\tLoginCode\030\020 \001(\t\"m\n\tLog" +
-      "outReq\022\034\n\006Header\030\001 \001(\0132\014.MessageHead\022\017\n\007" +
-      "LoginID\030\002 \001(\004\022\r\n\005Token\030\003 \001(\t\022\017\n\007LoginIp\030" +
-      "\004 \001(\t\022\021\n\tLoginPort\030\005 \001(\r\"K\n\tLogoutRsp\022\034\n" +
-      "\006Header\030\001 \001(\0132\014.MessageHead\022\017\n\007RetCode\030\002" +
-      " \001(\005\022\017\n\007RetDesc\030\003 \001(\t\"t\n\rTokenCheckReq\022\034" +
-      "\n\006Header\030\001 \001(\0132\014.MessageHead\022\017\n\007LoginID\030" +
-      "\002 \001(\004\022\r\n\005Token\030\003 \001(\t\022\022\n\nSystemTime\030\004 \001(\004" +
-      "\022\021\n\tCheckType\030\005 \001(\r\"\332\001\n\rTokenCheckRsp\022\034\n" +
-      "\006Header\030\001 \001(\0132\014.MessageHead\022\017\n\007RetCode\030\002" +
-      " \001(\005\022\017\n\007RetDesc\030\003 \001(\t\022\017\n\007LoginID\030\004 \001(\004\022\023" +
-      "\n\013TokenStatus\030\005 \001(\r\022\025\n\rLoginUserType\030\006 \001" +
-      "(\r\022\016\n\006UserID\030\007 \001(\r\022\024\n\014MemberUserID\030\010 \001(\r" +
-      "\022\022\n\nAccountIDs\030\t \003(\004\022\022\n\nSystemTime\030\n \001(\004" +
-      "\"x\n\014ModifyPwdReq\022\034\n\006Header\030\001 \001(\0132\014.Messa" +
-      "geHead\022\025\n\rModifyPwdType\030\002 \001(\r\022\023\n\013ModifyP" +
-      "wdID\030\003 \001(\004\022\016\n\006OldPwd\030\004 \001(\t\022\016\n\006NewPwd\030\005 \001" +
-      "(\t\"N\n\014ModifyPwdRsp\022\034\n\006Header\030\001 \001(\0132\014.Mes" +
-      "sageHead\022\017\n\007RetCode\030\002 \001(\005\022\017\n\007RetDesc\030\003 \001" +
-      "(\tB?\n%cn.muchinfo.rma.protobuf.protoclas" +
-      "sesZ\026com.muchinfo.mtp.proto"
+      "\030\r \001(\t\022\030\n\020ClientSystemInfo\030\016 \001(\014\022\023\n\013Clie" +
+      "ntAppID\030\017 \001(\t\"\330\002\n\010LoginRsp\022\034\n\006Header\030\001 \001" +
+      "(\0132\014.MessageHead\022\017\n\007RetCode\030\002 \001(\005\022\017\n\007Ret" +
+      "Desc\030\003 \001(\t\022\017\n\007LoginID\030\004 \001(\004\022\025\n\rLoginUser" +
+      "Type\030\005 \001(\r\022\025\n\rAccountStatus\030\006 \001(\r\022\016\n\006Use" +
+      "rID\030\007 \001(\r\022\024\n\014MemberUserID\030\010 \001(\r\022\022\n\nAccou" +
+      "ntIDs\030\t \003(\004\022\r\n\005Token\030\n \001(\t\022\022\n\nSystemTime" +
+      "\030\013 \001(\004\022\025\n\rHasUpdatedPwd\030\014 \001(\r\022\023\n\013PwdWron" +
+      "gCnt\030\r \001(\r\022\027\n\017PwdWrongLockCnt\030\016 \001(\r\022\030\n\020L" +
+      "oginLockHourNum\030\017 \001(\r\022\021\n\tLoginCode\030\020 \001(\t" +
+      "\"m\n\tLogoutReq\022\034\n\006Header\030\001 \001(\0132\014.MessageH" +
+      "ead\022\017\n\007LoginID\030\002 \001(\004\022\r\n\005Token\030\003 \001(\t\022\017\n\007L" +
+      "oginIp\030\004 \001(\t\022\021\n\tLoginPort\030\005 \001(\r\"K\n\tLogou" +
+      "tRsp\022\034\n\006Header\030\001 \001(\0132\014.MessageHead\022\017\n\007Re" +
+      "tCode\030\002 \001(\005\022\017\n\007RetDesc\030\003 \001(\t\"t\n\rTokenChe" +
+      "ckReq\022\034\n\006Header\030\001 \001(\0132\014.MessageHead\022\017\n\007L" +
+      "oginID\030\002 \001(\004\022\r\n\005Token\030\003 \001(\t\022\022\n\nSystemTim" +
+      "e\030\004 \001(\004\022\021\n\tCheckType\030\005 \001(\r\"\332\001\n\rTokenChec" +
+      "kRsp\022\034\n\006Header\030\001 \001(\0132\014.MessageHead\022\017\n\007Re" +
+      "tCode\030\002 \001(\005\022\017\n\007RetDesc\030\003 \001(\t\022\017\n\007LoginID\030" +
+      "\004 \001(\004\022\023\n\013TokenStatus\030\005 \001(\r\022\025\n\rLoginUserT" +
+      "ype\030\006 \001(\r\022\016\n\006UserID\030\007 \001(\r\022\024\n\014MemberUserI" +
+      "D\030\010 \001(\r\022\022\n\nAccountIDs\030\t \003(\004\022\022\n\nSystemTim" +
+      "e\030\n \001(\004\"x\n\014ModifyPwdReq\022\034\n\006Header\030\001 \001(\0132" +
+      "\014.MessageHead\022\025\n\rModifyPwdType\030\002 \001(\r\022\023\n\013" +
+      "ModifyPwdID\030\003 \001(\004\022\016\n\006OldPwd\030\004 \001(\t\022\016\n\006New" +
+      "Pwd\030\005 \001(\t\"N\n\014ModifyPwdRsp\022\034\n\006Header\030\001 \001(" +
+      "\0132\014.MessageHead\022\017\n\007RetCode\030\002 \001(\005\022\017\n\007RetD" +
+      "esc\030\003 \001(\tB?\n%cn.muchinfo.rma.protobuf.pr" +
+      "otoclassesZ\026com.muchinfo.mtp.proto"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -14622,7 +14988,7 @@ public final class SystemMI1 {
     internal_static_SystemMI1_LoginReq_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_SystemMI1_LoginReq_descriptor,
-        new java.lang.String[] { "Header", "LoginID", "LoginPWD", "LoginType", "ClientType", "Version", "MobilePhone", "GUID", "LoginIp", "LoginPort", "DeviceID", "EnvironmentInfo", "LoginCode", });
+        new java.lang.String[] { "Header", "LoginID", "LoginPWD", "LoginType", "ClientType", "Version", "MobilePhone", "GUID", "LoginIp", "LoginPort", "DeviceID", "EnvironmentInfo", "LoginCode", "ClientSystemInfo", "ClientAppID", });
     internal_static_SystemMI1_LoginRsp_descriptor =
       getDescriptor().getMessageTypes().get(1);
     internal_static_SystemMI1_LoginRsp_fieldAccessorTable = new

+ 0 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/MyApplication.kt

@@ -21,7 +21,6 @@ import cn.muchinfo.rma.business.management.BusinessManager
 import cn.muchinfo.rma.business.quote.QuoteManager
 import cn.muchinfo.rma.business.quote.adapter.QuoteAdapter
 import cn.muchinfo.rma.business.report.ReportManager
-import cn.muchinfo.rma.business.role.RoleManager
 import cn.muchinfo.rma.business.tradingquery.TradingQueryManager
 import cn.muchinfo.rma.business.warehouse.WarehouseManager
 import cn.muchinfo.rma.global.GlobalDataCollection
@@ -122,8 +121,6 @@ class MyApplication : BaseApplication() {
     /** 仓库相关管理类 */
     var warehouseManager : WarehouseManager? = null
 
-    /** 账户管理 **/
-    var roleManager : RoleManager? = null
 
     companion object {
         private var instance: MyApplication? = null
@@ -240,7 +237,6 @@ class MyApplication : BaseApplication() {
         futureManager = FutureManager()
         chartManager = ChartManager()
         warehouseManager = WarehouseManager()
-        roleManager = RoleManager()
     }
 
     /**

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

@@ -23,6 +23,7 @@ import cn.muchinfo.rma.lifecycle.getAppCompatActivity
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseFragment
 import cn.muchinfo.rma.view.base.future.trade.GoodsTradeActivity
+import cn.muchinfo.rma.view.base.home.accountmanager.AccountManagerActivity
 import cn.muchinfo.rma.view.base.home.business.BusinessManagementActivity
 import cn.muchinfo.rma.view.base.home.commodity.CommodityInformationActivity
 import cn.muchinfo.rma.view.base.home.commodity.newcommodity.NewCommodityInformationActivity
@@ -1079,9 +1080,12 @@ class SecondTabUI(private val baseFragment: Fragment, private val viewModel: Hom
                     }.lparams(0, matchParent, 1f)
 
                     relativeLayout {
+
                         verticalLayout {
                             onThrottleFirstClick {
-
+                                val intent = Intent()
+                                intent.setClass(context,AccountManagerActivity::class.java)
+                                ActivityUtils.startActivity(intent)
                             }
                             imageView {
                                 imageResource = R.mipmap.rma_account_management
@@ -1134,6 +1138,7 @@ class SecondTabUI(private val baseFragment: Fragment, private val viewModel: Hom
                 }
 
                 linearLayout {
+                    visibility = View.GONE
                     relativeLayout {
 
                         verticalLayout {

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

@@ -0,0 +1,229 @@
+package cn.muchinfo.rma.view.base.home.accountmanager
+
+import android.content.Intent
+import android.os.Bundle
+import android.view.View
+import android.view.ViewGroup
+import androidx.appcompat.app.AppCompatActivity
+import androidx.viewpager.widget.PagerAdapter
+import androidx.viewpager.widget.ViewPager
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.AccMgrLoginUserData
+import cn.muchinfo.rma.global.data.Userlist
+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.home.accountmanager.accountviewholder.AccountManagerViewHolder
+import cn.muchinfo.rma.view.base.home.accountmanager.accountviewholder.AccountUserViewHolder
+import cn.muchinfo.rma.view.base.home.commodity.AddHedgeGoodsActivity
+import cn.muchinfo.rma.view.base.home.commodity.AddSpotGoodsActivity
+import com.blankj.utilcode.util.ActivityUtils
+import com.blankj.utilcode.util.ConvertUtils
+import com.qmuiteam.qmui.util.QMUIDisplayHelper
+import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
+import com.qmuiteam.qmui.widget.tab.QMUITabSegment
+import com.sfit.ctp.info.DeviceInfoManager
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import org.jetbrains.anko._FrameLayout
+import org.jetbrains.anko.matchParent
+import org.jetbrains.anko.support.v4.viewPager
+import org.jetbrains.anko.verticalLayout
+import org.jetbrains.anko.view
+
+/**
+ * 账户管理页面
+ */
+class AccountManagerActivity : BaseActivity<AccountManagerViewModel>(){
+
+    lateinit var segment: QMUITabSegment
+    var selectedTabIndex: Int = 0
+    private lateinit var viewPager: ViewPager
+
+    private val tabsArray: List<String> by lazy {
+        arrayListOf(
+            "登录账户", "期货账户"
+        )
+    }
+
+    /**
+     * 登录账户
+     */
+    private val loginAccountManager by lazy { LoginAccountManager(this,viewModel) }
+
+    /**
+     * 期货账户
+     */
+    private val futuresAccountManager by lazy { FuturesAccountManager(this,viewModel) }
+
+    private val pagerAdapter: PagerAdapter by lazy {
+        object : PagerAdapter() {
+
+            override fun getPageTitle(position: Int): CharSequence? = tabsArray[position]
+
+            override fun instantiateItem(container: ViewGroup, position: Int): Any {
+                when (position) {
+                    0 -> {
+                        return loginAccountManager.root.apply {
+                            container.addView(
+                                this,
+                                ViewGroup.LayoutParams(matchParent, matchParent)
+                            )
+                        }
+                    }
+                    1 -> {
+                        return futuresAccountManager.root.apply {
+                            container.addView(
+                                this,
+                                ViewGroup.LayoutParams(matchParent, matchParent)
+                            )
+                        }
+                    }
+                    else -> return super.instantiateItem(container, position)
+                }
+            }
+
+            override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
+                (`object` as? View)?.let { container.removeView(it) }
+            }
+
+            override fun isViewFromObject(view: View, `object`: Any): Boolean = view == `object`
+
+            override fun getCount(): Int = tabsArray.size
+
+        }
+    }
+
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "账户管理"
+                }
+                commonMenuButton(R.mipmap.add_new) {
+
+                }
+            }
+           val collectInfo = DeviceInfoManager.getCollectInfo(context)
+            tabSegment {
+                segment = this
+                background = resources.getDrawable(R.color.segtabment_bg_color)
+                addOnTabSelectedListener(object :
+                    QMUITabSegment.OnTabSelectedListener {
+                    override fun onDoubleTap(index: Int) {}
+                    override fun onTabReselected(index: Int) {}
+                    override fun onTabUnselected(index: Int) {}
+                    override fun onTabSelected(index: Int) {
+                        selectedTabIndex = index
+                    }
+                })
+                setIndicator(
+                    QMUITabIndicator(
+                        QMUIDisplayHelper.dp2px(context, 2),
+                        false,
+                        true
+                    )
+                )
+                setDefaultTextSize(ConvertUtils.sp2px(16f), ConvertUtils.sp2px(16f))
+            }.lparams(matchParent, autoSize(80))
+
+            view {
+                background = resources.getDrawable(R.color.main_hit_bg_color)
+            }.lparams(matchParent, autoSize(1)) {
+                marginStart = autoSize(32)
+                marginEnd = autoSize(32)
+            }
+            viewPager {
+                background = resources.getDrawable(R.color.white)
+                viewPager = this
+                adapter = pagerAdapter
+            }.lparams(matchParent, matchParent)
+
+            segment.setupWithViewPager(viewPager)
+            segment.selectTab(selectedTabIndex)
+
+        }
+    }
+
+}
+
+/**
+ * 登录账户管理UI
+ * @property activity AppCompatActivity
+ * @property viewModel AccountManagerViewModel
+ * @constructor
+ */
+class LoginAccountManager(
+    private val activity : AppCompatActivity,
+    private val viewModel : AccountManagerViewModel
+){
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    //期货合约
+    private val accountManagerAdapter: BaseAdapter<AccMgrLoginUserData, AccountManagerViewHolder> =
+        BaseAdapter { _, _ -> AccountManagerViewHolder(activity, viewModel) }
+
+    init {
+        viewModel.queryAccMgrLoginUser()
+    }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        viewModel.queryAccMgrLoginUser()
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = accountManagerAdapter
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.accountManagerList.bindOptional(context){
+                if (it?.isEmpty() == true || it?.size == 0){
+                    statusLayout.showEmpty()
+                }else {
+                    if (swipeToLayout.getIsRefreshing()){
+                        swipeToLayout.finishRefresh()
+                    }
+                    statusLayout.showSuccess()
+                    accountManagerAdapter.setNewData(it)
+                }
+            }
+        }
+    }
+}
+
+/**
+ * 期货账户管理UI
+ * @property activity AppCompatActivity
+ * @property viewModel AccountManagerViewModel
+ * @property root _FrameLayout
+ * @constructor
+ */
+class FuturesAccountManager(
+    private val activity : AppCompatActivity,
+    private val viewModel: AccountManagerViewModel
+){
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+
+        }
+    }
+}

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

@@ -0,0 +1,52 @@
+package cn.muchinfo.rma.view.base.home.accountmanager
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.AccMgrLoginUserData
+import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.base.BaseViewModel
+import cn.muchinfo.rma.view.base.home.commodity.newcommodity.newhedge.HedgeSpeciesData
+
+class AccountManagerViewModel : BaseViewModel(){
+
+    /**
+     * 登录账号列表
+     */
+    val accountManagerList : MutableLiveData<List<AccMgrLoginUserData>> = MutableLiveData()
+
+    /**
+     * 查询账户管理登录账号(账户管理/登录账号)
+     */
+    fun queryAccMgrLoginUser(){
+        val params = mutableMapOf<String, String>().apply {
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+        }
+        MyApplication.getInstance()?.accountManager?.queryAccMgrLoginUser(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                accountManagerList.postValue(respData)
+            }
+        }
+    }
+
+    /**
+     * 商品信息-套保品种的item点击展开
+     * @param index Int
+     */
+    fun setOnLoginAccountHedgeClick(index: Int){
+        val datanewList = arrayListOf<AccMgrLoginUserData>()
+        accountManagerList.value?.forEach {
+            if (index == accountManagerList.value?.indexOf(it)) {
+                if (it.isSelect == 0) {
+                    datanewList.add(it.copy(isSelect = 1))
+                } else {
+                    datanewList.add(it.copy(isSelect = 0))
+                }
+            } else {
+                datanewList.add(it)
+            }
+        }
+        accountManagerList.postValue(datanewList)
+    }
+
+
+}

+ 92 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/accountviewholder/AccountManagerViewHolder.kt

@@ -0,0 +1,92 @@
+package cn.muchinfo.rma.view.base.home.accountmanager.accountviewholder
+
+import android.view.Gravity
+import android.view.View
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.AccMgrLoginUserData
+import cn.muchinfo.rma.global.data.Userlist
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import cn.muchinfo.rma.view.base.home.accountmanager.AccountManagerViewModel
+import cn.muchinfo.rma.view.base.home.commodity.newcommodity.newhedge.HedgeFutureContractViewHolder
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 账户管理/登录账号viewholder
+ * @property activity AppCompatActivity
+ * @property viewModel AccountManagerViewModel
+ * @property itemSize IntArray
+ * @constructor
+ */
+class AccountManagerViewHolder(
+    private val activity: AppCompatActivity,
+    private val viewModel: AccountManagerViewModel
+) : BaseViewHolder<AccMgrLoginUserData>(activity) {
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    //期货合约
+    private val accountUserAdapter: BaseAdapter<Userlist, AccountUserViewHolder> =
+        BaseAdapter { _, _ -> AccountUserViewHolder(activity, viewModel,dataIndex) }
+
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                imageView {
+                    onThrottleFirstClick {
+                        viewModel.setOnLoginAccountHedgeClick(dataIndex)
+                    }
+                    imageResource = R.mipmap.second_list_floding
+                }.lparams(autoSize(43), autoSize(43))
+
+                textView {
+                    data.bindOptional(context) {
+                        text = it?.rolename + "(" + it?.userlist?.size + ")"
+                    }
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(20)
+                }
+                emptyView()
+
+                imageView {
+                    onThrottleFirstClick {
+
+                    }
+                    imageResource = R.mipmap.rma_account_add
+                }.lparams(autoSize(43), autoSize(43)){
+                    marginEnd = autoSize(37)
+                }
+            }.lparams(matchParent, autoSize(108)) {
+                marginStart = autoSize(102)
+            }
+
+            itemView()
+
+            recyclerView {
+                data.bindOptional(context){
+                    if (it?.isSelect == 0){
+                        visibility = View.GONE
+                    }else{
+                        visibility = View.VISIBLE
+                    }
+                }
+                background = resources.getDrawable(R.color.white)
+                adapter = accountUserAdapter
+            }.lparams(matchParent, wrapContent)
+
+            data.bindOptional(context){
+                accountUserAdapter.setNewData(it?.userlist)
+            }
+        }
+    }
+
+
+}

+ 166 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/accountviewholder/AccountUserViewHolder.kt

@@ -0,0 +1,166 @@
+package cn.muchinfo.rma.view.base.home.accountmanager.accountviewholder
+
+import android.content.Intent
+import android.view.Gravity
+import android.view.View
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.Userlist
+import cn.muchinfo.rma.global.isBlankString
+import cn.muchinfo.rma.global.loginstatus
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.autoSize
+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.accountmanager.AccountManagerViewModel
+import cn.muchinfo.rma.view.base.home.contract.AddContractActivity
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import com.blankj.utilcode.util.ActivityUtils
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 账户管理-登录账号的子item
+ * @property activity AppCompatActivity
+ * @property viewModel AccountManagerViewModel
+ * @constructor
+ */
+class AccountUserViewHolder(
+    private val activity: AppCompatActivity,
+    private val viewModel: AccountManagerViewModel,
+    private val index : Int
+) : BaseViewHolder<Userlist>(activity) {
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            data.bindOptional(context) {
+
+                if (it?.loginstatus == "1") {
+                    backgroundResource = R.drawable.rma_list_item_bg
+                } else if (it?.loginstatus == "2") {
+                    backgroundResource = R.drawable.rma_list_item_bg
+                } else if (it?.loginstatus == "3") {
+                    backgroundResource = R.drawable.rma_list_item_nouse_bg
+                }
+            }
+
+            onThrottleFirstClick {
+
+            }
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    data.bindOptional(context) {
+                        text = it?.rolename
+                    }
+                    textColorInt = R.color.rma_black_33
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(31)
+                }
+
+                emptyView()
+                textView {
+                    data.bindOptional(context) {
+                        text = it?.loginstatus?.loginstatus()
+                        if (it?.loginstatus == "1") {
+                            textColorInt = R.color.rma_green_color
+                        } else if (it?.loginstatus == "2") {
+                            textColorInt = R.color.rma_red_color
+                        } else if (it?.loginstatus == "3") {
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }
+                    }
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginEnd = autoSize(31)
+                }
+            }.lparams(matchParent, autoSize(96))
+
+            linearLayout {
+                data.bindOptional(context) {
+                    if (it?.isSelect == 0) {
+                        visibility = View.GONE
+                    } else {
+                        visibility = View.VISIBLE
+                    }
+                }
+                gravity = Gravity.CENTER_VERTICAL
+                emptyView()
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    backgroundResource = R.drawable.rma_item_click_bg
+                    gravity = Gravity.CENTER
+                    text = "详情"
+                    textColorInt = R.color.rma_item_click_color
+                    textSizeAuto = 26
+                }.lparams(autoSize(120), autoSize(48)) {
+                    marginEnd = autoSize(24)
+                }
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    backgroundResource = R.drawable.rma_item_click_bg
+                    gravity = Gravity.CENTER
+                    text = "修改"
+                    textColorInt = R.color.rma_item_click_color
+                    textSizeAuto = 26
+                }.lparams(autoSize(120), autoSize(48)) {
+                    marginEnd = autoSize(24)
+                }
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    backgroundResource = R.drawable.rma_item_click_bg
+                    gravity = Gravity.CENTER
+                    text = "重置密码"
+                    textColorInt = R.color.rma_item_click_color
+                    textSizeAuto = 26
+                }.lparams(autoSize(156), autoSize(48)) {
+                    marginEnd = autoSize(24)
+                }
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    backgroundResource = R.drawable.rma_item_click_bg
+                    gravity = Gravity.CENTER
+                    text = "锁定"
+                    textColorInt = R.color.rma_item_click_color
+                    textSizeAuto = 26
+                }.lparams(autoSize(120), autoSize(48)) {
+                    marginEnd = autoSize(24)
+                }
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    backgroundResource = R.drawable.rma_item_click_bg
+                    gravity = Gravity.CENTER
+                    text = "注销"
+                    textColorInt = R.color.rma_item_click_color
+                    textSizeAuto = 26
+                }.lparams(autoSize(120), autoSize(48)) {
+                    marginEnd = autoSize(24)
+                }
+
+            }.lparams(matchParent, autoSize(72))
+        }.lparams(matchParent, wrapContent) {
+            marginStart = autoSize(102)
+            marginEnd = autoSize(78)
+            bottomMargin = autoSize(10)
+        }
+    }
+
+}

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/NewCommodityInformationActivity.kt

@@ -230,7 +230,7 @@ class NewHedgeSpeciesUI(
     private val hedgeSpeciesAdapter: BaseAdapter<HedgeSpeciesData, NewHedgeSpeciesViewHolder> = BaseAdapter { _, _ -> NewHedgeSpeciesViewHolder(activity, viewModel) }
 
     init {
-        viewModel.setDemoDataList()
+        viewModel.getHedgeSpeciesList()
     }
 
     val root = _FrameLayout(activity).apply {

+ 121 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/NewCommodityInformationViewModel.kt

@@ -47,6 +47,54 @@ class NewCommodityInformationViewModel : BaseViewModel() {
             )
         )
 
+        newhedgeSpeciesList.add(
+            HedgeSpeciesData(
+                id = "2",
+                futureTyeList = arrayListOf(
+                    HedgeFutureData(
+                        id = "1",
+                        futureContractList = arrayListOf("1", "2", "3")
+                    ), HedgeFutureData(
+                        id = "2",
+                        futureContractList = arrayListOf("1", "2", "3")
+                    )
+                ),
+                spotTypeList = arrayListOf(
+                    HedgeSpotData(
+                        id = "1",
+                        spotCategoryList = arrayListOf("1", "2", "3")
+                    ), HedgeSpotData(
+                        id = "2",
+                        spotCategoryList = arrayListOf("1", "2", "3")
+                    )
+                )
+            )
+        )
+
+        newhedgeSpeciesList.add(
+            HedgeSpeciesData(
+                id = "3",
+                futureTyeList = arrayListOf(
+                    HedgeFutureData(
+                        id = "1",
+                        futureContractList = arrayListOf("1", "2", "3")
+                    ), HedgeFutureData(
+                        id = "2",
+                        futureContractList = arrayListOf("1", "2", "3")
+                    )
+                ),
+                spotTypeList = arrayListOf(
+                    HedgeSpotData(
+                        id = "1",
+                        spotCategoryList = arrayListOf("1", "2", "3")
+                    ), HedgeSpotData(
+                        id = "2",
+                        spotCategoryList = arrayListOf("1", "2", "3")
+                    )
+                )
+            )
+        )
+
         hedgeSpeciesList.postValue(newhedgeSpeciesList)
     }
 
@@ -99,6 +147,79 @@ class NewCommodityInformationViewModel : BaseViewModel() {
         demoDataList.postValue(demoList)
     }
 
+    /**
+     * 商品信息-套保品种的item点击展开
+     * @param index Int
+     */
+    fun setOnAllHedgeClick(index: Int){
+        val datanewList = arrayListOf<HedgeSpeciesData>()
+        hedgeSpeciesList.value?.forEach {
+            if (index == hedgeSpeciesList.value?.indexOf(it)) {
+                if (it.isAllSelect == 0) {
+                    datanewList.add(it.copy(isAllSelect = 1))
+                } else {
+                    datanewList.add(it.copy(isAllSelect = 0))
+                }
+            } else {
+                datanewList.add(it)
+            }
+        }
+        hedgeSpeciesList.postValue(datanewList)
+    }
+
+    //套保品种-期货品种的展开隐藏点击事件
+    fun setOnHedgeFutureClick(index: Int, sonIndex: Int) {
+        val datanewlist = arrayListOf<HedgeSpeciesData>()
+        val oldList = hedgeSpeciesList.value
+        hedgeSpeciesList.value?.forEach {
+            if (index == oldList?.indexOf(it)) {
+                val newHedgeList = arrayListOf<HedgeFutureData>()
+                oldList.get(index).futureTyeList.forEach { data ->
+                    if (sonIndex == oldList.get(index).futureTyeList.indexOf(data)) {
+                        if (data.isFutureSelect == 0) {
+                            newHedgeList.add(data.copy(isFutureSelect = 1))
+                        } else {
+                            newHedgeList.add(data.copy(isFutureSelect = 0))
+                        }
+                    } else {
+                        newHedgeList.add(data)
+                    }
+                }
+                datanewlist.add(it.copy(futureTyeList = newHedgeList))
+            } else {
+                datanewlist.add(it)
+            }
+        }
+        hedgeSpeciesList.postValue(datanewlist)
+    }
+
+    //套保品种-现货品种的item点击展开
+    fun setOnHedgeSpotClick(index: Int, sonIndex: Int){
+        val datanewlist = arrayListOf<HedgeSpeciesData>()
+        val oldList = hedgeSpeciesList.value
+        hedgeSpeciesList.value?.forEach {
+            if (index == oldList?.indexOf(it)) {
+                val newHedgeList = arrayListOf<HedgeSpotData>()
+                oldList.get(index).spotTypeList.forEach { data ->
+                    if (sonIndex == oldList.get(index).spotTypeList.indexOf(data)) {
+                        if (data.isSpotSelect == 0) {
+                            newHedgeList.add(data.copy(isSpotSelect = 1))
+                        } else {
+                            newHedgeList.add(data.copy(isSpotSelect = 0))
+                        }
+                    } else {
+                        newHedgeList.add(data)
+                    }
+                }
+                datanewlist.add(it.copy(spotTypeList = newHedgeList))
+            } else {
+                datanewlist.add(it)
+            }
+        }
+        hedgeSpeciesList.postValue(datanewlist)
+    }
+
+
 
     /**
      * 现货合同item点击事件

+ 13 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/newhedge/HedgeFutureViewHolder.kt

@@ -1,8 +1,10 @@
 package cn.muchinfo.rma.view.base.home.commodity.newcommodity.newhedge
 
 import android.view.Gravity
+import android.view.View
 import androidx.appcompat.app.AppCompatActivity
 import cn.muchinfo.rma.R
+import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.home.commodity.newcommodity.NewCommodityInformationViewModel
 import cn.muchinfo.rma.view.base.home.contract.emptyView
@@ -68,7 +70,7 @@ class HedgeFutureViewHolder(
                     gravity = Gravity.CENTER_VERTICAL
                     imageView {
                         onThrottleFirstClick {
-
+                            viewModel.setOnHedgeFutureClick(index,dataIndex)
                         }
                         imageResource = R.mipmap.second_list_floding
                     }.lparams(autoSize(43), autoSize(43))
@@ -103,11 +105,20 @@ class HedgeFutureViewHolder(
             }
 
             recyclerView {
+                data.bindOptional(context){
+                    if (it?.isFutureSelect == 0){
+                        visibility = View.GONE
+                    }else{
+                        visibility = View.VISIBLE
+                    }
+                }
                 background = resources.getDrawable(R.color.white)
                 adapter = hedgeFutureContractAdapter
             }.lparams(matchParent, wrapContent)
 
-
+            data.bindOptional(context){
+                hedgeFutureContractAdapter.setNewData(it?.futureContractList)
+            }
         }
     }
 

+ 13 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/newhedge/HedgeSpotViewHolder.kt

@@ -1,8 +1,10 @@
 package cn.muchinfo.rma.view.base.home.commodity.newcommodity.newhedge
 
 import android.view.Gravity
+import android.view.View
 import androidx.appcompat.app.AppCompatActivity
 import cn.muchinfo.rma.R
+import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.home.commodity.newcommodity.NewCommodityInformationViewModel
 import cn.muchinfo.rma.view.base.home.contract.emptyView
@@ -68,7 +70,7 @@ class HedgeSpotViewHolder(
                     gravity = Gravity.CENTER_VERTICAL
                     imageView {
                         onThrottleFirstClick {
-
+                            viewModel.setOnHedgeSpotClick(index,dataIndex)
                         }
                         imageResource = R.mipmap.second_list_floding
                     }.lparams(autoSize(43), autoSize(43))
@@ -103,10 +105,20 @@ class HedgeSpotViewHolder(
             }
 
             recyclerView {
+                data.bindOptional(context){
+                    if (it?.isSpotSelect == 0){
+                        visibility = View.GONE
+                    }else{
+                        visibility = View.VISIBLE
+                    }
+                }
                 background = resources.getDrawable(R.color.white)
                 adapter = hedgeSpotCategoryAdapter
             }.lparams(matchParent, wrapContent)
 
+            data.bindOptional(context){
+                hedgeSpotCategoryAdapter.setNewData(it?.spotCategoryList)
+            }
         }
     }
 

+ 11 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/newhedge/NewHedgeSpeciesViewHolder.kt

@@ -1,8 +1,10 @@
 package cn.muchinfo.rma.view.base.home.commodity.newcommodity.newhedge
 
 import android.view.Gravity
+import android.view.View
 import androidx.appcompat.app.AppCompatActivity
 import cn.muchinfo.rma.R
+import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.home.commodity.newcommodity.NewCommodityInformationViewModel
 import cn.muchinfo.rma.view.base.home.contract.emptyView
@@ -33,8 +35,9 @@ class NewHedgeSpeciesViewHolder(
     override fun _FrameLayout.createContentView() {
         verticalLayout {
             linearLayout {
+                backgroundDrawable = resources.getDrawable(R.color.rma_item_bg)
                 onThrottleFirstClick {
-                    viewModel.setOnAllClick(dataIndex)
+                    viewModel.setOnAllHedgeClick(dataIndex)
                 }
                 gravity = Gravity.CENTER_VERTICAL
                 imageView {
@@ -61,6 +64,13 @@ class NewHedgeSpeciesViewHolder(
             }.lparams(matchParent, autoSize(84))
 
             verticalLayout {
+                data.bindOptional(context) {
+                    if (it?.isAllSelect == 0) {
+                        visibility = View.GONE
+                    } else {
+                        visibility = View.VISIBLE
+                    }
+                }
                 linearLayout {
                     gravity = Gravity.CENTER_VERTICAL
                     linearLayout {

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

@@ -20,7 +20,7 @@ class RoleSetViewModel : BaseViewModel(){
         val params = mutableMapOf<String, String>().apply {
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
         }
-        MyApplication.getInstance()?.roleManager?.queryAccMgrRole(params = params){isSuccess, respData, error ->
+        MyApplication.getInstance()?.accountManager?.queryAccMgrRole(params = params){isSuccess, respData, error ->
             if (isSuccess){
                 roleSetDataList.postValue(respData)
             }

+ 12 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ProcurementFragment.kt

@@ -222,6 +222,9 @@ class PriceUI(private val baseFragment: Fragment, private val viewModule: Procur
 
             statusLayout(contentBlock = {
                 statusLayout = this
+                setRetryAction {
+                    viewModule.queryContract("2","1")
+                }
 //                bindTaskStatus(viewModule.status)
                 swipeToLoadLayout {
                     swipeToLayout = this
@@ -273,6 +276,7 @@ class PriceUI(private val baseFragment: Fragment, private val viewModule: Procur
                         swipeToLayout.finishRefresh()
 //                        mHeadHeaderHSView.scrollTo(scrollXView,scrollYView)
                     }
+                    statusLayout.showSuccess()
                     contentAdapter.setDatas(it)
                 }
             }
@@ -382,6 +386,9 @@ class SettlementUI(
 
             statusLayout(contentBlock = {
                 statusLayout = this
+                setRetryAction {
+                    viewModule.queryContract("3","1")
+                }
 //                bindTaskStatus(viewModule.status)
                 swipeToLoadLayout {
                     swipeToLayout = this
@@ -431,6 +438,7 @@ class SettlementUI(
                         swipeToLayout.finishRefresh()
 //                        mHeadHeaderHSView.scrollTo(scrollXView,scrollYView)
                     }
+                    statusLayout.showSuccess()
                     contentAdapter.setDatas(it)
                 }
             }
@@ -531,6 +539,9 @@ class newAllUI(private val baseFragment: Fragment, private val viewModule: Procu
 
             statusLayout(contentBlock = {
                 statusLayout = this
+                setRetryAction {
+                    viewModule.queryContract("1","1")
+                }
 //                bindTaskStatus(viewModule.status)
                 swipeToLoadLayout {
                     swipeToLayout = this
@@ -582,6 +593,7 @@ class newAllUI(private val baseFragment: Fragment, private val viewModule: Procu
                         swipeToLayout.finishRefresh()
 //                        mHeadHeaderHSView.scrollTo(scrollXView,scrollYView)
                     }
+                    statusLayout.showSuccess()
                     contentAdapter.setDatas(it)
                 }
             }

+ 12 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/sale/SaleFragment.kt

@@ -219,6 +219,9 @@ class SalePriceUI(private val baseFragment: Fragment, private val viewModule: Sa
 
             statusLayout(contentBlock = {
                 statusLayout = this
+                setRetryAction {
+                    viewModule.queryContract("2","-1")
+                }
 //                bindTaskStatus(viewModule.status)
                 swipeToLoadLayout {
                     swipeToLayout = this
@@ -270,6 +273,7 @@ class SalePriceUI(private val baseFragment: Fragment, private val viewModule: Sa
                         swipeToLayout.finishRefresh()
 //                        mHeadHeaderHSView.scrollTo(scrollXView,scrollYView)
                     }
+                    statusLayout.showSuccess()
                     contentAdapter.setDatas(it)
                 }
             }
@@ -364,6 +368,9 @@ class SaleSettlementUI(
             statusLayout(contentBlock = {
                 statusLayout = this
 //                bindTaskStatus(viewModule.status)
+                setRetryAction {
+                    viewModule.queryContract("3","-1")
+                }
                 swipeToLoadLayout {
                     swipeToLayout = this
                     setEnableRefresh(true)
@@ -412,6 +419,7 @@ class SaleSettlementUI(
                         swipeToLayout.finishRefresh()
 //                        mHeadHeaderHSView.scrollTo(scrollXView,scrollYView)
                     }
+                    statusLayout.showSuccess()
                     contentAdapter.setDatas(it)
                 }
             }
@@ -510,6 +518,9 @@ class SalenewAllUI(private val baseFragment: Fragment, private val viewModule: S
 
             statusLayout(contentBlock = {
                 statusLayout = this
+                setRetryAction {
+                    viewModule.queryContract("1","-1")
+                }
 //                bindTaskStatus(viewModule.status)
                 swipeToLoadLayout {
                     swipeToLayout = this
@@ -561,6 +572,7 @@ class SalenewAllUI(private val baseFragment: Fragment, private val viewModule: S
                         swipeToLayout.finishRefresh()
 //                        mHeadHeaderHSView.scrollTo(scrollXView,scrollYView)
                     }
+                    statusLayout.showSuccess()
                     contentAdapter.setDatas(it)
                 }
             }

+ 8 - 0
RMA/app/src/main/res/drawable/rma_list_item_nouse_bg.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+    <stroke
+        android:color="#F4F4F4"
+        android:width="1dp" />
+    <solid android:color="#CCCCCC"/>
+    <corners android:radius="5dp"/>
+</shape>

BIN
RMA/app/src/main/res/mipmap-xhdpi/rma_account_add.png