Просмотр исходного кода

风险管理11月6日提交代码-liu.bolan-风管bug

Liu.bolan 4 лет назад
Родитель
Сommit
e2a951308e

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

@@ -154,6 +154,8 @@ data class XhWrstandard(
 data class XhMiddlergoods(
     @SerializedName("convertratio")
     val convertratio : String? = "",//拆算系数
+    @SerializedName("costratio")
+    val costratio : String? = "",//成本权重
     @SerializedName("enumdicname")
     val enumdicname : String? = "",//单位名称
     @SerializedName("middlegoodscode")
@@ -173,6 +175,7 @@ data class XhMiddlergoods(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
         parcel.createTypedArrayList(Ermcp3GoodsGroupEx),
         parcel.readString()
     ) {
@@ -180,6 +183,7 @@ data class XhMiddlergoods(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(convertratio)
+        parcel.writeString(costratio)
         parcel.writeString(enumdicname)
         parcel.writeString(middlegoodscode)
         parcel.writeString(middlegoodsid)
@@ -202,6 +206,7 @@ data class XhMiddlergoods(
         }
     }
 
+
 }
 
 

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

@@ -6,7 +6,7 @@ object Constant {
     /**
      * 获取基础url的接口
      */
-    const val baseurl = "http://103.40.249.123:38280/cfg?key=mtp_20" // 天津麦顿
+//    const val baseurl = "http://103.40.249.123:38280/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.127:28280/cfg?key=mtp_20"
@@ -15,7 +15,7 @@ object Constant {
 
 //    const val baseurl = "http://192.168.31.93:8080/cfg?key=test_93"//李倩企业风管 18611112222
 //    const val baseurl = "http://192.168.31.104:8080/cfg?key=test_104"//李倩云融 18611112222
-//    const val baseurl = "http://192.168.31.203:8080/cfg?key=test_203"//李倩云融 18611112222
+    const val baseurl = "http://192.168.31.203:8080/cfg?key=test_203"//李倩云融 18611112222
 //
 //    const val baseurl = "http://192.168.31.204:8080/cfg?key=test_204"// 瑶姐 云融 190000000001 123456
 //    const val baseurl = "http://192.168.31.205:8080/cfg?key=test_205"// 瑶姐 云融 190000000001 123456

+ 2 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/flow/CommodityModificationFlowViewModel.kt

@@ -74,7 +74,7 @@ class CommodityModificationFlowViewModel : BaseViewModel(){
     fun queryCostWeightDataList(deliverygoodsid : String = "",wrstandardid : String = ""){
         val params = mutableMapOf<String,String>().apply {
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
-            put("paramchangetype","1")
+            put("paramchangetype","3")
             put("ftstatus","2")
             put("deliverygoodsid",deliverygoodsid)
             put("wrstandardid",wrstandardid)
@@ -117,7 +117,7 @@ class CommodityModificationFlowViewModel : BaseViewModel(){
     fun queryConvertCoefficientDataList(deliverygoodsid : String = "",wrstandardid : String = ""){
         val params = mutableMapOf<String,String>().apply {
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
-            put("paramchangetype","1")
+            put("paramchangetype","2")
             put("ftstatus","2")
             put("deliverygoodsid",deliverygoodsid)
             put("wrstandardid",wrstandardid)

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

@@ -35,6 +35,7 @@ class ModifyViewModel : BaseViewModel(){
         val params = mutableMapOf<String,String>().apply {
             put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("status","1")
+            put("excludecfg","1")
         }
         MyApplication.getInstance()?.futureManager?.queryGoodsGroup(params = params){isSuccess, respData, error ->
             if (isSuccess){

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

@@ -135,7 +135,7 @@ class SpotCategoryViewHolder(private val activity : AppCompatActivity,private va
                 linearLayout {
                     gravity = Gravity.CENTER
                     textView {
-                        text = "单位"
+                        text = "折算系数"
                         textSizeAuto = 31
                         textColorInt = R.color.rma_hint_text_color_ccc
                     }.lparams(wrapContent, wrapContent)
@@ -144,7 +144,7 @@ class SpotCategoryViewHolder(private val activity : AppCompatActivity,private va
                     gravity = Gravity.CENTER_VERTICAL
                     emptyView()
                     textView {
-                        text = "套保系数"
+                        text = "成本权重"
                         textSizeAuto = 31
                         textColorInt = R.color.rma_hint_text_color_ccc
                     }.lparams(wrapContent, wrapContent) {

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

@@ -57,19 +57,19 @@ class SpotHedgeViewHolder(private val activity : AppCompatActivity,private val v
 
                 emptyView()
 
-                //单位
+                //折算系数
                 textView {
                     data.bindOptional(context){
-                        text = it?.enumdicname
+                        text = it?.convertratio
                     }
                     textColorInt = R.color.rma_black_33
                     textSizeAuto = 31
                 }.lparams(wrapContent, wrapContent)
                 emptyView()
-                //套保系数
+                //成本权重
                 textView {
                     data.bindOptional(context){
-                        text = it?.convertratio
+                        text = it?.costratio
                     }
                     textSizeAuto = 31
                     textColorInt = R.color.rma_black_33

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

@@ -111,6 +111,7 @@ class NewAddSpotGoodsViewModel : BaseViewModel(){
                         id =  data.mglst.indexOf(it).plus(1).toString(),
                         middleGoodsName = it.middlegoodsname ?: "",
                         value = it.convertratio ?: "",
+                        costWeight = it.costratio ?: "",
                         enumdicname = it.enumdicname ?: "",
                         enumdicnameid = it.unitid ?: ""
                     )

+ 5 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newspot/NewInsuredVarietyViewHolder.kt

@@ -213,6 +213,9 @@ class NewInsuredVarietyViewHolder(
 
             //成本权重
             linearLayout {
+                if (viewModel.spotModelList.value?.get(wrstandId.toInt().minus(1))?.middleGoodsList?.size ?: 0 > 1){
+
+                }
                 background = resources.getDrawable(R.color.white)
                 gravity = Gravity.CENTER_VERTICAL
                 textView {
@@ -237,8 +240,8 @@ class NewInsuredVarietyViewHolder(
                     cost_weight = this
                     isEnabled = !(operationType == "4" || operationType == "3" || operationType == "5")
                     data.bindOptional(context){
-                        if (it?.value.isNullOrEmpty().not()){
-                            setText(it?.value)
+                        if (it?.costWeight.isNullOrEmpty().not()){
+                            setText(it?.costWeight)
                             textColorInt = R.color.rma_black_33
                         }
                     }

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

@@ -1158,9 +1158,9 @@ class ReportQueryViewModel : BaseViewModel() {
             //套保品种/单位
             newRightData.add(it.middlegoodsname + "\n" + it.enumdicname)
             //现货总量/计划套保量
-            newRightData.add(it.totalspotqty + "\n" + it.totalneedhedgeqty)
+            newRightData.add(NumberUtils.roundNum(it.totalspotqty,2) + "\n" + NumberUtils.roundNum(it.totalneedhedgeqty,2))
             //期货持仓量/期限比例
-            newRightData.add(it.totalfutureqty + "\n" + it.futurespotratio?.toPercentage())
+            newRightData.add(NumberUtils.roundNum(it.totalfutureqty,2) + "\n" + it.futurespotratio?.toPercentage())
             //'现货损益/\n 现货浮动损益 '
             newRightData.add(
                 NumberUtils.roundNum(

+ 4 - 26
RMA/app/src/main/java/cn/muchinfo/rma/view/base/spot/associated/relationalrecord/RemoveRelationalRecordActivity.kt

@@ -238,28 +238,6 @@ class RemoveRelationalRecordActivity : BaseActivity<RelationalRecordViewModel>()
                             linearLayout {
                                 gravity = Gravity.CENTER_VERTICAL
                                 textView {
-                                    text = "期货账户代码"
-                                    textSizeAuto = 31
-                                    textColorInt = R.color.rma_black_33
-                                }.lparams(wrapContent, wrapContent){
-                                    marginStart = autoSize(36)
-                                }
-                            }.lparams(autoSize(250), autoSize(100))
-
-                            textView {
-                                text = data.accountid
-                                textSizeAuto = 31
-                                textColorInt = R.color.rma_black_33
-                            }.lparams(wrapContent, wrapContent)
-                        }.lparams(matchParent, autoSize(100))
-
-                        itemView()
-
-                        linearLayout {
-                            gravity = Gravity.CENTER_VERTICAL
-                            linearLayout {
-                                gravity = Gravity.CENTER_VERTICAL
-                                textView {
                                     text = "期货合约"
                                     textSizeAuto = 31
                                     textColorInt = R.color.rma_black_33
@@ -269,7 +247,7 @@ class RemoveRelationalRecordActivity : BaseActivity<RelationalRecordViewModel>()
                             }.lparams(autoSize(250), autoSize(100))
 
                             textView {
-                                text = data.accountid
+                                text = data.goodscode
                                 textSizeAuto = 31
                                 textColorInt = R.color.rma_black_33
                             }.lparams(wrapContent, wrapContent)
@@ -339,15 +317,15 @@ class RemoveRelationalRecordActivity : BaseActivity<RelationalRecordViewModel>()
                                 textSizeAuto = 31
                                 textColorInt = R.color.rma_black_33
                             }.lparams(wrapContent, wrapContent)
-                        }.lparams(matchParent, autoSize(100))
+                        }.lparams(matchParent, autoSize(100)){
+                            bottomMargin = autoSize(150)
+                        }
                     }
                 }
 
                 linearLayout {
                     background = resources.getDrawable(R.color.white)
                     gravity = Gravity.CENTER_VERTICAL
-
-
                     textView {
                         onThrottleFirstClick {
                             viewModel.linkUnbindReq(LinkDetailId = data.linkdetailid?.toLong() ?: 0){