فهرست منبع

风险管理8月4日提交代码-liu.bolan-云融大宗和企业风管不分bug

Liu.bolan 4 سال پیش
والد
کامیت
8c8e69a594
46فایلهای تغییر یافته به همراه1669 افزوده شده و 226 حذف شده
  1. 4 0
      RMA/app/src/main/AndroidManifest.xml
  2. 0 1
      RMA/app/src/main/java/cn/muchinfo/rma/business/contract/adapter/ContractAdapter.kt
  3. 58 1
      RMA/app/src/main/java/cn/muchinfo/rma/business/customer/CustomerManage.kt
  4. 149 5
      RMA/app/src/main/java/cn/muchinfo/rma/business/customer/adapter/CustomerAdapter.kt
  5. 229 0
      RMA/app/src/main/java/cn/muchinfo/rma/business/performance/PerformanceAdapter.kt
  6. 222 0
      RMA/app/src/main/java/cn/muchinfo/rma/business/performance/PerformanceManager.kt
  7. 0 27
      RMA/app/src/main/java/cn/muchinfo/rma/business/warehouse/WarehouseManager.kt
  8. 20 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/StringUtils.kt
  9. 42 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ParentAreaListData.kt
  10. 4 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/PerformancePlanData.kt
  11. 21 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/UserInfoData.kt
  12. 182 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/WrPerformancePlanStepData.kt
  13. 5 0
      RMA/app/src/main/java/cn/muchinfo/rma/protobuf/funcode/FunCode.java
  14. 2 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/MainActivity.kt
  15. 5 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/MyApplication.kt
  16. 3 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt
  17. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/exposure/ExposureNumberViewHolder.kt
  18. 43 13
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceDefaultActivity.kt
  19. 32 42
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceDelayActivity.kt
  20. 6 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceInformationActivity.kt
  21. 95 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceInformationViewModel.kt
  22. 56 8
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/adapter/PerformanceInformationContentAdapter.java
  23. 28 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/AccountManagerActivity.kt
  24. 5 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/ContractPublicView.kt
  25. 8 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/ContractViewModel.kt
  26. 1 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/adapter/ContractAdapter.java
  27. 264 56
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/AddCustomerDataActivity.kt
  28. 13 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/CustomerDataActivity.kt
  29. 16 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/CustomerDataViewHolder.kt
  30. 88 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/CustomerDataViewModel.kt
  31. 4 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/registration/InvoiceRegistrationActivity.kt
  32. 1 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryActivity.kt
  33. 5 5
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryViewModel.kt
  34. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/ExposureReportContentAdapter.java
  35. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/SpotReportContentAdapter.java
  36. 6 6
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/reportdetail/ReportCommonDetailsViewModel.kt
  37. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/AddLoginRoleActivity.kt
  38. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/AddRoleActivity.kt
  39. 19 18
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/AddRoleViewHolder.kt
  40. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/AddTradingLoginRoleActivity.kt
  41. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/spotmarket/SpotMarketPriceViewModel.kt
  42. 1 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ContentAdapter.java
  43. 21 8
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ContractDetailActivity.kt
  44. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/sale/SaleViewModel.kt
  45. 1 1
      RMA/app/src/main/res/layout/layout_item_scroll.xml
  46. 1 1
      RMA/app/src/main/res/layout/layout_item_top_scroll.xml

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

@@ -392,6 +392,10 @@
 
 
         <activity android:name=".view.base.hnstmain.account.RydzAccountActivity"/>
         <activity android:name=".view.base.hnstmain.account.RydzAccountActivity"/>
 
 
+        <activity android:name=".view.base.hnstmain.performance.PerformanceDefaultActivity"/>
+
+        <activity android:name=".view.base.hnstmain.performance.PerformanceDelayActivity"/>
+
     </application>
     </application>
 
 
 </manifest>
 </manifest>

+ 0 - 1
RMA/app/src/main/java/cn/muchinfo/rma/business/contract/adapter/ContractAdapter.kt

@@ -145,7 +145,6 @@ object ContractAdapter {
         }
         }
 
 
         val loginInfo = GlobalDataCollection.instance?.loginRsp!!
         val loginInfo = GlobalDataCollection.instance?.loginRsp!!
