Explorar o código

风险管理10月21日提交代码-liu.bolan-天津麦顿/企业风管6期开发

Liu.bolan %!s(int64=4) %!d(string=hai) anos
pai
achega
6a5273f09b
Modificáronse 57 ficheiros con 1525 adicións e 436 borrados
  1. 2 0
      RMA/app/src/main/AndroidManifest.xml
  2. 3 1
      RMA/app/src/main/java/cn/muchinfo/rma/business/account/AccountManager.kt
  3. 3 3
      RMA/app/src/main/java/cn/muchinfo/rma/business/account/adapter/AccountAdapter.kt
  4. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaSpotplReportData.kt
  5. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaStockApplyData.kt
  6. 3 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaStockData.kt
  7. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaStockReportData.kt
  8. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaSumPLData.kt
  9. 5 2
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ContractData.kt
  10. 3 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ExposureReportData.kt
  11. 3 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/FinanceReportData.kt
  12. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/FutureDataReportData.kt
  13. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/RealExposureData.kt
  14. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/SCMiddleGoodsReportData.kt
  15. 1 0
      RMA/app/src/main/java/cn/muchinfo/rma/netManage/base/interceptor/LoggingInterceptor.kt
  16. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt
  17. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/exposure/ExposureContentAdapter.java
  18. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/future/trade/GoodsTradeActivity.kt
  19. 198 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/HnstMainFragment.kt
  20. 21 10
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/NewHomeFragment.kt
  21. 20 15
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/adapter/ContractAdapter.java
  22. 27 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/DuctAuditActivity.kt
  23. 131 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/DuctAuditViewModel.kt
  24. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/convertcoefficient/ConvertCoefficientUI.kt
  25. 9 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/convertcoefficient/ConvertCoefficientViewHolder.kt
  26. 112 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/costweight/CostWeightUI.kt
  27. 56 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/hedgeratio/HedgeRatioAuditActivity.kt
  28. 11 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/hedgeratio/HedgeRatioAuditViewModel.kt
  29. 116 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/hedgeratio/HedgeRatioUI.kt
  30. 11 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/vatrate/VarRateUI.kt
  31. 10 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/vatrate/VarRateViewHolder.kt
  32. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/InventoryContentAdapter.java
  33. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/adapter/InventoryCurrentAdapter.java
  34. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/InventoryRecordAdapter.java
  35. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/ExposureReportContentAdapter.java
  36. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/FanacelReportContentAdapter.java
  37. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/FutureReportContentAdapter.java
  38. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/SpotReportContentAdapter.java
  39. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/SummaryReportContentAdapter.java
  40. 316 253
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/AddRoleActivity.kt
  41. 68 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/RoleSetViewModel.kt
  42. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/ChangePasswordActivity.kt
  43. 5 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/ChangePasswordViewModel.kt
  44. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/NewChangePasswordActivity.kt
  45. 12 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/NewChangePasswordViewModel.kt
  46. 70 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/about/AboutActivity.kt
  47. 8 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/about/AboutViewModel.kt
  48. 26 15
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ContentAdapter.java
  49. 20 15
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/contraceui/SpotContractAdapter.java
  50. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/report/PricingReportContentAdapter.java
  51. 4 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/report/ReportFragment.kt
  52. 20 15
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/sale/contract/SpotSellContractAdapter.java
  53. BIN=BIN
      RMA/app/src/main/res/mipmap-xhdpi/binding_phone.png
  54. BIN=BIN
      RMA/app/src/main/res/mipmap-xhdpi/reset_password.png
  55. BIN=BIN
      RMA/app/src/main/res/mipmap-xhdpi/tjmd_about.png
  56. BIN=BIN
      RMA/app/src/main/res/mipmap-xhdpi/tjmd_about_icon.png
  57. BIN=BIN
      RMA/app/src/main/res/mipmap-xhdpi/tjmd_invoice_information.png

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

@@ -483,6 +483,8 @@
         <activity android:name=".view.base.spot.associated.perioddocuments.BusinessAssociationsActivity"/>
 
         <activity android:name=".view.base.spot.associated.perioddocuments.FillSingleConnectionActivity"/>
+
+        <activity android:name=".view.base.main.about.AboutActivity"/>
     </application>
 
 </manifest>

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

