Преглед изворни кода

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

Liu.bolan пре 4 година
родитељ
комит
3730ab9664
34 измењених фајлова са 209 додато и 94 уклоњено
  1. 0 4
      RMA/app/src/main/java/cn/muchinfo/rma/business/contract/ContractManager.kt
  2. 1 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/GlobalDataCollection.kt
  3. 6 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/dao/AddressDao.kt
  4. 17 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/HedgePlanData.kt
  5. 5 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt
  6. 11 8
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/exposure/ExposureViewModel.kt
  7. 2 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/futureset/FutureSetViewModel.kt
  8. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/business/BusinessManagementViewModel.kt
  9. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/AddSpotGoodsActivity.kt
  10. 6 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/CommodityInformationViewModel.kt
  11. 4 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/NewCommodityInformationViewModel.kt
  12. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/newhedge/NewHedgeSpeciesViewHolder.kt
  13. 6 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/viewholder/InsuredVarietyViewHolder.kt
  14. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/AddContractActivity.kt
  15. 10 7
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/ContractViewModel.kt
  16. 4 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/AddCustomerDataActivity.kt
  17. 6 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/CustomerDataActivity.kt
  18. 6 6
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/CustomerDataViewModel.kt
  19. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/financial/FinancialViewModel.kt
  20. 23 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/AddHedgePlanActivity.kt
  21. 10 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/HedgeDetailsActivity.kt
  22. 9 7
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/HedgePlanViewModel.kt
  23. 4 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/InventoryManagerViewModel.kt
  24. 2 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/registration/RegistrationViewModel.kt
  25. 6 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryViewModel.kt
  26. 0 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/RoleSetViewModel.kt
  27. 3 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/spotmarket/SpotMarketDetailsActivity.kt
  28. 19 7
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/spotmarket/SpotMarketPriceViewModel.kt
  29. 0 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/tradingquery/TradingQueryActivity.kt
  30. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/warehouse/WarehouseInformationViewModel.kt
  31. 8 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ContentAdapter.java
  32. 2 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ProcurementViewModel.kt
  33. 2 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/sale/SaleViewModel.kt
  34. 28 16
      RMA/app/src/main/res/layout/layout_item_content.xml

+ 0 - 4
RMA/app/src/main/java/cn/muchinfo/rma/business/contract/ContractManager.kt

@@ -61,19 +61,16 @@ class ContractManager {
         SpotContractID: String = "",
         callback: (isCompleted: Boolean, err: Error?) -> Unit
     ) {
-
         val tradeSocketManager = MyApplication.getInstance()?.tradeSocketManager.guard {
             callback(false, Error("交易链路未初始化"))
             return
         }
-
         val reqPacket = ContractAdapter.getOneContractReqInfo(
             contractInfo = contractInfo,
             OperateType = OperateType,
             Remark = Remark,
             SpotContractID = SpotContractID
         )
-
         tradeSocketManager.send(
             reqPacket,
             FunCode.SpotContractOperateRsp,
@@ -87,7 +84,6 @@ class ContractManager {
                     // 发送数据失败
                     callback(false, err)
                 }
-
             }
         )
     }

+ 1 - 0
RMA/app/src/main/java/cn/muchinfo/rma/global/GlobalDataCollection.kt