-        // FIXME: - 250000000005
         builder.setHeader(
         builder.setHeader(
             MessageHeadModel.getHead(
             MessageHeadModel.getHead(
                 FunCode.SpotContractOperateReq,
                 FunCode.SpotContractOperateReq,

+ 58 - 1
RMA/app/src/main/java/cn/muchinfo/rma/business/customer/CustomerManage.kt

@@ -2,6 +2,7 @@ package cn.muchinfo.rma.business.customer
 
 
 import cn.muchinfo.rma.business.contract.adapter.ContractAdapter
 import cn.muchinfo.rma.business.contract.adapter.ContractAdapter
 import cn.muchinfo.rma.business.customer.adapter.CustomerAdapter
 import cn.muchinfo.rma.business.customer.adapter.CustomerAdapter
+import cn.muchinfo.rma.global.data.ParentAreaListData
 import cn.muchinfo.rma.global.data.UserInfoData
 import cn.muchinfo.rma.global.data.UserInfoData
 import cn.muchinfo.rma.netManage.base.ResponseCallback
 import cn.muchinfo.rma.netManage.base.ResponseCallback
 import cn.muchinfo.rma.netManage.utils.MyOkHttpUtils
 import cn.muchinfo.rma.netManage.utils.MyOkHttpUtils
@@ -12,6 +13,7 @@ import cn.muchinfo.rma.view.MyApplication
 import cn.muchinfo.rma.view.autoWidget.guard
 import cn.muchinfo.rma.view.autoWidget.guard
 import cn.muchinfo.rma.view.base.app.BaseResult
 import cn.muchinfo.rma.view.base.app.BaseResult
 import cn.muchinfo.rma.view.base.app.Constant
 import cn.muchinfo.rma.view.base.app.Constant
+import cn.muchinfo.rma.view.base.home.customerdata.updataCustomerData
 import com.blankj.utilcode.util.SPUtils
 import com.blankj.utilcode.util.SPUtils
 import okhttp3.Call
 import okhttp3.Call
 import java.lang.Exception
 import java.lang.Exception
@@ -22,6 +24,31 @@ import java.lang.Exception
 class CustomerManage {
 class CustomerManage {
 
 
     /**
     /**
+     * 查询所属机构列表
+     * @param params Map<String, String> 请求参数
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<UserInfoData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryParentAreaList(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<ParentAreaListData>?, error: Error?) -> Unit
+    ) {
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Qhj/QueryParentAreaList",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<ParentAreaListData>>>() {
+                override fun onResponse(response: BaseResult<List<ParentAreaListData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            })
+    }
+
+    /**
      * 查询客户资料列表
      * 查询客户资料列表
      * @param params Map<String, String> 请求参数
      * @param params Map<String, String> 请求参数
      * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<UserInfoData>?, [@kotlin.ParameterName] Error?, Unit>
      * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<UserInfoData>?, [@kotlin.ParameterName] Error?, Unit>
@@ -32,7 +59,7 @@ class CustomerManage {
     ) {
     ) {
         MyOkHttpUtils().query(
         MyOkHttpUtils().query(
             URL = SPUtils.getInstance()
             URL = SPUtils.getInstance()
-                .getString(Constant.goCommonSearchUrl) + "/Ermcp/QueryUserInfo",
+                .getString(Constant.goCommonSearchUrl) + "/Qhj/QueryCustomerInfo",
             params = params,
             params = params,
             type = "1",
             type = "1",
             callback = object : ResponseCallback<BaseResult<List<UserInfoData>>>() {
             callback = object : ResponseCallback<BaseResult<List<UserInfoData>>>() {
@@ -189,6 +216,36 @@ class CustomerManage {
 
 
             }
             }
         )
         )
+    }
+
+    fun CustomerInfoOperateReq(
+        data : updataCustomerData,
+        callback: (isCompleted: Boolean, err: Error?) -> Unit
+    ){
+        val tradeSocketManager = MyApplication.getInstance()?.tradeSocketManager.guard {
+            callback(false, Error("交易链路未初始化"))
+            return
+        }
 
 
+        val reqPacket = CustomerAdapter.getCustomerInfoOperateReqInfo(
+            data = data
+                )
+
+        tradeSocketManager.send(
+            reqPacket,
+            FunCode.FID_CustomerInfoOperateRsp,
+            object : Callback<Packet50> {
+                override fun onSuccess(rsp: Packet50?) {
+                    val rst = CustomerAdapter.analysisCustomerInfoOperateRsp(rsp!!)
+                    callback(rst.first, rst.second)
+                }
+
+                override fun onFail(err: Error?) {
+                    // 发送数据失败
+                    callback(false, err)
+                }
+
+            }
+        )
     }
     }
 }
 }

+ 149 - 5
RMA/app/src/main/java/cn/muchinfo/rma/business/customer/adapter/CustomerAdapter.kt

@@ -7,6 +7,7 @@ import cn.muchinfo.rma.netcore.packet.Packet50
 import cn.muchinfo.rma.protobuf.funcode.FunCode
 import cn.muchinfo.rma.protobuf.funcode.FunCode
 import cn.muchinfo.rma.protobuf.protoclasses.ManageServiceMI2
 import cn.muchinfo.rma.protobuf.protoclasses.ManageServiceMI2
 import cn.muchinfo.rma.protobuf.protoclasses.ManageServiceMI3
 import cn.muchinfo.rma.protobuf.protoclasses.ManageServiceMI3
+import cn.muchinfo.rma.view.base.home.customerdata.updataCustomerData
 import java.io.ByteArrayOutputStream
 import java.io.ByteArrayOutputStream
 import java.lang.Exception
 import java.lang.Exception
 
 
@@ -16,6 +17,146 @@ import java.lang.Exception
 object CustomerAdapter {
 object CustomerAdapter {
 
 
     /**
     /**
+     * 客户资料操作请求
+     * @param operatetype Int
+     * @param userid Long
+     * @param areaid Long
+     * @param logincode String
+     * @param loginpwd String
+     * @param userinfotype Int
+     * @param username String
+     * @param nickname String
+     * @param cardtype Int
+     * @param cardnum String
+     * @param cardfrontphotourl String
+     * @param cardbackphotourl String
+     * @param email String
+     * @param referral String
+     * @param legalpersonname String
+     * @param taxpayernum String
+     * @param proxystatementurl String
+     * @param contactname String
+     * @param mobilephone String
+     * @param telphone String
+     * @param provinceid Long
+     * @param cityid Long
+     * @param districtid Long
+     * @param ipaddress String
+     * @param remark String
+     * @param userstate Int
+     * @return Packet50
+     */
+    fun getCustomerInfoOperateReqInfo(
+        data : updataCustomerData
+    ) : Packet50{
+        val builder = ManageServiceMI3.CustomerInfoOperateReq.newBuilder()
+        val loginInfo = GlobalDataCollection.instance?.loginRsp
+        builder.setHeader(
+            MessageHeadModel.getHead(
+                FunCode.FID_CustomerInfoOperateReq,
+                loginInfo?.userID ?: 0,
+                0,
+                0,
+                18
+            )
+        )
+        builder.operatetype = data.operatetype
+        if (data.userid != 0L){
+            builder.userid = data.userid
+        }
+        if (data.areaid != 0L){
+            builder.areaid = data.areaid
+        }
+        if (data.logincode.isNotEmpty()){
+            builder.logincode = data.logincode
+        }
+        if (data.loginpwd.isNotEmpty()){
+            builder.loginpwd = data.loginpwd
+        }
+        if (data.userinfotype != 0){
+            builder.userinfotype = data.userinfotype
+        }
+        if (data.username.isNotEmpty()){
+            builder.username = data.username
+        }
+        if (data.nickname.isNotEmpty()){
+            builder.nickname = data.nickname
+        }
+        if (data.cardtype != 0){
+            builder.cardtype = data.cardtype
+        }
+
+        builder.cardnum = data.cardnum
+        if (data.cardfrontphotourl.isNotEmpty()){
+            builder.cardfrontphotourl = data.cardfrontphotourl
+        }
+        if (data.cardbackphotourl.isNotEmpty()){
+            builder.cardbackphotourl = data.cardbackphotourl
+        }
+        builder.email = data.email
+        if (data.referral.isNotEmpty()){
+            builder.referral = data.referral
+        }
+        if (data.legalpersonname.isNotEmpty()){
+            builder.legalpersonname = data.legalpersonname
+        }
+        if (data.taxpayernum.isNotEmpty()){
+            builder.taxpayernum = data.taxpayernum
+        }
+        if (data.proxystatementurl.isNotEmpty()){
+            builder.proxystatementurl = data.proxystatementurl
+        }
+        if (data.contactname.isNotEmpty()){
+            builder.contactname = data.contactname
+        }
+        if (data.mobilephone.isNotEmpty()){
+            builder.mobilephone = data.mobilephone
+        }
+        if (data.telphone.isNotEmpty()){
+            builder.telphone = data.telphone
+        }
+        if (data.provinceid != 0L){
+            builder.provinceid = data.provinceid
+        }
+        if (data.cityid != 0L){
+            builder.cityid = data.cityid
+        }
+        if (data.districtid != 0L){
+            builder.districtid = data.districtid
+        }
+        builder.ipaddress = data.ipaddress
+        builder.remark = data.remark
+        builder.userstate = data.userstate
+        val arrayOutputStream = ByteArrayOutputStream();
+        builder.build().writeTo(arrayOutputStream)
+        return Packet50(FunCode.FID_CustomerInfoOperateReq, arrayOutputStream.toByteArray())
+    }
+
+    /**
+     * 客户信息审核报文解析
+     * @param packet50 Packet50
+     * @return Triple<Boolean, Error?, ManageServiceMI2.?>
+     */
+    fun analysisCustomerInfoOperateRsp(packet50: Packet50): Triple<Boolean, Error?, ManageServiceMI3.CustomerInfoOperateRsp?> {
+        return try {
+            val resultRsp = ManageServiceMI3.CustomerInfoOperateRsp.parseFrom(packet50.content)
+            if (resultRsp.retCode == 0) {
+                // 操作成功
+                Triple(true, null, resultRsp)
+            }else if (resultRsp.retCode == -1){
+                // 操作失败
+                Triple(false, Error(resultRsp.retDesc), null)
+            }  else {
+                // 操作失败
+                Triple(false, Error(ErrorMessageUtils.getErrorString(resultRsp.retCode)), null)
+            }
+        } catch (e: Exception) {
+            // 操作失败
+            Triple(false, Error("装箱失败"), null)
+        }
+    }
+
+    /**
      * 客户信息审核报文装箱
      * 客户信息审核报文装箱
      * @param UserState Long 4-审核通过,5-审核拒绝
      * @param UserState Long 4-审核通过,5-审核拒绝
      * @param userid Long 客户userid
      * @param userid Long 客户userid
@@ -61,13 +202,16 @@ object CustomerAdapter {
      */
      */
     fun analysisCustomerDataRsq(packet50: Packet50): Triple<Boolean, Error?, ManageServiceMI3.AuditWskhUserInfoRsp?> {
     fun analysisCustomerDataRsq(packet50: Packet50): Triple<Boolean, Error?, ManageServiceMI3.AuditWskhUserInfoRsp?> {
         return try {
         return try {
-            val loginRsp = ManageServiceMI3.AuditWskhUserInfoRsp.parseFrom(packet50.content)
-            if (loginRsp.retCode == 0) {
+            val resultRsp = ManageServiceMI3.AuditWskhUserInfoRsp.parseFrom(packet50.content)
+            if (resultRsp.retCode == 0) {
                 // 操作成功
                 // 操作成功
-                Triple(true, null, loginRsp)
-            } else {
+                Triple(true, null, resultRsp)
+            }else if (resultRsp.retCode == -1){
+                // 操作失败
+                Triple(false, Error(resultRsp.retDesc), null)
+            }  else {
                 // 操作失败
                 // 操作失败
-                Triple(false, Error(ErrorMessageUtils.getErrorString(loginRsp.retCode)), null)
+                Triple(false, Error(ErrorMessageUtils.getErrorString(resultRsp.retCode)), null)
             }
             }
         } catch (e: Exception) {
         } catch (e: Exception) {
             // 操作失败
             // 操作失败

+ 229 - 0
RMA/app/src/main/java/cn/muchinfo/rma/business/performance/PerformanceAdapter.kt

@@ -0,0 +1,229 @@
+package cn.muchinfo.rma.business.performance
+
+import cn.muchinfo.rma.business.global.MessageHeadModel
+import cn.muchinfo.rma.global.ErrorMessageUtils
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.netcore.packet.Packet50
+import cn.muchinfo.rma.protobuf.funcode.FunCode
+import cn.muchinfo.rma.protobuf.protoclasses.ErmcpMI1
+import cn.muchinfo.rma.protobuf.protoclasses.PerformanceMI1
+import java.io.ByteArrayOutputStream
+import java.lang.Exception
+
+/**
+ * 履约交易相关adapter
+ */
+object PerformanceAdapter {
+
+    //履约手动确认请求
+    fun getPerformanceManualConfirmReqInfo(
+        marketid : Long = 0,//市场id
+        PerformancePlanStepID : Long = 0,//履约计划步骤ID
+        OverShortAmount : Double = 0.0,//溢短金额
+        PerformanceExecuteSide : Int = 0,//履约步骤执行方 1买方 2 卖方
+        StepRemark : String = "",//步骤备注
+        OverShortQty : Double = 0.0,//溢短数量
+        ExpressFee : Double = 0.0//运费金额
+    ) : Packet50{
+        val builder = PerformanceMI1.PerformanceManualConfirmReq.newBuilder()
+        val loginInfo = GlobalDataCollection.instance?.loginRsp!!
+        builder.setHeader(
+            MessageHeadModel.getHead(
+                FunCode.PerformanceManualConfirmReq,
+                loginInfo.userID,
+                GlobalDataCollection.instance?.accountId ?: 0,
+                0,
+                marketid.toInt()
+            )
+        )
+        builder.performancePlanStepID = PerformancePlanStepID
+        builder.overShortAmount = OverShortAmount
+        builder.performanceExecuteSide = PerformanceExecuteSide
+        builder.stepRemark = StepRemark
+        builder.overShortQty = OverShortQty
+        builder.expressFee = ExpressFee
+        val arrayOutputStream = ByteArrayOutputStream();
+        builder.build().writeTo(arrayOutputStream)
+        return Packet50(FunCode.PerformanceManualConfirmReq, arrayOutputStream.toByteArray())
+    }
+
+    /**
+     * 履约手动确认应答
+     * @param packet50 Packet50
+     * @return Triple<Boolean, Error?, ErmcpMI1.SpotContractOperateRsp?>
+     */
+    fun analysisPerformanceManualConfirmRsp(packet50: Packet50): Triple<Boolean, Error?, PerformanceMI1.PerformanceManualConfirmRsp?> {
+        return try {
+            val resultRsp = PerformanceMI1.PerformanceManualConfirmRsp.parseFrom(packet50.content)
+            if (resultRsp.retCode == 0) {
+                // 操作成功
+                Triple(true, null, resultRsp)
+            }else if (resultRsp.retCode == -1){
+                // 操作失败
+                Triple(false, Error(resultRsp.retDesc), null)
+            } else {
+                // 操作失败
+                Triple(false, Error(ErrorMessageUtils.getErrorString(resultRsp.retCode)), null)
+            }
+        } catch (e: Exception) {
+            // 操作失败
+            Triple(false, Error("装箱失败"), null)
+        }
+    }
+
+    //延期申请请求
+    fun getPerformanceDelayApplyReqinfo(
+        marketid : Long = 0,//市场id
+        PerformancePlanStepID : Long = 0,//履约计划步骤ID
+        delaydays : Int = 0,//申请延期天数
+        applicant : Long = 0,//申请人
+        applyremark : String = ""//申请备注
+    ) : Packet50{
+        val builder = PerformanceMI1.PerformanceDelayApplyReq.newBuilder()
+        val loginInfo = GlobalDataCollection.instance?.loginRsp!!
+        builder.setHeader(
+            MessageHeadModel.getHead(
+                FunCode.PerformanceDelayApplyReq,
+                loginInfo.userID,
+                GlobalDataCollection.instance?.accountId ?: 0,
+                0,
+                marketid.toInt()
+            )
+        )
+        builder.performancePlanStepID = PerformancePlanStepID
+        builder.delaydays = delaydays
+        builder.applicant = applicant
+        builder.applyremark = applyremark
+        val arrayOutputStream = ByteArrayOutputStream();
+        builder.build().writeTo(arrayOutputStream)
+        return Packet50(FunCode.PerformanceDelayApplyReq, arrayOutputStream.toByteArray())
+    }
+
+    /**
+     * 延期申请应答
+     * @param packet50 Packet50
+     * @return Triple<Boolean, Error?, ErmcpMI1.SpotContractOperateRsp?>
+     */
+    fun analysisPerformanceDelayApplyRsp(packet50: Packet50): Triple<Boolean, Error?, PerformanceMI1.PerformanceDelayApplyRsp?> {
+        return try {
+            val resultRsp = PerformanceMI1.PerformanceDelayApplyRsp.parseFrom(packet50.content)
+            if (resultRsp.retCode == 0) {
+                // 操作成功
+                Triple(true, null, resultRsp)
+            }else if (resultRsp.retCode == -1){
+                // 操作失败
+                Triple(false, Error(resultRsp.retDesc), null)
+            } else {
+                // 操作失败
+                Triple(false, Error(ErrorMessageUtils.getErrorString(resultRsp.retCode)), null)
+            }
+        } catch (e: Exception) {
+            // 操作失败
+            Triple(false, Error("装箱失败"), null)
+        }
+    }
+
+    //违约申请请求
+    fun getPerformanceContractedApplyReqInfo(
+        marketid : Long = 0,//市场id
+        PerformancePlanID : Long = 0,//履约计划步骤ID
+        BreachType : Int = 0,
+        Applicant : Long = 0,
+        ApplyRemark : String = "",
+        Attachment : String = ""
+    ) : Packet50{
+        val builder = PerformanceMI1.PerformanceContractedApplyReq.newBuilder()
+        val loginInfo = GlobalDataCollection.instance?.loginRsp!!
+        builder.setHeader(
+            MessageHeadModel.getHead(
+                FunCode.PerformanceContractedApplyReq,
+                loginInfo.userID,
+                GlobalDataCollection.instance?.accountId ?: 0,
+                0,
+                marketid.toInt()
+            )
+        )
+        builder.performancePlanID = PerformancePlanID
+        builder.breachType = BreachType
+        builder.applicant = Applicant
+        builder.applyRemark = ApplyRemark
+        builder.attachment = Attachment
+        val arrayOutputStream = ByteArrayOutputStream();
+        builder.build().writeTo(arrayOutputStream)
+        return Packet50(FunCode.PerformanceContractedApplyReq, arrayOutputStream.toByteArray())
+    }
+
+    /**
+     * 违约申请应答
+     * @param packet50 Packet50
+     * @return Triple<Boolean, Error?, ErmcpMI1.SpotContractOperateRsp?>
+     */
+    fun analysisPerformanceContractedApplyRsp(packet50: Packet50): Triple<Boolean, Error?, PerformanceMI1.PerformanceContractedApplyRsp?> {
+        return try {
+            val resultRsp = PerformanceMI1.PerformanceContractedApplyRsp.parseFrom(packet50.content)
+            if (resultRsp.retCode == 0) {
+                // 操作成功
+                Triple(true, null, resultRsp)
+            }else if (resultRsp.retCode == -1){
+                // 操作失败
+                Triple(false, Error(resultRsp.retDesc), null)
+            } else {
+                // 操作失败
+                Triple(false, Error(ErrorMessageUtils.getErrorString(resultRsp.retCode)), null)
+            }
+        } catch (e: Exception) {
+            // 操作失败
+            Triple(false, Error("装箱失败"), null)
+        }
+    }
+
+    //履约修改联络信息请求
+    fun getPerformanceModifyContactReqInfo(
+        marketid : Long = 0,//市场id
+        PerformancePlanID : Long = 0,
+        AccountID : Long = 0,
+        ContactInfo : String = ""
+    ) : Packet50{
+        val builder = PerformanceMI1.PerformanceModifyContactReq.newBuilder()
+        val loginInfo = GlobalDataCollection.instance?.loginRsp!!
+        builder.setHeader(
+            MessageHeadModel.getHead(
+                FunCode.PerformanceModifyContactReq,
+                loginInfo.userID,
+                AccountID,
+                0,
+                marketid.toInt()
+            )
+        )
+        builder.performancePlanID = PerformancePlanID
+        builder.contactInfo = ContactInfo
+        val arrayOutputStream = ByteArrayOutputStream();
+        builder.build().writeTo(arrayOutputStream)
+        return Packet50(FunCode.PerformanceModifyContactReq, arrayOutputStream.toByteArray())
+    }
+
+    /**
+     * 履约修改联络信息应答
+     * @param packet50 Packet50
+     * @return Triple<Boolean, Error?, ErmcpMI1.SpotContractOperateRsp?>
+     */
+    fun analysisPerformanceModifyContactRsp(packet50: Packet50): Triple<Boolean, Error?, PerformanceMI1.PerformanceModifyContactRsp?> {
+        return try {
+            val resultRsp = PerformanceMI1.PerformanceModifyContactRsp.parseFrom(packet50.content)
+            if (resultRsp.retCode == 0) {
+                // 操作成功
+                Triple(true, null, resultRsp)
+            }else if (resultRsp.retCode == -1){
+                // 操作失败
+                Triple(false, Error(resultRsp.retDesc), null)
+            } else {
+                // 操作失败
+                Triple(false, Error(ErrorMessageUtils.getErrorString(resultRsp.retCode)), null)
+            }
+        } catch (e: Exception) {
+            // 操作失败
+            Triple(false, Error("装箱失败"), null)
+        }
+    }
+
+}

+ 222 - 0
RMA/app/src/main/java/cn/muchinfo/rma/business/performance/PerformanceManager.kt

@@ -0,0 +1,222 @@
+package cn.muchinfo.rma.business.performance
+
+import cn.muchinfo.rma.business.customer.adapter.CustomerAdapter
+import cn.muchinfo.rma.global.data.PerformancePlanData
+import cn.muchinfo.rma.global.data.WrPerformancePlanStepData
+import cn.muchinfo.rma.netManage.base.ResponseCallback
+import cn.muchinfo.rma.netManage.utils.MyOkHttpUtils
+import cn.muchinfo.rma.netcore.packet.Packet50
+import cn.muchinfo.rma.netcore.socket.Callback
+import cn.muchinfo.rma.protobuf.funcode.FunCode
+import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.autoWidget.guard
+import cn.muchinfo.rma.view.base.app.BaseResult
+import cn.muchinfo.rma.view.base.app.Constant
+import com.blankj.utilcode.util.SPUtils
+import okhttp3.Call
+import java.lang.Exception
+
+/**
+ * 履约交易相关manager
+ */
+class PerformanceManager {
+
+    /**
+     * 查询履约信息详情
+     * @param params Map<String, String>
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<BusinessData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryWrPerformancePlanStep(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<WrPerformancePlanStepData>?, error: Error?) -> Unit
+    ) {
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/WrTrade2/QueryWrPerformancePlanStep",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<WrPerformancePlanStepData>>>() {
+                override fun onResponse(response: BaseResult<List<WrPerformancePlanStepData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+    /**
+     * 查询履约信息
+     * @param params Map<String, String>
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<BusinessData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryPerformancePlan(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<PerformancePlanData>?, error: Error?) -> Unit
+    ) {
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/WrTrade2/QueryPerformancePlan",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<PerformancePlanData>>>() {
+                override fun onResponse(response: BaseResult<List<PerformancePlanData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+    //履约手动确认请求
+    fun performanceManualConfirmReq(
+        marketid : Long = 0,//市场id
+        PerformancePlanStepID : Long = 0,//履约计划步骤ID
+        OverShortAmount : Double = 0.0,//溢短金额
+        PerformanceExecuteSide : Int = 0,//履约步骤执行方 1买方 2 卖方
+        StepRemark : String = "",//步骤备注
+        OverShortQty : Double = 0.0,//溢短数量
+        ExpressFee : Double = 0.0,//运费金额
+        callback: (isCompleted: Boolean, err: Error?) -> Unit
+    ){
+        val tradeSocketManager = MyApplication.getInstance()?.tradeSocketManager.guard {
+            callback(false, Error("交易链路未初始化"))
+            return
+        }
+
+        val reqPacket = PerformanceAdapter.getPerformanceManualConfirmReqInfo(
+            marketid, PerformancePlanStepID, OverShortAmount, PerformanceExecuteSide, StepRemark, OverShortQty, ExpressFee
+        )
+
+        tradeSocketManager.send(
+            reqPacket,
+            FunCode.PerformanceManualConfirmRsp,
+            object : Callback<Packet50> {
+                override fun onSuccess(rsp: Packet50?) {
+                    val rst = PerformanceAdapter.analysisPerformanceManualConfirmRsp(rsp!!)
+                    callback(rst.first, rst.second)
+                }
+
+                override fun onFail(err: Error?) {
+                    // 发送数据失败
+                    callback(false, err)
+                }
+
+            }
+        )
+    }
+
+    //延期申请请求
+    fun performanceDelayApplyReq(
+        marketid : Long = 0,//市场id
+        PerformancePlanStepID : Long = 0,//履约计划步骤ID
+        delaydays : Int = 0,//申请延期天数
+        applicant : Long = 0,//申请人
+        applyremark : String = "",//申请备注
+        callback: (isCompleted: Boolean, err: Error?) -> Unit
+    ){
+        val tradeSocketManager = MyApplication.getInstance()?.tradeSocketManager.guard {
+            callback(false, Error("交易链路未初始化"))
+            return
+        }
+
+        val reqPacket = PerformanceAdapter.getPerformanceDelayApplyReqinfo(
+            marketid, PerformancePlanStepID, delaydays, applicant, applyremark
+        )
+
+        tradeSocketManager.send(
+            reqPacket,
+            FunCode.PerformanceDelayApplyRsp,
+            object : Callback<Packet50> {
+                override fun onSuccess(rsp: Packet50?) {
+                    val rst = PerformanceAdapter.analysisPerformanceDelayApplyRsp(rsp!!)
+                    callback(rst.first, rst.second)
+                }
+
+                override fun onFail(err: Error?) {
+                    // 发送数据失败
+                    callback(false, err)
+                }
+
+            }
+        )
+    }
+
+    //违约申请请求
+    fun performanceContractedApplyReq(
+        marketid : Long = 0,//市场id
+        PerformancePlanID : Long = 0,//履约计划步骤ID
+        BreachType : Int = 0,//违约方类型
+        Applicant : Long = 0,//违约申请人
+        ApplyRemark : String = "",//申请备注
+        Attachment : String = "",//附件
+        callback: (isCompleted: Boolean, err: Error?) -> Unit
+    ){
+        val tradeSocketManager = MyApplication.getInstance()?.tradeSocketManager.guard {
+            callback(false, Error("交易链路未初始化"))
+            return
+        }
+
+        val reqPacket = PerformanceAdapter.getPerformanceContractedApplyReqInfo(
+            marketid, PerformancePlanID, BreachType, Applicant, ApplyRemark, Attachment
+        )
+
+        tradeSocketManager.send(
+            reqPacket,
+            FunCode.PerformanceContractedApplyRsp,
+            object : Callback<Packet50> {
+                override fun onSuccess(rsp: Packet50?) {
+                    val rst = PerformanceAdapter.analysisPerformanceContractedApplyRsp(rsp!!)
+                    callback(rst.first, rst.second)
+                }
+
+                override fun onFail(err: Error?) {
+                    // 发送数据失败
+                    callback(false, err)
+                }
+
+            }
+        )
+    }
+
+    //履约修改联络信息请求
+    fun performanceModifyContactReq(
+        marketid : Long = 0,//市场id
+        PerformancePlanID : Long = 0,
+        AccountID : Long = 0,
+        ContactInfo : String = "",
+        callback: (isCompleted: Boolean, err: Error?) -> Unit
+    ){
+        val tradeSocketManager = MyApplication.getInstance()?.tradeSocketManager.guard {
+            callback(false, Error("交易链路未初始化"))
+            return
+        }
+
+        val reqPacket = PerformanceAdapter.getPerformanceModifyContactReqInfo(
+            marketid, PerformancePlanID, AccountID, ContactInfo
+        )
+
+        tradeSocketManager.send(
+            reqPacket,
+            FunCode.PerformanceModifyContactRsp,
+            object : Callback<Packet50> {
+                override fun onSuccess(rsp: Packet50?) {
+                    val rst = PerformanceAdapter.analysisPerformanceModifyContactRsp(rsp!!)
+                    callback(rst.first, rst.second)
+                }
+
+                override fun onFail(err: Error?) {
+                    // 发送数据失败
+                    callback(false, err)
+                }
+
+            }
+        )
+    }
+
+}

+ 0 - 27
RMA/app/src/main/java/cn/muchinfo/rma/business/warehouse/WarehouseManager.kt

@@ -71,33 +71,6 @@ class WarehouseManager {
         )
         )
     }
     }
 
 
-
-    /**
-     * 查询履约信息
-     * @param params Map<String, String>
-     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<BusinessData>?, [@kotlin.ParameterName] Error?, Unit>
-     */
-    fun queryPerformancePlan(
-        params: Map<String, String>,
-        responseBack: (isSuccess: Boolean, respData: List<PerformancePlanData>?, error: Error?) -> Unit
-    ) {
-        MyOkHttpUtils().query(
-            URL = SPUtils.getInstance()
-                .getString(Constant.goCommonSearchUrl) + "/WrTrade2/QueryPerformancePlan",
-            params = params,
-            type = "1",
-            callback = object : ResponseCallback<BaseResult<List<PerformancePlanData>>>() {
-                override fun onResponse(response: BaseResult<List<PerformancePlanData>>?, id: Int) {
-                    responseBack(true, response?.data, null)
-                }
-
-                override fun onError(call: Call?, e: Exception?, id: Int) {
-                    responseBack(false, null, Error(e?.message))
-                }
-            }
-        )
-    }
-
     /**
     /**
      * 查询仓单持有记录
      * 查询仓单持有记录
      * @param params Map<String, String>
      * @param params Map<String, String>

+ 20 - 1
RMA/app/src/main/java/cn/muchinfo/rma/global/StringUtils.kt

@@ -335,7 +335,7 @@ fun String.loginstatus() : String{
             str = "正常"
             str = "正常"
         }
         }
         this == "2" -> {
         this == "2" -> {
-            str = "锁定"
+            str = "冻结"
         }
         }
         this == "3" -> {
         this == "3" -> {
             str = "无效"
             str = "无效"
@@ -450,3 +450,22 @@ fun String.payflag() : String{
 }
 }
 
 
 
 
+/**
+ * currencyid转简称
+ * @receiver String
+ * @return String
+ */
+fun String.currencyid() : String{
+    if (this.isNullOrEmpty()){
+        return "--"
+    }
+    var str = ""
+    when {
+        this == "1" -> {
+            str = "元"
+        }
+    }
+    return str
+}
+
+

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

@@ -0,0 +1,42 @@
+package cn.muchinfo.rma.global.data
+
+import android.os.Parcel
+import android.os.Parcelable
+import com.google.gson.annotations.SerializedName
+//所属机构列表
+data class ParentAreaListData(
+    @SerializedName("accountname")
+    val accountname : String? = "",//账户名称(机构名称)
+    @SerializedName("userid")
+    val userid : String? = "",//用户ID
+    @SerializedName("usertype")
+    val usertype : String? = ""//账户类型 - 1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)
+) : Parcelable{
+    constructor(parcel: Parcel) : this(
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString()
+    ) {
+    }
+
+    override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeString(accountname)
+        parcel.writeString(userid)
+        parcel.writeString(usertype)
+    }
+
+    override fun describeContents(): Int {
+        return 0
+    }
+
+    companion object CREATOR : Parcelable.Creator<ParentAreaListData> {
+        override fun createFromParcel(parcel: Parcel): ParentAreaListData {
+            return ParentAreaListData(parcel)
+        }
+
+        override fun newArray(size: Int): Array<ParentAreaListData?> {
+            return arrayOfNulls(size)
+        }
+    }
+
+}

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

@@ -106,6 +106,8 @@ data class PerformancePlanData(
     val wrstandardname : String? = "",//商品名称
     val wrstandardname : String? = "",//商品名称
     @SerializedName("wrtransferuserid")
     @SerializedName("wrtransferuserid")
     val wrtransferuserid : String? = "",//仓单受让用户
     val wrtransferuserid : String? = "",//仓单受让用户
+    @SerializedName("steptypeid")
+    val steptypeid : String? = "",//履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方履约前剩余保证金 10:货款溢短 11:生成合同[中江] 12:运费 90:确认付款(买方) 91. 确认放行(卖方) 92买方支付(直接扣款) 用于-1模板“
     @SerializedName("wrtypename")
     @SerializedName("wrtypename")
     val wrtypename : String? = "",//商品
     val wrtypename : String? = "",//商品
     var rightData : List<String?>? = arrayListOf()//组装的右侧数据
     var rightData : List<String?>? = arrayListOf()//组装的右侧数据
@@ -161,6 +163,7 @@ data class PerformancePlanData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
         parcel.createStringArrayList()
         parcel.createStringArrayList()
     ) {
     ) {
     }
     }
@@ -215,6 +218,7 @@ data class PerformancePlanData(
         parcel.writeString(wrstandardid)
         parcel.writeString(wrstandardid)
         parcel.writeString(wrstandardname)
         parcel.writeString(wrstandardname)
         parcel.writeString(wrtransferuserid)
         parcel.writeString(wrtransferuserid)
+        parcel.writeString(steptypeid)
         parcel.writeString(wrtypename)
         parcel.writeString(wrtypename)
         parcel.writeStringList(rightData)
         parcel.writeStringList(rightData)
     }
     }

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

@@ -85,7 +85,27 @@ data class UserInfoData(
     @SerializedName("nickname")
     @SerializedName("nickname")
     val nickname : String? = "",//昵称
     val nickname : String? = "",//昵称
     @SerializedName("taxpayernum")
     @SerializedName("taxpayernum")
-    val taxpayernum : String? = ""//纳税人识别号
+    val taxpayernum : String? = "",//纳税人识别号
+    @SerializedName("cityname")
+    val cityname : String? = "",//城市名称
+    @SerializedName("countryname")
+    val countryname : String? = "",//国家名称
+    @SerializedName("districtname")
+    val districtname : String? = "",//地区名称
+    @SerializedName("logincode")
+    val logincode : String? = "",//登录账号(代码)
+    @SerializedName("memberusername")
+    val memberusername : String? = "",//所属会员名称
+    @SerializedName("parentuserid")
+    val parentuserid:  String? = "",//上级机构(所属机构)
+    @SerializedName("parentusername")
+    val parentusername : String? = "",//所属机构名称
+    @SerializedName("provincename")
+    val provincename : String? = "",//省名称
+    @SerializedName("proxystatementurl")
+    val proxystatementurl:  String? = "",//授权委托书
+    @SerializedName("username")
+    val username : String? = ""//用户名称
 ) : Parcelable {
 ) : Parcelable {
     constructor(parcel: Parcel) : this(
     constructor(parcel: Parcel) : this(
         parcel.readString(),
         parcel.readString(),

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

@@ -0,0 +1,182 @@
+package cn.muchinfo.rma.global.data
+
+import android.os.Parcel
+import android.os.Parcelable
+import com.google.gson.annotations.SerializedName
+
+/**
+ * 履约信息详情
+ */
+data class WrPerformancePlanStepData(
+    @SerializedName("delaydays")
+    val delaydays : String? = "",//延期申请天数
+    @SerializedName("deliverygoodscode")
+    val deliverygoodscode : String? = "",//品种代码
+    @SerializedName("deliverygoodsid")
+    val deliverygoodsid : String? = "",//品种ID
+    @SerializedName("deliverygoodsname")
+    val deliverygoodsname : String? = "",//品种名称
+    @SerializedName("endtime")
+    val endtime : String? = "",//结束日期
+    @SerializedName("enumdicname")
+    val enumdicname : String? = "",//单位名称
+    @SerializedName("executeside")
+    val executeside : String? = "",//步骤执行方 - 1:买方 2:卖方
+    @SerializedName("handlestatus")
+    val handlestatus : String? = "",//处理状态 - 1:开始 2:结束 3:冻结请求 4:冻结返回成功 5:冻结返回失败 6:扣款请求 7:扣款返回成功 8:扣款返回失败 9:仓单转移请求 10:仓单转移返回成功 11:仓单转移返回失败 12:加钱请求 13:加钱返回成功 14:加钱返回失败 15:解冻仓单头寸请求 16:解冻仓单头寸返回成功 17:解冻仓单头寸返回失败 18:解冻库位请求 19:解冻库位返回成功 20:解冻库位返回失败
+    @SerializedName("isauto")
+    val isauto : String? = "",//是否自动 - 0:不自动 1:自动
+    @SerializedName("islastreceivestep")
+    val islastreceivestep : String? = "",//是否最后收款步骤 - 0:不是 1:是 (暂时不用,由服务自己判断是否为最后一步付款或收款)
+    @SerializedName("minivalue")
+    val minivalue : String? = "",//现货商品最小变动值
+    @SerializedName("optioncompare")
+    val optioncompare : String? = "",//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
+    @SerializedName("performancestepid")
+    val performancestepid : String? = "",//履约步骤ID(131+Unix秒时间戳(10位)+xxxxxx)
+    @SerializedName("planid")
+    val planid : String? = "",//所属履约计划ID
+    @SerializedName("realamount")
+    val realamount : String? = "",//实际完成金额
+    @SerializedName("relatedorderid")
+    val relatedorderid: String? = "",//关联单号
+    @SerializedName("remaindays")
+    val remaindays : String? = "",//剩余天数
+    @SerializedName("remark")
+    val remark:  String? = "",//错误备注
+    @SerializedName("starttime")
+    val starttime : String? = "",//开始日期
+    @SerializedName("stepamount")
+    val stepamount : String? = "",//步骤金额
+    @SerializedName("stepdays")
+    val stepdays : String? = "",//距离上一步天数(分钟)
+    @SerializedName("stepindex")
+    val stepindex : String? = "",//步骤序号
+    @SerializedName("steplanchtype")
+    val steplanchtype : String? = "",//步骤启动类型 - 1:系统自动 2:手动
+    @SerializedName("stepremark")
+    val stepremark : String? = "",//步骤备注
+    @SerializedName("stepstatus")
+    val stepstatus : String? = "",//步骤状态 - 1:待开始 2:进行中 3:已完成 4:延期(进行中) 5:失败 6:自动完成 7:超时关闭
+    @SerializedName("steptypeid")
+    val steptypeid : String? = "",//履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结 10:货款溢短 11:生成合同[中江] 12:运费 90:确认支付 91. 确认放行 92买方支付(直接扣款) 用于-1模板“
+    @SerializedName("steptypename")
+    val steptypename : String? = "",//步骤名称
+    @SerializedName("stepvalue")
+    val stepvalue : String? = "",//步骤值
+    @SerializedName("warehouseid")
+    val warehouseid:  String? = "",//仓库ID
+    @SerializedName("warehousename")
+    val warehousename: String? = "",//仓库名称
+    @SerializedName("wrfactortypeid")
+    val wrfactortypeid : String? = "",//仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
+    @SerializedName("wrfactortypename")
+    val wrfactortypename : String? = "",//仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
+    @SerializedName("wrstandardcode")
+    val wrstandardcode : String? = "",//现货商品代码
+    @SerializedName("wrstandardid")
+    val wrstandardid: String? = "",//现货商品ID
+    @SerializedName("wrstandardname")
+    val wrstandardname : String? = "",//商品名称
+    @SerializedName("wrtypename")
+    val wrtypename:  String? = "",//商品
+    @SerializedName("overdays")
+    val overdays : String? = ""//超期天数
+) : Parcelable{
+    constructor(parcel: Parcel) : this(
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString()
+    ) {
+    }
+
+    override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeString(delaydays)
+        parcel.writeString(deliverygoodscode)
+        parcel.writeString(deliverygoodsid)
+        parcel.writeString(deliverygoodsname)
+        parcel.writeString(endtime)
+        parcel.writeString(enumdicname)
+        parcel.writeString(executeside)
+        parcel.writeString(handlestatus)
+        parcel.writeString(isauto)
+        parcel.writeString(islastreceivestep)
+        parcel.writeString(minivalue)
+        parcel.writeString(optioncompare)
+        parcel.writeString(performancestepid)
+        parcel.writeString(planid)
+        parcel.writeString(realamount)
+        parcel.writeString(relatedorderid)
+        parcel.writeString(remaindays)
+        parcel.writeString(remark)
+        parcel.writeString(starttime)
+        parcel.writeString(stepamount)
+        parcel.writeString(stepdays)
+        parcel.writeString(stepindex)
+        parcel.writeString(steplanchtype)
+        parcel.writeString(stepremark)
+        parcel.writeString(stepstatus)
+        parcel.writeString(steptypeid)
+        parcel.writeString(steptypename)
+        parcel.writeString(stepvalue)
+        parcel.writeString(warehouseid)
+        parcel.writeString(warehousename)
+        parcel.writeString(wrfactortypeid)
+        parcel.writeString(wrfactortypename)
+        parcel.writeString(wrstandardcode)
+        parcel.writeString(wrstandardid)
+        parcel.writeString(wrstandardname)
+        parcel.writeString(wrtypename)
+        parcel.writeString(overdays)
+    }
+
+    override fun describeContents(): Int {
+        return 0
+    }
+
+    companion object CREATOR : Parcelable.Creator<WrPerformancePlanStepData> {
+        override fun createFromParcel(parcel: Parcel): WrPerformancePlanStepData {
+            return WrPerformancePlanStepData(parcel)
+        }
+
+        override fun newArray(size: Int): Array<WrPerformancePlanStepData?> {
+            return arrayOfNulls(size)
+        }
+    }
+
+
+}

+ 5 - 0
RMA/app/src/main/java/cn/muchinfo/rma/protobuf/funcode/FunCode.java

@@ -60,6 +60,11 @@ public class FunCode {
     /// 客户注册审核响应
     /// 客户注册审核响应
     public static final int AuditWskhUserInfoRsp = 1900725;
     public static final int AuditWskhUserInfoRsp = 1900725;
 
 
+    //客户资料操作请求
+    public static final int FID_CustomerInfoOperateReq = 1900731;
+    //客户资料操作响应
+    public static final int FID_CustomerInfoOperateRsp = 1900732;
+
     /**
     /**
      * MAKE_FID(0, 18, 2) 套保计划操作请求(1179650)
      * MAKE_FID(0, 18, 2) 套保计划操作请求(1179650)
      */
      */

+ 2 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/MainActivity.kt

@@ -9,6 +9,7 @@ import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.app.Constant
 import cn.muchinfo.rma.view.base.app.Constant
 
 
@@ -129,6 +130,7 @@ class MainActivity : BaseActivity<MainViewModel>() {
     }
     }
 
 
     fun initFragmentData() {
     fun initFragmentData() {
+
         newFragments.add(homeFragment)
         newFragments.add(homeFragment)
         newTabText.add("首页")
         newTabText.add("首页")
         newNormalIcon.add(R.mipmap.main_tab_1)
         newNormalIcon.add(R.mipmap.main_tab_1)

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

@@ -22,6 +22,7 @@ import cn.muchinfo.rma.business.hedge.HedgeManager
 import cn.muchinfo.rma.business.initialize.InitializeManager
 import cn.muchinfo.rma.business.initialize.InitializeManager
 import cn.muchinfo.rma.business.management.BusinessManager
 import cn.muchinfo.rma.business.management.BusinessManager
 import cn.muchinfo.rma.business.money.MoneyManager
 import cn.muchinfo.rma.business.money.MoneyManager
+import cn.muchinfo.rma.business.performance.PerformanceManager
 import cn.muchinfo.rma.business.quote.QuoteManager
 import cn.muchinfo.rma.business.quote.QuoteManager
 import cn.muchinfo.rma.business.quote.adapter.QuoteAdapter
 import cn.muchinfo.rma.business.quote.adapter.QuoteAdapter
 import cn.muchinfo.rma.business.report.ReportManager
 import cn.muchinfo.rma.business.report.ReportManager
@@ -141,6 +142,9 @@ class MyApplication : BaseApplication() {
     /** 银行相关管理类 **/
     /** 银行相关管理类 **/
     var bankManager : BankManager? = null
     var bankManager : BankManager? = null
 
 
+    /** 履约信息相关 **/
+    var performanceManager : PerformanceManager? = null
+
     companion object {
     companion object {
         private var instance: MyApplication? = null
         private var instance: MyApplication? = null
 
 
@@ -263,6 +267,7 @@ class MyApplication : BaseApplication() {
         moneyManager = MoneyManager()
         moneyManager = MoneyManager()
         contractGoodsManager = ContractGoodsManager()
         contractGoodsManager = ContractGoodsManager()
         bankManager = BankManager()
         bankManager = BankManager()
+        performanceManager = PerformanceManager()
     }
     }
 
 
     /**
     /**

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

@@ -9,12 +9,13 @@ object Constant {
 //        const val baseurl = "http://103.40.249.123:28280/cfg?key=mtp_20"//云融大宗
 //        const val baseurl = "http://103.40.249.123:28280/cfg?key=mtp_20"//云融大宗
 //    const val baseurl = "http://103.40.249.123:8280/cfg?key=mtp_20"//千海金外盘
 //    const val baseurl = "http://103.40.249.123:8280/cfg?key=mtp_20"//千海金外盘
 //    const val baseurl = "http://103.40.249.127:28280/cfg?key=mtp_20"
 //    const val baseurl = "http://103.40.249.127:28280/cfg?key=mtp_20"
-    const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"
-//    const val baseurl = "http://192.168.31.114:8080/cfg?key=test_114" // shenzhen01  123123
+//    const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"
+    const val baseurl = "http://192.168.31.114:8080/cfg?key=test_114" // 企业风管 123123
 //        const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"//李倩千海金 18611112222
 //        const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"//李倩千海金 18611112222
 //    const val baseurl = "http://192.168.31.220:8080/cfg?key=test_220"//李倩千海金 18611112222
 //    const val baseurl = "http://192.168.31.220:8080/cfg?key=test_220"//李倩千海金 18611112222
 //     const val baseurl = "http://192.168.31.101:8080/cfg?key=test_101"//李倩千海金 18611112222
 //     const val baseurl = "http://192.168.31.101:8080/cfg?key=test_101"//李倩千海金 18611112222
 
 
+//     const val baseurl = "http://192.168.31.107:8080/cfg?key=test_107"//李倩千海金 18611112222
 //      const val baseurl = "http://192.168.30.211:8080/cfg?key=test_211"// 瑶姐 130000000001 123456
 //      const val baseurl = "http://192.168.30.211:8080/cfg?key=test_211"// 瑶姐 130000000001 123456
 //          const val baseurl = "http://192.168.31.107:8080/cfg?key=test_107"// 瑶姐 千海金 13760119855
 //          const val baseurl = "http://192.168.31.107:8080/cfg?key=test_107"// 瑶姐 千海金 13760119855
 
 

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

@@ -107,7 +107,7 @@ class ExposureNumberViewHolder(
                       data.bindOptional(context){
                       data.bindOptional(context){
                        if (type == "1"){
                        if (type == "1"){
                             if (it?.decreaseqty == "-0"){
                             if (it?.decreaseqty == "-0"){
-                                text = "0"
+                                text = "0" + it?.enumdicname
                             } else{
                             } else{
                                 text = NumberUtils.roundNum(it?.decreaseqty,2) + it?.enumdicname
                                 text = NumberUtils.roundNum(it?.decreaseqty,2) + it?.enumdicname
                             }
                             }
@@ -125,7 +125,7 @@ class ExposureNumberViewHolder(
                  textView {
                  textView {
                      data.bindOptional(context){
                      data.bindOptional(context){
                         text = if (type == "1"){
                         text = if (type == "1"){
-                            it?.totalspotqty
+                            it?.totalspotqty + it?.enumdicname
                         }else{
                         }else{
                             it?.totalcurqty + "手"
                             it?.totalcurqty + "手"
                         }
                         }

+ 43 - 13
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceDefaultActivity.kt

@@ -1,11 +1,14 @@
 package cn.muchinfo.rma.view.base.hnstmain.performance
 package cn.muchinfo.rma.view.base.hnstmain.performance
 
 
+import android.annotation.SuppressLint
 import android.os.Bundle
 import android.os.Bundle
 import android.view.Gravity
 import android.view.Gravity
 import android.view.inputmethod.EditorInfo
 import android.view.inputmethod.EditorInfo
 import android.widget.EditText
 import android.widget.EditText
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.data.PerformancePlanData
 import cn.muchinfo.rma.global.data.PerformancePlanData
+import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.future.trade.itemView
 import cn.muchinfo.rma.view.base.future.trade.itemView
@@ -17,19 +20,21 @@ import org.jetbrains.anko.*
 /**
 /**
  * 违约申请
  * 违约申请
  */
  */
-class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>(){
+class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>() {
 
 
     val data by lazy { intent.getParcelableExtra<PerformancePlanData>("data") as PerformancePlanData }
     val data by lazy { intent.getParcelableExtra<PerformancePlanData>("data") as PerformancePlanData }
 
 
     //输入的支付金额
     //输入的支付金额
-    lateinit var input_amount : EditText
+    lateinit var input_amount: EditText
 
 
     //备注
     //备注
-    lateinit var remask_edittext : EditText
+    lateinit var remask_edittext: EditText
 
 
+    @SuppressLint("SetTextI18n")
     override fun onCreate(savedInstanceState: Bundle?) {
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         super.onCreate(savedInstanceState)
         verticalLayout {
         verticalLayout {
+            viewModel.queryWrPerformancePlanStep(data = data)
             createLoadingDialog(hintStr = "").bindTaskStatus(context, viewModel.loadingDialogStatus)
             createLoadingDialog(hintStr = "").bindTaskStatus(context, viewModel.loadingDialogStatus)
             background = resources.getDrawable(R.color.segtabment_bg_color)
             background = resources.getDrawable(R.color.segtabment_bg_color)
             topBar {
             topBar {
@@ -51,7 +56,7 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
                                 text = "品种"
                                 text = "品种"
                                 textSizeAuto = 34
                                 textSizeAuto = 34
                                 textColorInt = R.color.rma_zhushi_text_color
                                 textColorInt = R.color.rma_zhushi_text_color
-                            }.lparams(autoSize(250), wrapContent){
+                            }.lparams(autoSize(250), wrapContent) {
                                 marginStart = autoSize(36)
                                 marginStart = autoSize(36)
                             }
                             }
 
 
@@ -71,7 +76,7 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
                                 text = "商品"
                                 text = "商品"
                                 textSizeAuto = 34
                                 textSizeAuto = 34
                                 textColorInt = R.color.rma_zhushi_text_color
                                 textColorInt = R.color.rma_zhushi_text_color
-                            }.lparams(autoSize(250), wrapContent){
+                            }.lparams(autoSize(250), wrapContent) {
                                 marginStart = autoSize(36)
                                 marginStart = autoSize(36)
                             }
                             }
 
 
@@ -91,7 +96,7 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
                                 text = "仓库"
                                 text = "仓库"
                                 textSizeAuto = 34
                                 textSizeAuto = 34
                                 textColorInt = R.color.rma_zhushi_text_color
                                 textColorInt = R.color.rma_zhushi_text_color
-                            }.lparams(autoSize(250), wrapContent){
+                            }.lparams(autoSize(250), wrapContent) {
                                 marginStart = autoSize(36)
                                 marginStart = autoSize(36)
                             }
                             }
 
 
@@ -111,7 +116,7 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
                                 text = "关联单号"
                                 text = "关联单号"
                                 textSizeAuto = 34
                                 textSizeAuto = 34
                                 textColorInt = R.color.rma_zhushi_text_color
                                 textColorInt = R.color.rma_zhushi_text_color
-                            }.lparams(autoSize(250), wrapContent){
+                            }.lparams(autoSize(250), wrapContent) {
                                 marginStart = autoSize(36)
                                 marginStart = autoSize(36)
                             }
                             }
 
 
@@ -130,7 +135,7 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
                                 text = "当前步骤"
                                 text = "当前步骤"
                                 textSizeAuto = 34
                                 textSizeAuto = 34
                                 textColorInt = R.color.rma_zhushi_text_color
                                 textColorInt = R.color.rma_zhushi_text_color
-                            }.lparams(autoSize(250), wrapContent){
+                            }.lparams(autoSize(250), wrapContent) {
                                 marginStart = autoSize(36)
                                 marginStart = autoSize(36)
                             }
                             }
 
 
@@ -139,15 +144,18 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
                                     text = data.curstepname
                                     text = data.curstepname
                                     textSizeAuto = 29
                                     textSizeAuto = 29
                                     textColorInt = R.color.rma_black_33
                                     textColorInt = R.color.rma_black_33
-                                }.lparams(wrapContent, wrapContent){
+                                }.lparams(wrapContent, wrapContent) {
                                     topMargin = autoSize(36)
                                     topMargin = autoSize(36)
                                 }
                                 }
 
 
                                 textView {
                                 textView {
-                                    text = "超期天数" +  "--"
+                                    viewModel.wrPerformancePlanStepData.bindOptional(context) {
+                                        text = "超期天数" + it?.overdays
+                                    }
+                                    text = "超期天数" + "--"
                                     textSizeAuto = 29
                                     textSizeAuto = 29
                                     textColorInt = R.color.rma_hint_text_color_ccc
                                     textColorInt = R.color.rma_hint_text_color_ccc
-                                }.lparams(wrapContent, wrapContent){
+                                }.lparams(wrapContent, wrapContent) {
                                     topMargin = autoSize(36)
                                     topMargin = autoSize(36)
                                 }
                                 }
                             }.lparams(matchParent, autoSize(160))
                             }.lparams(matchParent, autoSize(160))
@@ -163,7 +171,7 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
                                 textSizeAuto = 31
                                 textSizeAuto = 31
                                 textColorInt = R.color.rma_black_33
                                 textColorInt = R.color.rma_black_33
                             }.lparams(wrapContent, wrapContent) {
                             }.lparams(wrapContent, wrapContent) {
-                                marginStart = autoSize(59)
+                                marginStart = autoSize(36)
                             }
                             }
 
 
                             editText {
                             editText {
@@ -188,6 +196,28 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
                     gravity = Gravity.CENTER_VERTICAL
                     gravity = Gravity.CENTER_VERTICAL
                     textView {
                     textView {
                         onThrottleFirstClick {
                         onThrottleFirstClick {
+                            if (data.buyorsell == "0") {
+                                viewModel.performanceContractedApplyReq(
+                                    marketid = data.marketid?.toLong() ?: 0,
+                                    PerformancePlanID = data.performanceplanid?.toLong() ?: 0,
+                                    BreachType = 2,
+                                    Applicant = GlobalDataCollection.instance?.loginRsp?.userID?.toLong()
+                                        ?: 0,
+                                    ApplyRemark = remask_edittext.text.toString()
+                                ) {
+                                    finish()
+                                }
+                            } else {
+                                viewModel.performanceContractedApplyReq(
+                                    marketid = data.marketid?.toLong() ?: 0,
+                                    PerformancePlanID = data.performanceplanid?.toLong() ?: 0,
+                                    BreachType = 1,
+                                    Applicant = GlobalDataCollection.instance?.loginRsp?.userID?.toLong() ?: 0,
+                                    ApplyRemark = remask_edittext.text.toString()
+                                ){
+                                    finish()
+                                }
+                            }
 
 
                         }
                         }
                         gravity = Gravity.CENTER
                         gravity = Gravity.CENTER
@@ -203,7 +233,7 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
                 }.lparams(matchParent, autoSize(144)) {
                 }.lparams(matchParent, autoSize(144)) {
                     gravity = Gravity.BOTTOM
                     gravity = Gravity.BOTTOM
                 }
                 }
-            }
+            }.lparams(matchParent, matchParent)
         }
         }
     }
     }
 
 

+ 32 - 42
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceDelayActivity.kt

@@ -1,15 +1,20 @@
 package cn.muchinfo.rma.view.base.hnstmain.performance
 package cn.muchinfo.rma.view.base.hnstmain.performance
 
 
+import android.annotation.SuppressLint
 import android.os.Bundle
 import android.os.Bundle
 import android.view.Gravity
 import android.view.Gravity
 import android.view.inputmethod.EditorInfo
 import android.view.inputmethod.EditorInfo
 import android.widget.EditText
 import android.widget.EditText
+import android.widget.Toast
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.data.PerformancePlanData
 import cn.muchinfo.rma.global.data.PerformancePlanData
+import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.future.trade.itemView
 import cn.muchinfo.rma.view.base.future.trade.itemView
 import cn.muchinfo.rma.view.base.home.contract.viewItemUI
 import cn.muchinfo.rma.view.base.home.contract.viewItemUI
+import com.blankj.utilcode.util.ToastUtils
 import mtp.polymer.com.autowidget.dialog.createLoadingDialog
 import mtp.polymer.com.autowidget.dialog.createLoadingDialog
 import mtp.polymer.com.autowidget.utils.bindTaskStatus
 import mtp.polymer.com.autowidget.utils.bindTaskStatus
 import org.jetbrains.anko.*
 import org.jetbrains.anko.*
@@ -27,9 +32,11 @@ class PerformanceDelayActivity : BaseActivity<PerformanceInformationViewModel>()
     //备注
     //备注
     lateinit var remask_edittext : EditText
     lateinit var remask_edittext : EditText
 
 
+    @SuppressLint("SetTextI18n")
     override fun onCreate(savedInstanceState: Bundle?) {
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         super.onCreate(savedInstanceState)
         verticalLayout {
         verticalLayout {
+            viewModel.queryWrPerformancePlanStep(data = data)
             createLoadingDialog(hintStr = "").bindTaskStatus(context, viewModel.loadingDialogStatus)
             createLoadingDialog(hintStr = "").bindTaskStatus(context, viewModel.loadingDialogStatus)
             background = resources.getDrawable(R.color.segtabment_bg_color)
             background = resources.getDrawable(R.color.segtabment_bg_color)
             topBar {
             topBar {
@@ -144,6 +151,9 @@ class PerformanceDelayActivity : BaseActivity<PerformanceInformationViewModel>()
                                 }
                                 }
 
 
                                 textView {
                                 textView {
+                                    viewModel.wrPerformancePlanStepData.bindOptional(context){
+                                        text = "超期天数" + it?.overdays
+                                    }
                                     text = "超期天数" +  "--"
                                     text = "超期天数" +  "--"
                                     textSizeAuto = 29
                                     textSizeAuto = 29
                                     textColorInt = R.color.rma_hint_text_color_ccc
                                     textColorInt = R.color.rma_hint_text_color_ccc
@@ -168,56 +178,19 @@ class PerformanceDelayActivity : BaseActivity<PerformanceInformationViewModel>()
                                 marginStart = autoSize(36)
                                 marginStart = autoSize(36)
                             }
                             }
 
 
-                            verticalLayout {
-                                textView {
-                                    text = "--元"
-                                    textSizeAuto = 29
-                                    textColorInt = R.color.rma_black_33
-                                }.lparams(wrapContent, wrapContent){
-                                    topMargin = autoSize(36)
-                                }
-
-                                textView {
-                                    if (data.buyorsell == "0"){//买
-                                        text = "已冻结履约金额" +  data.buyerfreezeamount + "元"
-                                    }else{//卖
-                                        text = "已冻结履约金额" +  data.sellerfreezeamountremain + "元"
-                                    }
-                                    textSizeAuto = 29
-                                    textColorInt = R.color.rma_hint_text_color_ccc
-                                }.lparams(wrapContent, wrapContent){
-                                    topMargin = autoSize(36)
-                                }
-                            }.lparams(matchParent, autoSize(160))
-                        }.lparams(matchParent, autoSize(160))
-
-                        itemView()
-
-                        linearLayout {
-                            background = resources.getDrawable(R.color.white)
-                            gravity = Gravity.CENTER_VERTICAL
-                            textView {
-                                text = "本次需支付"
-                                textSizeAuto = 34
-                                textColorInt = R.color.rma_zhushi_text_color
-                            }.lparams(autoSize(250), wrapContent){
-                                marginStart = autoSize(36)
-                            }
-
                             editText {
                             editText {
                                 input_amount = this
                                 input_amount = this
-                                hint = "请输入支付金额"
+                                hint = "请输入申请延期天数"
                                 background = null
                                 background = null
                                 inputType = EditorInfo.TYPE_CLASS_NUMBER
                                 inputType = EditorInfo.TYPE_CLASS_NUMBER
                                 hintColorStr = "#CCCCCC"
                                 hintColorStr = "#CCCCCC"
                                 textSizeAuto = 31
                                 textSizeAuto = 31
                                 textColorStr = "#333333"
                                 textColorStr = "#333333"
-                            }.lparams(0, autoSize(132),1f) {
-                                marginStart = autoSize(80)
-                            }
+                            }.lparams(matchParent, autoSize(132))
+
                         }.lparams(matchParent, autoSize(132))
                         }.lparams(matchParent, autoSize(132))
 
 
-                        viewItemUI()
+                        itemView()
 
 
                         linearLayout {
                         linearLayout {
                             background = resources.getDrawable(R.color.white)
                             background = resources.getDrawable(R.color.white)
@@ -252,7 +225,24 @@ class PerformanceDelayActivity : BaseActivity<PerformanceInformationViewModel>()
                     gravity = Gravity.CENTER_VERTICAL
                     gravity = Gravity.CENTER_VERTICAL
                     textView {
                     textView {
                         onThrottleFirstClick {
                         onThrottleFirstClick {
+                            if (input_amount.text.toString().isNullOrEmpty()){
+                                ToastUtils.showLong("请输入延期天数")
+                                return@onThrottleFirstClick
+                            }
+                            if (input_amount.text.toString().toDouble() == 0.0){
+                                ToastUtils.showLong("延期天数不能为零")
+                                return@onThrottleFirstClick
+                            }
 
 
+                            viewModel.performanceDelayApplyReq(
+                                marketid = data.marketid?.toLong() ?: 0,
+                                PerformancePlanStepID = viewModel.wrPerformancePlanStepData.value?.performancestepid?.toLong() ?: 0,
+                                delaydays = input_amount.text.toString().toInt(),
+                                applicant = GlobalDataCollection.instance?.loginRsp?.userID?.toLong() ?: 0,
+                                applyremark = remask_edittext.text.toString()
+                            ){
+                                finish()
+                            }
                         }
                         }
                         gravity = Gravity.CENTER
                         gravity = Gravity.CENTER
                         backgroundResource = R.mipmap.rma_save_info_bg
                         backgroundResource = R.mipmap.rma_save_info_bg
@@ -267,7 +257,7 @@ class PerformanceDelayActivity : BaseActivity<PerformanceInformationViewModel>()
                 }.lparams(matchParent, autoSize(144)) {
                 }.lparams(matchParent, autoSize(144)) {
                     gravity = Gravity.BOTTOM
                     gravity = Gravity.BOTTOM
                 }
                 }
-            }
+            }.lparams(matchParent, matchParent)
 
 
         }
         }
     }
     }