@@ -324,6 +324,8 @@ class AccountManager {
     fun modifyPwd(
         oldpwd: String,
         newPwd: String,
+        ModifyPwdType : Int = 0,
+        ModifyPwdID : Long = 0,
         callback: (isCompleted: Boolean, err: Error?) -> Unit
     ) {
         val tradeSocketManager = MyApplication.getInstance()?.tradeSocketManager.guard {
@@ -332,7 +334,7 @@ class AccountManager {
         }
 
         val reqPacket = AccountAdapter.modifyPwdRepPacket(
-            oldpwd, newPwd
+            oldpwd, newPwd,ModifyPwdType,ModifyPwdID
         )
 
         tradeSocketManager.send(

+ 3 - 3
RMA/app/src/main/java/cn/muchinfo/rma/business/account/adapter/AccountAdapter.kt

@@ -179,13 +179,13 @@ class AccountAdapter {
          * @param newPwd String
          * @return Packet50
          */
-        fun modifyPwdRepPacket(oldpwd : String,newPwd : String) : Packet50{
+        fun modifyPwdRepPacket(oldpwd : String,newPwd : String,ModifyPwdType : Int = 0,ModifyPwdID : Long = 0) : Packet50{
             val builder = SystemMI1.ModifyPwdReq.newBuilder()
             val loginInfo = GlobalDataCollection.instance?.loginRsp!!
             builder.setNewPwd(newPwd)
             builder.setOldPwd(oldpwd)
-            builder.setModifyPwdType(1)
-            builder.setModifyPwdID(loginInfo.loginID)
+            builder.setModifyPwdType(ModifyPwdType)
+            builder.setModifyPwdID(ModifyPwdID)
             builder.setHeader(
                 MessageHeadModel.getHead(
                     FunCode.FID_ModifyPwdReq,

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

@@ -8,6 +8,7 @@ import com.google.gson.annotations.SerializedName
 data class AreaSpotplReportData(
     @SerializedName("accountid")
     val accountid: String? = "",//期货账户ID (作废, 默认为0)
+    var isOnClick : Int = 0,
     @SerializedName("accountname")
     val accountname: String? = "",//机构名称
     @SerializedName("actualpl")
@@ -113,6 +114,7 @@ data class AreaSpotplReportData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -169,6 +171,7 @@ data class AreaSpotplReportData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(accountname)
         parcel.writeString(actualpl)
         parcel.writeString(areauserid)

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

@@ -50,6 +50,7 @@ import com.google.gson.annotations.SerializedName
 data class AreaStockApplyData(
     @SerializedName("applyid")
     val applyid : String? = "",//申请人
+    var isOnClick : Int = 0,
     @SerializedName("applyname")
     val applyname : String? = "",//申请人名称
     @SerializedName("applyremark")
@@ -139,6 +140,7 @@ data class AreaStockApplyData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -187,6 +189,7 @@ data class AreaStockApplyData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(applyid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(applyname)
         parcel.writeString(applyremark)
         parcel.writeString(applysrc)

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class AreaStockData(
     @SerializedName("brandname")
     val brandname : String? = "",//品牌名称
+    var isOnClick : Int = 0,
     @SerializedName("curstock")
     val curstock : String? = "",//期末库存量(今日量)
     @SerializedName("deliverygoodsid")
@@ -62,6 +63,7 @@ data class AreaStockData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -92,6 +94,7 @@ data class AreaStockData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(brandname)
+        parcel.writeInt(isOnClick)
         parcel.writeString(curstock)
         parcel.writeString(deliverygoodsid)
         parcel.writeString(deliverygoodsname)
@@ -133,5 +136,4 @@ data class AreaStockData(
         }
     }
 
-
 }

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class AreaStockReportData(
     @SerializedName("brandname")
     val brandname : String? = "",//品牌名称
+    var isOnClick : Int = 0,
     @SerializedName("curstock")
     val curstock : String? = "",//期末库存量
     @SerializedName("deliverygoodscode")
@@ -81,6 +82,7 @@ data class AreaStockReportData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -120,6 +122,7 @@ data class AreaStockReportData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(brandname)
+        parcel.writeInt(isOnClick)
         parcel.writeString(curstock)
         parcel.writeString(deliverygoodscode)
         parcel.writeString(deliverygoodsid)

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

@@ -8,6 +8,7 @@ import com.google.gson.annotations.SerializedName
 data class AreaSumPLData(
     @SerializedName("areauserid")
     val areauserid :String? = "",//所属机构\交易用户ID
+    var isOnClick : Int = 0,
     @SerializedName("currencyid")
     val currencyid :String? = "",//结算币种ID
     @SerializedName("currencyname")
@@ -47,6 +48,7 @@ data class AreaSumPLData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -70,6 +72,7 @@ data class AreaSumPLData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(areauserid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(currencyid)
         parcel.writeString(currencyname)
         parcel.writeString(cycletime)

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

@@ -215,7 +215,8 @@ data class ContractData(
     @SerializedName("vatrate")
     val vatrate : String? = "",//增值税税率
     @SerializedName("nickname")
-    val nickname : String? = ""//nicheng
+    val nickname : String? = "",//nicheng
+    var isOnClick : Int = 0
 ) : Parcelable {
     constructor(parcel: Parcel) : this(
         parcel.readString(),
@@ -299,7 +300,8 @@ data class ContractData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
-        parcel.readString()
+        parcel.readString(),
+        parcel.readInt()
     ) {
     }
 
@@ -386,6 +388,7 @@ data class ContractData(
         parcel.writeString(saleusername)
         parcel.writeString(vatrate)
         parcel.writeString(nickname)
+        parcel.writeInt(isOnClick)
     }
 
     override fun describeContents(): Int {

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class ExposureReportData(
     @SerializedName("areauserid")
     val areauserid : String? = "",//所属机构
+    var isOnClick : Int =0,
     @SerializedName("buyfutureqty")
     val buyfutureqty : String? = "",//买入期货数量
     @SerializedName("buyplanqty")
@@ -129,6 +130,7 @@ data class ExposureReportData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -192,6 +194,7 @@ data class ExposureReportData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(areauserid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(buyfutureqty)
         parcel.writeString(buyplanqty)
         parcel.writeString(buypricedqty)
@@ -266,5 +269,4 @@ data class ExposureReportData(
         }
     }
 
-
 }

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

@@ -76,6 +76,7 @@ data class FinanceReportData(
     val wrstandardcode : String? = "",//品类代码
     @SerializedName("wrstandardname")
     val wrstandardname : String? = "",//品类名称
+    var isOnClick : Int = 0,
     @SerializedName("rightData")
     var rightData : List<String?>? = arrayListOf()//组装的右侧数据
 ) : Parcelable{
@@ -115,6 +116,7 @@ data class FinanceReportData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readInt(),
         parcel.createStringArrayList()
     ) {
     }
@@ -155,6 +157,7 @@ data class FinanceReportData(
         parcel.writeString(enddate)
         parcel.writeString(wrstandardcode)
         parcel.writeString(wrstandardname)
+        parcel.writeInt(isOnClick)
         parcel.writeStringList(rightData)
     }
 
@@ -172,5 +175,4 @@ data class FinanceReportData(
         }
     }
 
-
 }

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class FutureDataReportData(
     @SerializedName("accountid")
     val accountid : String? = "",//交易账户
+    var isOnClick : Int = 0,
     @SerializedName("accountname")
     val accountname : String? = "",//交易账号名称
     @SerializedName("begindate")
@@ -105,6 +106,7 @@ data class FutureDataReportData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -156,6 +158,7 @@ data class FutureDataReportData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(accountname)
         parcel.writeString(begindate)
         parcel.writeString(currencyname)

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

@@ -83,6 +83,7 @@ data class RealExposureData(
     @SerializedName("orineedhedgeexposoure") val orineedhedgeexposoure : String?  ="",//期初套保敞口
     @SerializedName("oritotalexposure") val oritotalexposure : String? = "",//期初总敞口
     @SerializedName("oritotalfutureqty") val oritotalfutureqty : String? = "",//期初期货总量
+    var isOnClick : Int = 0,
     @SerializedName("oritotalneedhedgeqty") val oritotalneedhedgeqty : String? = ""//期初现货应套保量
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
@@ -131,6 +132,7 @@ data class RealExposureData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString()
     ) {
     }
@@ -181,6 +183,7 @@ data class RealExposureData(
         parcel.writeString(orineedhedgeexposoure)
         parcel.writeString(oritotalexposure)
         parcel.writeString(oritotalfutureqty)
+        parcel.writeInt(isOnClick)
         parcel.writeString(oritotalneedhedgeqty)
     }
 

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class SCMiddleGoodsReportData(
     @SerializedName("begindate")
     val begindate : String? = "",//开始交易日
+    var isOnClick : Int = 0,
     @SerializedName("contractno")
     val contractno : String? = "",//合同编号
     @SerializedName("contracttype")
@@ -96,6 +97,7 @@ data class SCMiddleGoodsReportData(
 )  : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -143,6 +145,7 @@ data class SCMiddleGoodsReportData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(begindate)
+        parcel.writeInt(isOnClick)
         parcel.writeString(contractno)
         parcel.writeString(contracttype)
         parcel.writeString(convertratio)

+ 1 - 0
RMA/app/src/main/java/cn/muchinfo/rma/netManage/base/interceptor/LoggingInterceptor.kt

@@ -62,6 +62,7 @@ class LoggingInterceptor(
     @Throws(IOException::class)
     override fun intercept(chain: Interceptor.Chain): Response {
         val request = chain.request()
+
         val logRequest =
             printLevel == Level.ALL || printLevel != Level.NONE && printLevel == Level.REQUEST
         if (logRequest) {

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

@@ -15,9 +15,9 @@ object Constant {
 
 //    const val baseurl = "http://192.168.31.93:8080/cfg?key=test_93"//李倩企业风管 18611112222
 //    const val baseurl = "http://192.168.31.104:8080/cfg?key=test_104"//李倩云融 18611112222
-//    const val baseurl = "http://192.168.31.137:8080/cfg?key=test_137"//李倩云融 18611112222
+    const val baseurl = "http://192.168.31.137:8080/cfg?key=test_137"//李倩云融 18611112222
 //
-    const val baseurl = "http://192.168.31.135:8080/cfg?key=test_135"// 瑶姐 云融 190000000001 123456
+//    const val baseurl = "http://192.168.31.135:8080/cfg?key=test_135"// 瑶姐 云融 190000000001 123456
 
 //    const val baseurl = "http://192.168.31.175:8080/cfg?key=test_175" // 8888  123123
 //    const val baseurl = "http://192.168.31.223:8080/cfg?key=test_223"

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/exposure/ExposureContentAdapter.java

@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.List;
 import cn.muchinfo.rma.R;
 import cn.muchinfo.rma.global.GlobalDataCollection;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.RealExposureData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
 import cn.muchinfo.rma.view.base.future.trade.GoodsTradeActivity;
@@ -58,14 +59,24 @@ public class ExposureContentAdapter extends RecyclerView.Adapter<ExposureContent
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position){
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<RealExposureData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                RealExposureData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                RealExposureData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -93,7 +104,7 @@ public class ExposureContentAdapter extends RecyclerView.Adapter<ExposureContent
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position){
+        if (datas.get(i).isOnClick() == 1){
             itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.exposure_allView.setVisibility(View.VISIBLE);
         }else {
@@ -104,7 +115,7 @@ public class ExposureContentAdapter extends RecyclerView.Adapter<ExposureContent
         itemViewHolder.exposure_all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_exposure","client_exposure_real","client_exposure_spotdetail")){

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

@@ -327,7 +327,7 @@ class GoodsTradeActivity : BaseActivity<GoodsTradeViewModel>() {
                 textView {
                     viewModel.allWorth.bindOptional(context){
                         if (it?.isNullOrEmpty()?.not() == true){
-                            text = "权益:${NumberUtils.roundNum(it,2)}"
+                            text = "权益:${NumberUtils.roundNum(NumberUtils.doubleDistortion(it),2)}"
                         }
                     }
                     textSizeAuto = 31
@@ -337,7 +337,7 @@ class GoodsTradeActivity : BaseActivity<GoodsTradeViewModel>() {
                 emptyView()
                 textView {
                     viewModel.canUseWorth.bindOptional(context){
-                        text = "可用:" + NumberUtils.roundNum(it,2)
+                        text = "可用:" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it),2)
                     }
                     textSizeAuto = 31
                     textColorInt = R.color.rma_yellow_text_color

+ 198 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/HnstMainFragment.kt

@@ -39,6 +39,8 @@ import cn.muchinfo.rma.view.base.hnstmain.performance.PerformanceInformationActi
 import cn.muchinfo.rma.view.base.hnstmain.performancetemplate.PerformanceTemplateActivity
 import cn.muchinfo.rma.view.base.hnstmain.spotwarehouse.SpotWareHouseActivity
 import cn.muchinfo.rma.view.base.home.contract.emptyView
+import cn.muchinfo.rma.view.base.home.set.ChangePasswordActivity
+import cn.muchinfo.rma.view.base.main.about.AboutActivity
 import cn.muchinfo.rma.view.base.main.addressmanagement.MyAddressManagementActivity
 import cn.muchinfo.rma.view.base.main.castsurely.MyCastSurelyActivity
 import cn.muchinfo.rma.view.base.main.integral.MyIntegralActivity
@@ -1047,6 +1049,202 @@ class HnstMainFragment : BaseFragment<HnstMainViewmodel>() {
                             }
                         }.lparams(matchParent, autoSize(140))
 
+                         itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+//                                val intent = Intent()
+//                                intent.setClass(context, AboutActivity::class.java)
+//                                ActivityUtils.startActivity(intent)
+                            }
+                            imageView {
+                                imageResource = R.mipmap.tjmd_invoice_information
+                            }.lparams(autoSize(50), autoSize(50)) {
+                                marginStart = autoSize(60)
+                            }
+
+                            textView {
+                                text = "发票信息"
+                                textSizeAuto = 36
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(29)
+                            }
+
+                            emptyView()
+
+                            textView {
+                                visibility = View.GONE
+                                text = "99"
+                                textColorInt = R.color.p_global_write_color
+                                textSizeAuto = 15
+                                setPadding(
+                                    autoSize(10),
+                                    autoSize(6),
+                                    autoSize(10),
+                                    autoSize(6)
+                                )
+                                backgroundDrawable =
+                                    createRoundRectDrawable("#FFA127", 45)
+                            }.lparams(wrapContent, wrapContent) {
+                                marginEnd = autoSize(20)
+                            }
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(40), autoSize(40)) {
+                                marginEnd = autoSize(49)
+                            }
+                        }.lparams(matchParent, autoSize(140))
+
+                        itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                val intent = Intent()
+                                intent.setClass(context, ChangePasswordActivity::class.java)
+                                ActivityUtils.startActivity(intent)
+                            }
+                            imageView {
+                                imageResource = R.mipmap.reset_password
+                            }.lparams(autoSize(50), autoSize(50)) {
+                                marginStart = autoSize(60)
+                            }
+
+                            textView {
+                                text = "密码修改"
+                                textSizeAuto = 36
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(29)
+                            }
+
+                            emptyView()
+
+                            textView {
+                                visibility = View.GONE
+                                text = "99"
+                                textColorInt = R.color.p_global_write_color
+                                textSizeAuto = 15
+                                setPadding(
+                                    autoSize(10),
+                                    autoSize(6),
+                                    autoSize(10),
+                                    autoSize(6)
+                                )
+                                backgroundDrawable =
+                                    createRoundRectDrawable("#FFA127", 45)
+                            }.lparams(wrapContent, wrapContent) {
+                                marginEnd = autoSize(20)
+                            }
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(40), autoSize(40)) {
+                                marginEnd = autoSize(49)
+                            }
+                        }.lparams(matchParent, autoSize(140))
+
+                        itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+//                                val intent = Intent()
+//                                intent.setClass(context, AboutActivity::class.java)
+//                                ActivityUtils.startActivity(intent)
+                            }
+                            imageView {
+                                imageResource = R.mipmap.binding_phone
+                            }.lparams(autoSize(50), autoSize(50)) {
+                                marginStart = autoSize(60)
+                            }
+
+                            textView {
+                                text = "手机绑定/解绑"
+                                textSizeAuto = 36
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(29)
+                            }
+
+                            emptyView()
+
+                            textView {
+                                visibility = View.GONE
+                                text = "99"
+                                textColorInt = R.color.p_global_write_color
+                                textSizeAuto = 15
+                                setPadding(
+                                    autoSize(10),
+                                    autoSize(6),
+                                    autoSize(10),
+                                    autoSize(6)
+                                )
+                                backgroundDrawable =
+                                    createRoundRectDrawable("#FFA127", 45)
+                            }.lparams(wrapContent, wrapContent) {
+                                marginEnd = autoSize(20)
+                            }
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(40), autoSize(40)) {
+                                marginEnd = autoSize(49)
+                            }
+                        }.lparams(matchParent, autoSize(140))
+
+                        itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                val intent = Intent()
+                                intent.setClass(context, AboutActivity::class.java)
+                                ActivityUtils.startActivity(intent)
+                            }
+                            imageView {
+                                imageResource = R.mipmap.tjmd_about
+                            }.lparams(autoSize(50), autoSize(50)) {
+                                marginStart = autoSize(60)
+                            }
+
+                            textView {
+                                text = "关于我们"
+                                textSizeAuto = 36
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(29)
+                            }
+
+                            emptyView()
+
+                            textView {
+                                visibility = View.GONE
+                                text = "99"
+                                textColorInt = R.color.p_global_write_color
+                                textSizeAuto = 15
+                                setPadding(
+                                    autoSize(10),
+                                    autoSize(6),
+                                    autoSize(10),
+                                    autoSize(6)
+                                )
+                                backgroundDrawable =
+                                    createRoundRectDrawable("#FFA127", 45)
+                            }.lparams(wrapContent, wrapContent) {
+                                marginEnd = autoSize(20)
+                            }
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(40), autoSize(40)) {
+                                marginEnd = autoSize(49)
+                            }
+                        }.lparams(matchParent, autoSize(140))
+
 
                         linearLayout {
                             gravity = Gravity.CENTER

+ 21 - 10
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/NewHomeFragment.kt

@@ -174,10 +174,10 @@ class NewHomeFragment : BaseFragment<HomeViewModel>() {
         }else{
             tabsArray.add("公告")
             uiMessageList.add(announcementUI.root)
-            tabsArray.add("资讯")
-            uiMessageList.add(informationUI.root)
-            tabsArray.add("研报")
-            uiMessageList.add(researchReportUI.root)
+//            tabsArray.add("资讯")
+//            uiMessageList.add(informationUI.root)
+//            tabsArray.add("研报")
+//            uiMessageList.add(researchReportUI.root)
         }
 
         pagerAdapter = object : PagerAdapter() {
@@ -338,13 +338,13 @@ class NewHomeFragment : BaseFragment<HomeViewModel>() {
                         verticalLayout {
                             background = resources.getDrawable(R.color.white)
 
-//                            imageView {
-//                                visibility = View.GONE
-//                                scaleType = ImageView.ScaleType.CENTER_CROP
-//                                imageResource = R.mipmap.banner
-//                            }.lparams(matchParent, autoSize(400))
-
                             inflateLayout<BGABanner>(R.layout.banner) {
+                                visibility = View.GONE
+//                                if (SPUtils.getInstance().getString(Constant.oem) == "fxgl"){
+//
+//                                }else{
+//                                    visibility = View.VISIBLE
+//                                }
                                 // TODO 目前没有banner
                                 viewModel.bannerList.bindOptional(context) {
                                     setData(
@@ -385,6 +385,17 @@ class NewHomeFragment : BaseFragment<HomeViewModel>() {
 
                             }.lparams(matchParent, autoSize(400))
 
+                            imageView {
+//                                if (SPUtils.getInstance().getString(Constant.oem) == "fxgl"){
+//                                    visibility = View.VISIBLE
+//                                }else{
+//                                    visibility = View.GONE
+//                                }
+
+                                scaleType = ImageView.ScaleType.CENTER_CROP
+                                imageResource = R.mipmap.banner
+                            }.lparams(matchParent, autoSize(400))
+
                             //用于首页tabmenu的控制
                             tabSegment {
                                 segment2 = this

+ 20 - 15
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/adapter/ContractAdapter.java

@@ -75,14 +75,24 @@ public class ContractAdapter extends RecyclerView.Adapter<ContractAdapter.ItemVi
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<ContractData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                ContractData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                ContractData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -111,7 +121,7 @@ public class ContractAdapter extends RecyclerView.Adapter<ContractAdapter.ItemVi
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position) {
+        if (contractData.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -122,15 +132,10 @@ public class ContractAdapter extends RecyclerView.Adapter<ContractAdapter.ItemVi
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
-            }
-        });
-        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
+
         if (type.equals("2")){
             if (GlobalDataCollection.Companion.getInstance().getFourLevelMenu("client_spotsaduit","client_spotsaduit_contract","client_spotsaduit_contract_unaduit","client_spotsaduit_contract_unaduit_cancel")){
                 if (contractData.getContracctstatus().equals("1")){

+ 27 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/DuctAuditActivity.kt

@@ -1,7 +1,14 @@
 package cn.muchinfo.rma.view.base.home.ductaudit
 
 import android.os.Bundle
+import cn.muchinfo.rma.view.autoWidget.commonLeftButton
+import cn.muchinfo.rma.view.autoWidget.commonTitle
+import cn.muchinfo.rma.view.autoWidget.topBar
 import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.home.ductaudit.convertcoefficient.ConvertCoefficientUI
+import cn.muchinfo.rma.view.base.home.ductaudit.costweight.CostWeightUI
+import cn.muchinfo.rma.view.base.home.ductaudit.hedgeratio.HedgeRatioUI
+import cn.muchinfo.rma.view.base.home.ductaudit.vatrate.VarRateUI
 import org.jetbrains.anko.verticalLayout
 
 /**
@@ -9,9 +16,29 @@ import org.jetbrains.anko.verticalLayout
  */
 class DuctAuditActivity : BaseActivity<DuctAuditViewModel>(){
 
+    //增值税税率ui
+    val varRateUI by lazy { VarRateUI(this,viewModel) }
+
+    //折算系数ui
+    val convertCoefficientUI by lazy { ConvertCoefficientUI(this,viewModel) }
+
+    //成本权重ui
+    val costWeightUI by lazy { CostWeightUI(this,viewModel) }
+
+    //套保比例
+    val hedgeRateUI by lazy { HedgeRatioUI(this,viewModel) }
+
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         verticalLayout {
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "风管审核"
+                }
+            }
+
 
         }
     }

+ 131 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/DuctAuditViewModel.kt

@@ -24,6 +24,137 @@ class DuctAuditViewModel : BaseViewModel(){
     val convertcoefficientDataList : MutableLiveData<List<ParamChangeAppData>> = MutableLiveData()
 
     /**
+     * 成本权重列表数据
+     */
+    val costWeightDataList : MutableLiveData<List<ParamChangeAppData>> = MutableLiveData()
+
+    /**
+     * 套保比例列表数据
+     */
+    val hedgeRatioDataList : MutableLiveData<List<ParamChangeAppData>> = MutableLiveData()
+
+    /**
+     * 套保比例列表item的点击
+     * @param applicationid String
+     */
+    fun setOnHedgeRationClick(applicationid : String){
+        val newDataList = arrayListOf<ParamChangeAppData>()
+        hedgeRatioDataList.value?.forEach {
+            if (applicationid == it.applicationid){
+                if (it.isClick == 0){
+                    newDataList.add(it.copy(isClick = 1))
+                }else{
+                    newDataList.add(it.copy(isClick = 0))
+                }
+            }else{
+                newDataList.add(it.copy(isClick = 0))
+            }
+        }
+        hedgeRatioDataList.postValue(newDataList)
+    }
+
+    /**
+     * 增值税税率列表item的点击
+     * @param applicationid String
+     */
+    fun setOnVatRateClick(applicationid : String){
+        val newDataList = arrayListOf<ParamChangeAppData>()
+        vatrateDataList.value?.forEach {
+            if (applicationid == it.applicationid){
+                if (it.isClick == 0){
+                    newDataList.add(it.copy(isClick = 1))
+                }else{
+                    newDataList.add(it.copy(isClick = 0))
+                }
+            }else{
+                newDataList.add(it.copy(isClick = 0))
+            }
+        }
+        vatrateDataList.postValue(newDataList)
+    }
+
+    /**
+     * 折算系数列表item的点击
+     * @param applicationid String
+     */
+    fun setOnConvertCoefficientClick(applicationid : String){
+        val newDataList = arrayListOf<ParamChangeAppData>()
+        convertcoefficientDataList.value?.forEach {
+            if (applicationid == it.applicationid){
+                if (it.isClick == 0){
+                    newDataList.add(it.copy(isClick = 1))
+                }else{
+                    newDataList.add(it.copy(isClick = 0))
+                }
+            }else{
+                newDataList.add(it.copy(isClick = 0))
+            }
+        }
+        convertcoefficientDataList.postValue(newDataList)
+    }
+
+
+    /**
+     * 成本权重列表item的点击
+     * @param applicationid String
+     */
+    fun setOnCostWeightClick(applicationid : String){
+        val newDataList = arrayListOf<ParamChangeAppData>()
+        costWeightDataList.value?.forEach {
+            if (applicationid == it.applicationid){
+                if (it.isClick == 0){
+                    newDataList.add(it.copy(isClick = 1))
+                }else{
+                    newDataList.add(it.copy(isClick = 0))
+                }
+            }else{
+                newDataList.add(it.copy(isClick = 0))
+            }
+        }
+        costWeightDataList.postValue(newDataList)
+    }
+
+    /**
+     * 套保比例列表数据请求
+     */
+    fun queryHedgeRatioDataList(){
+        val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("paramchangetype","4")
+        }
+
+        MyApplication.getInstance()?.spotManager?.queryParamChangeApp(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                respData?.toArrayList()?.sortWith(Comparator { t1, t2 ->
+                    (TimeUtils.string2Millis(t2.applytime) - TimeUtils.string2Millis(t1.applytime)).toInt()
+                })
+                hedgeRatioDataList.postValue(respData)
+            }
+        }
+    }
+
+
+
+    /**
+     * 成本权重列表数据
+     */
+    fun queryCostWeightDataList(){
+        val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("paramchangetype","3")
+        }
+
+        MyApplication.getInstance()?.spotManager?.queryParamChangeApp(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                respData?.toArrayList()?.sortWith(Comparator { t1, t2 ->
+                    (TimeUtils.string2Millis(t2.applytime) - TimeUtils.string2Millis(t1.applytime)).toInt()
+                })
+                costWeightDataList.postValue(respData)
+            }
+        }
+    }
+
+    /**
      * 查询折算系数列表数据
      */
     fun queryConvertCoefficientDataList(){

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/convertcoefficient/ConvertCoefficientUI.kt

@@ -26,7 +26,7 @@ class ConvertCoefficientUI(private val activity : AppCompatActivity,private val
         viewModel.queryConvertCoefficientDataList()
     }
 
-    private val convertCoefficientViewHolder: BaseAdapter<ParamChangeAppData, ConvertCoefficientViewHolder> = BaseAdapter { _, _ -> ConvertCoefficientViewHolder(activity, viewModel) }
+    private val convertCoefficientViewHolder: BaseAdapter<ParamChangeAppData, ConvertCoefficientViewHolder> = BaseAdapter { _, _ -> ConvertCoefficientViewHolder(activity, viewModel,"1") }
 
     val root = _FrameLayout(activity).apply {
         verticalLayout {

+ 9 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/convertcoefficient/ConvertCoefficientViewHolder.kt

@@ -20,13 +20,21 @@ import org.jetbrains.anko.*
  * @property activity AppCompatActivity
  * @property viewModel DuctAuditViewModel
  * @property itemSize IntArray
+ * type 1 是折算系数 2是成本权重
  * @constructor
  */
-class ConvertCoefficientViewHolder(private val activity : AppCompatActivity, private val viewModel: DuctAuditViewModel) : BaseViewHolder<ParamChangeAppData>(activity){
+class ConvertCoefficientViewHolder(private val activity : AppCompatActivity, private val viewModel: DuctAuditViewModel,private val type : String) : BaseViewHolder<ParamChangeAppData>(activity){
     override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
 
     override fun _FrameLayout.createContentView() {
         verticalLayout {
+            onThrottleFirstClick {
+                if (type == "1"){
+                    viewModel.setOnConvertCoefficientClick(data.value?.applicationid ?: "")
+                }else{
+                    viewModel.setOnCostWeightClick(data.value?.applicationid ?: "")//权重点击
+                }
+            }
             linearLayout {
                 verticalLayout {
                     gravity = Gravity.LEFT

+ 112 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/costweight/CostWeightUI.kt

@@ -1,10 +1,122 @@
 package cn.muchinfo.rma.view.base.home.ductaudit.costweight
 
+import android.view.Gravity
 import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.ParamChangeAppData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.home.ductaudit.DuctAuditViewModel
+import cn.muchinfo.rma.view.base.home.ductaudit.convertcoefficient.ConvertCoefficientViewHolder
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import org.jetbrains.anko.*
 
+/**
+ * 成本权重页面
+ * @property activity AppCompatActivity
+ * @property viewModel DuctAuditViewModel
+ * @constructor
+ */
 class CostWeightUI(private val activity : AppCompatActivity,private val viewModel: DuctAuditViewModel){
 
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
 
+    init {
+        viewModel.queryCostWeightDataList()
+    }
+
+    private val convertCoefficientViewHolder: BaseAdapter<ParamChangeAppData, ConvertCoefficientViewHolder> = BaseAdapter { _, _ -> ConvertCoefficientViewHolder(activity, viewModel,"2") }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            linearLayout {
+                verticalLayout {
+                    gravity = Gravity.LEFT
+                    textView {
+                        text = "商品"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(32)
+                        topMargin = autoSize(20)
+                    }
+                    textView {
+                        text = "套保品种"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "现货品种"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_HORIZONTAL
+                    textView {
+                        text = "原值/"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                    }
+                    textView {
+                        text = "新值"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "申请时间"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(32)
+                    }
+                }.lparams(0, autoSize(80),1f)
+            }.lparams(matchParent, autoSize(80))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        viewModel.queryCostWeightDataList()
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = convertCoefficientViewHolder
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.costWeightDataList.bindOptional(context){
+                if (it?.isEmpty() == true || it?.size == 0){
+                    statusLayout.showEmpty()
+                }else {
+                    if (swipeToLayout.getIsRefreshing()){
+                        swipeToLayout.finishRefresh()
+                    }
+                    convertCoefficientViewHolder.setNewData(it)
+                }
+            }
+        }
+    }
 
 }

+ 56 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/hedgeratio/HedgeRatioAuditActivity.kt

@@ -0,0 +1,56 @@
+package cn.muchinfo.rma.view.base.home.ductaudit.hedgeratio
+
+import android.os.Bundle
+import android.view.Gravity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.ViewEnumUtils
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import org.jetbrains.anko.*
+
+/**
+ * 套保比例审核页面
+ */
+class HedgeRatioAuditActivity : BaseActivity<HedgeRatioAuditViewModel>(){
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "套保比例审核"
+                }
+            }
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+//                if (data.contracctstatus == "3") {
+//                    background =
+//                        resources.getDrawable(R.color.rma_pass_status)//rma_pass_status已通过背景色
+//                } else {
+//                    background =
+//                        resources.getDrawable(R.color.rma_details_status)//rma_pass_status已通过背景色
+//                }
+//                imageView {
+//                    if (data.contracctstatus == "3") {
+//                        imageResource = R.mipmap.rma_pass_status
+//                    } else {
+//                        imageResource = R.mipmap.rma_wait_status
+//                    }
+//
+//                }.lparams(autoSize(38), autoSize(38)) {
+//                    marginStart = autoSize(37)
+//                }
+//                textView {
+//                    text = ViewEnumUtils.getContractStatus(data.contracctstatus ?: "")
+//                    textSizeAuto = 31
+//                    textColorInt = R.color.rma_yellow_text_color
+//                }.lparams(wrapContent, wrapContent) {
+//                    marginStart = autoSize(20)
+//                }
+            }.lparams(matchParent, autoSize(60))
+        }
+    }
+
+}

+ 11 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/hedgeratio/HedgeRatioAuditViewModel.kt

@@ -0,0 +1,11 @@
+package cn.muchinfo.rma.view.base.home.ductaudit.hedgeratio
+
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+/**
+ * 套保比例审核页面
+ */
+class HedgeRatioAuditViewModel : BaseViewModel(){
+
+
+}

+ 116 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/hedgeratio/HedgeRatioUI.kt

@@ -0,0 +1,116 @@
+package cn.muchinfo.rma.view.base.home.ductaudit.hedgeratio
+
+import android.view.Gravity
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.ParamChangeAppData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.home.ductaudit.DuctAuditViewModel
+import cn.muchinfo.rma.view.base.home.ductaudit.vatrate.VarRateViewHolder
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import org.jetbrains.anko.*
+
+/**
+ * 套保比例页面
+ * @property activity AppCompatActivity
+ * @property viewModel DuctAuditViewModel
+ * @constructor
+ */
+class HedgeRatioUI(private val activity : AppCompatActivity,private val viewModel: DuctAuditViewModel){
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    init {
+        viewModel.queryHedgeRatioDataList()
+    }
+
+    private val varRateViewHolder: BaseAdapter<ParamChangeAppData, VarRateViewHolder> = BaseAdapter { _, _ -> VarRateViewHolder(activity, viewModel,"2") }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            linearLayout {
+                verticalLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT
+                    textView {
+                        text = "现货品种"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(32)
+                    }
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "商品"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_HORIZONTAL
+                    textView {
+                        text = "原值%/"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                    }
+                    textView {
+                        text = "新值%"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "申请时间"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(32)
+                    }
+                }.lparams(0, autoSize(80),1f)
+            }.lparams(matchParent, autoSize(80))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        viewModel.queryHedgeRatioDataList()
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = varRateViewHolder
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.vatrateDataList.bindOptional(context){
+                if (it?.isEmpty() == true || it?.size == 0){
+                    statusLayout.showEmpty()
+                }else {
+                    if (swipeToLayout.getIsRefreshing()){
+                        swipeToLayout.finishRefresh()
+                    }
+                    varRateViewHolder.setNewData(it)
+                }
+            }
+        }
+    }
+
+}

+ 11 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/vatrate/VarRateUI.kt

@@ -12,6 +12,16 @@ import cn.muchinfo.rma.view.base.home.financial.FinancialViewholder
 import mtp.polymer.com.autowidget.adapter.BaseAdapter
 import org.jetbrains.anko.*
 
+/**
+ * 增值税税率页面
+ * @property activity AppCompatActivity
+ * @property viewModel DuctAuditViewModel
+ * @property swipeToLayout SwipeToLoadLayout
+ * @property statusLayout StatusLayout
+ * @property varRateViewHolder BaseAdapter<ParamChangeAppData, VarRateViewHolder>
+ * @property root _FrameLayout
+ * @constructor
+ */
 class VarRateUI(private val activity : AppCompatActivity,private val viewModel: DuctAuditViewModel){
 
     private lateinit var swipeToLayout: SwipeToLoadLayout
@@ -21,7 +31,7 @@ class VarRateUI(private val activity : AppCompatActivity,private val viewModel:
         viewModel.queryVatRateDataList()
     }
 
-    private val varRateViewHolder: BaseAdapter<ParamChangeAppData, VarRateViewHolder> = BaseAdapter { _, _ -> VarRateViewHolder(activity, viewModel) }
+    private val varRateViewHolder: BaseAdapter<ParamChangeAppData, VarRateViewHolder> = BaseAdapter { _, _ -> VarRateViewHolder(activity, viewModel,"1") }
 
     val root = _FrameLayout(activity).apply {
         verticalLayout {

+ 10 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/vatrate/VarRateViewHolder.kt

@@ -16,17 +16,25 @@ import mtp.polymer.com.autowidget.adapter.BaseViewHolder
 import org.jetbrains.anko.*
 
 /**
- * 增值税税率审核viewholder
+ * 增值税税率与套保比例审核viewholder
  * @property activity AppCompatActivity
  * @property viewModel DuctAuditViewModel
  * @property itemSize IntArray
+ * type 1 是增值税税率页面 2 是套保比例页面
  * @constructor
  */
-class VarRateViewHolder(private val activity : AppCompatActivity,private val viewModel: DuctAuditViewModel) : BaseViewHolder<ParamChangeAppData>(activity){
+class VarRateViewHolder(private val activity : AppCompatActivity,private val viewModel: DuctAuditViewModel,private val type : String) : BaseViewHolder<ParamChangeAppData>(activity){
     override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
 
     override fun _FrameLayout.createContentView() {
         verticalLayout {
+            onThrottleFirstClick {
+                if (type == "1"){
+                    viewModel.setOnVatRateClick(data.value?.applicationid ?: "")
+                }else{
+                    viewModel.setOnHedgeRationClick(data.value?.applicationid ?: "")
+                }
+            }
             linearLayout {
                 verticalLayout {
                     gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/InventoryContentAdapter.java

@@ -20,6 +20,7 @@ import cn.muchinfo.rma.R;
 import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.ViewEnumUtils;
 import cn.muchinfo.rma.global.data.AreaStockApplyData;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
 import cn.muchinfo.rma.view.base.procurement.RightScrollAdapter;
 
@@ -57,14 +58,24 @@ public class InventoryContentAdapter extends RecyclerView.Adapter<InventoryConte
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position){
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<AreaStockApplyData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                AreaStockApplyData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                AreaStockApplyData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -92,7 +103,7 @@ public class InventoryContentAdapter extends RecyclerView.Adapter<InventoryConte
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position){
+        if (datas.get(i).isOnClick() == 1){
             itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.exposure_allView.setVisibility(View.VISIBLE);
         }else {
@@ -103,7 +114,7 @@ public class InventoryContentAdapter extends RecyclerView.Adapter<InventoryConte
         itemViewHolder.exposure_roots_view.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         if (type.equals("1")){

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/adapter/InventoryCurrentAdapter.java

@@ -26,6 +26,7 @@ import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.ViewEnumUtils;
 import cn.muchinfo.rma.global.data.AreaStockApplyData;
 import cn.muchinfo.rma.global.data.AreaStockData;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
 import cn.muchinfo.rma.view.base.app.Constant;
 import cn.muchinfo.rma.view.base.home.inventory.inventoryaudit.BuySellInventoryActivity;
@@ -64,14 +65,24 @@ public class InventoryCurrentAdapter extends RecyclerView.Adapter<InventoryCurre
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position){
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<AreaStockData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                AreaStockData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                AreaStockData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -104,7 +115,7 @@ public class InventoryCurrentAdapter extends RecyclerView.Adapter<InventoryCurre
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position){
+        if (datas.get(i).isOnClick() == 1){
             itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.exposure_allView.setVisibility(View.VISIBLE);
         }else {
@@ -115,7 +126,7 @@ public class InventoryCurrentAdapter extends RecyclerView.Adapter<InventoryCurre
         itemViewHolder.exposure_all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         //判断是否有入库明细的权限

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/InventoryRecordAdapter.java

@@ -28,6 +28,7 @@ import cn.muchinfo.rma.global.data.AreaSpotplReportData;
 import cn.muchinfo.rma.global.data.AreaStockApplyData;
 import cn.muchinfo.rma.global.data.AreaStockReportData;
 import cn.muchinfo.rma.global.data.AreaSumPLData;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ExposureReportData;
 import cn.muchinfo.rma.global.data.FinanceReportData;
 import cn.muchinfo.rma.global.data.FutureDataReportData;
@@ -99,14 +100,24 @@ public class InventoryRecordAdapter extends RecyclerView.Adapter<InventoryRecord
     }
 
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<AreaStockReportData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                AreaStockReportData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                AreaStockReportData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -140,7 +151,7 @@ public class InventoryRecordAdapter extends RecyclerView.Adapter<InventoryRecord
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.exposure_allView.setVisibility(View.VISIBLE);
         } else {
@@ -170,7 +181,7 @@ public class InventoryRecordAdapter extends RecyclerView.Adapter<InventoryRecord
         itemViewHolder.exposure_all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         //库存明细

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/ExposureReportContentAdapter.java

@@ -25,6 +25,7 @@ import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.data.AreaSpotplReportData;
 import cn.muchinfo.rma.global.data.AreaStockReportData;
 import cn.muchinfo.rma.global.data.AreaSumPLData;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ExposureReportData;
 import cn.muchinfo.rma.global.data.FinanceReportData;
 import cn.muchinfo.rma.global.data.FutureDataReportData;
@@ -97,14 +98,24 @@ public class ExposureReportContentAdapter extends RecyclerView.Adapter<ExposureR
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<ExposureReportData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                ExposureReportData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                ExposureReportData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -136,7 +147,7 @@ public class ExposureReportContentAdapter extends RecyclerView.Adapter<ExposureR
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -146,7 +157,7 @@ public class ExposureReportContentAdapter extends RecyclerView.Adapter<ExposureR
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         if (type.equals("2")){

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/FanacelReportContentAdapter.java

@@ -26,6 +26,7 @@ import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.data.AreaSpotplReportData;
 import cn.muchinfo.rma.global.data.AreaStockReportData;
 import cn.muchinfo.rma.global.data.AreaSumPLData;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ExposureReportData;
 import cn.muchinfo.rma.global.data.FinanceReportData;
 import cn.muchinfo.rma.global.data.FutureDataReportData;
@@ -98,14 +99,24 @@ public class FanacelReportContentAdapter extends RecyclerView.Adapter<FanacelRep
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<FinanceReportData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                FinanceReportData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                FinanceReportData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -142,7 +153,7 @@ public class FanacelReportContentAdapter extends RecyclerView.Adapter<FanacelRep
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -152,7 +163,7 @@ public class FanacelReportContentAdapter extends RecyclerView.Adapter<FanacelRep
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         if (type.equals("2")){

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/FutureReportContentAdapter.java

@@ -26,6 +26,7 @@ import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.data.AreaSpotplReportData;
 import cn.muchinfo.rma.global.data.AreaStockReportData;
 import cn.muchinfo.rma.global.data.AreaSumPLData;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ExposureReportData;
 import cn.muchinfo.rma.global.data.FinanceReportData;
 import cn.muchinfo.rma.global.data.FutureDataReportData;
@@ -98,14 +99,24 @@ public class FutureReportContentAdapter extends RecyclerView.Adapter<FutureRepor
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<FutureDataReportData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                FutureDataReportData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                FutureDataReportData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -145,7 +156,7 @@ public class FutureReportContentAdapter extends RecyclerView.Adapter<FutureRepor
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -155,7 +166,7 @@ public class FutureReportContentAdapter extends RecyclerView.Adapter<FutureRepor
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         if (type.equals("6")){

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/SpotReportContentAdapter.java

@@ -26,6 +26,7 @@ import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.data.AreaSpotplReportData;
 import cn.muchinfo.rma.global.data.AreaStockReportData;
 import cn.muchinfo.rma.global.data.AreaSumPLData;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ExposureReportData;
 import cn.muchinfo.rma.global.data.FinanceReportData;
 import cn.muchinfo.rma.global.data.FutureDataReportData;
@@ -98,14 +99,24 @@ public class SpotReportContentAdapter extends RecyclerView.Adapter<SpotReportCon
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<AreaSpotplReportData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                AreaSpotplReportData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                AreaSpotplReportData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -137,7 +148,7 @@ public class SpotReportContentAdapter extends RecyclerView.Adapter<SpotReportCon
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -147,7 +158,7 @@ public class SpotReportContentAdapter extends RecyclerView.Adapter<SpotReportCon
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         if (type.equals("2")){

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/SummaryReportContentAdapter.java

@@ -26,6 +26,7 @@ import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.data.AreaSpotplReportData;
 import cn.muchinfo.rma.global.data.AreaStockReportData;
 import cn.muchinfo.rma.global.data.AreaSumPLData;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ExposureReportData;
 import cn.muchinfo.rma.global.data.FinanceReportData;
 import cn.muchinfo.rma.global.data.FutureDataReportData;
@@ -98,14 +99,24 @@ public class SummaryReportContentAdapter extends RecyclerView.Adapter<SummaryRep
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<AreaSumPLData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                AreaSumPLData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                AreaSumPLData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -136,7 +147,7 @@ public class SummaryReportContentAdapter extends RecyclerView.Adapter<SummaryRep
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -146,7 +157,7 @@ public class SummaryReportContentAdapter extends RecyclerView.Adapter<SummaryRep
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         if (type.equals("2")){

+ 316 - 253
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/AddRoleActivity.kt

@@ -7,12 +7,14 @@ import android.view.inputmethod.EditorInfo
 import android.widget.EditText
 import androidx.lifecycle.MutableLiveData
 import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.MTPEnums
 import cn.muchinfo.rma.global.data.AccMgrBizGroupSetData
 import cn.muchinfo.rma.global.data.AccMgrLoginUserData
 import cn.muchinfo.rma.global.data.AccMgrTaaccountSonData
 import cn.muchinfo.rma.global.data.Userlist
 import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.protobuf.protoclasses.ManageServiceMI2
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.future.trade.itemView
@@ -100,7 +102,7 @@ class AddRoleActivity : BaseActivity<RoleSetViewModel>() {
         if (type == "1"){//新增
             viewModel.queryAccMgrTaaccount(type ?: "1")
         }else{//  TODO 查询时和新增期货账户传入的实体不同,具体做时再做修改
-//            viewModel.queryAccMgrTaaccount(type ?: "1",data ?: AccMgrBizGroupSetData())
+            viewModel.queryAccMgrTaaccountBymanager(type ?: "1",data1 ,data1.clientroleid ?: "")
         }
     }
 
@@ -129,295 +131,350 @@ class AddRoleActivity : BaseActivity<RoleSetViewModel>() {
                 }
             }
 
-            linearLayout {
-                background = resources.getDrawable(R.color.white)
-                gravity = Gravity.CENTER_VERTICAL
+            frameLayout {
+                scrollView {
+                    verticalLayout {
 
-                textView {
-                    text = "*"
-                    textColorInt = R.color.rma_star_color
-                    textSizeAuto = 31
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(37)
-                }
-                textView {
-                    text = "登录账号"
-                    textSizeAuto = 31
-                    textColorInt = R.color.rma_black_33
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(10)
-                }
+                        linearLayout {
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
 
-                editText {
-                    isEnabled = type == "1"//登录账号只能在新增时修改
-                    if (type != "1") {
-                        setText(data1.rolename)
-                    }
-                    login_account = this
-                    hint = "请输入登录账号"
-                    background = null
-                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                            textView {
+                                text = "*"
+                                textColorInt = R.color.rma_star_color
+                                textSizeAuto = 31
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(37)
+                            }
+                            textView {
+                                text = "登录账号"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(10)
+                            }
+
+                            editText {
+                                isEnabled = type == "1"//登录账号只能在新增时修改
+                                if (type != "1") {
+                                    setText(data1.logincode)
+                                }
+                                login_account = this
+                                hint = "请输入登录账号"
+                                background = null
+                                inputType = EditorInfo.TYPE_CLASS_TEXT
 //                    setDecimalInputType()
-                    hintColorStr = "#CCCCCC"
-                    textSizeAuto = 31
-                    textColorStr = "#333333"
-                }.lparams(matchParent, autoSize(132)) {
-                    marginStart = autoSize(80)
-                }
-            }.lparams(matchParent, autoSize(132))
+                                hintColorStr = "#CCCCCC"
+                                textSizeAuto = 31
+                                textColorStr = "#333333"
+                            }.lparams(matchParent, autoSize(132)) {
+                                marginStart = autoSize(80)
+                            }
+                        }.lparams(matchParent, autoSize(132))
 
-            itemView()
+                        itemView()
 
-            linearLayout {
-                background = resources.getDrawable(R.color.white)
-                gravity = Gravity.CENTER_VERTICAL
+                        linearLayout {
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
 
-                textView {
-                    text = "*"
-                    textColorInt = R.color.rma_star_color
-                    textSizeAuto = 31
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(37)
-                }
-                textView {
-                    text = "账户名称"
-                    textSizeAuto = 31
-                    textColorInt = R.color.rma_black_33
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(10)
-                }
+                            textView {
+                                text = "*"
+                                textColorInt = R.color.rma_star_color
+                                textSizeAuto = 31
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(37)
+                            }
+                            textView {
+                                text = "账户名称"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(10)
+                            }
 
-                editText {
-                    account_name = this
-                    isEnabled = type == "1" || type == "3"
-                    if (type != "1") {
-                        setText(data1.accountname)
-                    }
-                    hint = "请输入账户名称"
-                    background = null
-                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                            editText {
+                                account_name = this
+                                isEnabled = type == "1" || type == "3"
+                                if (type != "1") {
+                                    setText(data1.accountname)
+                                }
+                                hint = "请输入账户名称"
+                                background = null
+                                inputType = EditorInfo.TYPE_CLASS_TEXT
 //                    setDecimalInputType()
-                    hintColorStr = "#CCCCCC"
-                    textSizeAuto = 31
-                    textColorStr = "#333333"
-                }.lparams(matchParent, autoSize(132)) {
-                    marginStart = autoSize(80)
-                }
-            }.lparams(matchParent, autoSize(132))
+                                hintColorStr = "#CCCCCC"
+                                textSizeAuto = 31
+                                textColorStr = "#333333"
+                            }.lparams(matchParent, autoSize(132)) {
+                                marginStart = autoSize(80)
+                            }
+                        }.lparams(matchParent, autoSize(132))
 
-            itemView()
+                        itemView()
 
-            linearLayout {
-                if (type == "1") {
-                    visibility = View.VISIBLE
-                } else {
-                    visibility = View.GONE
-                }
-                background = resources.getDrawable(R.color.white)
-                gravity = Gravity.CENTER_VERTICAL
-
-                textView {
-                    text = "*"
-                    textColorInt = R.color.rma_star_color
-                    textSizeAuto = 31
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(37)
-                }
-                textView {
-                    text = "登录密码"
-                    textSizeAuto = 31
-                    textColorInt = R.color.rma_black_33
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(10)
-                }
+                        linearLayout {
+                            if (type == "1") {
+                                visibility = View.VISIBLE
+                            } else {
+                                visibility = View.GONE
+                            }
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
+
+                            textView {
+                                text = "*"
+                                textColorInt = R.color.rma_star_color
+                                textSizeAuto = 31
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(37)
+                            }
+                            textView {
+                                text = "登录密码"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(10)
+                            }
 
-                editText {
-                    login_password = this
-                    isEnabled = type == "1" || type == "3"
-                    if (type != "1") {
-                        setText("********")
-                    }
-                    hint = "请输入登录密码"
-                    background = null
-                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                            editText {
+                                login_password = this
+                                isEnabled = type == "1" || type == "3"
+                                if (type != "1") {
+                                    setText("********")
+                                }
+                                hint = "请输入登录密码"
+                                background = null
+                                inputType = EditorInfo.TYPE_CLASS_TEXT
 //                    setDecimalInputType()
-                    hintColorStr = "#CCCCCC"
-                    textSizeAuto = 31
-                    textColorStr = "#333333"
-                }.lparams(matchParent, autoSize(132)) {
-                    marginStart = autoSize(80)
-                }
+                                hintColorStr = "#CCCCCC"
+                                textSizeAuto = 31
+                                textColorStr = "#333333"
+                            }.lparams(matchParent, autoSize(132)) {
+                                marginStart = autoSize(80)
+                            }
 
 
-            }.lparams(matchParent, autoSize(132))
+                        }.lparams(matchParent, autoSize(132))
 
-            itemView()
+                        itemView()
 
-            linearLayout {
-                background = resources.getDrawable(R.color.white)
-                gravity = Gravity.CENTER_VERTICAL
+                        linearLayout {
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
 
-                textView {
-                    text = "*"
-                    textColorInt = R.color.rma_star_color
-                    textSizeAuto = 31
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(37)
-                }
-                textView {
-                    text = "手机号码"
-                    textSizeAuto = 31
-                    textColorInt = R.color.rma_black_33
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(10)
-                }
+                            textView {
+                                text = "*"
+                                textColorInt = R.color.rma_star_color
+                                textSizeAuto = 31
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(37)
+                            }
+                            textView {
+                                text = "手机号码"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(10)
+                            }
 
-                editText {
-                    phone_number = this
-                    isEnabled = type == "1" || type == "3"
-                    if (type == "1") {
-                        setText("")
-                    } else {
-                        setText(data1.mobile)
-                    }
-                    hint = "可用于找回密码"
-                    background = null
-                    inputType = EditorInfo.TYPE_CLASS_PHONE
+                            editText {
+                                phone_number = this
+                                isEnabled = type == "1" || type == "3"
+                                if (type == "1") {
+                                    setText("")
+                                } else {
+                                    setText(data1.mobile)
+                                }
+                                hint = "可用于找回密码"
+                                background = null
+                                inputType = EditorInfo.TYPE_CLASS_PHONE
 //                    setDecimalInputType()
-                    hintColorStr = "#CCCCCC"
-                    textSizeAuto = 31
-                    textColorStr = "#333333"
-                }.lparams(matchParent, autoSize(132)) {
-                    marginStart = autoSize(80)
-                }
-            }.lparams(matchParent, autoSize(132))
-
-            itemView()
-
-            linearLayout {
-                background = resources.getDrawable(R.color.white)
-                gravity = Gravity.CENTER_VERTICAL
-                onThrottleFirstClick {
-                    if (type == "2") {
-                        return@onThrottleFirstClick
-                    }
-                    creatBottomSheetDialog("请选择账户权限", getSelectDataList()) {
-                        roleTypeSelectData.postValue(this)
-                    }
-                }
-                textView {
-                    text = "*"
-                    textColorInt = R.color.rma_star_color
-                    textSizeAuto = 31
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(37)
-                }
-
-                textView {
-                    text = "账户权限"
-                    textSizeAuto = 31
-                    textColorInt = R.color.rma_black_33
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(10)
-                }
-
-                textView {
-                    roleTypeSelectData.bindOptional(context) {
-                        text = it?.value
-                    }
-                    text = data.rolename
-                    textSizeAuto = 31
-                    textColorInt = R.color.rma_black_33
-                }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(80)
-                }
-
-                emptyView()
-
-                imageView {
-                    if (type == "1") {
-                        visibility = View.VISIBLE
-                    } else {
-                        visibility = View.GONE
-                    }
-                    imageResource = R.mipmap.rma_more
-                }.lparams(autoSize(36), autoSize(36)) {
-                    marginEnd = autoSize(25)
-                }
-            }.lparams(matchParent, autoSize(132))
-
-            // TODO 增加期货账户关联功能
+                                hintColorStr = "#CCCCCC"
+                                textSizeAuto = 31
+                                textColorStr = "#333333"
+                            }.lparams(matchParent, autoSize(132)) {
+                                marginStart = autoSize(80)
+                            }
+                        }.lparams(matchParent, autoSize(132))
+
+                        itemView()
+
+                        linearLayout {
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                if (type == "2") {
+                                    return@onThrottleFirstClick
+                                }
+                                creatBottomSheetDialog("请选择账户权限", getSelectDataList()) {
+                                    roleTypeSelectData.postValue(this)
+                                }
+                            }
+                            textView {
+                                text = "*"
+                                textColorInt = R.color.rma_star_color
+                                textSizeAuto = 31
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(37)
+                            }
 
-            linearLayout {
+                            textView {
+                                text = "账户权限"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(10)
+                            }
 
-            }.lparams(matchParent, wrapContent)
+                            textView {
+                                roleTypeSelectData.bindOptional(context) {
+                                    text = it?.value
+                                }
+                                text = data.rolename
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(80)
+                            }
 
-            /**
-             * 期货账户的列表
-             */
-            recyclerView {
-                background = resources.getDrawable(R.color.add_role_bg_color)
-                adapter = addFutureAccountRoleAdapter
-            }.lparams(matchParent, wrapContent)
+                            emptyView()
+
+                            imageView {
+                                if (type == "1") {
+                                    visibility = View.VISIBLE
+                                } else {
+                                    visibility = View.GONE
+                                }
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(36), autoSize(36)) {
+                                marginEnd = autoSize(25)
+                            }
+                        }.lparams(matchParent, autoSize(132))
+
+
+                        linearLayout {
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
+                            textView {
+                                text = "*"
+                                textColorInt = R.color.rma_star_color
+                                textSizeAuto = 31
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(37)
+                            }
+                            textView {
+                                text = "授权期货账户"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(10)
+                            }
 
-            viewModel.futureDataList.bindOptional(context) {
-                addFutureAccountRoleAdapter.setNewData(it)
-            }
+                            textView {
+                                if (type == "2"){
+                                    text = "已勾选期货账户"
+                                }else{
+                                    text = "请勾选期货账户"
+                                }
+
+                                textColorInt = R.color.rma_yellow_text_color
+                                textSizeAuto = 31
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(40)
+                            }
+                        }.lparams(matchParent, autoSize(132))
 
 
-            view {
+                        /**
+                         * 期货账户的列表
+                         */
+                        recyclerView {
+                            background = resources.getDrawable(R.color.add_role_bg_color)
+                            adapter = addFutureAccountRoleAdapter
+                        }.lparams(matchParent, wrapContent){
+                            bottomMargin = autoSize(145)
+                        }
 
-            }.lparams(autoSize(1), 0, 1f)
+                        viewModel.futureDataList.bindOptional(context) {
+                            addFutureAccountRoleAdapter.setNewData(it)
+                        }
 
+                    }
+                }
 
-            linearLayout {
-                background = resources.getDrawable(R.color.white)
-                gravity = Gravity.CENTER_VERTICAL
-                textView {
-                    onThrottleFirstClick {
-                        if (check().not()) {
-                            return@onThrottleFirstClick
-                        }
-                        if (type == "1") {// 1 新增 2 详情 3 修改 4 锁定 5 注销
-                            viewModel.LoginaccountOperateReq(
-                                operatetype = 3,
-                                logincode = login_account.text.toString(),
-                                accountname = account_name.text.toString(),
-                                password = login_password.text.toString(),
-                                mobile = phone_number.text.toString(),
-                                roleids = arrayListOf(roleTypeSelectData.value?.id?.toLong() ?: 0)
-                            ) {
-                                finish()
+                linearLayout {
+                    background = resources.getDrawable(R.color.white)
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        onThrottleFirstClick {
+                            if (check().not()) {
+                                return@onThrottleFirstClick
                             }
-                        } else if (type == "3") {//修改
-                            viewModel.LoginaccountOperateReq(
-                                operatetype = 4,
-                                userid = data1.userid?.toLong() ?: 0,
-                                loginid = data1.loginid?.toLong() ?: 0,
-                                logincode = login_account.text.toString(),
-                                accountname = account_name.text.toString(),
-                                password = login_password.text.toString(),
-                                mobile = phone_number.text.toString(),
-                                roleids = arrayListOf(roleTypeSelectData.value?.id?.toLong() ?: 0)
-                            ) {
-                                finish()
+                            if (type == "1") {// 1 新增 2 详情 3 修改 4 锁定 5 注销
+                                viewModel.LoginaccountOperateReq(
+                                    operatetype = 3,
+                                    userid = GlobalDataCollection.instance?.loginRsp?.userID?.toLong() ?: 0,
+                                    logincode = login_account.text.toString(),
+                                    accountname = account_name.text.toString(),
+                                    password = login_password.text.toString(),
+                                    mobile = phone_number.text.toString(),
+                                    logintaaccounts = getSelectFuture(),
+                                    roleids = arrayListOf(roleTypeSelectData.value?.id?.toLong() ?: 0)
+                                ) {
+                                    finish()
+                                }
+                            } else if (type == "3") {//修改
+                                viewModel.LoginaccountOperateReq(
+                                    operatetype = 4,
+                                    userid = data1.userid?.toLong() ?: 0,
+                                    loginid = data1.loginid?.toLong() ?: 0,
+                                    logincode = login_account.text.toString(),
+                                    accountname = account_name.text.toString(),
+                                    password = login_password.text.toString(),
+                                    mobile = phone_number.text.toString(),
+                                    logintaaccounts = getSelectFuture(),
+                                    roleids = arrayListOf(roleTypeSelectData.value?.id?.toLong() ?: 0)
+                                ) {
+                                    finish()
+                                }
                             }
                         }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.mipmap.rma_submit_bg
+                        text = "完成"
+                        textColorInt = R.color.white
+                        textSizeAuto = 38
+                    }.lparams(matchParent, autoSize(119)) {
+                        marginStart = autoSize(60)
+                        marginEnd = autoSize(60)
                     }
-                    gravity = Gravity.CENTER
-                    backgroundResource = R.mipmap.rma_submit_bg
-                    text = "完成"
-                    textColorInt = R.color.white
-                    textSizeAuto = 38
-                }.lparams(matchParent, autoSize(119)) {
-                    marginStart = autoSize(60)
-                    marginEnd = autoSize(60)
+                }.lparams(matchParent, autoSize(144)){
+                    gravity = Gravity.BOTTOM
                 }
-            }.lparams(matchParent, autoSize(144))
+            }.lparams(matchParent, matchParent)
+
+
         }
     }
 
     /**
+     * 获取提交资料时期货账户的列表
+     * @return List<ManageServiceMI2.LoginTaaccount>
+     */
+    fun getSelectFuture() : List<ManageServiceMI2.LoginTaaccount>{
+        val loginTaaccountDataList = arrayListOf<ManageServiceMI2.LoginTaaccount>()
+        viewModel.futureDataList.value?.forEach {
+            val loginTaaccountData = ManageServiceMI2.LoginTaaccount.newBuilder()
+            if (it.isSelect == 1){
+                loginTaaccountData.setAccountid(it.accountid?.toLong() ?: 0)
+                loginTaaccountDataList.add(loginTaaccountData.build())
+            }
+        }
+        return loginTaaccountDataList
+    }
+
+    /**
      * 可选择的账户角色
      */
     fun getSelectDataList(): List<SelectData> {
@@ -450,6 +507,12 @@ class AddRoleActivity : BaseActivity<RoleSetViewModel>() {
             ToastUtils.showLong("密码最少为6位")
             return false
         }
+
+        val selectData = viewModel.futureDataList.value?.find { it.isSelect == 1 }
+        if (selectData?.accountid.isNullOrEmpty()){
+            ToastUtils.showLong("请选择期货账户")
+            return false
+        }
         return true
     }
 

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

@@ -95,6 +95,74 @@ class RoleSetViewModel : BaseViewModel() {
         futureDataList.postValue(newWrStandList)
     }
 
+    /**
+     * 查询账户管理/期货账户 (用于管理账户修改)
+     */
+    fun queryAccMgrTaaccountBymanager(type: String, data: Userlist, roleid: String = "") {
+        val params = mutableMapOf<String, String>().apply {
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+        }
+        MyApplication.getInstance()?.accountManager?.queryAccMgrTaaccount(params = params) { isSuccess, respData, error ->
+            if (isSuccess) {
+                resetAccMgrTaaccountBymanager(respData ?: arrayListOf(), type, data, roleid)
+            }
+        }
+    }
+
+    /**
+     * 对期货账户的主列表和子列表进行合并
+     */
+    fun resetAccMgrTaaccountBymanager(
+        oldList: List<AccMgrTaaccountData>,
+        type: String,
+        data: Userlist,
+        roleid: String
+    ) {
+        val newDataList = arrayListOf<AccMgrTaaccountSonData>()
+        oldList.forEach {
+//                newDataList.add(it.mainAcc ?: AccMgrTaaccountSonData())
+            it.subacclist?.forEach {
+//                if (it.relateduserid == roleid) {
+                    newDataList.add(it)
+//                }
+            }
+        }
+        futureDataList.postValue(newDataList)
+
+        if (type == "2") {
+            val newFutureList = arrayListOf<AccMgrTaaccountSonData>()
+            newDataList.forEach { result ->
+                LogUtils.eTag("dasdadsadasd", result.accountid)
+                val findData = data.acclist?.find {
+                    it.accountid == result.accountid
+                }
+                if (findData?.accountid.isNullOrEmpty()) {
+//                        newFutureList.add(result)
+                } else {
+                    newFutureList.add(result.copy(isSelect = 1))
+                }
+            }
+            futureDataList.postValue(newFutureList)
+        } else {
+            val newFutureList = arrayListOf<AccMgrTaaccountSonData>()
+            newDataList.forEach { result ->
+                LogUtils.eTag("dasdadsadasd", result.accountid)
+                val findData = data.acclist?.find {
+                    it.accountid == result.accountid
+                }
+                if (findData?.accountid.isNullOrEmpty()) {
+                    newFutureList.add(result)
+                } else {
+                    newFutureList.add(result.copy(isSelect = 1))
+                }
+            }
+            futureDataList.postValue(newFutureList)
+        }
+
+
+    }
+
+
 
     /**
      * 查询账户管理/期货账户

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

@@ -38,14 +38,14 @@ class ChangePasswordActivity : BaseActivity<ChangePasswordViewModel>(){
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         verticalLayout {
-            loadingDialog = createLoadingDialog(hintStr = "请求中..")
+            loadingDialog = createLoadingDialog(hintStr = "请求中...")
             loadingDialog?.bindTaskStatus(context, viewModel.loadingDialogStatus)
             val marpadding = autoSize(32)
             background = resources.getDrawable(R.color.white)
             topBar {
                 commonLeftButton()
                 commonTitle {
-                    text = "修改登录密码"
+                    text = "登录密码修改"
                 }
             }
 

+ 5 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/ChangePasswordViewModel.kt

@@ -31,6 +31,8 @@ class ChangePasswordViewModel : BaseViewModel() {
      */
     fun modifyPwd(
         oldpwd: String, newPwd: String,
+        ModifyPwdType : Int = 0,
+        ModifyPwdID : Long = 0,
         isSuccess: (isCompleted: Boolean) -> Unit
     ){
         val sha256Encrypt = SHA256Encrypt()
@@ -38,7 +40,9 @@ class ChangePasswordViewModel : BaseViewModel() {
         GlobalScope.launch {
             MyApplication.getInstance()?.accountManager?.modifyPwd(oldpwd = sha256Encrypt.getEncryptString(sha256Encrypt.encrypt(
                 GlobalDataCollection.instance?.loginRsp?.loginID.toString() + oldpwd)).toLowerCase(),newPwd = sha256Encrypt.getEncryptString(sha256Encrypt.encrypt(
-                GlobalDataCollection.instance?.loginRsp?.loginID.toString() + newPwd)).toLowerCase()){isCompleted, err ->
+                GlobalDataCollection.instance?.loginRsp?.loginID.toString() + newPwd)
+            ).toLowerCase(),ModifyPwdType = 1,ModifyPwdID = GlobalDataCollection.instance?.loginRsp?.loginID ?: 0
+            ){isCompleted, err ->
                 if (isCallBack.not()){
                     if (isCompleted){
                         isCallBack = true

+ 3 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/NewChangePasswordActivity.kt

@@ -0,0 +1,3 @@
+package cn.muchinfo.rma.view.base.home.set
+
+class NewChangePasswordActivity

+ 12 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/NewChangePasswordViewModel.kt

@@ -0,0 +1,12 @@
+package cn.muchinfo.rma.view.base.home.set
+
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+/**
+ * 某些人新设计的修改密码页面的viewmodel
+ */
+class NewChangePasswordViewModel : BaseViewModel(){
+
+
+
+}

+ 70 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/about/AboutActivity.kt

@@ -0,0 +1,70 @@
+package cn.muchinfo.rma.view.base.main.about
+
+import android.annotation.SuppressLint
+import android.os.Bundle
+import android.view.Gravity
+import cn.muchinfo.rma.BuildConfig
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import org.jetbrains.anko.*
+
+/**
+ * 关于页面
+ */
+class AboutActivity : BaseActivity<AboutViewModel>(){
+
+    @SuppressLint("SetTextI18n")
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.white)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "关于我们"
+                }
+            }
+
+            imageView {
+                imageResource = R.mipmap.tjmd_about_icon
+            }.lparams(autoSize(480), autoSize(240)) {
+                gravity = Gravity.CENTER_HORIZONTAL
+                topMargin = -autoSize(150)
+            }
+
+            textView {
+                text = "版本号V" + BuildConfig.VERSION_NAME
+            }.lparams(wrapContent, wrapContent){
+                gravity = Gravity.CENTER_HORIZONTAL
+                topMargin = autoSize(20)
+                bottomMargin = autoSize(20)
+            }
+
+            itemView()
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    text = "版本更新"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent){
+                    marginStart = autoSize(36)
+                }
+
+                emptyView()
+
+                imageView {
+                    imageResource = R.mipmap.rma_more
+                }.lparams(autoSize(40), autoSize(40)){
+                    marginEnd = autoSize(36)
+                }
+            }.lparams(matchParent, autoSize(100))
+
+        }
+    }
+
+}

+ 8 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/about/AboutViewModel.kt

@@ -0,0 +1,8 @@
+package cn.muchinfo.rma.view.base.main.about
+
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+class AboutViewModel : BaseViewModel(){
+
+
+}

+ 26 - 15
RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ContentAdapter.java

@@ -73,14 +73,24 @@ public class ContentAdapter extends RecyclerView.Adapter<ContentAdapter.ItemView
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<ContractData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                ContractData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                ContractData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -94,6 +104,7 @@ public class ContentAdapter extends RecyclerView.Adapter<ContentAdapter.ItemView
     @Override
     public void onBindViewHolder(@NonNull final ItemViewHolder itemViewHolder, int i) {
         this.index = i;
+        ContractData data = datas.get(i);
         itemViewHolder.tvLeftTitle.setText(datas.get(i).getNickname());
         itemViewHolder.tv_left_bottom_title.setText(datas.get(i).getContractno());
         //右边滑动部分
@@ -108,7 +119,7 @@ public class ContentAdapter extends RecyclerView.Adapter<ContentAdapter.ItemView
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -199,15 +210,15 @@ public class ContentAdapter extends RecyclerView.Adapter<ContentAdapter.ItemView
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
-            }
-        });
-        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
+//        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
+//            @Override
+//            public void onClick(View view) {
+//                setPosition(i);
+//            }
+//        });
         //出入库登记
         itemViewHolder.warehouse_register.setOnClickListener(view -> {
             Intent intent = new Intent();

+ 20 - 15
RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/contraceui/SpotContractAdapter.java

@@ -71,14 +71,24 @@ public class SpotContractAdapter extends RecyclerView.Adapter<SpotContractAdapte
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<ContractData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                ContractData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                ContractData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -107,7 +117,7 @@ public class SpotContractAdapter extends RecyclerView.Adapter<SpotContractAdapte
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position) {
+        if (contractData.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -118,15 +128,10 @@ public class SpotContractAdapter extends RecyclerView.Adapter<SpotContractAdapte
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
-            }
-        });
-        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
+
         if (type.equals("2")){
             if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_spotcontract","client_spotcontract_unaduit","client_spotcontract_cancel")){
                 if (contractData.getContracctstatus().equals("1")){

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/report/PricingReportContentAdapter.java

@@ -26,6 +26,7 @@ import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.data.AreaSpotplReportData;
 import cn.muchinfo.rma.global.data.AreaStockReportData;
 import cn.muchinfo.rma.global.data.AreaSumPLData;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ExposureReportData;
 import cn.muchinfo.rma.global.data.FinanceReportData;
 import cn.muchinfo.rma.global.data.FutureDataReportData;
@@ -95,14 +96,24 @@ public class PricingReportContentAdapter extends RecyclerView.Adapter<PricingRep
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<SCMiddleGoodsReportData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                SCMiddleGoodsReportData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                SCMiddleGoodsReportData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -134,7 +145,7 @@ public class PricingReportContentAdapter extends RecyclerView.Adapter<PricingRep
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -144,7 +155,7 @@ public class PricingReportContentAdapter extends RecyclerView.Adapter<PricingRep
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         itemViewHolder.spot_details.setVisibility(View.GONE);

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

@@ -108,8 +108,10 @@ class ReportFragment : BaseFragment<ReportQueryViewModel>(){
             uiList.add(spotEarningReportUI.root)
         }
 
-        newTabsArray.add("定价报表")
-        uiList.add(pricingReportUI.root)
+        if (GlobalDataCollection.instance?.getSecondLevelMenu(firstCode = "client_report",secondCode = "client_report_pricing") == true) {
+            newTabsArray.add("定价报表")
+            uiList.add(pricingReportUI.root)
+        }
 
         showIndex.postValue(uiList.size)
         newPagerAdapter = object : PagerAdapter() {

+ 20 - 15
RMA/app/src/main/java/cn/muchinfo/rma/view/base/sale/contract/SpotSellContractAdapter.java

@@ -71,14 +71,24 @@ public class SpotSellContractAdapter extends RecyclerView.Adapter<SpotSellContra
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<ContractData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                ContractData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                ContractData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -107,7 +117,7 @@ public class SpotSellContractAdapter extends RecyclerView.Adapter<SpotSellContra
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position) {
+        if (contractData.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -118,15 +128,10 @@ public class SpotSellContractAdapter extends RecyclerView.Adapter<SpotSellContra
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
-            }
-        });
-        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
+
         if (type.equals("2")){
             if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_spotcontract","client_spotcontract_unaduit","client_spotcontract_cancel")){
                 if (contractData.getContracctstatus().equals("1")){

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


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


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


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


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