@@ -42,6 +42,7 @@ class GlobalDataCollection : BaseGlobalData() {
      */
     fun getEnumList(enumCode : String) : List<EnumDicEntity>{
         val enumList = arrayListOf<EnumDicEntity>()
+
         enumDicEntityList.forEach {
             if (it.enumdiccode == enumCode){
                 enumList.add(it)

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

@@ -49,4 +49,10 @@ interface AddressDao {
      */
     @Insert(onConflict = OnConflictStrategy.REPLACE)
     fun insert(errorCodes: List<AddressEntity>)
+
+    /**
+     * 删除错误信息
+     */
+    @Query("DELETE FROM ERRORCODE")
+    fun deleteAll()
 }

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

@@ -44,7 +44,11 @@ data class HedgePlanData(
     val enumdicname : String? = "",//单位
     val audittime : String? = "",//审核时间
     val createtime : String? = "",//创建时间
-    val updatetime : String? = ""//更新时间
+    val updatetime : String? = "",//更新时间
+    val currencyid : String? = "",//币种id
+    val currencyname : String? = "",//币种名称
+    val tradeuserid : String? = "",//交易用户id
+    val tradeusername : String? = ""//交易用户名称
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
@@ -66,6 +70,12 @@ data class HedgePlanData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
         parcel.readString()
     ) {
     }
@@ -87,10 +97,16 @@ data class HedgePlanData(
         parcel.writeString(wrstandardid)
         parcel.writeString(wrstandardname)
         parcel.writeInt(indexSelect)
+        parcel.writeString(unitid)
+        parcel.writeString(deliverygoodscode)
         parcel.writeString(enumdicname)
         parcel.writeString(audittime)
         parcel.writeString(createtime)
         parcel.writeString(updatetime)
+        parcel.writeString(currencyid)
+        parcel.writeString(currencyname)
+        parcel.writeString(tradeuserid)
+        parcel.writeString(tradeusername)
     }
 
     override fun describeContents(): Int {

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

@@ -11,9 +11,9 @@ object Constant {
 //    const val baseurl = "http://192.168.31.114:8080/cfg?key=test_114" // shenzhen01  123123
 //    const val baseurl = "http://192.168.31.220:8080/cfg?key=test_220"//李倩
 //      const val baseurl = "http://192.168.30.211:8080/cfg?key=test_211"// 瑶姐
-//    const val baseurl = "http://192.168.31.175:8080/cfg?key=test_175" // 8888  123123
+    const val baseurl = "http://192.168.31.175:8080/cfg?key=test_175" // 8888  123123
 //    const val baseurl = "http://192.168.31.223:8080/cfg?key=test_223"
-    const val baseurl = "http://192.168.31.174:8080/cfg?key=test_174"// 邓工
+//    const val baseurl = "http://192.168.31.174:8080/cfg?key=test_174"// 邓工
 
     /**
      * 用sp存储基础url的key
@@ -149,4 +149,7 @@ object Constant {
 
     /** 记录最后一次商品信息请求的时间 **/
     const val QUERY_GOODS_TIME = "query_goods_time"
+
+    /** 搞一个标示记录成功申请成功了客户资料 **/
+    const val SUCCESS_ADD_CUSTOMER = "SUCCESS_ADD_CUSTOMER"
 }

+ 11 - 8
RMA/app/src/main/java/cn/muchinfo/rma/view/base/exposure/ExposureViewModel.kt

@@ -82,7 +82,8 @@ class ExposureViewModel : BaseViewModel(){
      */
     fun queryExposureDetail(middleGoodsId : String){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("middlegoodsid", middleGoodsId)
         }
 
@@ -98,7 +99,7 @@ class ExposureViewModel : BaseViewModel(){
      */
     fun queryRealtimeExposurePosition(middleGoodsId : String){
         val params = mutableMapOf<String, String>().apply {
-            put("areaUserId", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("middleGoodsId", middleGoodsId)
         }
 
@@ -175,7 +176,7 @@ class ExposureViewModel : BaseViewModel(){
      */
     fun queryRealtimeExposure(){
         val params = mutableMapOf<String, String>().apply {
-            put("AreaUserID", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
         }
 
         MyApplication.getInstance()?.exposureManager?.queryRealtimeExposure(params = params){isSuccess, respData, error ->
@@ -211,7 +212,8 @@ class ExposureViewModel : BaseViewModel(){
      */
     fun queryExposureSpot(){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
 
         MyApplication.getInstance()?.exposureManager?.queryExposureSpot(params = params){isSuccess, respData, error ->
@@ -226,7 +228,7 @@ class ExposureViewModel : BaseViewModel(){
      */
     fun queryExposureHedgePosition(){
         val params = mutableMapOf<String, String>().apply {
-            put("areaUserId", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
         }
 
         MyApplication.getInstance()?.exposureManager?.queryExposureHedgePosition(params = params){isSuccess, respData, error ->
@@ -241,7 +243,7 @@ class ExposureViewModel : BaseViewModel(){
      */
     fun queryHisExposure(){
         val params = mutableMapOf<String, String>().apply {
-            put("areaUserId", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("lastNum", "30")
         }
         MyApplication.getInstance()?.exposureManager?.queryHisExposure(params = params){isSuccess, respData, error ->
@@ -257,7 +259,8 @@ class ExposureViewModel : BaseViewModel(){
      */
     fun queryExposureSpotDetail(deliverygoodsid : String){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("deliverygoodsid", deliverygoodsid)
         }
         MyApplication.getInstance()?.exposureManager?.queryExposureSpotDetail(params = params){isSuccess, respData, error ->
@@ -273,7 +276,7 @@ class ExposureViewModel : BaseViewModel(){
      */
     fun queryExposureHedgePositionDetail(goodsId : String){
         val params = mutableMapOf<String, String>().apply {
-            put("areaUserId", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("goodsId", goodsId)
         }
         MyApplication.getInstance()?.exposureManager?.queryExposureHedgePositionDetail(params = params){isSuccess, respData, error ->

+ 2 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/futureset/FutureSetViewModel.kt

@@ -138,7 +138,8 @@ class FutureSetViewModel : BaseViewModel(){
      */
     fun queryDeliveryGoods(type : String,data : AccMgrBizGroupSetData = AccMgrBizGroupSetData()) {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             if (type == "1"){
                 put("excludecfg", "1")
             }

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

@@ -58,7 +58,7 @@ class BusinessManagementViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 somePriceList.postValue(datanewlist)
@@ -72,7 +72,7 @@ class BusinessManagementViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 settlementList.postValue(datanewlist)

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

@@ -222,7 +222,7 @@ class AddSpotGoodsActivity : BaseActivity<CommodityInformationViewModel>() {
                                 spot_variety_code_edittext = this
                                 hint = "请输入商品代码"
                                 background = null
-                                inputType = EditorInfo.TYPE_CLASS_TEXT
+                                inputType = EditorInfo.TYPE_TEXT_VARIATION_PASSWORD
 //                                setDecimalInputType()
                                 hintColorStr = "#CCCCCC"
                                 textSizeAuto = 31

+ 6 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/CommodityInformationViewModel.kt

@@ -137,7 +137,8 @@ class CommodityInformationViewModel : BaseViewModel() {
         select: (AvaildGoodsGroupData.() -> Unit)? = null
     ) {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("middlegoodsid", middlegoodsid)
         }
         MyApplication.getInstance()?.commodityManager?.queryMiddleGoodsDetail(params = params) { isSuccess, respData, error ->
@@ -200,7 +201,8 @@ class CommodityInformationViewModel : BaseViewModel() {
      */
     fun queryGoodsGroup() {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
 //            put("deliverygoodsid", deliverygoodsid)
         }
         MyApplication.getInstance()?.futureManager?.queryGoodsGroup(params = params) { isSuccess, respData, _ ->
@@ -607,7 +609,8 @@ class CommodityInformationViewModel : BaseViewModel() {
      */
     fun queryWrStandardDetails(deliverygoodsid: String) {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("deliverygoodsid", deliverygoodsid)
         }
         MyApplication.getInstance()?.commodityManager?.queryDeliveryGoodsDetail(params = params) { isSuccess, respData, _ ->

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

@@ -50,7 +50,8 @@ class NewCommodityInformationViewModel : BaseViewModel() {
      */
     fun queryDeliveryGoodsDetailList() {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
         MyApplication.getInstance()?.commodityManager?.queryDeliveryGoodsDetail(params = params) { isSuccess, respData, _ ->
             if (isSuccess) {
@@ -65,7 +66,8 @@ class NewCommodityInformationViewModel : BaseViewModel() {
      */
     fun queryMiddleGoodsDetailList() {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
         MyApplication.getInstance()?.commodityManager?.queryMiddleGoodsDetail(params = params) { isSuccess, respData, error ->
             if (isSuccess) {

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

@@ -95,7 +95,7 @@ class NewHedgeSpeciesViewHolder(
                     }
                     textView {
                         data.bindOptional(context){
-                            text = "套利比例" + it?.mg?.evaluateratio?.toPercentage()
+                            text = "套利比例100%"
                         }
                         textSizeAuto = 25
                         textColorInt = R.color.rma_green_color

+ 6 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/viewholder/InsuredVarietyViewHolder.kt

@@ -3,6 +3,7 @@ package cn.muchinfo.rma.view.base.home.commodity.viewholder
 import android.view.Gravity
 import android.view.View
 import android.view.inputmethod.EditorInfo
+import android.widget.EditText
 import androidx.appcompat.app.AppCompatActivity
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.MTPEnums
@@ -35,6 +36,9 @@ class InsuredVarietyViewHolder(
 ) : BaseViewHolder<SpotInfoData>(activity) {
     override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
 
+    //套保系数
+    lateinit var hedge_coefficient : EditText
+
     override fun _FrameLayout.createContentView() {
         verticalLayout {
             linearLayout {
@@ -47,6 +51,7 @@ class InsuredVarietyViewHolder(
 
                     activity.creatGoodsHedgeBottomSheetDialog("请选择套保品种", viewModel.getRemainingMiddleGoodsList()) {
                         viewModel.changeMiddleGoodsList(type = "4",id = dataIndex.plus(1).toString(),ano = "",middlegoodsId = this.goodsgroupid ?: "",enumdicnameid = this.goodunitid ?: "",enumdicname = this.enumdicname ?: "" ?: "",middleGoodsName = this.goodsgroupname ?: "")
+                        hedge_coefficient.setText("")
                     }
                 }
                 textView {
@@ -160,6 +165,7 @@ class InsuredVarietyViewHolder(
                 }
 
                 editText {
+                    hedge_coefficient = this
                     isEnabled = !(operationType == "4" || operationType == "3" || operationType == "5")
                     data.bindOptional(context){
                         if (it?.value.isNullOrEmpty().not()){

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

@@ -527,7 +527,7 @@ class AddContractActivity : BaseActivity<ContractViewModel>() {
                             gravity = Gravity.CENTER_VERTICAL
 
                             textView {
-                                textResource = R.string.business_license
+                                text = "合同附件"
                                 textSizeAuto = 31
                                 textColorInt = R.color.rma_black_33
                             }.lparams(wrapContent, wrapContent) {

+ 10 - 7
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/ContractViewModel.kt

@@ -211,7 +211,8 @@ class ContractViewModel : BaseViewModel() {
      */
     fun queryDeliveryGoods(){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
         MyApplication.getInstance()?.commodityManager?.queryDeliveryGoods(params = params) { isSuccess, respData, error ->
             if (isSuccess) {
@@ -227,7 +228,8 @@ class ContractViewModel : BaseViewModel() {
      */
     fun queryDeliveryGoodsDetail(deliverygoodsid : String){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("deliverygoodsid",deliverygoodsid)
         }
         MyApplication.getInstance()?.commodityManager?.queryDeliveryGoodsDetail(params = params) { isSuccess, respData, error ->
@@ -270,7 +272,7 @@ class ContractViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 unSubmitList.postValue(datanewlist)
@@ -284,7 +286,7 @@ class ContractViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 toAuditList.postValue(datanewlist)
@@ -298,7 +300,7 @@ class ContractViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 performanceList.postValue(datanewlist)
@@ -312,7 +314,7 @@ class ContractViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 finishList.postValue(datanewlist)
@@ -329,7 +331,8 @@ class ContractViewModel : BaseViewModel() {
     fun queryContract(QueryType: String) {
 
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("querytype", QueryType)
         }
 

+ 4 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/AddCustomerDataActivity.kt

@@ -449,6 +449,7 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
                                 cardType.bindOptional(context) {
                                     it.let {
                                         text = it?.value?.isBlankString()
+                                        textColorInt = R.color.rma_black_33
                                     }
                                 }
                                 document_type_text = this
@@ -540,7 +541,7 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
 
                             editText {
                                 if (status != "1") {
-                                    setText(data.cardnum?.isBlankString())
+                                    setText(data.legalpersonname?.isBlankString())
                                 }
                                 if (status != "1" && status != "2") {
                                     isEnabled = false
@@ -581,7 +582,7 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
 
                             editText {
                                 if (status != "1") {
-                                    setText(data.cardnum?.isBlankString())
+                                    setText(data.taxpayernum?.isBlankString())
                                 }
                                 if (status != "1" && status != "2") {
                                     isEnabled = false
@@ -1600,6 +1601,7 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
                 }
 
                 viewModel.loadingDialogStatus.value = TaskUiModel.success(msg = "提交成功")
+                SPUtils.getInstance().put(Constant.SUCCESS_ADD_CUSTOMER,1)//记录申请成功了
                 finish()
             }
         }

+ 6 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/CustomerDataActivity.kt

@@ -17,8 +17,10 @@ import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.BaseUI
+import cn.muchinfo.rma.view.base.app.Constant
 import com.blankj.utilcode.util.ActivityUtils
 import com.blankj.utilcode.util.ConvertUtils
+import com.blankj.utilcode.util.SPUtils
 import com.blankj.utilcode.util.ToastUtils
 import com.qmuiteam.qmui.util.QMUIDisplayHelper
 import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
@@ -179,6 +181,10 @@ class CustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
 
     override fun onResume() {
         super.onResume()
+        if (SPUtils.getInstance().getInt(Constant.SUCCESS_ADD_CUSTOMER,0) == 1){
+            segment.selectTab(1)
+            SPUtils.getInstance().put(Constant.SUCCESS_ADD_CUSTOMER,0)
+        }
         viewModel.queryUserInfo(type = "1")
         viewModel.queryUserInfo(type = "2")
         viewModel.queryUserInfo(type = "3")

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

@@ -57,7 +57,7 @@ class CustomerDataViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 unSubmitList.postValue(datanewlist)
@@ -71,7 +71,7 @@ class CustomerDataViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 toAuditList.postValue(datanewlist)
@@ -85,7 +85,7 @@ class CustomerDataViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 normalList.postValue(datanewlist)
@@ -99,7 +99,7 @@ class CustomerDataViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 disableList.postValue(datanewlist)
@@ -124,14 +124,14 @@ class CustomerDataViewModel : BaseViewModel() {
                     "1" -> {    // 未提交  以下是狗屎一样的处理办法,排序老是让终端排,垃圾
                         val newList = respData?.toArrayList()
                         newList?.sortWith(Comparator { t1, t2 ->
-                            (TimeUtils.string2Millis(t1.audittime) - TimeUtils.string2Millis(t2.audittime)).toInt()
+                            (TimeUtils.string2Millis(t1.createtime) - TimeUtils.string2Millis(t2.createtime)).toInt()
                         })
                         unSubmitList.postValue(newList)
                     }
                     "2" -> {    // 待审核 mmp 根本没有返回审核时间
                         val newList = respData?.toArrayList()
                         newList?.sortWith(Comparator { t1, t2 ->
-                            (TimeUtils.string2Millis(t1.audittime) - TimeUtils.string2Millis(t2.audittime)).toInt()
+                            (TimeUtils.string2Millis(t1.createtime) - TimeUtils.string2Millis(t2.createtime)).toInt()
                         })
                         toAuditList.postValue(newList)
                     }

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

@@ -43,7 +43,7 @@ class FinancialViewModel : BaseViewModel(){
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 paymentList.postValue(datanewlist)
@@ -57,7 +57,7 @@ class FinancialViewModel : BaseViewModel(){
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 invoiceList.postValue(datanewlist)

+ 23 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/AddHedgePlanActivity.kt

@@ -99,12 +99,15 @@ class AddHedgePlanActivity : BaseActivity<HedgePlanViewModel>() {
             )
             // TODO 列表内缺少现货品种单位字段enumdicname
             selectWrStandardData.value = SelectData(
-                id = data.wrstandardid ?: "",
-                value = data.wrstandardname ?: "",
+                id = data.deliverygoodsid ?: "",
+                value = data.deliverygoodsname ?: "",
                 deliverygoodsid = data.deliverygoodsid ?: "",
                 areauserid = data.areauserid ?: "",
-                enumdicname = ""
+                enumdicname = data.enumdicname ?: ""
             )
+            selectWrStandModel.value = SelectData(id = data.wrstandardid ?: "",value = data.wrstandardname ?: "",convertfactor = data.convertfactor ?: "")
+            selelctCurreryId.value = SelectData(id = data.currencyid ?: "",value = data.currencyname ?: "")
+            transactionUserSelectData.value = SelectData(id = data.tradeuserid ?: "",value = data.tradeusername ?: "")
         }
     }
 
@@ -192,6 +195,9 @@ class AddHedgePlanActivity : BaseActivity<HedgePlanViewModel>() {
 
                             editText {
                                 planNameEdittext = this
+                                if (type == "2"){
+                                    setText(data.hedgeplanno)
+                                }
                                 hint = "请输入计划名称"
                                 background = null
                                 inputType = EditorInfo.TYPE_CLASS_TEXT
@@ -369,6 +375,10 @@ class AddHedgePlanActivity : BaseActivity<HedgePlanViewModel>() {
 
                             textView {
                                 coefficientWarehouse = this
+                                selectWrStandModel.bindOptional(context) {
+                                    text = it?.convertfactor
+                                    textColorInt = R.color.rma_black_33
+                                }
                                 text = "1"
                                 textSizeAuto = 31
                                 textColorInt = R.color.rma_black_33
@@ -433,6 +443,9 @@ class AddHedgePlanActivity : BaseActivity<HedgePlanViewModel>() {
 
                             editText {
                                 amountPlanning = this
+                                if (type == "2"){
+                                    setText(data.planqty)
+                                }
                                 hint = "请输入计划量"
                                 background = null
                                 inputType = EditorInfo.TYPE_CLASS_NUMBER
@@ -446,6 +459,13 @@ class AddHedgePlanActivity : BaseActivity<HedgePlanViewModel>() {
 
                             textView {
                                 selectWrStandardData.bindOptional(context) {
+                                    if (selectWrStandModel.value?.id.isNullOrEmpty()){
+                                        text = it?.enumdicname
+                                    }else{
+                                        text = selectWrStandModel.value?.enumdicname
+                                    }
+                                }
+                                selectWrStandModel.bindOptional(context){
                                     text = it?.enumdicname
                                 }
                                 textSizeAuto = 31

+ 10 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/HedgeDetailsActivity.kt

@@ -130,18 +130,25 @@ class HedgeDetailsActivity : BaseActivity<HedgePlanViewModel>() {
 
                             viewItemUI()
 
-                            creatHedgeItemView(titleString = "标仓系数", content = "1")
+                            creatHedgeItemView(titleString = "标仓系数", content = data.convertfactor ?: "")
 
                             viewItemUI()
 
-                            // TODO 缺一个计划量单位
                             creatHedgeItemView(
                                 titleString = "计  划  量",
-                                content = data.planqty ?: ""
+                                content = data.planqty + data.enumdicname
                             )
 
                             viewItemUI()
 
+                            creatHedgeItemView(titleString = "交易用户", content = data.tradeusername ?: "")
+
+                            viewItemUI()
+
+                            creatHedgeItemView(titleString = "结算币种", content = data.currencyname ?: "")
+
+                            viewItemUI()
+
                             linearLayout {
                                 if (data.remark.isNullOrEmpty()) {
                                     visibility = View.GONE

+ 9 - 7
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/HedgePlanViewModel.kt

@@ -102,7 +102,7 @@ class HedgePlanViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 unSubmitList.postValue(datanewlist)
@@ -116,7 +116,7 @@ class HedgePlanViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 toAuditList.postValue(datanewlist)
@@ -130,7 +130,7 @@ class HedgePlanViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 executionList.postValue(datanewlist)
@@ -190,7 +190,8 @@ class HedgePlanViewModel : BaseViewModel() {
      */
     fun queryWrStandardList() {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
 //            put("excludecfg  ", "1")
         }
         MyApplication.getInstance()?.commodityManager?.queryDeliveryGoods(params) { isSuccess, respData, error ->
@@ -227,7 +228,8 @@ class HedgePlanViewModel : BaseViewModel() {
      */
     fun queryWrStandardDetail(deliverygoodsid: String) {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("deliverygoodsid", deliverygoodsid)
         }
 
@@ -246,7 +248,7 @@ class HedgePlanViewModel : BaseViewModel() {
     fun selectWrStandardModel(data: DeliveryGoodsDetailData): ArrayList<SelectData> {
         val wrstandardModel = arrayListOf<SelectData>()
         data.gmlist?.forEach {
-            wrstandardModel.add(SelectData(id = it.wrstandardid ?: "", value = it.wrstandardname ?: ""))
+            wrstandardModel.add(SelectData(id = it.wrstandardid ?: "", value = it.wrstandardname ?: "",convertfactor = it.convertfactor ?: "",enumdicname = it.enumdicname ?: ""))
         }
         return wrstandardModel
     }
@@ -357,7 +359,7 @@ class HedgePlanViewModel : BaseViewModel() {
     fun getSelectCurreryIdData() : List<SelectData>{
         val selectDataList = arrayListOf<SelectData>()
         GlobalDataCollection.instance?.getEnumList(enumCode = "paycurrency")?.forEach {
-            selectDataList.add(SelectData(id = it.enumdicid.toString(),value = it.enumdicname))
+            selectDataList.add(SelectData(id = it.enumitemname,value = it.enumdicname))
         }
         return selectDataList
     }

+ 4 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/InventoryManagerViewModel.kt

@@ -328,7 +328,8 @@ class InventoryManagerViewModel : BaseViewModel() {
      */
     fun queryWrStandardList() {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
         MyApplication.getInstance()?.commodityManager?.queryDeliveryGoods(params) { isSuccess, respData, error ->
             if (isSuccess) {
@@ -365,7 +366,8 @@ class InventoryManagerViewModel : BaseViewModel() {
      */
     fun queryWrStandardDetail(deliverygoodsid: String) {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("deliverygoodsid",deliverygoodsid)
         }
         MyApplication.getInstance()?.commodityManager?.queryDeliveryGoodsDetail(params) { isSuccess, respData, error ->

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

@@ -118,7 +118,8 @@ class RegistrationViewModel : BaseViewModel(){
      */
     fun queryWrStandardDetail(deliverygoodsid: String) {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("deliverygoodsid", deliverygoodsid)
         }
 

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

@@ -590,7 +590,8 @@ class ReportQueryViewModel : BaseViewModel(){
      */
     fun queryDeliveryGoods(){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
         MyApplication.getInstance()?.commodityManager?.queryDeliveryGoods(params = params) { isSuccess, respData, error ->
             if (isSuccess) {
@@ -606,7 +607,8 @@ class ReportQueryViewModel : BaseViewModel(){
      */
     fun queryGoodsWrstandard(){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
         MyApplication.getInstance()?.commodityManager?.queryGoodsWrstandard(params = params) { isSuccess, respData, error ->
             if (isSuccess) {
@@ -622,7 +624,8 @@ class ReportQueryViewModel : BaseViewModel(){
      */
     fun queryGoodsbrand(){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
         MyApplication.getInstance()?.commodityManager?.queryGoodsbrand(params = params) { isSuccess, respData, error ->
             if (isSuccess) {

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

@@ -235,7 +235,6 @@ class RoleSetViewModel : BaseViewModel(){
                 newMenuDataList.add(it)
             }
         }
-
         roleMenuDataList.postValue(newMenuDataList)
     }
 

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

@@ -35,7 +35,7 @@ class SpotMarketDetailsActivity : BaseActivity<SpotMarketPriceViewModel>(){
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         verticalLayout {
-            viewModel.querySpotGoodsPriceLog(data.deliverygoodsid ?: "")
+            viewModel.querySpotGoodsPriceLog(deliverygoodsid= data.deliverygoodsid ?: "",wrstandardid = data.wrstandardid ?: "",brandid = data.spotgoodsbrandid ?: "")
             background = resources.getDrawable(R.color.main_hit_bg_color)
             //页面标题
             topBar {
@@ -90,14 +90,14 @@ class SpotMarketDetailsActivity : BaseActivity<SpotMarketPriceViewModel>(){
                 statusLayout = this
 //                bindTaskStatus(viewModule.status)
                 setRetryAction {
-                    viewModel.querySpotGoodsPriceLog(data.deliverygoodsid ?: "")
+                    viewModel.querySpotGoodsPriceLog(deliverygoodsid= data.deliverygoodsid ?: "",wrstandardid = data.wrstandardid ?: "",brandid = data.spotgoodsbrandid ?: "")
                 }
                 swipeToLoadLayout {
                     swipeToLayout = this
                     setEnableRefresh(true)
                     setEnableLoadMore(false)
                     setOnRefreshListener {
-                        viewModel.querySpotGoodsPriceLog(data.deliverygoodsid ?: "")
+                        viewModel.querySpotGoodsPriceLog(deliverygoodsid= data.deliverygoodsid ?: "",wrstandardid = data.wrstandardid ?: "",brandid = data.spotgoodsbrandid ?: "")
                     }
                     setEnableScrollContentWhenLoaded(false)
                     setEnableLoadMoreWhenContentNotFull(false)

+ 19 - 7
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/spotmarket/SpotMarketPriceViewModel.kt

@@ -6,7 +6,9 @@ import cn.muchinfo.rma.global.data.*
 import cn.muchinfo.rma.netManage.base.InteractiveException
 import cn.muchinfo.rma.view.MyApplication
 import cn.muchinfo.rma.view.autoWidget.remove
+import cn.muchinfo.rma.view.autoWidget.toArrayList
 import cn.muchinfo.rma.view.base.BaseViewModel
+import com.blankj.utilcode.util.TimeUtils
 import com.blankj.utilcode.util.ToastUtils
 import kotlinx.coroutines.GlobalScope
 import kotlinx.coroutines.launch
@@ -65,7 +67,11 @@ class SpotMarketPriceViewModel : BaseViewModel(){
 
         MyApplication.getInstance()?.spotManager?.querySpotGoodsPrice(params = params) { isSuccess, respData, error ->
             if (isSuccess) {
-                spotMarketPriceDataList.postValue(respData?.remove { it.isvalid == "0" })
+                val newDataList = respData?.remove { it.isvalid == "0" }?.toArrayList()
+                newDataList?.sortWith(Comparator { t1, t2 ->
+                    (TimeUtils.string2Millis(t1.operatetime) - TimeUtils.string2Millis(t2.operatetime)).toInt()
+                })
+                spotMarketPriceDataList.postValue(newDataList)
             } else {
                 ToastUtils.showLong("数据请求失败")
             }
@@ -87,7 +93,7 @@ class SpotMarketPriceViewModel : BaseViewModel(){
                     newDataList.add(it.copy(isClick = 0))
                 }
             }else{
-                newDataList.add(it)
+                newDataList.add(it.copy(isClick = 0))
             }
         }
         spotMarketPriceDataList.postValue(newDataList)
@@ -97,10 +103,12 @@ class SpotMarketPriceViewModel : BaseViewModel(){
      * 查询现货市价详情(现货市价/详情)
      * @param wrstandardid String
      */
-    fun querySpotGoodsPriceLog(deliverygoodsid : String){
+    fun querySpotGoodsPriceLog(deliverygoodsid : String,wrstandardid : String,brandid : String){
         val params = mutableMapOf<String, String>().apply {
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("deliverygoodsid",deliverygoodsid)
+            put("brandid",brandid)
+            put("wrstandardid",wrstandardid)
         }
         MyApplication.getInstance()?.spotManager?.querySpotGoodsPriceLog(params = params) { isSuccess, respData, error ->
             if (isSuccess) {
@@ -158,7 +166,8 @@ class SpotMarketPriceViewModel : BaseViewModel(){
      */
     fun queryDeliveryGoods(){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
         MyApplication.getInstance()?.commodityManager?.queryDeliveryGoods(params = params) { isSuccess, respData, error ->
             if (isSuccess) {
@@ -174,7 +183,8 @@ class SpotMarketPriceViewModel : BaseViewModel(){
      */
     fun queryDeliveryGoodsDetails(deliverygoodsid : String){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("deliverygoodsid",deliverygoodsid)
         }
         MyApplication.getInstance()?.commodityManager?.queryDeliveryGoodsDetail(params = params) { isSuccess, respData, error ->
@@ -191,7 +201,8 @@ class SpotMarketPriceViewModel : BaseViewModel(){
      */
     fun queryGoodsWrstandard(){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
         MyApplication.getInstance()?.commodityManager?.queryGoodsWrstandard(params = params) { isSuccess, respData, error ->
             if (isSuccess) {
@@ -207,7 +218,8 @@ class SpotMarketPriceViewModel : BaseViewModel(){
      */
     fun queryGoodsbrand(){
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
         }
         MyApplication.getInstance()?.commodityManager?.queryGoodsbrand(params = params) { isSuccess, respData, error ->
             if (isSuccess) {

+ 0 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/tradingquery/TradingQueryActivity.kt

@@ -411,7 +411,6 @@ class HistoryCommissionedUI(
                         textColorInt = R.color.hint_text_color
                     }.lparams(wrapContent, wrapContent) {
                         topMargin = autoSize(20)
-
                     }
                     textView {
                         text = "时间"

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

@@ -72,7 +72,7 @@ class WarehouseInformationViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 normalWarehouseInfo.postValue(datanewlist)
@@ -86,7 +86,7 @@ class WarehouseInformationViewModel : BaseViewModel() {
                             datanewlist.add(it.copy(indexSelect = 0))
                         }
                     } else {
-                        datanewlist.add(it)
+                        datanewlist.add(it.copy(indexSelect = 0))
                     }
                 }
                 stopWarehouseInfo.postValue(datanewlist)

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

@@ -186,6 +186,12 @@ public class ContentAdapter extends RecyclerView.Adapter<ContentAdapter.ItemView
                 setPosition(i);
             }
         });
+        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                setPosition(i);
+            }
+        });
         //出入库登记
         itemViewHolder.warehouse_register.setOnClickListener(view -> {
             Intent intent = new Intent();
@@ -281,6 +287,7 @@ public class ContentAdapter extends RecyclerView.Adapter<ContentAdapter.ItemView
         TextView tvLeftTitle;//左边销售方字段
         TextView tv_left_bottom_title;//合同编号
         RecyclerView rvItemRight;//右方的列表
+        ImageView click_icon;//图标
         public CustomHorizontalScrollView horItemScrollview;//右方的滑动控件
         private boolean isLayoutFinish;//自定义字段,用于标记layout
 
@@ -294,6 +301,7 @@ public class ContentAdapter extends RecyclerView.Adapter<ContentAdapter.ItemView
 
         public ItemViewHolder(@NonNull View itemView) {
             super(itemView);
+            click_icon = itemView.findViewById(R.id.click_icon);
             warehouse_register = itemView.findViewById(R.id.warehouse_register);
             midpoints_registration = itemView.findViewById(R.id.midpoints_registration);
             settlement_of_registration = itemView.findViewById(R.id.settlement_of_registration);

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

@@ -140,7 +140,8 @@ class ProcurementViewModel : BaseViewModel() {
      */
     fun queryContract(type: String,contracttype : String) {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("contracttype", contracttype)
             put("querytype", type)
         }

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

@@ -99,7 +99,8 @@ class SaleViewModel : BaseViewModel(){
      */
     fun queryContract(type: String,contracttype : String) {
         val params = mutableMapOf<String, String>().apply {
-            put("areauserid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("usertype",GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: "")
             put("contracttype", contracttype)
             put("querytype", type)
         }

+ 28 - 16
RMA/app/src/main/res/layout/layout_item_content.xml

@@ -12,27 +12,39 @@
         android:layout_height="55dp">
 
         <LinearLayout
-            android:gravity="center_vertical"
-            android:orientation="vertical"
             android:layout_width="160dp"
+            android:orientation="horizontal"
             android:layout_height="match_parent">
+            <LinearLayout
+                android:gravity="center_vertical"
+                android:orientation="vertical"
+                android:layout_width="130dp"
+                android:layout_height="match_parent">
 
-            <TextView
-                android:layout_marginStart="7dp"
-                android:id="@+id/tv_left_title"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textSize="13sp"
-                android:textColor="#333333" />
-            <TextView
-                android:layout_marginStart="7dp"
-                android:id="@+id/tv_left_bottom_title"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textSize="10sp"
-                android:textColor="#333333" />
+                <TextView
+                    android:layout_marginStart="7dp"
+                    android:id="@+id/tv_left_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textSize="13sp"
+                    android:textColor="#333333" />
+                <TextView
+                    android:layout_marginStart="7dp"
+                    android:id="@+id/tv_left_bottom_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textSize="10sp"
+                    android:textColor="#333333" />
+            </LinearLayout>
+            <ImageView
+                android:id="@+id/click_icon"
+                android:layout_gravity="center_vertical"
+                android:layout_width="30dp"
+                android:layout_height="30dp"
+                android:src="@mipmap/rma_down"/>
 
         </LinearLayout>
+
         <cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView
             android:id="@+id/hor_item_scrollview"
             android:overScrollMode="never"