+ 6 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceInformationActivity.kt

@@ -87,6 +87,12 @@ class PerformanceInformationActivity : BaseActivity<PerformanceInformationViewMo
 
 
     }
     }
 
 
+    override fun onResume() {
+        super.onResume()
+        viewModel.queryPerformancePlan()
+        viewModel.querySellPerformancePlan()
+    }
+
     override fun onCreate(savedInstanceState: Bundle?) {
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         super.onCreate(savedInstanceState)
         verticalLayout {
         verticalLayout {
@@ -96,7 +102,6 @@ class PerformanceInformationActivity : BaseActivity<PerformanceInformationViewMo
                 commonTitle {
                 commonTitle {
                     text = "履约信息"
                     text = "履约信息"
                 }
                 }
-
             }
             }
 
 
             tabSegment {
             tabSegment {

+ 95 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceInformationViewModel.kt

@@ -4,12 +4,16 @@ import androidx.lifecycle.MutableLiveData
 import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.data.ColumnsData
 import cn.muchinfo.rma.global.data.ColumnsData
 import cn.muchinfo.rma.global.data.PerformancePlanData
 import cn.muchinfo.rma.global.data.PerformancePlanData
+import cn.muchinfo.rma.global.data.WrPerformancePlanStepData
 import cn.muchinfo.rma.global.data.WrSpecialMatchOrderData
 import cn.muchinfo.rma.global.data.WrSpecialMatchOrderData
 import cn.muchinfo.rma.global.isBlankString
 import cn.muchinfo.rma.global.isBlankString
 import cn.muchinfo.rma.global.performancestatus
 import cn.muchinfo.rma.global.performancestatus
+import cn.muchinfo.rma.netManage.base.InteractiveException
 import cn.muchinfo.rma.view.MyApplication
 import cn.muchinfo.rma.view.MyApplication
 import cn.muchinfo.rma.view.autoWidget.toArrayList
 import cn.muchinfo.rma.view.autoWidget.toArrayList
 import cn.muchinfo.rma.view.base.BaseViewModel
 import cn.muchinfo.rma.view.base.BaseViewModel
+import kotlinx.coroutines.GlobalScope
+import kotlinx.coroutines.launch
 import mtp.polymer.com.autowidget.utils.TaskUiModel
 import mtp.polymer.com.autowidget.utils.TaskUiModel
 
 
 /**
 /**
@@ -41,6 +45,23 @@ class PerformanceInformationViewModel : BaseViewModel(){
      */
      */
     val sellPerformanceInformationDataList: MutableLiveData<List<PerformancePlanData>> = MutableLiveData()
     val sellPerformanceInformationDataList: MutableLiveData<List<PerformancePlanData>> = MutableLiveData()
 
 
+    /**
+     * 履约信息详情
+     */
+    val wrPerformancePlanStepData : MutableLiveData<WrPerformancePlanStepData> = MutableLiveData()
+
+    fun queryWrPerformancePlanStep(data : PerformancePlanData){
+        val params = mutableMapOf<String,String>().apply {
+            put("planid",data.performanceplanid ?: "")
+        }
+        MyApplication.getInstance()?.performanceManager?.queryWrPerformancePlanStep(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                if (respData?.size ?: 0 > 0){
+                    wrPerformancePlanStepData.postValue(respData?.get(0))
+                }
+            }
+        }
+    }
 
 
     //-----------------买履约------------------
     //-----------------买履约------------------
     /**
     /**
@@ -71,7 +92,7 @@ class PerformanceInformationViewModel : BaseViewModel(){
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("buyorsell","0")
             put("buyorsell","0")
         }
         }
-        MyApplication.getInstance()?.warehouseManager?.queryPerformancePlan(params = params){ isSuccess, respData, error ->
+        MyApplication.getInstance()?.performanceManager?.queryPerformancePlan(params = params){ isSuccess, respData, error ->
             if (isSuccess){
             if (isSuccess){
                 buyPerformanceInformationDataList.postValue(getqueryPerformancePlanRightData(respData ?: arrayListOf()))
                 buyPerformanceInformationDataList.postValue(getqueryPerformancePlanRightData(respData ?: arrayListOf()))
             }
             }
@@ -147,7 +168,7 @@ class PerformanceInformationViewModel : BaseViewModel(){
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("buyorsell","1")
             put("buyorsell","1")
         }
         }
-        MyApplication.getInstance()?.warehouseManager?.queryPerformancePlan(params = params){ isSuccess, respData, error ->
+        MyApplication.getInstance()?.performanceManager?.queryPerformancePlan(params = params){ isSuccess, respData, error ->
             if (isSuccess){
             if (isSuccess){
                 sellPerformanceInformationDataList.postValue(getquerySellPerformancePlanRightData(respData ?: arrayListOf()))
                 sellPerformanceInformationDataList.postValue(getquerySellPerformancePlanRightData(respData ?: arrayListOf()))
             }
             }
@@ -193,5 +214,77 @@ class PerformanceInformationViewModel : BaseViewModel(){
         return newList
         return newList
     }
     }
 
 
+    //延期申请
+    fun performanceDelayApplyReq(
+        marketid : Long = 0,//市场id
+        PerformancePlanStepID : Long = 0,//履约计划步骤ID
+        delaydays : Int = 0,//申请延期天数
+        applicant : Long = 0,//申请人
+        applyremark : String = "",//申请备注
+        isSuccess: (isCompleted: Boolean) -> Unit
+    ){
+        loadingDialogStatus.value = TaskUiModel.inFlight()
+        GlobalScope.launch {
+            MyApplication.getInstance()?.performanceManager?.performanceDelayApplyReq(
+                marketid = marketid,
+                PerformancePlanStepID = PerformancePlanStepID,
+                delaydays = delaydays,
+                applicant = applicant,
+                applyremark = applyremark
+            ) { isCompleted, err ->
+                if (isCompleted) {
+                    loadingDialogStatus.postValue(TaskUiModel.success(msg = "请求成功"))
+                    isSuccess(true)
+                } else {
+                    loadingDialogStatus.postValue(
+                        TaskUiModel.failed(
+                            InteractiveException(
+                                errorMessage = err?.message!!
+                            )
+                        )
+                    )
+                }
+            }
+        }
+    }
+
+    //违约申请
+    fun performanceContractedApplyReq(
+        marketid : Long = 0,//市场id
+        PerformancePlanID : Long = 0,//履约计划步骤ID
+        BreachType : Int = 0,//违约方类型
+        Applicant : Long = 0,//违约申请人
+        ApplyRemark : String = "",//申请备注
+        Attachment : String = "",//附件
+        isSuccess: (isCompleted: Boolean) -> Unit
+    ){
+        loadingDialogStatus.value = TaskUiModel.inFlight()
+        GlobalScope.launch {
+            MyApplication.getInstance()?.performanceManager?.performanceContractedApplyReq(
+                marketid = marketid,
+                PerformancePlanID = PerformancePlanID,
+                BreachType = BreachType,
+                Applicant = Applicant,
+                ApplyRemark = ApplyRemark,
+                Attachment = Attachment
+            ) { isCompleted, err ->
+                if (isCompleted) {
+                    loadingDialogStatus.postValue(TaskUiModel.success(msg = "请求成功"))
+                    isSuccess(true)
+                } else {
+                    loadingDialogStatus.postValue(
+                        TaskUiModel.failed(
+                            InteractiveException(
+                                errorMessage = err?.message!!
+                            )
+                        )
+                    )
+                }
+            }
+        }
+    }
+
+
+
 
 
 }
 }

+ 56 - 8
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/adapter/PerformanceInformationContentAdapter.java

@@ -2,6 +2,7 @@ package cn.muchinfo.rma.view.base.hnstmain.performance.adapter;
 
 
 import android.annotation.SuppressLint;
 import android.annotation.SuppressLint;
 import android.content.Context;
 import android.content.Context;
+import android.content.Intent;
 import android.view.LayoutInflater;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.View;
@@ -15,6 +16,8 @@ import androidx.annotation.NonNull;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 import androidx.recyclerview.widget.RecyclerView;
 
 
+import com.blankj.utilcode.util.ActivityUtils;
+
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
@@ -22,6 +25,9 @@ import cn.muchinfo.rma.R;
 import cn.muchinfo.rma.global.data.HnstWrPositionData;
 import cn.muchinfo.rma.global.data.HnstWrPositionData;
 import cn.muchinfo.rma.global.data.PerformancePlanData;
 import cn.muchinfo.rma.global.data.PerformancePlanData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
+import cn.muchinfo.rma.view.base.hnstmain.performance.PerformanceDefaultActivity;
+import cn.muchinfo.rma.view.base.hnstmain.performance.PerformanceDelayActivity;
+import cn.muchinfo.rma.view.base.hnstmain.performance.PerformationPayActivity;
 import cn.muchinfo.rma.view.base.procurement.RightScrollAdapter;
 import cn.muchinfo.rma.view.base.procurement.RightScrollAdapter;
 
 
 /**
 /**
@@ -115,32 +121,74 @@ public class PerformanceInformationContentAdapter extends RecyclerView.Adapter<P
         itemViewHolder.details.setVisibility(View.VISIBLE);
         itemViewHolder.details.setVisibility(View.VISIBLE);
         itemViewHolder.future_details.setVisibility(View.VISIBLE);
         itemViewHolder.future_details.setVisibility(View.VISIBLE);
         itemViewHolder.spot_details.setVisibility(View.VISIBLE);
         itemViewHolder.spot_details.setVisibility(View.VISIBLE);
-        if (type.equals("1")){
-            itemViewHolder.warehouse_register.setText("付款");
-            itemViewHolder.warehouse_register.setVisibility(View.VISIBLE);
-        }
 
 
         if (type.equals("2")){
         if (type.equals("2")){
             itemViewHolder.fanacel_register.setText("发票");
             itemViewHolder.fanacel_register.setText("发票");
-            itemViewHolder.fanacel_register.setVisibility(View.VISIBLE);
+            itemViewHolder.fanacel_register.setVisibility(View.GONE);
+        }
+
+        if (data.getPerformancestatus().equals("2")){
+            if (type.equals("1")){//买履约
+                if (data.getSteptypeid().equals("1") || data.getSteptypeid().equals("6") || data.getSteptypeid().equals("10")){//步骤为买方支付,货款溢短,卖方发票时,延期,违约,详情按钮才显示
+                    itemViewHolder.spot_details.setText("延期");
+                    itemViewHolder.spot_details.setVisibility(View.VISIBLE);
+                    itemViewHolder.future_details.setText("违约");
+                    itemViewHolder.future_details.setVisibility(View.VISIBLE);
+                    itemViewHolder.details.setText("详情");
+                    itemViewHolder.details.setVisibility(View.VISIBLE);
+                }
+                if (data.getSteptypeid().equals("1")){//付款只有在买方支付时显示
+                    itemViewHolder.warehouse_register.setText("付款");
+                    itemViewHolder.warehouse_register.setVisibility(View.VISIBLE);
+                }
+            }else if (type.equals("2")){//卖履约
+                itemViewHolder.warehouse_register.setVisibility(View.GONE);
+                if (data.getSteptypeid().equals("1") || data.getSteptypeid().equals("4") || data.getSteptypeid().equals("6") || data.getSteptypeid().equals("8")){//步骤为买方支付,卖方发货,卖方发票,仓单转移时,延期,违约,详情按钮才显示
+                    itemViewHolder.spot_details.setText("延期");
+                    itemViewHolder.spot_details.setVisibility(View.VISIBLE);
+                    itemViewHolder.future_details.setText("违约");
+                    itemViewHolder.future_details.setVisibility(View.VISIBLE);
+                    itemViewHolder.details.setText("详情");
+                    itemViewHolder.details.setVisibility(View.VISIBLE);
+                }
+            }
+
+        }else {
+            itemViewHolder.warehouse_register.setVisibility(View.GONE);
+            itemViewHolder.spot_details.setVisibility(View.GONE);
+            itemViewHolder.future_details.setVisibility(View.GONE);
+            itemViewHolder.details.setVisibility(View.GONE);
         }
         }
 
 
         //付款
         //付款
         itemViewHolder.warehouse_register.setOnClickListener(view -> {
         itemViewHolder.warehouse_register.setOnClickListener(view -> {
-
+            Intent intent = new Intent();
+            intent.putExtra("data",data);
+            intent.setClass(context, PerformationPayActivity.class);
+            ActivityUtils.startActivity(intent);
         });
         });
+
         //发票
         //发票
         itemViewHolder.fanacel_register.setOnClickListener(view -> {
         itemViewHolder.fanacel_register.setOnClickListener(view -> {
 
 
         });
         });
+
         //延期
         //延期
         itemViewHolder.spot_details.setOnClickListener(view -> {
         itemViewHolder.spot_details.setOnClickListener(view -> {
-
+            Intent intent = new Intent();
+            intent.putExtra("data",data);
+            intent.setClass(context, PerformanceDelayActivity.class);
+            ActivityUtils.startActivity(intent);
         });
         });
+
         //违约
         //违约
         itemViewHolder.future_details.setOnClickListener(view -> {
         itemViewHolder.future_details.setOnClickListener(view -> {
-
+            Intent intent = new Intent();
+            intent.putExtra("data",data);
+            intent.setClass(context, PerformanceDefaultActivity.class);
+            ActivityUtils.startActivity(intent);
         });
         });
+
         //详情
         //详情
         itemViewHolder.details.setOnClickListener(view -> {
         itemViewHolder.details.setOnClickListener(view -> {
 
 

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

@@ -255,6 +255,13 @@ class LoginAccountManager(
                     marginStart = autoSize(20)
                     marginStart = autoSize(20)
                 }
                 }
                 textView {
                 textView {
+                    viewModel.accountManagerList.bindOptional(context){
+                        var size = 0
+                        it?.forEach {data ->
+                            size = size.plus(data.userlist?.size ?: 0)
+                        }
+                        text = "(" + size + ")"
+                    }
                     text = ""
                     text = ""
                     textColorInt = R.color.rma_hint_text_color_ccc
                     textColorInt = R.color.rma_hint_text_color_ccc
                     textSizeAuto = 36
                     textSizeAuto = 36
@@ -372,6 +379,13 @@ class TradingAccountManager(
                     marginStart = autoSize(20)
                     marginStart = autoSize(20)
                 }
                 }
                 textView {
                 textView {
+                    viewModel.tradingAccountManagerList.bindOptional(context){
+                        var size = 0
+                        it?.forEach {data ->
+                            size = size.plus(data.userlist?.size ?: 0)
+                        }
+                        text = "(" + size + ")"
+                    }
                     text = ""
                     text = ""
                     textColorInt = R.color.rma_hint_text_color_ccc
                     textColorInt = R.color.rma_hint_text_color_ccc
                     textSizeAuto = 36
                     textSizeAuto = 36
@@ -498,6 +512,13 @@ class ManagerAccountUI(
                     marginStart = autoSize(20)
                     marginStart = autoSize(20)
                 }
                 }
                 textView {
                 textView {
+                    viewModel.managerAccountManagerList.bindOptional(context){
+                        var size = 0
+                        it?.forEach {data ->
+                            size = size.plus(data.userlist?.size ?: 0)
+                        }
+                        text = "(" + size + ")"
+                    }
                     text = ""
                     text = ""
                     textColorInt = R.color.rma_hint_text_color_ccc
                     textColorInt = R.color.rma_hint_text_color_ccc
                     textSizeAuto = 36
                     textSizeAuto = 36
@@ -650,6 +671,13 @@ class FuturesAccountManager(
                     marginStart = autoSize(20)
                     marginStart = autoSize(20)
                 }
                 }
                 textView {
                 textView {
+                    viewModel.futureManagerList.bindOptional(context){
+                        var size = 0
+                        it?.forEach {data ->
+                            size = size.plus(data.subacclist?.remove { it.tradestatus == "7" }?.size ?: 0)
+                        }
+                        text = "(" + size + ")"
+                    }
                     text = ""
                     text = ""
                     textColorInt = R.color.rma_hint_text_color_ccc
                     textColorInt = R.color.rma_hint_text_color_ccc
                     textSizeAuto = 36
                     textSizeAuto = 36

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

@@ -6,6 +6,7 @@ import android.view.Gravity
 import android.view.View
 import android.view.View
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.ViewEnumUtils
 import cn.muchinfo.rma.global.ViewEnumUtils
+import cn.muchinfo.rma.global.currencyid
 import cn.muchinfo.rma.global.data.ContractData
 import cn.muchinfo.rma.global.data.ContractData
 import cn.muchinfo.rma.global.isBlankString
 import cn.muchinfo.rma.global.isBlankString
 import cn.muchinfo.rma.global.isShowTimeString
 import cn.muchinfo.rma.global.isShowTimeString
@@ -396,7 +397,7 @@ fun _LinearLayout.contractDetailThreeView(data: ContractData) {
             }
             }
 
 
             textView {
             textView {
-                text = data.price + data.currencyname
+                text = data.price + data.currencyid?.currencyid()
                 textColorInt = R.color.rma_black_33
                 textColorInt = R.color.rma_black_33
                 textSizeAuto = 31
                 textSizeAuto = 31
             }.lparams(wrapContent, wrapContent) {
             }.lparams(wrapContent, wrapContent) {
@@ -419,7 +420,7 @@ fun _LinearLayout.contractDetailThreeView(data: ContractData) {
             }
             }
 
 
             textView {
             textView {
-                text = data.amount + data.currencyname
+                text = data.amount + data.currencyid?.currencyid()
                 textColorInt = R.color.rma_black_33
                 textColorInt = R.color.rma_black_33
                 textSizeAuto = 31
                 textSizeAuto = 31
             }.lparams(wrapContent, wrapContent) {
             }.lparams(wrapContent, wrapContent) {
@@ -471,7 +472,7 @@ fun _LinearLayout.contractDetailThreeView(data: ContractData) {
             }
             }
 
 
             textView {
             textView {
-                text = data.price + data.currencyname
+                text = data.price + data.currencyid?.currencyid()
                 textColorInt = R.color.rma_black_33
                 textColorInt = R.color.rma_black_33
                 textSizeAuto = 31
                 textSizeAuto = 31
             }.lparams(wrapContent, wrapContent) {
             }.lparams(wrapContent, wrapContent) {
@@ -493,7 +494,7 @@ fun _LinearLayout.contractDetailThreeView(data: ContractData) {
             }
             }
 
 
             textView {
             textView {
-                text = data.pricemove + data.currencyname + "/" + data.enumdicname
+                text = data.pricemove + data.currencyid?.currencyid() + "/" + data.enumdicname
                 textColorInt = R.color.rma_black_33
                 textColorInt = R.color.rma_black_33
                 textSizeAuto = 31
                 textSizeAuto = 31
             }.lparams(wrapContent, wrapContent) {
             }.lparams(wrapContent, wrapContent) {

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

@@ -1,4 +1,4 @@
-package cn.muchinfo.rma.view.base.home.contract
+    package cn.muchinfo.rma.view.base.home.contract
 
 
 import androidx.lifecycle.MutableLiveData
 import androidx.lifecycle.MutableLiveData
 import cn.muchinfo.rma.business.contract.SpotContractInfo
 import cn.muchinfo.rma.business.contract.SpotContractInfo
@@ -462,8 +462,8 @@ class ContractViewModel : BaseViewModel() {
      */
      */
     fun queryUserInfo() {
     fun queryUserInfo() {
         val params = mutableMapOf<String, String>().apply {
         val params = mutableMapOf<String, String>().apply {
-            put("MemberUserID", GlobalDataCollection.instance?.loginRsp?.memberUserID.toString())
-            put("queryType", "3")
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("querytype", "3")
         }
         }
 
 
         MyApplication.getInstance()?.customerManage?.queryUserInfo(params) { isSuccess, respData, error ->
         MyApplication.getInstance()?.customerManage?.queryUserInfo(params) { isSuccess, respData, error ->
@@ -484,7 +484,11 @@ class ContractViewModel : BaseViewModel() {
             newCustomerList.add(
             newCustomerList.add(
                 SelectData(
                 SelectData(
                     id = it.userid.toString() ?: "",
                     id = it.userid.toString() ?: "",
-                    value = it.nickname ?: ""
+                    value =  if (it.nickname.isNullOrEmpty()){
+                        it.username ?: ""
+                    }else{
+                        it.nickname
+                    }
                 )
                 )
             )
             )
         }
         }

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

@@ -266,6 +266,7 @@ public class ContractAdapter extends RecyclerView.Adapter<ContractAdapter.ItemVi
                 }else {
                 }else {
                     intent.putExtra("type","2");
                     intent.putExtra("type","2");
                 }
                 }
+                intent.putExtra("isFrom","2");
                 intent.setClass(context, ContractDetailActivity.class);
                 intent.setClass(context, ContractDetailActivity.class);
                 context.startActivity(intent);
                 context.startActivity(intent);
             }
             }

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

@@ -13,6 +13,7 @@ import android.widget.TextView
 import androidx.lifecycle.MutableLiveData
 import androidx.lifecycle.MutableLiveData
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.MTPEnums
 import cn.muchinfo.rma.global.data.UserInfoData
 import cn.muchinfo.rma.global.data.UserInfoData
 import cn.muchinfo.rma.global.database.DataBase
 import cn.muchinfo.rma.global.database.DataBase
 import cn.muchinfo.rma.global.isBlankString
 import cn.muchinfo.rma.global.isBlankString
@@ -26,6 +27,9 @@ import cn.muchinfo.rma.view.autoWidget.addressDialog.AddressItemData
 import cn.muchinfo.rma.view.autoWidget.photopicter.PhotoUtils
 import cn.muchinfo.rma.view.autoWidget.photopicter.PhotoUtils
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.app.Constant
 import cn.muchinfo.rma.view.base.app.Constant
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import cn.muchinfo.rma.view.base.home.contract.verticalEmptyView
+import cn.muchinfo.rma.view.base.home.contract.viewItemUI
 import com.alibaba.fastjson.JSON
 import com.alibaba.fastjson.JSON
 import com.blankj.utilcode.util.LogUtils
 import com.blankj.utilcode.util.LogUtils
 import com.blankj.utilcode.util.SPUtils
 import com.blankj.utilcode.util.SPUtils
@@ -113,6 +117,16 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
     lateinit var enterprise_name: EditText
     lateinit var enterprise_name: EditText
 
 
     /**
     /**
+     * 登录账号
+     */
+    lateinit var login_name: EditText
+
+    /**
+     * 登录密码
+     */
+    lateinit var login_psw: EditText
+
+    /**
      * 证件号码
      * 证件号码
      */
      */
     lateinit var card_umber: EditText
     lateinit var card_umber: EditText
@@ -147,6 +161,11 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
      */
      */
     val cardType: MutableLiveData<SelectData> = MutableLiveData()
     val cardType: MutableLiveData<SelectData> = MutableLiveData()
 
 
+    /**
+     * 选择的所属机构
+     */
+    val selectPresentData : MutableLiveData<SelectData> = MutableLiveData()
+
     private val dialog by lazy { createLoadingDialog(hintStr = "正在提交") }
     private val dialog by lazy { createLoadingDialog(hintStr = "正在提交") }
 
 
     private var addressDialog //地址选择控件
     private var addressDialog //地址选择控件
@@ -179,6 +198,12 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
                     value = data.cardtypename ?: ""
                     value = data.cardtypename ?: ""
                 )
                 )
             )
             )
+            selectPresentData.postValue(
+                SelectData(
+                    id = data.parentuserid.toString(),
+                    value = data.parentusername ?: ""
+                )
+            )
             val addressList = arrayListOf<AddressItemData>()
             val addressList = arrayListOf<AddressItemData>()
             if (data.provinceid != 0) {
             if (data.provinceid != 0) {
                 val provinceidData = AddressItemData()
                 val provinceidData = AddressItemData()
@@ -205,6 +230,7 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
         dialog.bindTaskStatus(context = this, taskUiModelData = viewModel.loadingDialogStatus)
         dialog.bindTaskStatus(context = this, taskUiModelData = viewModel.loadingDialogStatus)
 
 
         verticalLayout {
         verticalLayout {
+            viewModel.queryParentAreaList()
             loadingDialog = createLoadingDialog(hintStr = "请求中")
             loadingDialog = createLoadingDialog(hintStr = "请求中")
             loadingDialog?.bindTaskStatus(context, viewModel.loadingDialogStatus)
             loadingDialog?.bindTaskStatus(context, viewModel.loadingDialogStatus)
             topBar {
             topBar {
@@ -239,6 +265,162 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
             frameLayout {
             frameLayout {
                 scrollView {
                 scrollView {
                     verticalLayout {
                     verticalLayout {
+
+                         linearLayout {
+                             if (SPUtils.getInstance().getString(Constant.oem) == "qhj"){
+                                visibility = View.VISIBLE
+                            }else{
+                                 visibility = View.GONE
+                             }
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                creatBottomSheetDialog("请选择合同类型", viewModel.getSelectPresentList()) {
+                                    selectPresentData.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 {
+                                text = "请选择所属机构"
+                                selectPresentData.bindOptional(context) {
+                                    text = it?.value
+                                    textColorInt = R.color.rma_black_33
+                                }
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(80)
+                            }
+
+                            emptyView()
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(36), autoSize(36)) {
+                                marginEnd = autoSize(25)
+                            }
+                        }.lparams(matchParent, autoSize(132))
+
+                         viewItemUI()
+
+                        // 千海金 登陆账号
+                        linearLayout {
+                            if (SPUtils.getInstance().getString(Constant.oem) == "qhj"){
+                                visibility = View.VISIBLE
+                            }else{
+                                visibility = View.GONE
+                            }
+                            gravity = Gravity.CENTER_VERTICAL
+
+                            textView {
+                                if (status == "6") {
+                                    visibility = View.INVISIBLE
+                                } else {
+                                    visibility = View.VISIBLE
+                                }
+                                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 {
+                                if (status != "1") {
+                                    setText(data.logincode)
+                                }
+                                if (status != "1" && status != "2") {
+                                    isEnabled = false
+                                }
+                                login_name = this
+                                hint = "请输入登录账号"
+                                background = null
+                                inputType = EditorInfo.TYPE_CLASS_TEXT
+                                hintColorStr = "#CCCCCC"
+                                textSizeAuto = 31
+                                textColorStr = "#333333"
+                            }.lparams(autoSize(500), wrapContent) {
+                                marginStart = autoSize(86)
+                            }
+
+                        }.lparams(matchParent, autoSize(136))
+
+                        viewItemUI()
+
+                        // 千海金 登录密码
+                        linearLayout {
+                            if (SPUtils.getInstance().getString(Constant.oem) == "qhj"){
+                                visibility = View.VISIBLE
+                            }else{
+                                visibility = View.GONE
+                            }
+                            gravity = Gravity.CENTER_VERTICAL
+
+                            textView {
+                                if (status == "6") {
+                                    visibility = View.INVISIBLE
+                                } else {
+                                    visibility = View.VISIBLE
+                                }
+                                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 {
+//                                if (status != "1") {
+//                                    setText(data.customername)
+//                                }
+                                if (status != "1" && status != "2") {
+                                    isEnabled = false
+                                }
+                                login_psw = this
+                                hint = "请输入登录密码"
+                                background = null
+                                inputType = EditorInfo.TYPE_CLASS_TEXT
+                                hintColorStr = "#CCCCCC"
+                                textSizeAuto = 31
+                                textColorStr = "#333333"
+                            }.lparams(autoSize(500), wrapContent) {
+                                marginStart = autoSize(86)
+                            }
+
+                        }.lparams(matchParent, autoSize(136))
+
+                         viewItemUI()
                         // 客户类型
                         // 客户类型
                         linearLayout {
                         linearLayout {
                             // 客户类型点击
                             // 客户类型点击
@@ -1245,6 +1427,8 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
                         }.lparams(matchParent, autoSize(136)) {
                         }.lparams(matchParent, autoSize(136)) {
                             bottomMargin = autoSize(200)
                             bottomMargin = autoSize(200)
                         }
                         }
+
+                        verticalEmptyView()
                     }
                     }
                 }
                 }
 
 
@@ -1456,6 +1640,21 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
      */
      */
     private fun checkInput(): Boolean {
     private fun checkInput(): Boolean {
 
 
+        if (SPUtils.getInstance().getString(Constant.oem) == "qhj"){
+            if (selectPresentData.value?.id.isNullOrEmpty()){
+                ToastUtils.showLong("请选择所属机构")
+                return false
+            }
+            if (login_name.text.toString().isNullOrEmpty()){
+                ToastUtils.showLong("请输入登录账号")
+                return false
+            }
+            if (login_psw.text.toString().isNullOrEmpty()){
+                ToastUtils.showLong("请输入登录密码")
+                return false
+            }
+        }
+
         if (customerType.value?.id == "1"){//判断个人的必填项
         if (customerType.value?.id == "1"){//判断个人的必填项
             if (enterprise_name.text.isNullOrEmpty()) {
             if (enterprise_name.text.isNullOrEmpty()) {
                 ToastUtils.showLong("请输入姓名")
                 ToastUtils.showLong("请输入姓名")
@@ -1477,7 +1676,6 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
                 return false
                 return false
             }
             }
         }
         }
-
         return true
         return true
     }
     }
 
 
@@ -1493,118 +1691,128 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
     }
     }
 
 
     private fun addUserInfo(isDraft: Boolean) {
     private fun addUserInfo(isDraft: Boolean) {
+        val data = updataCustomerData()
         // 客户资料参数
         // 客户资料参数
-        val params = mutableMapOf<String, Any>()
-        if (data.userid?.toInt() == 0) {
-            params["userid"] = 1
+
+        if (data.userid.toInt() == 0) {
+            data.userid = 0
+            data.operatetype = 1
         } else {
         } else {
-            params["userid"] = data.userid ?: 1
+            data.operatetype = 2
+            data.userid = data.userid
         }
         }
 
 
-        params["userinfotype"] = customerType.value?.id?.toInt() ?: 0
-        // 企业名称
-        params["customername"] = enterprise_name.text.toString()
-        params["username"] = enterprise_name.text.toString()
-        // 开户状态:1 - 未提交;2 - 待初审
-        params["userstate"] = if (isDraft) 1 else 2
+        if (SPUtils.getInstance().getString(Constant.oem) == "qhj"){
+            data.areaid = selectPresentData.value?.id?.toLong() ?: 0
+            data.logincode = login_name.text.toString()
+            data.loginpwd = login_psw.text.toString()
+        }else{
+            data.areaid = GlobalDataCollection.instance?.loginRsp?.userID?.toLong() ?: 0
+        }
+        data.userinfotype = customerType.value?.id?.toInt() ?: 0
+        data.username = enterprise_name.text.toString()
+        data.userstate = if (isDraft) 1 else 2
         // 所属机构
         // 所属机构
-        // FIXME: - 这里应该判断一下UserID是否为0
-        params["memberareaid"] = GlobalDataCollection.instance?.loginRsp?.userID ?: 0
+//        // FIXME: - 这里应该判断一下UserID是否为0
+//        params["memberareaid"] = GlobalDataCollection.instance?.loginRsp?.userID ?: 0
 
 
         // 证件类型
         // 证件类型
         if (cardType.value?.id?.isNullOrEmpty() == false) {
         if (cardType.value?.id?.isNullOrEmpty() == false) {
             // FIXME: - 证件类型要从数据库枚举中获取
             // FIXME: - 证件类型要从数据库枚举中获取
-            params["cardtype"] = cardType.value?.id?.toInt() ?: 0
-        } else {
-            params["cardtype"] = -1
+            data.cardtype = cardType.value?.id?.toInt() ?: 0
         }
         }
         // 证件号码
         // 证件号码
         if (!card_umber.text.isNullOrEmpty()) {
         if (!card_umber.text.isNullOrEmpty()) {
-            params["cardnum"] = card_umber.text.toString()
+            data.cardnum = card_umber.text.toString()
         }
         }
 
 
         if (customerType.value?.id == "1"){//个人
         if (customerType.value?.id == "1"){//个人
             // 身份证正面照
             // 身份证正面照
             if (!frontIdCarduploadFile.isNullOrEmpty()) {
             if (!frontIdCarduploadFile.isNullOrEmpty()) {
-                params["cardfrontphotourl"] = frontIdCarduploadFile
+                data.cardfrontphotourl = frontIdCarduploadFile
             }
             }
             //身份证背面照
             //身份证背面照
             if (!backIdCarduploadFile.isNullOrEmpty()) {
             if (!backIdCarduploadFile.isNullOrEmpty()) {
-                params["cardbackphotourl"] = backIdCarduploadFile
+                data.cardbackphotourl = backIdCarduploadFile
             }
             }
+
+            data.nickname = enterprise_name.text.toString()
         }else{//企业
         }else{//企业
             // 营业执照
             // 营业执照
             if (!uploadFile.isNullOrEmpty()) {
             if (!uploadFile.isNullOrEmpty()) {
-                params["cardfrontphotourl"] = uploadFile
+                data.proxystatementurl = uploadFile
             }
             }
             //企业简称
             //企业简称
             if (enterprise_referred.text.toString().isNotEmpty()){
             if (enterprise_referred.text.toString().isNotEmpty()){
-                params["nickname"] = enterprise_referred.text.toString()
+                data.nickname = enterprise_referred.text.toString()
             }
             }
             //法定代表人
             //法定代表人
             if (legal_representative.text.toString().isNotEmpty()){
             if (legal_representative.text.toString().isNotEmpty()){
-                params["legalpersonname"] = legal_representative.text.toString()
+                data.legalpersonname = legal_representative.text.toString()
             }
             }
             //纳税人识别号
             //纳税人识别号
             if (identification_number.text.toString().isNotEmpty()){
             if (identification_number.text.toString().isNotEmpty()){
-                params["taxpayernum"] = identification_number.text.toString()
+                data.taxpayernum = identification_number.text.toString()
             }
             }
             //联系人
             //联系人
             if (the_contact.text.toString().isNotEmpty()){
             if (the_contact.text.toString().isNotEmpty()){
-                params["contactname"] = the_contact.text.toString()
+                data.contactname = the_contact.text.toString()
             }
             }
         }
         }
 
 
         // 手机号码
         // 手机号码
         if (!phone_number.text.isNullOrEmpty()) {
         if (!phone_number.text.isNullOrEmpty()) {
-            params["mobilephone"] = phone_number.text.toString()
+            data.mobilephone = phone_number.text.toString()
         }
         }
         // 联系电话
         // 联系电话
         if (!contact_number.text.isNullOrEmpty()) {
         if (!contact_number.text.isNullOrEmpty()) {
-            params["telphone"] = contact_number.text.toString()
+            data.telphone = contact_number.text.toString()
         }
         }
         // 通讯地址
         // 通讯地址
         if (mData.value.isNullOrEmpty().not()) {
         if (mData.value.isNullOrEmpty().not()) {
-            params["countryid"] = 0
-            params["provinceid"] = mData.value?.get(0)?.autoid?.toInt()!!
-            params["cityid"] = mData.value?.get(1)?.autoid?.toInt()!!
-            params["districtid"] = mData.value?.get(2)?.autoid?.toInt()!!
+            data.provinceid = mData.value?.get(0)?.autoid?.toLong()!!
+            data.cityid = mData.value?.get(1)?.autoid?.toLong()!!
+            data.districtid = mData.value?.get(2)?.autoid?.toLong()!!
         }
         }
 
 
         if (detailed_address.text.toString().isNullOrEmpty().not()) {
         if (detailed_address.text.toString().isNullOrEmpty().not()) {
-            params["cardaddress"] = detailed_address.text.toString()
+            data.ipaddress = detailed_address.text.toString()
         }
         }
 
 
         // 备注
         // 备注
         if (!remark.text.isNullOrEmpty()) {
         if (!remark.text.isNullOrEmpty()) {
-            params["remark"] = remark.text.toString()
+            data.remark = remark.text.toString()
         }
         }
 
 
-        // 提交申请
-        viewModel.loadingDialogStatus.value = TaskUiModel.inFlight()
-        if (status == "2") {//修改
-            viewModel.modifyUserInfoApply(params) { isCompleted, err ->
-                if (!isCompleted) {
-                    viewModel.loadingDialogStatus.value =
-                        TaskUiModel.failed(InteractiveException(err?.message ?: ""))
-                    return@modifyUserInfoApply
-                }
-                viewModel.loadingDialogStatus.value = TaskUiModel.success(msg = "提交成功")
-                finish()
-            }
-        } else if (status == "1") {//新增
-            viewModel.addUserInfoApply(params) { isCompleted, err ->
-                if (!isCompleted) {
-                    viewModel.loadingDialogStatus.value =
-                        TaskUiModel.failed(InteractiveException(err?.message ?: ""))
-                    return@addUserInfoApply
-                }
-
-                viewModel.loadingDialogStatus.value = TaskUiModel.success(msg = "提交成功")
-                SPUtils.getInstance().put(Constant.SUCCESS_ADD_CUSTOMER,1)//记录申请成功了
-                finish()
-            }
+        viewModel.customerInfoOperateReq(data = data){
+            finish()
         }
         }
 
 
+//        // 提交申请
+//        viewModel.loadingDialogStatus.value = TaskUiModel.inFlight()
+//        if (status == "2") {//修改
+//            viewModel.modifyUserInfoApply(params) { isCompleted, err ->
+//                if (!isCompleted) {
+//                    viewModel.loadingDialogStatus.value =
+//                        TaskUiModel.failed(InteractiveException(err?.message ?: ""))
+//                    return@modifyUserInfoApply
+//                }
+//                viewModel.loadingDialogStatus.value = TaskUiModel.success(msg = "提交成功")
+//                finish()
+//            }
+//        } else if (status == "1") {//新增
+//            viewModel.addUserInfoApply(params) { isCompleted, err ->
+//                if (!isCompleted) {
+//                    viewModel.loadingDialogStatus.value =
+//                        TaskUiModel.failed(InteractiveException(err?.message ?: ""))
+//                    return@addUserInfoApply
+//                }
+//
+//                viewModel.loadingDialogStatus.value = TaskUiModel.success(msg = "提交成功")
+//                SPUtils.getInstance().put(Constant.SUCCESS_ADD_CUSTOMER,1)//记录申请成功了
+//                finish()
+//            }
+//        }
+
     }
     }
 }
 }

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

@@ -18,6 +18,7 @@ import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.BaseUI
 import cn.muchinfo.rma.view.base.BaseUI
 import cn.muchinfo.rma.view.base.app.Constant
 import cn.muchinfo.rma.view.base.app.Constant
+import cn.muchinfo.rma.view.base.home.contract.emptyView
 import com.blankj.utilcode.util.ActivityUtils
 import com.blankj.utilcode.util.ActivityUtils
 import com.blankj.utilcode.util.ConvertUtils
 import com.blankj.utilcode.util.ConvertUtils
 import com.blankj.utilcode.util.SPUtils
 import com.blankj.utilcode.util.SPUtils
@@ -241,12 +242,14 @@ class UnSubmitUI(
                     marginStart = autoSize(215)
                     marginStart = autoSize(215)
                 }
                 }
 
 
+                emptyView()
+
                 textView {
                 textView {
                     textResource = R.string.status
                     textResource = R.string.status
                     textColorInt = R.color.hint_text_color
                     textColorInt = R.color.hint_text_color
                     textSizeAuto = 24
                     textSizeAuto = 24
                 }.lparams(wrapContent, wrapContent) {
                 }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(100)
+                    marginEnd = autoSize(36)
                 }
                 }
 
 
             }.lparams(matchParent, autoSize(68))
             }.lparams(matchParent, autoSize(68))
@@ -343,12 +346,14 @@ class ToAuditUI(
                     marginStart = autoSize(215)
                     marginStart = autoSize(215)
                 }
                 }
 
 
+                emptyView()
+
                 textView {
                 textView {
                     textResource = R.string.status
                     textResource = R.string.status
                     textColorInt = R.color.hint_text_color
                     textColorInt = R.color.hint_text_color
                     textSizeAuto = 24
                     textSizeAuto = 24
                 }.lparams(wrapContent, wrapContent) {
                 }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(80)
+                    marginEnd = autoSize(36)
                 }
                 }
 
 
             }.lparams(matchParent, autoSize(68))
             }.lparams(matchParent, autoSize(68))
@@ -445,12 +450,14 @@ class NormalUI(
                     marginStart = autoSize(215)
                     marginStart = autoSize(215)
                 }
                 }
 
 
+                emptyView()
+
                 textView {
                 textView {
                     textResource = R.string.status
                     textResource = R.string.status
                     textColorInt = R.color.hint_text_color
                     textColorInt = R.color.hint_text_color
                     textSizeAuto = 24
                     textSizeAuto = 24
                 }.lparams(wrapContent, wrapContent) {
                 }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(80)
+                    marginEnd = autoSize(36)
                 }
                 }
 
 
             }.lparams(matchParent, autoSize(68))
             }.lparams(matchParent, autoSize(68))
@@ -545,12 +552,14 @@ class DisableUI(
                     marginStart = autoSize(215)
                     marginStart = autoSize(215)
                 }
                 }
 
 
+                emptyView()
+
                 textView {
                 textView {
                     textResource = R.string.status
                     textResource = R.string.status
                     textColorInt = R.color.hint_text_color
                     textColorInt = R.color.hint_text_color
                     textSizeAuto = 24
                     textSizeAuto = 24
                 }.lparams(wrapContent, wrapContent) {
                 }.lparams(wrapContent, wrapContent) {
-                    marginStart = autoSize(80)
+                    marginEnd = autoSize(36)
                 }
                 }
 
 
             }.lparams(matchParent, autoSize(68))
             }.lparams(matchParent, autoSize(68))

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

@@ -88,7 +88,7 @@ class CustomerDataViewHolder(
                             if (it?.userinfotype.toString() == "2"){//企业用户时显示企业简称
                             if (it?.userinfotype.toString() == "2"){//企业用户时显示企业简称
                                 text = it?.nickname
                                 text = it?.nickname
                             }else{
                             }else{
-                                text = it?.customername
+                                text = it?.username
                             }
                             }
 
 
                         }
                         }
@@ -116,7 +116,21 @@ class CustomerDataViewHolder(
                 // 状态
                 // 状态
                 linearLayout {
                 linearLayout {
                     textView {
                     textView {
-                        data.bindOptional(context) { text = it?.statusdesc }
+                        data.bindOptional(context) {
+                            if (it?.status == 1){
+                                text = "待激活"
+                            }else if (it?.status == 2){
+                                text = "待审核"
+                            }else if (it?.status == 3){
+                                text = "待复审"
+                            }else if (it?.status == 4){
+                                text = "正常"
+                            }else if (it?.status == 5){
+                                text = "审核拒绝"
+                            }else if (it?.status == 6){
+                                text = "注销"
+                            }
+                        }
                         textColorInt = R.color.rma_black_33
                         textColorInt = R.color.rma_black_33
                         textSizeAuto = 29
                         textSizeAuto = 29
                     }.lparams(wrapContent, wrapContent) {
                     }.lparams(wrapContent, wrapContent) {

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

@@ -2,6 +2,7 @@ package cn.muchinfo.rma.view.base.home.customerdata
 
 
 import androidx.lifecycle.MutableLiveData
 import androidx.lifecycle.MutableLiveData
 import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.ParentAreaListData
 import cn.muchinfo.rma.global.data.UserInfoData
 import cn.muchinfo.rma.global.data.UserInfoData
 import cn.muchinfo.rma.netManage.base.InteractiveException
 import cn.muchinfo.rma.netManage.base.InteractiveException
 import cn.muchinfo.rma.view.MyApplication
 import cn.muchinfo.rma.view.MyApplication
@@ -11,6 +12,7 @@ import cn.muchinfo.rma.view.base.BaseViewModel
 import com.blankj.utilcode.util.TimeUtils
 import com.blankj.utilcode.util.TimeUtils
 import kotlinx.coroutines.GlobalScope
 import kotlinx.coroutines.GlobalScope
 import kotlinx.coroutines.launch
 import kotlinx.coroutines.launch
+import mtp.polymer.com.autowidget.dialog.SelectData
 import mtp.polymer.com.autowidget.utils.TaskUiModel
 import mtp.polymer.com.autowidget.utils.TaskUiModel
 
 
 class CustomerDataViewModel : BaseViewModel() {
 class CustomerDataViewModel : BaseViewModel() {
@@ -41,6 +43,32 @@ class CustomerDataViewModel : BaseViewModel() {
     val disableList: MutableLiveData<List<UserInfoData>> = MutableLiveData()
     val disableList: MutableLiveData<List<UserInfoData>> = MutableLiveData()
 
 
     /**
     /**
+     * 所属机构列表
+     */
+    val parentAreaList : MutableLiveData<List<ParentAreaListData>> = MutableLiveData()
+    /**
+     * 查询所属机构列表
+     */
+    fun queryParentAreaList(){
+        val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
+        }
+        MyApplication.getInstance()?.customerManage?.queryParentAreaList(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                parentAreaList.postValue(respData)
+            }
+        }
+    }
+
+    fun getSelectPresentList() : List<SelectData>{
+        val selectDataList = arrayListOf<SelectData>()
+        parentAreaList.value?.forEach {
+            selectDataList.add(SelectData(id = it.userid ?: "",value = it?.accountname ?: ""))
+        }
+        return selectDataList
+    }
+
+    /**
      * 对于列表点击展开后的数据处理
      * 对于列表点击展开后的数据处理
      * @param index Int 点击的item数据在列表的index
      * @param index Int 点击的item数据在列表的index
      * @param type String 点击的列表类型
      * @param type String 点击的列表类型
@@ -115,8 +143,8 @@ class CustomerDataViewModel : BaseViewModel() {
 //        unSubmitList.value = arrayListOf(UserInfoData(address = "1"),UserInfoData(address = "2"),UserInfoData(address = "3"))
 //        unSubmitList.value = arrayListOf(UserInfoData(address = "1"),UserInfoData(address = "2"),UserInfoData(address = "3"))
 //        loadingDialogStatus.value = TaskUiModel.inFlight()
 //        loadingDialogStatus.value = TaskUiModel.inFlight()
         val params = mutableMapOf<String, String>().apply {
         val params = mutableMapOf<String, String>().apply {
-            put("MemberUserID", GlobalDataCollection.instance?.loginRsp?.memberUserID.toString())
-            put("queryType", type)
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("querytype", type)
         }
         }
         MyApplication.getInstance()?.customerManage?.queryUserInfo(params) { isSuccess, respData, error ->
         MyApplication.getInstance()?.customerManage?.queryUserInfo(params) { isSuccess, respData, error ->
             if (isSuccess) {
             if (isSuccess) {
@@ -253,6 +281,34 @@ class CustomerDataViewModel : BaseViewModel() {
     }
     }
 
 
     /**
     /**
+     * 新增客户资料
+     */
+    fun customerInfoOperateReq(
+        data : updataCustomerData,
+        isSuccess: (isCompleted: Boolean) -> Unit
+    ){
+        loadingDialogStatus.value = TaskUiModel.inFlight()
+        GlobalScope.launch {
+            MyApplication.getInstance()?.customerManage?.CustomerInfoOperateReq(
+                data = data
+            ) { isCompleted, err ->
+                if (isCompleted) {
+                    loadingDialogStatus.postValue(TaskUiModel.success(msg = "请求成功"))
+                    isSuccess(true)
+                } else {
+                    loadingDialogStatus.postValue(
+                        TaskUiModel.failed(
+                            InteractiveException(
+                                errorMessage = err?.message!!
+                            )
+                        )
+                    )
+                }
+            }
+        }
+    }
+
+    /**
      * 更新用户状态
      * 更新用户状态
      * @param userID Int
      * @param userID Int
      * @param accountStatus Int
      * @param accountStatus Int
@@ -274,4 +330,33 @@ class CustomerDataViewModel : BaseViewModel() {
 
 
         customerManage.updateUserAccountStatus(userID = userID,accountStatus = accountStatus, callback = callback)
         customerManage.updateUserAccountStatus(userID = userID,accountStatus = accountStatus, callback = callback)
     }
     }
-}
+}
+
+data class updataCustomerData(
+    var operatetype : Int = 0,//操作类型-1:新增 2:修改
+    var userid : Long = 0,//用户ID(修改时必填)
+    var areaid : Long = 0,//所属机构
+    var logincode : String = "",//登录帐号(千海金项目必填)
+    var loginpwd : String = "",//登录密码(千海金项目必填)
+    var userinfotype : Int = 0,// 客户类型 1:个人  2:企业
+    var username : String = "",//姓名、企业名称
+    var nickname : String = "",//企业简称(企业)
+    var cardtype : Int = 0,//证件类型
+    var cardnum : String = "",//证件号码
+    var cardfrontphotourl : String = "",//身份证正面照(个人)
+    var cardbackphotourl : String = "",//身份证反面照(个人)
+    var email : String = "",//邮箱(个人)
+    var referral : String = "",//推荐码(个人)
+    var legalpersonname : String = "",//法定代表人(企业)
+    var taxpayernum : String = "",//纳税人识别号(企业)
+    var proxystatementurl : String = "",//营业执照(企业)
+    var contactname : String = "",//联系人(企业)
+    var mobilephone : String = "",//手机号码、联系人手机号
+    var telphone : String = "",//联系电话
+    var provinceid : Long = 0,//省
+    var cityid : Long = 0,//市
+    var districtid : Long = 0,//县
+    var ipaddress : String = "",//详细地址
+    var remark : String = "",//备注
+    var userstate : Int = 0//开户状态 1:保存草稿 2:提交审核
+)

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

@@ -423,7 +423,7 @@ class InvoiceRegistrationActivity : BaseActivity<RegistrationViewModel>() {
                             linearLayout {
                             linearLayout {
                                 gravity = Gravity.CENTER_VERTICAL
                                 gravity = Gravity.CENTER_VERTICAL
                                 textView {
                                 textView {
-                                    text = "本次点价信息"
+                                    text = "本次发票信息"
                                     textColorInt = R.color.rma_blue_color
                                     textColorInt = R.color.rma_blue_color
                                     textSizeAuto = 34
                                     textSizeAuto = 34
                                 }.lparams(wrapContent, wrapContent) {
                                 }.lparams(wrapContent, wrapContent) {
@@ -517,6 +517,9 @@ class InvoiceRegistrationActivity : BaseActivity<RegistrationViewModel>() {
                             }
                             }
 
 
                             textView {
                             textView {
+                                onThrottleFirstClick {
+                                    amount_edittext.setText(data.daikaiamount)
+                                }
                                 text = "全部登记"
                                 text = "全部登记"
                                 textSizeAuto = 29
                                 textSizeAuto = 29
                                 textColorInt = R.color.rma_green_color
                                 textColorInt = R.color.rma_green_color

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

@@ -1731,6 +1731,7 @@ class InvertoryReportUI(
                             "请选择现货品种",
                             "请选择现货品种",
                             viewModel.getDeliverySelectData()
                             viewModel.getDeliverySelectData()
                         ) {
                         ) {
+                            viewModel.queryGoodsWrstandard(deliverygoodsid = this.id)
                             selectdeliverygoodsData.postValue(this)
                             selectdeliverygoodsData.postValue(this)
                         }
                         }
                     }
                     }

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

@@ -1007,10 +1007,7 @@ class ReportQueryViewModel : BaseViewModel() {
             )
             )
             // '最新价/\n 期末市值 '
             // '最新价/\n 期末市值 '
             newRightData.add(
             newRightData.add(
-                NumberUtils.roundNum(
-                    NumberUtils.doubleDistortion(it.curspotprice),
-                    2
-                ) + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.curmarketvalue), 2)
+                NumberUtils.roundNum(NumberUtils.doubleDistortion(it.curmarketvalue), 2)
             )
             )
             val newData = it.copy(rightData = newRightData)
             val newData = it.copy(rightData = newRightData)
             newList.add(newData)
             newList.add(newData)
@@ -1641,13 +1638,16 @@ class ReportQueryViewModel : BaseViewModel() {
     /**
     /**
      * /Ermcp3/QueryGoodsWrstandard查询商品品类
      * /Ermcp3/QueryGoodsWrstandard查询商品品类
      */
      */
-    fun queryGoodsWrstandard() {
+    fun queryGoodsWrstandard(deliverygoodsid : String = "") {
         val params = mutableMapOf<String, String>().apply {
         val params = mutableMapOf<String, String>().apply {
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put(
             put(
                 "usertype",
                 "usertype",
                 GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: ""
                 GlobalDataCollection.instance?.userAccountData?.usertype?.toString() ?: ""
             )
             )
+            if (deliverygoodsid.isNullOrEmpty().not()){
+                put("deliverygoodsid",deliverygoodsid)
+            }
         }
         }
         MyApplication.getInstance()?.commodityManager?.queryGoodsWrstandard(params = params) { isSuccess, respData, error ->
         MyApplication.getInstance()?.commodityManager?.queryGoodsWrstandard(params = params) { isSuccess, respData, error ->
             if (isSuccess) {
             if (isSuccess) {

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

@@ -246,7 +246,7 @@ public class ExposureReportContentAdapter extends RecyclerView.Adapter<ExposureR
         //套保计划明细
         //套保计划明细
         itemViewHolder.payment_registration.setOnClickListener(view -> {
         itemViewHolder.payment_registration.setOnClickListener(view -> {
             Intent intent = new Intent();
             Intent intent = new Intent();
-            intent.putExtra("title","套保计划明细");
+            intent.putExtra("title","套保计划变动量明细");
             intent.putExtra("transaction",this.transaction);
             intent.putExtra("transaction",this.transaction);
             if (data.getCycletype().equals("0")){
             if (data.getCycletype().equals("0")){
                 intent.putExtra("tabtitle", Constant.table_mobile_report_expose_hedgeplan_day);
                 intent.putExtra("tabtitle", Constant.table_mobile_report_expose_hedgeplan_day);

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

@@ -169,7 +169,7 @@ public class SpotReportContentAdapter extends RecyclerView.Adapter<SpotReportCon
         //现货明细
         //现货明细
         itemViewHolder.spot_details.setOnClickListener(view -> {
         itemViewHolder.spot_details.setOnClickListener(view -> {
             Intent intent = new Intent();
             Intent intent = new Intent();
-            intent.putExtra("title","现货报表明细");
+            intent.putExtra("title","现货明细");
             intent.putExtra("time",this.time);
             intent.putExtra("time",this.time);
             intent.putExtra("transaction",this.transaction);
             intent.putExtra("transaction",this.transaction);
             if (data.getCycletype().equals("0")){
             if (data.getCycletype().equals("0")){

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

@@ -513,7 +513,7 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
             val data = ReportCommonDetailData()
             val data = ReportCommonDetailData()
             val newRightData = arrayListOf<String>()
             val newRightData = arrayListOf<String>()
             data.leftContent = it.reckondate ?: ""//日期
             data.leftContent = it.reckondate ?: ""//日期
-            newRightData.add(it.accountname + "\n" + it.currencyid)//'交易账户/\n 结算币种 '
+            newRightData.add(it.accountname + "\n" + it.currencyname)//'交易账户/\n 结算币种 '
             newRightData.add(it.goodsgroupname  + "\n" + it.goodsname + "/" + if (it.buyorsell == "0") {"买"}else{"卖"})//'交易品种/\n 交易合约/方向 '
             newRightData.add(it.goodsgroupname  + "\n" + it.goodsname + "/" + if (it.buyorsell == "0") {"买"}else{"卖"})//'交易品种/\n 交易合约/方向 '
             newRightData.add(NumberUtils.roundNum(it.oriholdqty,2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.holdqty,2) + it.enumdicname)//''期初持仓量/\n 期末持仓量 '
             newRightData.add(NumberUtils.roundNum(it.oriholdqty,2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.holdqty,2) + it.enumdicname)//''期初持仓量/\n 期末持仓量 '
             newRightData.add(NumberUtils.roundNum(it.todayopenqty,2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.todaycloseqty,2) + it.enumdicname)//''今开仓量/\n 今平仓量 '
             newRightData.add(NumberUtils.roundNum(it.todayopenqty,2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.todaycloseqty,2) + it.enumdicname)//''今开仓量/\n 今平仓量 '
@@ -524,7 +524,7 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
             newRightData.add(NumberUtils.roundNum(it.reckonprice,2) + "\n" + NumberUtils.roundNum(it.reckonholdamount,2))//'结算价/\n 结算持仓额 ',
             newRightData.add(NumberUtils.roundNum(it.reckonprice,2) + "\n" + NumberUtils.roundNum(it.reckonholdamount,2))//'结算价/\n 结算持仓额 ',
             newRightData.add(NumberUtils.roundNum(it.closepl,2) + "\n" + NumberUtils.roundNum(it.reckonpl,2))//'平仓损益/\n 结算损益 '
             newRightData.add(NumberUtils.roundNum(it.closepl,2) + "\n" + NumberUtils.roundNum(it.reckonpl,2))//'平仓损益/\n 结算损益 '
             newRightData.add(NumberUtils.roundNum(it.charge,2) + "\n" + NumberUtils.roundNum(it.goodsgroupspotqty,2))//'续费/\n 交易品种期末量 '
             newRightData.add(NumberUtils.roundNum(it.charge,2) + "\n" + NumberUtils.roundNum(it.goodsgroupspotqty,2))//'续费/\n 交易品种期末量 '
-            newRightData.add(it.middlegoodsqty + "\n" + NumberUtils.roundNum(it.todaymiddlegoodsqty,2) + it.enumdicname)//'套保品种/\n 套保品种变动量 'TODO 缺少套保品种
+            newRightData.add(it.middlegoodsname + "\n" + NumberUtils.roundNum(it.todaymiddlegoodsqty,2) + it.enumdicname)//'套保品种/\n 套保品种变动量 'TODO 缺少套保品种
             data.rightData = newRightData
             data.rightData = newRightData
             newList.add(data)
             newList.add(data)
         }
         }
@@ -537,7 +537,7 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
         dataList.forEach {
         dataList.forEach {
             val data = ReportCommonDetailData()
             val data = ReportCommonDetailData()
             val newRightData = arrayListOf<String>()
             val newRightData = arrayListOf<String>()
-            data.leftContent = it.accountname + "\n" + it.currencyid//'交易账户/\n 结算币种 '
+            data.leftContent = it.accountname + "\n" + it.currencyname//'交易账户/\n 结算币种 '
             newRightData.add(it.goodsgroupname  + "\n" + it.goodsname + "/" + if (it.buyorsell == "0") {"买"}else{"卖"})//'交易品种/\n 交易合约/方向 '
             newRightData.add(it.goodsgroupname  + "\n" + it.goodsname + "/" + if (it.buyorsell == "0") {"买"}else{"卖"})//'交易品种/\n 交易合约/方向 '
             newRightData.add(NumberUtils.roundNum(it.oriholdqty,2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.holdqty,2) + it.enumdicname)//''期初持仓量/\n 期末持仓量 '
             newRightData.add(NumberUtils.roundNum(it.oriholdqty,2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.holdqty,2) + it.enumdicname)//''期初持仓量/\n 期末持仓量 '
             newRightData.add(NumberUtils.roundNum(it.todayopenqty,2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.todaycloseqty,2) + it.enumdicname)//''今开仓量/\n 今平仓量 '
             newRightData.add(NumberUtils.roundNum(it.todayopenqty,2) + it.enumdicname + "\n" + NumberUtils.roundNum(it.todaycloseqty,2) + it.enumdicname)//''今开仓量/\n 今平仓量 '
@@ -548,7 +548,7 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
             newRightData.add(NumberUtils.roundNum(it.reckonprice,2) + "\n" + NumberUtils.roundNum(it.reckonholdamount,2))//'结算价/\n 结算持仓额 ',
             newRightData.add(NumberUtils.roundNum(it.reckonprice,2) + "\n" + NumberUtils.roundNum(it.reckonholdamount,2))//'结算价/\n 结算持仓额 ',
             newRightData.add(NumberUtils.roundNum(it.closepl,2) + "\n" + NumberUtils.roundNum(it.reckonpl,2))//'平仓损益/\n 结算损益 '
             newRightData.add(NumberUtils.roundNum(it.closepl,2) + "\n" + NumberUtils.roundNum(it.reckonpl,2))//'平仓损益/\n 结算损益 '
             newRightData.add(NumberUtils.roundNum(it.charge,2) + "\n" + NumberUtils.roundNum(it.goodsgroupspotqty,2))//'续费/\n 交易品种期末量 '
             newRightData.add(NumberUtils.roundNum(it.charge,2) + "\n" + NumberUtils.roundNum(it.goodsgroupspotqty,2))//'续费/\n 交易品种期末量 '
-            newRightData.add(it.middlegoodsqty + "\n" + NumberUtils.roundNum(it.todaymiddlegoodsqty,2) + it.enumdicname)//'套保品种/\n 套保品种变动量 'TODO 缺少套保品种
+            newRightData.add(it.middlegoodsname + "\n" + NumberUtils.roundNum(it.todaymiddlegoodsqty,2) + it.enumdicname)//'套保品种/\n 套保品种变动量 'TODO 缺少套保品种
             data.rightData = newRightData
             data.rightData = newRightData
             newList.add(data)
             newList.add(data)
         }
         }
@@ -881,7 +881,7 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
             newRightData.add(it.contractno + "\n" + if (it.contracttype == "1"){ "采购" }else{ "销售" })//'合同编号/\n 合同类型 '
             newRightData.add(it.contractno + "\n" + if (it.contracttype == "1"){ "采购" }else{ "销售" })//'合同编号/\n 合同类型 '
             newRightData.add(it.buyusername + "\n" + it.sellusername)//'采购方/\n 销售方 '
             newRightData.add(it.buyusername + "\n" + it.sellusername)//'采购方/\n 销售方 '
             newRightData.add(it.deliverygoodsname + "\n" + it.wrstandardname)//'现货品种/\n 现货品类 '
             newRightData.add(it.deliverygoodsname + "\n" + it.wrstandardname)//'现货品种/\n 现货品类 '
-            newRightData.add(it.deliverygoodsname + "\n" + NumberUtils.roundNum(it.todaypricedqty,2) + it.enumdicname)//'期现用途/\n 今定价量 ' TODO缺少期现用途
+            newRightData.add(if (it.biztype == "1"){ "套保" }else{ "套利" } + "\n" + NumberUtils.roundNum(it.todaypricedqty,2) + it.enumdicname)//'期现用途/\n 今定价量 ' TODO缺少期现用途
             newRightData.add(it.middlegoodsname + "\n" + NumberUtils.roundNum(it.diffhedgeqty,2) + it.enumdicname)//'套保品种/\n 套保变动量 ' //
             newRightData.add(it.middlegoodsname + "\n" + NumberUtils.roundNum(it.diffhedgeqty,2) + it.enumdicname)//'套保品种/\n 套保变动量 ' //
             newRightData.add(NumberUtils.roundNum(it.diffneedhedgeqty,2) + it.enumdicname)//'应套保变动量 ',
             newRightData.add(NumberUtils.roundNum(it.diffneedhedgeqty,2) + it.enumdicname)//'应套保变动量 ',
             data.rightData = newRightData
             data.rightData = newRightData
@@ -899,7 +899,7 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
             data.leftContent = it.contractno + "\n" + if (it.contracttype == "1"){ "采购" }else{ "销售" }//'合同编号/\n 合同类型 '
             data.leftContent = it.contractno + "\n" + if (it.contracttype == "1"){ "采购" }else{ "销售" }//'合同编号/\n 合同类型 '
             newRightData.add(it.buyusername + "\n" + it.sellusername)//'采购方/\n 销售方 '
             newRightData.add(it.buyusername + "\n" + it.sellusername)//'采购方/\n 销售方 '
             newRightData.add(it.deliverygoodsname + "\n" + it.wrstandardname)//'现货品种/\n 现货品类 '
             newRightData.add(it.deliverygoodsname + "\n" + it.wrstandardname)//'现货品种/\n 现货品类 '
-            newRightData.add(it.deliverygoodsname + "\n" + NumberUtils.roundNum(it.todaypricedqty,2) + it.enumdicname)//'期现用途/\n 今定价量 ' TODO缺少期现用途
+            newRightData.add(if (it.biztype == "1"){ "套保" }else{ "套利" } + "\n" + NumberUtils.roundNum(it.todaypricedqty,2) + it.enumdicname)//'期现用途/\n 今定价量 ' TODO缺少期现用途
             newRightData.add(it.middlegoodsname + "\n" + NumberUtils.roundNum(it.diffhedgeqty,2) + it.enumdicname)//'套保品种/\n 套保变动量 ' //
             newRightData.add(it.middlegoodsname + "\n" + NumberUtils.roundNum(it.diffhedgeqty,2) + it.enumdicname)//'套保品种/\n 套保变动量 ' //
             newRightData.add(NumberUtils.roundNum(it.diffneedhedgeqty,2) + it.enumdicname)//'应套保变动量 ',
             newRightData.add(NumberUtils.roundNum(it.diffneedhedgeqty,2) + it.enumdicname)//'应套保变动量 ',
             data.rightData = newRightData
             data.rightData = newRightData

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

@@ -147,7 +147,7 @@ class AddLoginRoleActivity : BaseActivity<RoleSetViewModel>() {
                     } else if (type == "3") {
                     } else if (type == "3") {
                         text = "修改"
                         text = "修改"
                     } else if (type == "4") {
                     } else if (type == "4") {
-                        text = "锁定"
+                        text = "冻结"
                     } else if (type == "5") {
                     } else if (type == "5") {
                         text = "注销"
                         text = "注销"
                     }
                     }

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

@@ -106,7 +106,7 @@ class AddRoleActivity : BaseActivity<RoleSetViewModel>() {
                     }else if (type == "3"){
                     }else if (type == "3"){
                         text = "修改"
                         text = "修改"
                     }else if (type == "4"){
                     }else if (type == "4"){
-                        text = "锁定"
+                        text = "冻结锁定"
                     }else if (type == "5"){
                     }else if (type == "5"){
                         text = "注销"
                         text = "注销"
                     }
                     }

+ 19 - 18
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/rolemanagement/AddRoleViewHolder.kt

@@ -50,8 +50,7 @@ class AddRoleViewHolder(private val activity : AppCompatActivity,private val vie
 
 
                 emptyView()
                 emptyView()
 
 
-                textView {
-
+                linearLayout {
                     onThrottleFirstClick {
                     onThrottleFirstClick {
                         if (data.value?.Menu?.ishadrole == true){
                         if (data.value?.Menu?.ishadrole == true){
                             viewModel.setAllRoleSelect(data.value?.Menu?.resourcecode ?: "",false)
                             viewModel.setAllRoleSelect(data.value?.Menu?.resourcecode ?: "",false)
@@ -59,24 +58,26 @@ class AddRoleViewHolder(private val activity : AppCompatActivity,private val vie
                             viewModel.setAllRoleSelect(data.value?.Menu?.resourcecode ?: "",true)
                             viewModel.setAllRoleSelect(data.value?.Menu?.resourcecode ?: "",true)
                         }
                         }
                     }
                     }
-                    if (type == "3") {
-                        visibility = View.GONE
-                    } else {
-                        visibility = View.VISIBLE
-                    }
-                    data.bindOptional(context){
-                        text = if (it?.Menu?.ishadrole == false){
-                            "全选"
-                        }else{
-                            "全不选"
+                    emptyView()
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        if (type == "3") {
+                            visibility = View.GONE
+                        } else {
+                            visibility = View.VISIBLE
                         }
                         }
+                        data.bindOptional(context){
+                            text =  "全选"
+                        }
+                        text = "全选"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent) {
+                        marginEnd = autoSize(36)
                     }
                     }
-                    text = "全选"
-                    textSizeAuto = 31
-                    textColorInt = R.color.rma_blue_color
-                }.lparams(wrapContent, wrapContent) {
-                    marginEnd = autoSize(36)
-                }
+                }.lparams(autoSize(200), autoSize(92))
+
+
             }.lparams(matchParent, autoSize(92))
             }.lparams(matchParent, autoSize(92))
 
 
             view {
             view {

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

@@ -125,7 +125,7 @@ class AddTradingLoginRoleActivity : BaseActivity<RoleSetViewModel>() {
                     } else if (type == "3") {
                     } else if (type == "3") {
                         text = "修改交易员"
                         text = "修改交易员"
                     } else if (type == "4") {
                     } else if (type == "4") {
-                        text = "锁定"
+                        text = "冻结"
                     } else if (type == "5") {
                     } else if (type == "5") {
                         text = "注销"
                         text = "注销"
                     }
                     }

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

@@ -69,7 +69,7 @@ class SpotMarketPriceViewModel : BaseViewModel(){
             if (isSuccess) {
             if (isSuccess) {
                 val newDataList = respData?.remove { it.isvalid == "0" }?.toArrayList()
                 val newDataList = respData?.remove { it.isvalid == "0" }?.toArrayList()
                 newDataList?.sortWith(Comparator { t1, t2 ->
                 newDataList?.sortWith(Comparator { t1, t2 ->
-                    (TimeUtils.string2Millis(t1.operatetime) - TimeUtils.string2Millis(t2.operatetime)).toInt()
+                    (TimeUtils.string2Millis(t2.operatetime) - TimeUtils.string2Millis(t1.operatetime)).toInt()
                 })
                 })
                 spotMarketPriceDataList.postValue(newDataList)
                 spotMarketPriceDataList.postValue(newDataList)
             } else {
             } else {

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

@@ -235,6 +235,7 @@ public class ContentAdapter extends RecyclerView.Adapter<ContentAdapter.ItemView
         itemViewHolder.details.setOnClickListener(view -> {
         itemViewHolder.details.setOnClickListener(view -> {
             Intent intent = new Intent();
             Intent intent = new Intent();
             intent.putExtra("data", datas.get(i));
             intent.putExtra("data", datas.get(i));
+            intent.putExtra("isFrom","1");
             intent.putExtra("type",this.type);
             intent.putExtra("type",this.type);
             intent.setClass(context, ContractDetailActivity.class);
             intent.setClass(context, ContractDetailActivity.class);
             context.startActivity(intent);
             context.startActivity(intent);

+ 21 - 8
RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ContractDetailActivity.kt

@@ -56,6 +56,9 @@ class ContractDetailActivity : BaseActivity<ProcurementViewModel>() {
     // type 1 采购 2 销售
     // type 1 采购 2 销售
     private val type by lazy { intent.getStringExtra("type") }
     private val type by lazy { intent.getStringExtra("type") }
 
 
+    // 1 是从采购销售跳的 2是从现货合同
+    private val isFrom by lazy { intent.getStringExtra("isFrom") }
+
     private val tabsArray: List<String> by lazy {
     private val tabsArray: List<String> by lazy {
         if (type == "1") {
         if (type == "1") {
             arrayListOf("合同详情", "点价记录", "交收记录", "款项记录", "发票记录", "入库记录", "变更记录")
             arrayListOf("合同详情", "点价记录", "交收记录", "款项记录", "发票记录", "入库记录", "变更记录")
@@ -66,7 +69,7 @@ class ContractDetailActivity : BaseActivity<ProcurementViewModel>() {
     }
     }
 
 
     //合同详情
     //合同详情
-    private val contractDetailsUI by lazy { ContractDetailsUI(this, viewModel, data) }
+    private val contractDetailsUI by lazy { ContractDetailsUI(this, viewModel, data,isFrom ?: "") }
 
 
     //点价登记
     //点价登记
     private val priceRecordUI by lazy { PriceRecordUI(this, viewModel, data) }
     private val priceRecordUI by lazy { PriceRecordUI(this, viewModel, data) }
@@ -232,16 +235,28 @@ class ContractDetailActivity : BaseActivity<ProcurementViewModel>() {
 class ContractDetailsUI(
 class ContractDetailsUI(
     private val activity: AppCompatActivity,
     private val activity: AppCompatActivity,
     private val viewModel: ProcurementViewModel,
     private val viewModel: ProcurementViewModel,
-    private val data: ContractData
+    private val data: ContractData,
+    private val isFrom : String
 ) {
 ) {
 
 
     private lateinit var swipeToLayout: SwipeToLoadLayout
     private lateinit var swipeToLayout: SwipeToLoadLayout
     private lateinit var statusLayout: StatusLayout
     private lateinit var statusLayout: StatusLayout
     lateinit var recyclerView: RecyclerView
     lateinit var recyclerView: RecyclerView
 
 
+    var accnoutname : String = ""
+
     private val unSubmitAdapter: BaseAdapter<ContractDetailsData, ContractDetailsViewHolder> =
     private val unSubmitAdapter: BaseAdapter<ContractDetailsData, ContractDetailsViewHolder> =
         BaseAdapter { _, _ -> ContractDetailsViewHolder(activity) }
         BaseAdapter { _, _ -> ContractDetailsViewHolder(activity) }
     val root = _FrameLayout(activity).apply {
     val root = _FrameLayout(activity).apply {
+        if (isFrom == "1"){
+            accnoutname = data.accountname + "(" + data.nickname + ")"
+        }else{
+            accnoutname = if (data.contracttype == "1") {
+                data.sellusername + "(" + data.sellnickname + ")"
+            } else {
+                data.buyusername + "(" + data.buynickname + ")"
+            }
+        }
         verticalLayout {
         verticalLayout {
 
 
             linearLayout {
             linearLayout {
@@ -281,8 +296,9 @@ class ContractDetailsUI(
                 }
                 }
             }.lparams(matchParent, matchParent)
             }.lparams(matchParent, matchParent)
 
 
-
             val datalist = arrayListOf<ContractDetailsData>(
             val datalist = arrayListOf<ContractDetailsData>(
+
+
                 ContractDetailsData(
                 ContractDetailsData(
                     title = "合同编号",
                     title = "合同编号",
                     content = data.contractno?.isBlankString() ?: ""
                     content = data.contractno?.isBlankString() ?: ""
@@ -295,16 +311,13 @@ class ContractDetailsUI(
                         "销售合同"
                         "销售合同"
                     }
                     }
                 ),
                 ),
+
                 ContractDetailsData(
                 ContractDetailsData(
                     title = if (data.contracttype == "1") {
                     title = if (data.contracttype == "1") {
                         "销售方"
                         "销售方"
                     } else {
                     } else {
                         "采购方"
                         "采购方"
-                    },content =   if (data.contracttype == "1") {
-                        data.nickname ?: "-"
-                    } else {
-                        data.nickname ?: "-"
-                    }
+                    },content = accnoutname
                 ),
                 ),
                 ContractDetailsData(title = "业务类型",content = if (data.biztype == "1"){
                 ContractDetailsData(title = "业务类型",content = if (data.biztype == "1"){
                     "套保"
                     "套保"

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

@@ -169,7 +169,7 @@ class SaleViewModel : BaseViewModel(){
             newRightData.add(NumberUtils.roundNum(it.invoiceamount,2) + "\n" + NumberUtils.roundNum(it.daikaiamount,2))
             newRightData.add(NumberUtils.roundNum(it.invoiceamount,2) + "\n" + NumberUtils.roundNum(it.daikaiamount,2))
             newRightData.add(getTimeString(it))
             newRightData.add(getTimeString(it))
             newRightData.add(it.convertfactor ?: "--")
             newRightData.add(it.convertfactor ?: "--")
-            newRightData.add(it.qty + "\n" + it.unpricedqty)
+            newRightData.add(it.qty + it.enumdicname + "\n" + it.unpricedqty + it.enumdicname)
             val newData = it.copy(rightData = newRightData)
             val newData = it.copy(rightData = newRightData)
             newList.add(newData)
             newList.add(newData)
         }
         }

+ 1 - 1
RMA/app/src/main/res/layout/layout_item_scroll.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="100dp"
+    android:layout_width="110dp"
     android:layout_height="60dp"
     android:layout_height="60dp"
     android:orientation="vertical">
     android:orientation="vertical">
 
 

+ 1 - 1
RMA/app/src/main/res/layout/layout_item_top_scroll.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="100dp"
+    android:layout_width="110dp"
     android:layout_height="40dp"
     android:layout_height="40dp"
     android:orientation="vertical">
     android:orientation="vertical">