Quellcode durchsuchen

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

Liu.bolan vor 4 Jahren
Ursprung
Commit
c7067a545f
58 geänderte Dateien mit 971 neuen und 206 gelöschten Zeilen
  1. 3 3
      RMA/app/build.gradle
  2. 1 1
      RMA/app/src/main/AndroidManifest.xml
  3. 5 5
      RMA/app/src/main/java/cn/muchinfo/rma/business/performance/PerformanceAdapter.kt
  4. 6 2
      RMA/app/src/main/java/cn/muchinfo/rma/business/warehouse/WarehouseManager.kt
  5. 10 3
      RMA/app/src/main/java/cn/muchinfo/rma/business/warehouse/adapter/WarehouseAdapter.kt
  6. 8 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/StringUtils.kt
  7. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/FaProductDetailData.kt
  8. 5 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/HoldLBData.kt
  9. 8 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/MarketTradeConfigData.kt
  10. 4 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/OrderQuoteData.kt
  11. 5 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/PerformancePlanData.kt
  12. 440 43
      RMA/app/src/main/java/cn/muchinfo/rma/protobuf/protoclasses/WarehouseTradeMI1.java
  13. 1 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/view/MangeNumberEditText3.java
  14. 8 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/SplashActivity.kt
  15. 4 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceDefaultActivity.kt
  16. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceInformationActivity.kt
  17. 41 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformanceInformationViewModel.kt
  18. 15 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformationPayActivity.kt
  19. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/adapter/PerformanceInformationContentAdapter.java
  20. 5 5
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/SpotWareHouseActivity.kt
  21. 11 6
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/listed/ListedActivity.kt
  22. 2 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/listed/ListedViewModel.kt
  23. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/AddSpotGoodsActivity.kt
  24. 7 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/viewholder/InsuredVarietyViewHolder.kt
  25. 4 6
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/ContractDetailsActivity.kt
  26. 8 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/ContractPublicView.kt
  27. 5 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/adapter/ContractAdapter.java
  28. 7 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/login/LoginActivity.kt
  29. 2 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/promotioncode/ShowImageByUrlActivity.kt
  30. 12 7
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/detailsviewholder/InvoiceRecordViewHolder.kt
  31. 8 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessBuyHallViewHolder.kt
  32. 163 5
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallActivity.kt
  33. 6 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallViewModel.kt
  34. 39 7
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/FloatListedDialog.kt
  35. 29 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/OneListedDialog.kt
  36. 92 72
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/SelectFincningDialog.kt
  37. 1 1
      RMA/app/src/main/res/layout/layout_qhj_item_scroll.xml
  38. BIN
      RMA/app/src/main/res/mipmap-hdpi/ic_launcher_qhj.png
  39. BIN
      RMA/app/src/main/res/mipmap-hdpi/ic_launcher_rma.png
  40. 0 0
      RMA/app/src/main/res/mipmap-hdpi/ic_launcher_yrdz.png
  41. BIN
      RMA/app/src/main/res/mipmap-mdpi/ic_launcher_qhj.png
  42. BIN
      RMA/app/src/main/res/mipmap-mdpi/ic_launcher_rma.png
  43. 0 0
      RMA/app/src/main/res/mipmap-mdpi/ic_launcher_yrdz.png
  44. BIN
      RMA/app/src/main/res/mipmap-xhdpi/ic_launcher_qhj.png
  45. BIN
      RMA/app/src/main/res/mipmap-xhdpi/ic_launcher_rma.png
  46. 0 0
      RMA/app/src/main/res/mipmap-xhdpi/ic_launcher_yrdz.png
  47. BIN
      RMA/app/src/main/res/mipmap-xhdpi/qhj_img_start.png
  48. BIN
      RMA/app/src/main/res/mipmap-xhdpi/qhj_login_logo.png
  49. BIN
      RMA/app/src/main/res/mipmap-xhdpi/rma_img_start.png
  50. BIN
      RMA/app/src/main/res/mipmap-xhdpi/rma_login_logo.png
  51. 0 0
      RMA/app/src/main/res/mipmap-xhdpi/yrdz_img_start.png
  52. BIN
      RMA/app/src/main/res/mipmap-xhdpi/yrdz_login_logo.png
  53. BIN
      RMA/app/src/main/res/mipmap-xxhdpi/ic_launcher_qhj.png
  54. BIN
      RMA/app/src/main/res/mipmap-xxhdpi/ic_launcher_rma.png
  55. 0 0
      RMA/app/src/main/res/mipmap-xxhdpi/ic_launcher_yrdz.png
  56. BIN
      RMA/app/src/main/res/mipmap-xxxhdpi/ic_launcher_qhj.png
  57. BIN
      RMA/app/src/main/res/mipmap-xxxhdpi/ic_launcher_rma.png
  58. 0 0
      RMA/app/src/main/res/mipmap-xxxhdpi/ic_launcher_yrdz.png

+ 3 - 3
RMA/app/build.gradle

@@ -40,14 +40,14 @@ android {
             // 自动生成@string/app_name为demo
             resValue "string","app_name","企业风管云"
             // 定义app_icon字段,在AndroidManifest.xml文件中用到
-            manifestPlaceholders = [app_icon : "@mipmap/ic_launcher"]
+            manifestPlaceholders = [app_icon : "@mipmap/ic_launcher_rma"]
         }
         // app2
         app2 {
             // 解释同app1
             applicationId "cn.muchinfo.qhj"
             resValue "string","app_name","千海金"
-            manifestPlaceholders = [app_icon : "@mipmap/ic_launcher"]
+            manifestPlaceholders = [app_icon : "@mipmap/ic_launcher_qhj"]
         }
 
         // app3
@@ -55,7 +55,7 @@ android {
             // 解释同app1
             applicationId "cn.muchinfo.yrdz"
             resValue "string","app_name","云融"
-            manifestPlaceholders = [app_icon : "@mipmap/ic_launcher"]
+            manifestPlaceholders = [app_icon : "@mipmap/ic_launcher_yrdz"]
         }
     }
 

+ 1 - 1
RMA/app/src/main/AndroidManifest.xml

@@ -31,7 +31,7 @@
         android:allowBackup="true"
         android:icon="${app_icon}"
         android:label="@string/app_name"
-        android:roundIcon="@mipmap/ic_launcher"
+        android:roundIcon="@mipmap/ic_launcher_yrdz"
         android:requestLegacyExternalStorage="true"
         android:supportsRtl="true"
         android:theme="@style/Theme.RMA"

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

@@ -37,11 +37,11 @@ object PerformanceAdapter {
             )
         )
         builder.performancePlanStepID = PerformancePlanStepID
-        builder.overShortAmount = OverShortAmount
-        builder.performanceExecuteSide = PerformanceExecuteSide
-        builder.stepRemark = StepRemark
-        builder.overShortQty = OverShortQty
-        builder.expressFee = ExpressFee
+//        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())

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

@@ -417,6 +417,8 @@ class WarehouseManager {
         WRFactorTypeId: Long = 0,//仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
         DeliveryMonth: String = "",//交收月
         HasWr: Int = 0,//是否有仓单-0:没有仓单 1:有仓单
+        IsFinancing : Int = 0,//是否融资购买(买摘牌时有效)-0:否 1:是
+        ProductDetailID : Long = 0,//金融机构产品组合ID(融资购买时有效)
         callback: (isCompleted: Boolean, err: Error?) -> Unit
     ) {
         val tradeSocketManager = MyApplication.getInstance()?.tradeSocketManager.guard {
@@ -424,7 +426,7 @@ class WarehouseManager {
             return
         }
         val reqPacket = WarehouseAdapter.getHdWRDealOrderReqInfo(
-            RelatedWRTradeOrderID, WRTransferUserID, OrderQty, BuyOrSell, ApplyID, LadingBillId, SubNum, WRFactorTypeId, DeliveryMonth, HasWr
+            RelatedWRTradeOrderID, WRTransferUserID, OrderQty, BuyOrSell, ApplyID, LadingBillId, SubNum, WRFactorTypeId, DeliveryMonth, HasWr,IsFinancing,ProductDetailID
         )
 
         tradeSocketManager.send(
@@ -479,6 +481,7 @@ class WarehouseManager {
         DeliveryMonth : String = "",//交收月
         HasWr: Int = 0,//是否有仓单-0:没有仓单 1:有仓单
         WRStandardID: Int = 0,//现货品种ID
+        DelistMinQty : Long = 0,//起摘数量
         callback: (isCompleted: Boolean, err: Error?) -> Unit
     ) {
         val tradeSocketManager = MyApplication.getInstance()?.tradeSocketManager.guard {
@@ -514,7 +517,8 @@ class WarehouseManager {
             CanPart,
             DeliveryMonth,
             HasWr,
-            WRStandardID
+            WRStandardID,
+            DelistMinQty
         )
 
         tradeSocketManager.send(

+ 10 - 3
RMA/app/src/main/java/cn/muchinfo/rma/business/warehouse/adapter/WarehouseAdapter.kt

@@ -111,7 +111,9 @@ object WarehouseAdapter {
         SubNum : Long = 0,//提单子单号(wrholdlb的SubNum字段),卖的时候填写
         WRFactorTypeId : Long = 0,//仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
         DeliveryMonth : String = "",//交收月
-        HasWr : Int = 0//是否有仓单-0:没有仓单 1:有仓单
+        HasWr : Int = 0,//是否有仓单-0:没有仓单 1:有仓单
+        IsFinancing : Int = 0,//是否融资购买(买摘牌时有效)-0:否 1:是
+        ProductDetailID : Long = 0//金融机构产品组合ID(融资购买时有效)
     ) : Packet50{
         val builder = WarehouseTradeMI1.HdWRDealOrderReq.newBuilder()
         val loginInfo = GlobalDataCollection.instance?.loginRsp!!
@@ -135,7 +137,10 @@ object WarehouseAdapter {
         builder.clientOrderTime = TimeUtils.getNowString()
         builder.clientType = 3 // 客户端类型: 1客户端  3 手机端 android
         builder.operatorID = loginInfo.loginID // TODO
-
+        builder.isFinancing = IsFinancing
+        if (IsFinancing == 1){
+            builder.productDetailID = ProductDetailID
+        }
         builder.orderQty = OrderQty
         builder.buyOrSell = BuyOrSell
         builder.applyID = ApplyID
@@ -212,7 +217,8 @@ object WarehouseAdapter {
 //        MatchAccIDsString : List<String> = arrayListOf(),//仓单贸易对手用户ID集合(指定对手时填写)
         DeliveryMonth : String = "",//交收月
         HasWr : Int = 0,//是否有仓单-0:没有仓单 1:有仓单
-        WRStandardID : Int = 0//现货品种ID
+        WRStandardID : Int = 0,//现货品种ID
+        DelistMinQty : Long = 0//起摘数量
 //        FactoryItems : WarehouseTradeMI1.DGFactoryItems//要素类型明细集合(没有仓单要素ID填写)
     ) : Packet50{
         val builder = WarehouseTradeMI1.HdWROrderReq.newBuilder()
@@ -272,6 +278,7 @@ object WarehouseAdapter {
         if (DeliveryMonth.isNotEmpty()){
             builder.deliveryMonth = DeliveryMonth
         }
+        builder.delistMinQty = DelistMinQty
 
         val arrayOutputStream = ByteArrayOutputStream()
         builder.build().writeTo(arrayOutputStream)

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

@@ -46,6 +46,14 @@ fun String.toPercentage() : String{
     return NumberUtils.roundNum(toDouble().times(100),2) + "%"
 }
 
+fun String.toWanPercentage() : String{
+    if (this.isEmpty()){
+        return "--"
+    }
+    return NumberUtils.roundNum(toDouble().times(10000),2) + "‱"
+}
+
+
 /**
  * 成交单类型
  */

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

@@ -21,7 +21,7 @@ data class FaProductDetailData(
     @SerializedName("interestratemode")
     val interestratemode : String? = "",//利率方式 - 1:年利率 2:日利率
     @SerializedName("interestsettlemode")
-    val interestsettlemode : String? = "",//结息方式 - 1:按日结息 3:按月结息
+    val interestsettlemode : String? = "",//结息方式 - 1:按日结息 3:按月结息 3 是
     @SerializedName("interestsettlevalue")
     val interestsettlevalue : String? = "",//结息方式值
     @SerializedName("isautoloan")

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

@@ -22,6 +22,8 @@ data class HoldLBData(
     val enableqty : String? = "",//可用数量
     @SerializedName("enumdicname")
     val enumdicname : String? = "",//单位名称
+    @SerializedName("minivalue")
+    val minivalue : String? = "",//现货商品最小变动值
     @SerializedName("freezerqty")
     val freezerqty : String? = "",//冻结数量
     @SerializedName("ladingbillid")
@@ -86,6 +88,7 @@ data class HoldLBData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
         parcel.createStringArrayList()
     ) {
     }
@@ -98,6 +101,7 @@ data class HoldLBData(
         parcel.writeString(deliverygoodsname)
         parcel.writeString(enableqty)
         parcel.writeString(enumdicname)
+        parcel.writeString(minivalue)
         parcel.writeString(freezerqty)
         parcel.writeString(ladingbillid)
         parcel.writeString(optioncompare)
@@ -133,4 +137,5 @@ data class HoldLBData(
         }
     }
 
+
 }

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

@@ -8,6 +8,10 @@ import com.google.gson.annotations.SerializedName
  * 市场交易参数配置
  */
 data class MarketTradeConfigData(
+    @SerializedName("basisdownratio")
+    val basisdownratio : String? = "",//浮动价基差下限比例(仓单贸易)
+    @SerializedName("basisupratio")
+    val basisupratio : String? = "",//浮动价基差上限比例(仓单贸易)
     @SerializedName("buychargealgorithm")
     val buychargealgorithm : String? = "",//买方手续费收取方式 1:比率 2:固定
     @SerializedName("buychargealgorithm2")
@@ -111,11 +115,15 @@ data class MarketTradeConfigData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
         parcel.readString()
     ) {
     }
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeString(basisdownratio)
+        parcel.writeString(basisupratio)
         parcel.writeString(buychargealgorithm)
         parcel.writeString(buychargealgorithm2)
         parcel.writeString(buychargealgorithmvalue)

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

@@ -31,6 +31,8 @@ import com.google.gson.annotations.SerializedName
 data class OrderQuoteData(
     @SerializedName("buyprice")
     val buyprice : String? = "",//买价
+    @SerializedName("minivalue")
+    val minivalue : String? = "",//现货商品最小变动值
     @SerializedName("buypricemove")
     val buypricemove : String? = "",//买升贴水(基差)
     @SerializedName("deliverymonth")
@@ -96,12 +98,14 @@ data class OrderQuoteData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
         parcel.readString()
     ) {
     }
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(buyprice)
+        parcel.writeString(minivalue)
         parcel.writeString(buypricemove)
         parcel.writeString(deliverymonth)
         parcel.writeString(buyqty)

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

@@ -24,6 +24,8 @@ data class PerformancePlanData(
     val buyusername : String? = "",//买方名字
     @SerializedName("contractid")
     val contractid : String? = "",//合同ID
+    @SerializedName("unpaidamount")
+    val unpaidamount : String? = "",//剩余金额
     @SerializedName("createtime")
     val createtime : String? = "",//创建时间(开始时间)
     @SerializedName("creatorid")
@@ -164,6 +166,7 @@ data class PerformancePlanData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
         parcel.createStringArrayList()
     ) {
     }
@@ -177,6 +180,7 @@ data class PerformancePlanData(
         parcel.writeString(buypaidamount)
         parcel.writeString(buyusername)
         parcel.writeString(contractid)
+        parcel.writeString(unpaidamount)
         parcel.writeString(createtime)
         parcel.writeString(creatorid)
         parcel.writeString(curstepdeadline)
@@ -237,4 +241,5 @@ data class PerformancePlanData(
         }
     }
 
+
 }

+ 440 - 43
RMA/app/src/main/java/cn/muchinfo/rma/protobuf/protoclasses/WarehouseTradeMI1.java

@@ -632,7 +632,7 @@ public final class WarehouseTradeMI1 {
     }
     /**
      * <pre>
-     *
+     * �ֵ�ó�׸�������Ʒ������Ϣ 0 22 1
      * </pre>
      *
      * Protobuf type {@code WarehouseTradeMI1.WRGoodsInfo}
@@ -1334,7 +1334,7 @@ public final class WarehouseTradeMI1 {
     boolean hasOrderQty();
     /**
      * <pre>
-     * uint64 ������
+     * uint64
      * </pre>
      *
      * <code>optional uint64 OrderQty = 6;</code>
@@ -1344,7 +1344,7 @@ public final class WarehouseTradeMI1 {
 
     /**
      * <pre>
-     * uint32 ������Ʒ��ƷID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 DeliveryGoodsID = 7;</code>
@@ -1353,7 +1353,7 @@ public final class WarehouseTradeMI1 {
     boolean hasDeliveryGoodsID();
     /**
      * <pre>
-     * uint32 ������Ʒ��ƷID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 DeliveryGoodsID = 7;</code>
@@ -1363,7 +1363,7 @@ public final class WarehouseTradeMI1 {
 
     /**
      * <pre>
-     * uint32 Ʒ��ID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 BrandID = 8;</code>
@@ -1372,7 +1372,7 @@ public final class WarehouseTradeMI1 {
     boolean hasBrandID();
     /**
      * <pre>
-     * uint32 Ʒ��ID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 BrandID = 8;</code>
@@ -1382,7 +1382,7 @@ public final class WarehouseTradeMI1 {
 
     /**
      * <pre>
-     * uint32 Ʒ��ID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 QualityID = 9;</code>
@@ -1391,7 +1391,7 @@ public final class WarehouseTradeMI1 {
     boolean hasQualityID();
     /**
      * <pre>
-     * uint32 Ʒ��ID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 QualityID = 9;</code>
@@ -1401,7 +1401,7 @@ public final class WarehouseTradeMI1 {
 
     /**
      * <pre>
-     * uint32 ���ID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 SpecID = 10;</code>
@@ -1410,7 +1410,7 @@ public final class WarehouseTradeMI1 {
     boolean hasSpecID();
     /**
      * <pre>
-     * uint32 ���ID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 SpecID = 10;</code>
@@ -1420,7 +1420,7 @@ public final class WarehouseTradeMI1 {
 
     /**
      * <pre>
-     * uint32 �ֿ�ID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 WarehouseID = 11;</code>
@@ -1429,7 +1429,7 @@ public final class WarehouseTradeMI1 {
     boolean hasWarehouseID();
     /**
      * <pre>
-     * uint32 �ֿ�ID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 WarehouseID = 11;</code>
@@ -1439,7 +1439,7 @@ public final class WarehouseTradeMI1 {
 
     /**
      * <pre>
-     * uint32 �·�ID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 DeliveryMonthID = 12;</code>
@@ -1448,7 +1448,7 @@ public final class WarehouseTradeMI1 {
     boolean hasDeliveryMonthID();
     /**
      * <pre>
-     * uint32 �·�ID
+     * uint32
      * </pre>
      *
      * <code>optional uint32 DeliveryMonthID = 12;</code>
@@ -1458,7 +1458,7 @@ public final class WarehouseTradeMI1 {
 
     /**
      * <pre>
-     * uint32 �۸�ʽ
+     * uint32
      * </pre>
      *
      * <code>optional uint32 WRPriceType = 13;</code>
@@ -1467,7 +1467,7 @@ public final class WarehouseTradeMI1 {
     boolean hasWRPriceType();
     /**
      * <pre>
-     * uint32 �۸�ʽ
+     * uint32
      * </pre>
      *
      * <code>optional uint32 WRPriceType = 13;</code>
@@ -33134,6 +33134,25 @@ public final class WarehouseTradeMI1 {
      */
     cn.muchinfo.rma.protobuf.protoclasses.WarehouseTradeMI1.DGFactoryItemsOrBuilder getFactoryItemsOrBuilder(
         int index);
+
+    /**
+     * <pre>
+     * uint64 ��ժ����
+     * </pre>
+     *
+     * <code>optional uint64 DelistMinQty = 39;</code>
+     * @return Whether the delistMinQty field is set.
+     */
+    boolean hasDelistMinQty();
+    /**
+     * <pre>
+     * uint64 ��ժ����
+     * </pre>
+     *
+     * <code>optional uint64 DelistMinQty = 39;</code>
+     * @return The delistMinQty.
+     */
+    long getDelistMinQty();
   }
   /**
    * <pre>
@@ -33432,6 +33451,11 @@ public final class WarehouseTradeMI1 {
                   input.readMessage(cn.muchinfo.rma.protobuf.protoclasses.WarehouseTradeMI1.DGFactoryItems.PARSER, extensionRegistry));
               break;
             }
+            case 312: {
+              bitField1_ |= 0x00000004;
+              delistMinQty_ = input.readUInt64();
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -34881,6 +34905,33 @@ public final class WarehouseTradeMI1 {
       return factoryItems_.get(index);
     }
 
+    public static final int DELISTMINQTY_FIELD_NUMBER = 39;
+    private long delistMinQty_;
+    /**
+     * <pre>
+     * uint64 ��ժ����
+     * </pre>
+     *
+     * <code>optional uint64 DelistMinQty = 39;</code>
+     * @return Whether the delistMinQty field is set.
+     */
+    @java.lang.Override
+    public boolean hasDelistMinQty() {
+      return ((bitField1_ & 0x00000004) != 0);
+    }
+    /**
+     * <pre>
+     * uint64 ��ժ����
+     * </pre>
+     *
+     * <code>optional uint64 DelistMinQty = 39;</code>
+     * @return The delistMinQty.
+     */
+    @java.lang.Override
+    public long getDelistMinQty() {
+      return delistMinQty_;
+    }
+
     private byte memoizedIsInitialized = -1;
     @java.lang.Override
     public final boolean isInitialized() {
@@ -35029,6 +35080,9 @@ public final class WarehouseTradeMI1 {
       for (int i = 0; i < factoryItems_.size(); i++) {
         output.writeMessage(38, factoryItems_.get(i));
       }
+      if (((bitField1_ & 0x00000004) != 0)) {
+        output.writeUInt64(39, delistMinQty_);
+      }
       unknownFields.writeTo(output);
     }
 
@@ -35191,6 +35245,10 @@ public final class WarehouseTradeMI1 {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(38, factoryItems_.get(i));
       }
+      if (((bitField1_ & 0x00000004) != 0)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt64Size(39, delistMinQty_);
+      }
       size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
@@ -35388,6 +35446,11 @@ public final class WarehouseTradeMI1 {
       }
       if (!getFactoryItemsList()
           .equals(other.getFactoryItemsList())) return false;
+      if (hasDelistMinQty() != other.hasDelistMinQty()) return false;
+      if (hasDelistMinQty()) {
+        if (getDelistMinQty()
+            != other.getDelistMinQty()) return false;
+      }
       if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
@@ -35563,6 +35626,11 @@ public final class WarehouseTradeMI1 {
         hash = (37 * hash) + FACTORYITEMS_FIELD_NUMBER;
         hash = (53 * hash) + getFactoryItemsList().hashCode();
       }
+      if (hasDelistMinQty()) {
+        hash = (37 * hash) + DELISTMINQTY_FIELD_NUMBER;
+        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+            getDelistMinQty());
+      }
       hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
@@ -35791,6 +35859,8 @@ public final class WarehouseTradeMI1 {
         } else {
           factoryItemsBuilder_.clear();
         }
+        delistMinQty_ = 0L;
+        bitField1_ = (bitField1_ & ~0x00000040);
         return this;
       }
 
@@ -35989,6 +36059,10 @@ public final class WarehouseTradeMI1 {
         } else {
           result.factoryItems_ = factoryItemsBuilder_.build();
         }
+        if (((from_bitField1_ & 0x00000040) != 0)) {
+          result.delistMinQty_ = delistMinQty_;
+          to_bitField1_ |= 0x00000004;
+        }
         result.bitField0_ = to_bitField0_;
         result.bitField1_ = to_bitField1_;
         onBuilt();
@@ -36229,6 +36303,9 @@ public final class WarehouseTradeMI1 {
             }
           }
         }
+        if (other.hasDelistMinQty()) {
+          setDelistMinQty(other.getDelistMinQty());
+        }
         this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
@@ -39545,6 +39622,61 @@ public final class WarehouseTradeMI1 {
         }
         return factoryItemsBuilder_;
       }
+
+      private long delistMinQty_ ;
+      /**
+       * <pre>
+       * uint64 ��ժ����
+       * </pre>
+       *
+       * <code>optional uint64 DelistMinQty = 39;</code>
+       * @return Whether the delistMinQty field is set.
+       */
+      @java.lang.Override
+      public boolean hasDelistMinQty() {
+        return ((bitField1_ & 0x00000040) != 0);
+      }
+      /**
+       * <pre>
+       * uint64 ��ժ����
+       * </pre>
+       *
+       * <code>optional uint64 DelistMinQty = 39;</code>
+       * @return The delistMinQty.
+       */
+      @java.lang.Override
+      public long getDelistMinQty() {
+        return delistMinQty_;
+      }
+      /**
+       * <pre>
+       * uint64 ��ժ����
+       * </pre>
+       *
+       * <code>optional uint64 DelistMinQty = 39;</code>
+       * @param value The delistMinQty to set.
+       * @return This builder for chaining.
+       */
+      public Builder setDelistMinQty(long value) {
+        bitField1_ |= 0x00000040;
+        delistMinQty_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * uint64 ��ժ����
+       * </pre>
+       *
+       * <code>optional uint64 DelistMinQty = 39;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearDelistMinQty() {
+        bitField1_ = (bitField1_ & ~0x00000040);
+        delistMinQty_ = 0L;
+        onChanged();
+        return this;
+      }
       @java.lang.Override
       public final Builder setUnknownFields(
           final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -42058,6 +42190,44 @@ public final class WarehouseTradeMI1 {
      * @return The hasWr.
      */
     int getHasWr();
+
+    /**
+     * <pre>
+     * uint32 �Ƿ����ʹ���(��ժ��ʱ��Ч)-0:�� 1:��
+     * </pre>
+     *
+     * <code>optional uint32 IsFinancing = 20;</code>
+     * @return Whether the isFinancing field is set.
+     */
+    boolean hasIsFinancing();
+    /**
+     * <pre>
+     * uint32 �Ƿ����ʹ���(��ժ��ʱ��Ч)-0:�� 1:��
+     * </pre>
+     *
+     * <code>optional uint32 IsFinancing = 20;</code>
+     * @return The isFinancing.
+     */
+    int getIsFinancing();
+
+    /**
+     * <pre>
+     * uint64 ���ڻ�����Ʒ���ID(���ʹ���ʱ��Ч)
+     * </pre>
+     *
+     * <code>optional uint64 ProductDetailID = 21;</code>
+     * @return Whether the productDetailID field is set.
+     */
+    boolean hasProductDetailID();
+    /**
+     * <pre>
+     * uint64 ���ڻ�����Ʒ���ID(���ʹ���ʱ��Ч)
+     * </pre>
+     *
+     * <code>optional uint64 ProductDetailID = 21;</code>
+     * @return The productDetailID.
+     */
+    long getProductDetailID();
   }
   /**
    * <pre>
@@ -42220,6 +42390,16 @@ public final class WarehouseTradeMI1 {
               hasWr_ = input.readUInt32();
               break;
             }
+            case 160: {
+              bitField0_ |= 0x00080000;
+              isFinancing_ = input.readUInt32();
+              break;
+            }
+            case 168: {
+              bitField0_ |= 0x00100000;
+              productDetailID_ = input.readUInt64();
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -42909,6 +43089,60 @@ public final class WarehouseTradeMI1 {
       return hasWr_;
     }
 
+    public static final int ISFINANCING_FIELD_NUMBER = 20;
+    private int isFinancing_;
+    /**
+     * <pre>
+     * uint32 �Ƿ����ʹ���(��ժ��ʱ��Ч)-0:�� 1:��
+     * </pre>
+     *
+     * <code>optional uint32 IsFinancing = 20;</code>
+     * @return Whether the isFinancing field is set.
+     */
+    @java.lang.Override
+    public boolean hasIsFinancing() {
+      return ((bitField0_ & 0x00080000) != 0);
+    }
+    /**
+     * <pre>
+     * uint32 �Ƿ����ʹ���(��ժ��ʱ��Ч)-0:�� 1:��
+     * </pre>
+     *
+     * <code>optional uint32 IsFinancing = 20;</code>
+     * @return The isFinancing.
+     */
+    @java.lang.Override
+    public int getIsFinancing() {
+      return isFinancing_;
+    }
+
+    public static final int PRODUCTDETAILID_FIELD_NUMBER = 21;
+    private long productDetailID_;
+    /**
+     * <pre>
+     * uint64 ���ڻ�����Ʒ���ID(���ʹ���ʱ��Ч)
+     * </pre>
+     *
+     * <code>optional uint64 ProductDetailID = 21;</code>
+     * @return Whether the productDetailID field is set.
+     */
+    @java.lang.Override
+    public boolean hasProductDetailID() {
+      return ((bitField0_ & 0x00100000) != 0);
+    }
+    /**
+     * <pre>
+     * uint64 ���ڻ�����Ʒ���ID(���ʹ���ʱ��Ч)
+     * </pre>
+     *
+     * <code>optional uint64 ProductDetailID = 21;</code>
+     * @return The productDetailID.
+     */
+    @java.lang.Override
+    public long getProductDetailID() {
+      return productDetailID_;
+    }
+
     private byte memoizedIsInitialized = -1;
     @java.lang.Override
     public final boolean isInitialized() {
@@ -42980,6 +43214,12 @@ public final class WarehouseTradeMI1 {
       if (((bitField0_ & 0x00040000) != 0)) {
         output.writeUInt32(19, hasWr_);
       }
+      if (((bitField0_ & 0x00080000) != 0)) {
+        output.writeUInt32(20, isFinancing_);
+      }
+      if (((bitField0_ & 0x00100000) != 0)) {
+        output.writeUInt64(21, productDetailID_);
+      }
       unknownFields.writeTo(output);
     }
 
@@ -43061,6 +43301,14 @@ public final class WarehouseTradeMI1 {
         size += com.google.protobuf.CodedOutputStream
           .computeUInt32Size(19, hasWr_);
       }
+      if (((bitField0_ & 0x00080000) != 0)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt32Size(20, isFinancing_);
+      }
+      if (((bitField0_ & 0x00100000) != 0)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt64Size(21, productDetailID_);
+      }
       size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
@@ -43171,6 +43419,16 @@ public final class WarehouseTradeMI1 {
         if (getHasWr()
             != other.getHasWr()) return false;
       }
+      if (hasIsFinancing() != other.hasIsFinancing()) return false;
+      if (hasIsFinancing()) {
+        if (getIsFinancing()
+            != other.getIsFinancing()) return false;
+      }
+      if (hasProductDetailID() != other.hasProductDetailID()) return false;
+      if (hasProductDetailID()) {
+        if (getProductDetailID()
+            != other.getProductDetailID()) return false;
+      }
       if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
@@ -43266,6 +43524,15 @@ public final class WarehouseTradeMI1 {
         hash = (37 * hash) + HASWR_FIELD_NUMBER;
         hash = (53 * hash) + getHasWr();
       }
+      if (hasIsFinancing()) {
+        hash = (37 * hash) + ISFINANCING_FIELD_NUMBER;
+        hash = (53 * hash) + getIsFinancing();
+      }
+      if (hasProductDetailID()) {
+        hash = (37 * hash) + PRODUCTDETAILID_FIELD_NUMBER;
+        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+            getProductDetailID());
+      }
       hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
@@ -43446,6 +43713,10 @@ public final class WarehouseTradeMI1 {
         bitField0_ = (bitField0_ & ~0x00020000);
         hasWr_ = 0;
         bitField0_ = (bitField0_ & ~0x00040000);
+        isFinancing_ = 0;
+        bitField0_ = (bitField0_ & ~0x00080000);
+        productDetailID_ = 0L;
+        bitField0_ = (bitField0_ & ~0x00100000);
         return this;
       }
 
@@ -43554,6 +43825,14 @@ public final class WarehouseTradeMI1 {
           result.hasWr_ = hasWr_;
           to_bitField0_ |= 0x00040000;
         }
+        if (((from_bitField0_ & 0x00080000) != 0)) {
+          result.isFinancing_ = isFinancing_;
+          to_bitField0_ |= 0x00080000;
+        }
+        if (((from_bitField0_ & 0x00100000) != 0)) {
+          result.productDetailID_ = productDetailID_;
+          to_bitField0_ |= 0x00100000;
+        }
         result.bitField0_ = to_bitField0_;
         onBuilt();
         return result;
@@ -43668,6 +43947,12 @@ public final class WarehouseTradeMI1 {
         if (other.hasHasWr()) {
           setHasWr(other.getHasWr());
         }
+        if (other.hasIsFinancing()) {
+          setIsFinancing(other.getIsFinancing());
+        }
+        if (other.hasProductDetailID()) {
+          setProductDetailID(other.getProductDetailID());
+        }
         this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
@@ -45055,6 +45340,116 @@ public final class WarehouseTradeMI1 {
         onChanged();
         return this;
       }
+
+      private int isFinancing_ ;
+      /**
+       * <pre>
+       * uint32 �Ƿ����ʹ���(��ժ��ʱ��Ч)-0:�� 1:��
+       * </pre>
+       *
+       * <code>optional uint32 IsFinancing = 20;</code>
+       * @return Whether the isFinancing field is set.
+       */
+      @java.lang.Override
+      public boolean hasIsFinancing() {
+        return ((bitField0_ & 0x00080000) != 0);
+      }
+      /**
+       * <pre>
+       * uint32 �Ƿ����ʹ���(��ժ��ʱ��Ч)-0:�� 1:��
+       * </pre>
+       *
+       * <code>optional uint32 IsFinancing = 20;</code>
+       * @return The isFinancing.
+       */
+      @java.lang.Override
+      public int getIsFinancing() {
+        return isFinancing_;
+      }
+      /**
+       * <pre>
+       * uint32 �Ƿ����ʹ���(��ժ��ʱ��Ч)-0:�� 1:��
+       * </pre>
+       *
+       * <code>optional uint32 IsFinancing = 20;</code>
+       * @param value The isFinancing to set.
+       * @return This builder for chaining.
+       */
+      public Builder setIsFinancing(int value) {
+        bitField0_ |= 0x00080000;
+        isFinancing_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * uint32 �Ƿ����ʹ���(��ժ��ʱ��Ч)-0:�� 1:��
+       * </pre>
+       *
+       * <code>optional uint32 IsFinancing = 20;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearIsFinancing() {
+        bitField0_ = (bitField0_ & ~0x00080000);
+        isFinancing_ = 0;
+        onChanged();
+        return this;
+      }
+
+      private long productDetailID_ ;
+      /**
+       * <pre>
+       * uint64 ���ڻ�����Ʒ���ID(���ʹ���ʱ��Ч)
+       * </pre>
+       *
+       * <code>optional uint64 ProductDetailID = 21;</code>
+       * @return Whether the productDetailID field is set.
+       */
+      @java.lang.Override
+      public boolean hasProductDetailID() {
+        return ((bitField0_ & 0x00100000) != 0);
+      }
+      /**
+       * <pre>
+       * uint64 ���ڻ�����Ʒ���ID(���ʹ���ʱ��Ч)
+       * </pre>
+       *
+       * <code>optional uint64 ProductDetailID = 21;</code>
+       * @return The productDetailID.
+       */
+      @java.lang.Override
+      public long getProductDetailID() {
+        return productDetailID_;
+      }
+      /**
+       * <pre>
+       * uint64 ���ڻ�����Ʒ���ID(���ʹ���ʱ��Ч)
+       * </pre>
+       *
+       * <code>optional uint64 ProductDetailID = 21;</code>
+       * @param value The productDetailID to set.
+       * @return This builder for chaining.
+       */
+      public Builder setProductDetailID(long value) {
+        bitField0_ |= 0x00100000;
+        productDetailID_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * uint64 ���ڻ�����Ʒ���ID(���ʹ���ʱ��Ч)
+       * </pre>
+       *
+       * <code>optional uint64 ProductDetailID = 21;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearProductDetailID() {
+        bitField0_ = (bitField0_ & ~0x00100000);
+        productDetailID_ = 0L;
+        onChanged();
+        return this;
+      }
       @java.lang.Override
       public final Builder setUnknownFields(
           final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -47485,7 +47880,7 @@ public final class WarehouseTradeMI1 {
       "erTime\030\006 \001(\t\022\026\n\016ClientSerialNo\030\007 \001(\t\"\\\n\016" +
       "DGFactoryItems\022\033\n\023DGFactoryItemTypeID\030\001 " +
       "\001(\004\022\027\n\017DGFactoryItemID\030\002 \001(\004\022\024\n\014ItemType" +
-      "Mode\030\003 \001(\r\"\361\006\n\014HdWROrderReq\022\034\n\006Header\030\001 " +
+      "Mode\030\003 \001(\r\"\207\007\n\014HdWROrderReq\022\034\n\006Header\030\001 " +
       "\001(\0132\014.MessageHead\022\024\n\014LadingBillId\030\002 \001(\004\022" +
       "\021\n\tTradeDate\030\003 \002(\t\022\016\n\006SubNum\030\004 \001(\004\022\026\n\016WR" +
       "FactorTypeId\030\005 \001(\004\022\016\n\006UserID\030\006 \002(\r\022\021\n\tAc" +
@@ -47507,30 +47902,32 @@ public final class WarehouseTradeMI1 {
       "ccIDsString\030\" \003(\t\022\025\n\rDeliveryMonth\030# \001(\t" +
       "\022\r\n\005HasWr\030$ \001(\r\022\024\n\014WRStandardID\030% \001(\r\0227\n" +
       "\014FactoryItems\030& \003(\0132!.WarehouseTradeMI1." +
-      "DGFactoryItems\"\307\001\n\014HdWROrderRsp\022\034\n\006Heade" +
-      "r\030\001 \001(\0132\014.MessageHead\022\017\n\007RetCode\030\002 \001(\005\022\017" +
-      "\n\007RetDesc\030\003 \001(\t\022\016\n\006UserID\030\004 \001(\r\022\021\n\tAccou" +
-      "ntID\030\005 \001(\004\022\026\n\016WRTradeOrderID\030\006 \001(\004\022\021\n\tFr" +
-      "eezeQty\030\007 \001(\004\022\021\n\tOrderTime\030\010 \001(\t\022\026\n\016Clie" +
-      "ntSerialNo\030\t \001(\t\"\244\003\n\020HdWRDealOrderReq\022\034\n" +
-      "\006Header\030\001 \001(\0132\014.MessageHead\022\016\n\006UserID\030\002 " +
-      "\001(\r\022\021\n\tAccountID\030\003 \001(\004\022\035\n\025RelatedWRTrade" +
-      "OrderID\030\004 \001(\004\022\030\n\020WRTransferUserID\030\005 \001(\r\022" +
-      "\020\n\010OrderQty\030\006 \001(\004\022\020\n\010OrderSrc\030\007 \001(\r\022\026\n\016C" +
-      "lientSerialNo\030\010 \001(\t\022\027\n\017ClientOrderTime\030\t" +
-      " \001(\t\022\022\n\nClientType\030\n \001(\r\022\022\n\nOperatorID\030\013" +
-      " \001(\004\022\021\n\tBuyOrSell\030\014 \001(\r\022\017\n\007ApplyID\030\r \001(\004" +
-      "\022\024\n\014LadingBillId\030\016 \001(\004\022\016\n\006SubNum\030\017 \001(\004\022\026" +
-      "\n\016WRFactorTypeId\030\020 \001(\004\022\021\n\tTradeDate\030\021 \001(" +
-      "\t\022\025\n\rDeliveryMonth\030\022 \001(\t\022\r\n\005HasWr\030\023 \001(\r\"" +
-      "\355\001\n\020HdWRDealOrderRsp\022\034\n\006Header\030\001 \001(\0132\014.M" +
-      "essageHead\022\017\n\007RetCode\030\002 \001(\005\022\017\n\007RetDesc\030\003" +
-      " \001(\t\022\016\n\006UserID\030\004 \001(\r\022\021\n\tAccountID\030\005 \001(\004\022" +
-      "\026\n\016WRTradeOrderID\030\006 \001(\004\022\035\n\025RelatedWRTrad" +
-      "eOrderID\030\007 \001(\004\022\024\n\014FreezeAmount\030\010 \001(\001\022\021\n\t" +
-      "OrderTime\030\t \001(\t\022\026\n\016ClientSerialNo\030\n \001(\tB" +
-      "?\n%cn.muchinfo.rma.protobuf.protoclasses" +
-      "Z\026com.muchinfo.mtp.proto"
+      "DGFactoryItems\022\024\n\014DelistMinQty\030\' \001(\004\"\307\001\n" +
+      "\014HdWROrderRsp\022\034\n\006Header\030\001 \001(\0132\014.MessageH" +
+      "ead\022\017\n\007RetCode\030\002 \001(\005\022\017\n\007RetDesc\030\003 \001(\t\022\016\n" +
+      "\006UserID\030\004 \001(\r\022\021\n\tAccountID\030\005 \001(\004\022\026\n\016WRTr" +
+      "adeOrderID\030\006 \001(\004\022\021\n\tFreezeQty\030\007 \001(\004\022\021\n\tO" +
+      "rderTime\030\010 \001(\t\022\026\n\016ClientSerialNo\030\t \001(\t\"\322" +
+      "\003\n\020HdWRDealOrderReq\022\034\n\006Header\030\001 \001(\0132\014.Me" +
+      "ssageHead\022\016\n\006UserID\030\002 \001(\r\022\021\n\tAccountID\030\003" +
+      " \001(\004\022\035\n\025RelatedWRTradeOrderID\030\004 \001(\004\022\030\n\020W" +
+      "RTransferUserID\030\005 \001(\r\022\020\n\010OrderQty\030\006 \001(\004\022" +
+      "\020\n\010OrderSrc\030\007 \001(\r\022\026\n\016ClientSerialNo\030\010 \001(" +
+      "\t\022\027\n\017ClientOrderTime\030\t \001(\t\022\022\n\nClientType" +
+      "\030\n \001(\r\022\022\n\nOperatorID\030\013 \001(\004\022\021\n\tBuyOrSell\030" +
+      "\014 \001(\r\022\017\n\007ApplyID\030\r \001(\004\022\024\n\014LadingBillId\030\016" +
+      " \001(\004\022\016\n\006SubNum\030\017 \001(\004\022\026\n\016WRFactorTypeId\030\020" +
+      " \001(\004\022\021\n\tTradeDate\030\021 \001(\t\022\025\n\rDeliveryMonth" +
+      "\030\022 \001(\t\022\r\n\005HasWr\030\023 \001(\r\022\023\n\013IsFinancing\030\024 \001" +
+      "(\r\022\027\n\017ProductDetailID\030\025 \001(\004\"\355\001\n\020HdWRDeal" +
+      "OrderRsp\022\034\n\006Header\030\001 \001(\0132\014.MessageHead\022\017" +
+      "\n\007RetCode\030\002 \001(\005\022\017\n\007RetDesc\030\003 \001(\t\022\016\n\006User" +
+      "ID\030\004 \001(\r\022\021\n\tAccountID\030\005 \001(\004\022\026\n\016WRTradeOr" +
+      "derID\030\006 \001(\004\022\035\n\025RelatedWRTradeOrderID\030\007 \001" +
+      "(\004\022\024\n\014FreezeAmount\030\010 \001(\001\022\021\n\tOrderTime\030\t " +
+      "\001(\t\022\026\n\016ClientSerialNo\030\n \001(\tB?\n%cn.muchin" +
+      "fo.rma.protobuf.protoclassesZ\026com.muchin" +
+      "fo.mtp.proto"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -47633,7 +48030,7 @@ public final class WarehouseTradeMI1 {
     internal_static_WarehouseTradeMI1_HdWROrderReq_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_WarehouseTradeMI1_HdWROrderReq_descriptor,
-        new java.lang.String[] { "Header", "LadingBillId", "TradeDate", "SubNum", "WRFactorTypeId", "UserID", "AccountID", "IsSpecified", "MatchAccIDs", "OrderQty", "DeliveryGoodsID", "WRPriceType", "FixedPrice", "WRTradeGoods", "PriceFactor", "PriceMove", "TimevalidType", "ValidTime", "FirstRatio", "PerformanceTemplateID", "OrderSrc", "ClientSerialNo", "ClientOrderTime", "ClientType", "OperatorID", "BuyOrSell", "PriceDisplayMode", "CanBargain", "Attachment1", "Attachment2", "Remark", "ApplyID", "CanPart", "MatchAccIDsString", "DeliveryMonth", "HasWr", "WRStandardID", "FactoryItems", });
+        new java.lang.String[] { "Header", "LadingBillId", "TradeDate", "SubNum", "WRFactorTypeId", "UserID", "AccountID", "IsSpecified", "MatchAccIDs", "OrderQty", "DeliveryGoodsID", "WRPriceType", "FixedPrice", "WRTradeGoods", "PriceFactor", "PriceMove", "TimevalidType", "ValidTime", "FirstRatio", "PerformanceTemplateID", "OrderSrc", "ClientSerialNo", "ClientOrderTime", "ClientType", "OperatorID", "BuyOrSell", "PriceDisplayMode", "CanBargain", "Attachment1", "Attachment2", "Remark", "ApplyID", "CanPart", "MatchAccIDsString", "DeliveryMonth", "HasWr", "WRStandardID", "FactoryItems", "DelistMinQty", });
     internal_static_WarehouseTradeMI1_HdWROrderRsp_descriptor =
       getDescriptor().getMessageTypes().get(16);
     internal_static_WarehouseTradeMI1_HdWROrderRsp_fieldAccessorTable = new
@@ -47645,7 +48042,7 @@ public final class WarehouseTradeMI1 {
     internal_static_WarehouseTradeMI1_HdWRDealOrderReq_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_WarehouseTradeMI1_HdWRDealOrderReq_descriptor,
-        new java.lang.String[] { "Header", "UserID", "AccountID", "RelatedWRTradeOrderID", "WRTransferUserID", "OrderQty", "OrderSrc", "ClientSerialNo", "ClientOrderTime", "ClientType", "OperatorID", "BuyOrSell", "ApplyID", "LadingBillId", "SubNum", "WRFactorTypeId", "TradeDate", "DeliveryMonth", "HasWr", });
+        new java.lang.String[] { "Header", "UserID", "AccountID", "RelatedWRTradeOrderID", "WRTransferUserID", "OrderQty", "OrderSrc", "ClientSerialNo", "ClientOrderTime", "ClientType", "OperatorID", "BuyOrSell", "ApplyID", "LadingBillId", "SubNum", "WRFactorTypeId", "TradeDate", "DeliveryMonth", "HasWr", "IsFinancing", "ProductDetailID", });
     internal_static_WarehouseTradeMI1_HdWRDealOrderRsp_descriptor =
       getDescriptor().getMessageTypes().get(18);
     internal_static_WarehouseTradeMI1_HdWRDealOrderRsp_fieldAccessorTable = new

+ 1 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/view/MangeNumberEditText3.java

@@ -297,15 +297,7 @@ public class MangeNumberEditText3 extends FrameLayout implements View.OnClickLis
 
             } else {
                 double _text = Double.parseDouble(text);
-                if (_text < 0) {
-                    p_number.setText(String.valueOf(0));
-                } else {
-                    if ((_text + type) > 0) {
-                        p_number.setText(NumberUtils.roundNum(String.valueOf(_text + type), this.decimal));
-                    } else {
-                        p_number.setText("0");
-                    }
-                }
+                p_number.setText(NumberUtils.roundNum(String.valueOf(_text + type), this.decimal));
             }
         }
 

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

@@ -4,6 +4,7 @@ import android.content.Intent
 import android.os.Bundle
 import android.widget.ImageView
 import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.BuildConfig
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.BaseUrlData
 import cn.muchinfo.rma.lifecycle.addObserver
@@ -39,7 +40,13 @@ class SplashActivity : AppCompatActivity() {
 
             imageView {
                 scaleType = ImageView.ScaleType.CENTER_CROP
-                imageResource = R.mipmap.img_start
+                if (BuildConfig.APPLICATION_ID == "cn.muchinfo.rma"){//企业风管
+                    imageResource = R.mipmap.rma_img_start
+                }else if (BuildConfig.APPLICATION_ID == "cn.muchinfo.qhj"){//千海金
+                    imageResource = R.mipmap.qhj_img_start
+                }else if (BuildConfig.APPLICATION_ID == "cn.muchinfo.yrdz"){//云融大宗
+                    imageResource = R.mipmap.yrdz_img_start
+                }
             }.lparams(matchParent, matchParent)
 
             Observable.timer(1000, TimeUnit.MILLISECONDS)//在此页面停留1秒钟跳转到mainactivity

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

@@ -24,6 +24,9 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
 
     val data by lazy { intent.getParcelableExtra<PerformancePlanData>("data") as PerformancePlanData }
 
+    // 1 是买履约 2是卖履约
+    val type by lazy { intent.getStringExtra("type") }
+
     //输入的支付金额
     lateinit var input_amount: EditText
 
@@ -196,7 +199,7 @@ class PerformanceDefaultActivity : BaseActivity<PerformanceInformationViewModel>
                     gravity = Gravity.CENTER_VERTICAL
                     textView {
                         onThrottleFirstClick {
-                            if (data.buyorsell == "0") {
+                            if (type == "1") {
                                 viewModel.performanceContractedApplyReq(
                                     marketid = data.marketid?.toLong() ?: 0,
                                     PerformancePlanID = data.performanceplanid?.toLong() ?: 0,

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

@@ -310,7 +310,7 @@ class SellInformationUI(private val activity : AppCompatActivity,private val vie
     val performanceInformationcontentAdapter by lazy {
         PerformanceInformationContentAdapter(
             activity,
-            "1"
+            "2"
         )
     }
 

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

@@ -50,9 +50,11 @@ class PerformanceInformationViewModel : BaseViewModel(){
      */
     val wrPerformancePlanStepData : MutableLiveData<WrPerformancePlanStepData> = MutableLiveData()
 
+    //查询具体步骤的信息
     fun queryWrPerformancePlanStep(data : PerformancePlanData){
         val params = mutableMapOf<String,String>().apply {
             put("planid",data.performanceplanid ?: "")
+            put("curstepid",data.curstepid ?: "")
         }
         MyApplication.getInstance()?.performanceManager?.queryWrPerformancePlanStep(params = params){isSuccess, respData, error ->
             if (isSuccess){
@@ -161,7 +163,7 @@ class PerformanceInformationViewModel : BaseViewModel(){
     }
 
     /**
-     * 履约
+     * 履约
      */
     fun querySellPerformancePlan(){
         val params = mutableMapOf<String,String>().apply {
@@ -248,6 +250,44 @@ class PerformanceInformationViewModel : BaseViewModel(){
         }
     }
 
+    //付款
+    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,//运费金额
+        isSuccess: (isCompleted: Boolean) -> Unit
+    ){
+        loadingDialogStatus.value = TaskUiModel.inFlight()
+        GlobalScope.launch {
+            MyApplication.getInstance()?.performanceManager?.performanceManualConfirmReq(
+                marketid = marketid,
+                PerformancePlanStepID = PerformancePlanStepID,
+                OverShortAmount = OverShortAmount,
+                PerformanceExecuteSide = PerformanceExecuteSide,
+                StepRemark = StepRemark,
+                OverShortQty = OverShortQty,
+                ExpressFee = ExpressFee
+            ) { 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

+ 15 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/performance/PerformationPayActivity.kt

@@ -1,9 +1,11 @@
 package cn.muchinfo.rma.view.base.hnstmain.performance
 
+import android.annotation.SuppressLint
 import android.os.Bundle
 import android.view.Gravity
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.data.PerformancePlanData
+import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.future.trade.itemView
@@ -19,9 +21,11 @@ class PerformationPayActivity : BaseActivity<PerformanceInformationViewModel>(){
 
     val data by lazy { intent.getParcelableExtra<PerformancePlanData>("data") as PerformancePlanData }
 
+    @SuppressLint("SetTextI18n")
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         verticalLayout {
+            viewModel.queryWrPerformancePlanStep(data = data)
             createLoadingDialog(hintStr = "").bindTaskStatus(context, viewModel.loadingDialogStatus)
             background = resources.getDrawable(R.color.segtabment_bg_color)
             topBar {
@@ -135,11 +139,10 @@ class PerformationPayActivity : BaseActivity<PerformanceInformationViewModel>(){
 
                     textView {
                         if (data.buyorsell == "0"){//买
-                            text = "已冻结履约金额" +  data.buyerfreezeamount + "元"
+                            text = "已冻结履约金额" +  data.buyerfreezeamountremain + "元"
                         }else{//卖
                             text = "已冻结履约金额" +  data.sellerfreezeamountremain + "元"
                         }
-
                         textSizeAuto = 29
                         textColorInt = R.color.rma_hint_text_color_ccc
                     }.lparams(wrapContent, wrapContent){
@@ -164,6 +167,9 @@ class PerformationPayActivity : BaseActivity<PerformanceInformationViewModel>(){
                 }
 
                 textView {
+                    viewModel.wrPerformancePlanStepData.bindOptional(context){
+                        text = it?.stepamount
+                    }
                     text = "--"
                     textSizeAuto = 29
                     textColorInt = R.color.rma_black_33
@@ -184,7 +190,7 @@ class PerformationPayActivity : BaseActivity<PerformanceInformationViewModel>(){
                 }
 
                 textView {
-                    text = "--"
+                    text = data.unpaidamount
                     textSizeAuto = 29
                     textColorInt = R.color.rma_black_33
                 }.lparams(wrapContent, wrapContent)
@@ -198,7 +204,12 @@ class PerformationPayActivity : BaseActivity<PerformanceInformationViewModel>(){
                 gravity = Gravity.CENTER_VERTICAL
                 textView {
                     onThrottleFirstClick {
-
+                        viewModel.performanceManualConfirmReq(
+                            marketid = data.marketid?.toLong() ?: 0,
+                            PerformancePlanStepID = viewModel.wrPerformancePlanStepData.value?.performancestepid?.toLong() ?: 0
+                        ){
+                            finish()
+                        }
                     }
                     gravity = Gravity.CENTER
                     backgroundResource = R.mipmap.rma_save_info_bg

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

@@ -89,7 +89,7 @@ public class PerformanceInformationContentAdapter extends RecyclerView.Adapter<P
 
         itemViewHolder.tvLeftTitle.setText(data.getDeliverygoodsname());
 
-        itemViewHolder.tv_left_bottom_title.setText(data.getWrstandardname());
+        itemViewHolder.tv_left_bottom_title.setText(data.getWrtypename());
         //右边滑动部分
         LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
         linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
@@ -152,7 +152,6 @@ public class PerformanceInformationContentAdapter extends RecyclerView.Adapter<P
                     itemViewHolder.details.setVisibility(View.VISIBLE);
                 }
             }
-
         }else {
             itemViewHolder.warehouse_register.setVisibility(View.GONE);
             itemViewHolder.spot_details.setVisibility(View.GONE);
@@ -185,6 +184,7 @@ public class PerformanceInformationContentAdapter extends RecyclerView.Adapter<P
         itemViewHolder.future_details.setOnClickListener(view -> {
             Intent intent = new Intent();
             intent.putExtra("data",data);
+            intent.putExtra("type",type);
             intent.setClass(context, PerformanceDefaultActivity.class);
             ActivityUtils.startActivity(intent);
         });

+ 5 - 5
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/SpotWareHouseActivity.kt

@@ -82,11 +82,11 @@ class SpotWareHouseActivity : BaseActivity<SpotWareHouseViewModel>(){
 
     fun initMenuData(){
 
-        newTabsArray.add("现货汇总")
-        uiList.add(spotSummaryUI.root)
-
-        newTabsArray.add("库存汇总")
-        uiList.add(warehouseSummaryUI.root)
+//        newTabsArray.add("现货汇总")
+//        uiList.add(spotSummaryUI.root)
+//
+//        newTabsArray.add("库存汇总")
+//        uiList.add(warehouseSummaryUI.root)
 
         newTabsArray.add("明细")
         uiList.add(detailsWarehouseUI.root)

+ 11 - 6
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/listed/ListedActivity.kt

@@ -620,11 +620,12 @@ class ListedActivity : BaseActivity<ListedViewModel>() {
                             verticalLayout {
                                 linearLayout {
                                     editText {
+                                        setText(data.minivalue)
                                         startInputNumber = this
                                         hint = "请输入起摘数量"
                                         background = null
                                         inputType = EditorInfo.TYPE_CLASS_NUMBER
-                                        setDecimalInputType()
+//                                        setDecimalInputType()
                                         hintColorStr = "#CCCCCC"
                                         textSizeAuto = 31
                                         textColorStr = "#333333"
@@ -640,7 +641,7 @@ class ListedActivity : BaseActivity<ListedViewModel>() {
                                 }.lparams(matchParent, autoSize(100))
 
                                 textView {
-                                    text = "最小单位1吨"
+                                    text = "最小单位" + data.minivalue + data.enumdicname
                                     textSizeAuto = 29
                                     textColorInt = R.color.rma_hint_text_color_ccc
                                 }.lparams(wrapContent, wrapContent) {
@@ -779,6 +780,7 @@ class ListedActivity : BaseActivity<ListedViewModel>() {
                                         ApplyID = 0,
                                         CanPart = 1,
                                         HasWr = 1,
+                                        DelistMinQty = startInputNumber.text.toString().toLong(),
                                         WRStandardID = data.wrstandardid?.toInt() ?: 0
                                     ) {
                                         finish()
@@ -808,6 +810,7 @@ class ListedActivity : BaseActivity<ListedViewModel>() {
                                         ApplyID = 0,
                                         CanPart = 1,
                                         HasWr = 1,
+                                        DelistMinQty = startInputNumber.text.toString().toLong(),
                                         WRStandardID = data.wrstandardid?.toInt() ?: 0
                                     ) {
                                         finish()
@@ -841,6 +844,7 @@ class ListedActivity : BaseActivity<ListedViewModel>() {
                                         ApplyID = 0,
                                         CanPart = 1,
                                         HasWr = 0,
+                                        DelistMinQty = startInputNumber.text.toString().toLong(),
                                         WRStandardID = data1.wrstandardid?.toInt() ?: 0
                                     ) {
                                         finish()
@@ -871,6 +875,7 @@ class ListedActivity : BaseActivity<ListedViewModel>() {
                                         ApplyID = 0,
                                         CanPart = 1,
                                         HasWr = 0,
+                                        DelistMinQty = startInputNumber.text.toString().toLong(),
                                         WRStandardID = data1.wrstandardid?.toInt() ?: 0
                                     ) {
                                         finish()
@@ -932,8 +937,8 @@ class ListedActivity : BaseActivity<ListedViewModel>() {
                 ToastUtils.showLong("请输入起摘数量")
                 return false
             }
-            if (startInputNumber.text.toString() == "0" || startInputNumber.text.toString() == "0.0" || startInputNumber.text.toString() == "0.00") {
-                ToastUtils.showLong("起摘数量不能为0")
+            if (startInputNumber.text.toString().toLong() < data.minivalue?.toLong() ?: 0){
+                ToastUtils.showLong("起摘数量不能小于" + data.minivalue)
                 return false
             }
 
@@ -968,8 +973,8 @@ class ListedActivity : BaseActivity<ListedViewModel>() {
                 ToastUtils.showLong("请输入起摘数量")
                 return false
             }
-            if (startInputNumber.text.toString() == "0" || startInputNumber.text.toString() == "0.0" || startInputNumber.text.toString() == "0.00") {
-                ToastUtils.showLong("起摘数量不能为0")
+            if (startInputNumber.text.toString().toLong() < data.minivalue?.toLong() ?: 0){
+                ToastUtils.showLong("起摘数量不能小于" + data.minivalue)
                 return false
             }
             if (type == "2") {

+ 2 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/listed/ListedViewModel.kt

@@ -205,6 +205,7 @@ class ListedViewModel : BaseViewModel(){
 //        MatchAccIDsString : List<String> = arrayListOf(),//仓单贸易对手用户ID集合(指定对手时填写)
         DeliveryMonth : String = "",//交收月
         HasWr: Int = 0,//是否有仓单-0:没有仓单 1:有仓单
+        DelistMinQty : Long = 0,//起摘数量
         WRStandardID: Int = 0,//现货品种ID
         isSuccess: (isCompleted: Boolean) -> Unit
     ){
@@ -238,6 +239,7 @@ class ListedViewModel : BaseViewModel(){
                 CanBargain = CanBargain,
                 Attachment1 = Attachment1,
                 Attachment2 = Attachment2,
+                DelistMinQty = DelistMinQty,
                 Remark = Remark,
                 ApplyID = ApplyID
             ) { isCompleted, err ->

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

@@ -188,7 +188,7 @@ class AddSpotGoodsActivity : BaseActivity<CommodityInformationViewModel>() {
                                     isEnabled = true
                                 }
                                 spot_variety_name_edittext = this
-                                hint = "请输入商品名称"
+                                hint = "请输入现货品种名称"
                                 background = null
                                 inputType = EditorInfo.TYPE_CLASS_TEXT
 //                                setDecimalInputType()
@@ -223,7 +223,7 @@ class AddSpotGoodsActivity : BaseActivity<CommodityInformationViewModel>() {
                                     isEnabled = true
                                 }
                                 spot_variety_code_edittext = this
-                                hint = "请输入商品代码"
+                                hint = "请输入现货品种代码"
                                 background = null
                                 inputType = EditorInfo.TYPE_TEXT_VARIATION_PASSWORD
 //                                setDecimalInputType()

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

@@ -74,10 +74,14 @@ class InsuredVarietyViewHolder(
 
                 textView {
                     data.bindOptional(context){
-                        text = it?.middleGoodsName
-                        textColorInt = R.color.rma_black_33
+                        if (it?.middleGoodsName.isNullOrEmpty()){
+                            text = "请选择套保品种"
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }else{
+                            text = it?.middleGoodsName
+                            textColorInt = R.color.rma_black_33
+                        }
                     }
-                    text = "请选择套保品种"
                     textSizeAuto = 31
                     textColorInt = R.color.rma_hint_text_color_ccc
                 }.lparams(wrapContent, wrapContent) {

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

@@ -53,13 +53,11 @@ class ContractDetailsActivity : BaseActivity<ContractViewModel>() {
      */
     val selectTradingData : MutableLiveData<SelectData> = MutableLiveData()
 
-
-
     //对跟单员,业务员,期货账户进行数据初始化
     fun init(){
-        selectSalesman.postValue(SelectData(id = data.saleuserid ?: "",value = data.saleuserlogincode ?: ""))
-        selectMerchandiser.postValue(SelectData(id = data.meruserid ?: "",value = data.meruserlogincode ?: ""))
-        selectTradingData.postValue(SelectData(id = data.tradeuserid ?: "",value = data.tradeusername ?: ""))//没有accountname
+        selectSalesman.postValue(SelectData(id = data.saleuserid ?: "",value = data.saleusername + "-" + data.saleuserlogincode))
+        selectMerchandiser.postValue(SelectData(id = data.meruserid ?: "",value = data.merusername + "-" + data.meruserlogincode))
+        selectTradingData.postValue(SelectData(id = data.tradeuserid ?: "",value = data.tradeusername  + "-" + data.tradeuserlogincode))//没有accountname
     }
 
 
@@ -180,7 +178,7 @@ class ContractDetailsActivity : BaseActivity<ContractViewModel>() {
                                     }
 
                                 }
-                                text = data.saleuserlogincode?.isBlankString()
+                                text = data.saleusername?.isBlankString()
                                 textColorInt = R.color.rma_black_33
                                 textSizeAuto = 31
                             }.lparams(wrapContent, wrapContent) {

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

@@ -1,6 +1,7 @@
 package cn.muchinfo.rma.view.base.home.contract
 
 import android.annotation.SuppressLint
+import android.content.Intent
 import android.text.TextUtils
 import android.view.Gravity
 import android.view.View
@@ -14,6 +15,8 @@ import cn.muchinfo.rma.view.autoWidget.autoSize
 import cn.muchinfo.rma.view.autoWidget.onThrottleFirstClick
 import cn.muchinfo.rma.view.autoWidget.textColorInt
 import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.base.main.promotioncode.ShowImageByUrlActivity
+import com.blankj.utilcode.util.ActivityUtils
 import com.blankj.utilcode.util.ToastUtils
 import org.jetbrains.anko.*
 
@@ -150,7 +153,7 @@ fun _LinearLayout.contractDetailOneView(data: ContractData) {
             }
 
             textView {
-                text = data.sellusername
+                text = data.sellnickname
                 textColorInt = R.color.rma_black_33
                 textSizeAuto = 31
             }.lparams(wrapContent, wrapContent) {
@@ -172,7 +175,10 @@ fun _LinearLayout.contractDetailOneView(data: ContractData) {
 
             textView {
                 onThrottleFirstClick {
-                    ToastUtils.showLong("查看附件")
+                    val intent = Intent()
+                    intent.putExtra("url",data.attachment)
+                    intent.setClass(context, ShowImageByUrlActivity::class.java)
+                    ActivityUtils.startActivity(intent)
                 }
                 text = "查看附件"
                 textColorInt = R.color.rma_yellow_text_color

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

@@ -27,6 +27,7 @@ import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.ViewEnumUtils;
 import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
+import cn.muchinfo.rma.view.base.home.contract.AddContractActivity;
 import cn.muchinfo.rma.view.base.home.contract.ContractDetailsActivity;
 import cn.muchinfo.rma.view.base.home.contract.ContractViewModel;
 import cn.muchinfo.rma.view.base.home.registration.InvoiceRegistrationActivity;
@@ -188,9 +189,9 @@ public class ContractAdapter extends RecyclerView.Adapter<ContractAdapter.ItemVi
         //修改
         itemViewHolder.contract_modify.setOnClickListener(view -> {
             Intent intent = new Intent();
-            intent.putExtra("type","2");
+            intent.putExtra("operationtype","2");
             intent.putExtra("data",contractData);
-            intent.setClass(context, ContractDetailsActivity.class);
+            intent.setClass(context, AddContractActivity.class);
             ActivityUtils.startActivity(intent);
         });
         if (type.equals("3")){
@@ -226,9 +227,9 @@ public class ContractAdapter extends RecyclerView.Adapter<ContractAdapter.ItemVi
         //重新提交
         itemViewHolder.contract_resubmit.setOnClickListener(view -> {
             Intent intent = new Intent();
-            intent.putExtra("type","2");
+            intent.putExtra("operationtype","2");
             intent.putExtra("data",contractData);
-            intent.setClass(context, ContractDetailsActivity.class);
+            intent.setClass(context, AddContractActivity.class);
             ActivityUtils.startActivity(intent);
         });
         if (type.equals("1")){

+ 7 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/login/LoginActivity.kt

@@ -119,7 +119,13 @@ class LoginActivity : BaseActivity<LoginViewModel>(), UserPopupWindow.OnClearAcc
             }.lparams(matchParent, autoSize(507))
 
             imageView {
-                imageResource = R.mipmap.rma_login_logo
+                if (BuildConfig.APPLICATION_ID == "cn.muchinfo.rma"){//企业风管
+                    imageResource = R.mipmap.rma_login_logo
+                }else if (BuildConfig.APPLICATION_ID == "cn.muchinfo.qhj"){//千海金
+                    imageResource = R.mipmap.qhj_login_logo
+                }else if (BuildConfig.APPLICATION_ID == "cn.muchinfo.yrdz"){//云融大宗
+                    imageResource = R.mipmap.yrdz_login_logo
+                }
             }.lparams(autoSize(480), autoSize(240)) {
                 gravity = Gravity.CENTER_HORIZONTAL
                 topMargin = -autoSize(150)

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

@@ -28,15 +28,13 @@ class ShowImageByUrlActivity : BaseActivity<MyPromotionCodeViewModel>(){
             topBar {
                 commonLeftButton()
                 commonTitle {
-                    text = "申请推广码"
+                    text = "预览"
                 }
             }
 
             imageView {
                 showImage(
-                    SPUtils.getInstance().getString(Constant.openApiUrl) + url?.substring(
-                        1
-                    )
+                    SPUtils.getInstance().getString(Constant.openApiUrl) + url?.substring(1)
                 )
             }.lparams(matchParent, matchParent)
         }

+ 12 - 7
RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/detailsviewholder/InvoiceRecordViewHolder.kt

@@ -70,17 +70,22 @@ class InvoiceRecordViewHolder(private val activity: AppCompatActivity, private v
                     data.bindOptional(context) {
                         data.bindOptional(context) {
                             if (type == "1") {
-                                if (it?.kxtype == "1") {
-                                    text = "付款"
-                                } else if (it?.kxtype == "2") {
-                                    text = "退款"
-                                } else if (it?.kxtype == "3") {
-                                    text = "付款/退款"
+                                if (it?.contracttype == "1"){//1:采购 -1:销售
+                                    if (it.kxtype == "1") {
+                                        text = "付款"
+                                    } else if (it.kxtype == "2") {
+                                        text = "退款"
+                                    } else if (it.kxtype == "3") {
+                                        text = "付款/退款"
+                                    }
+                                }else if (it?.contracttype == "-1"){
+                                    text = "收款"
                                 }
+
                             } else {
                                 if (it?.contracttype == "1") {
                                     text = "收票"
-                                } else if (it?.contracttype == "2") {
+                                } else if (it?.contracttype == "-1") {
                                     text = "开票"
                                 }
                             }

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

@@ -5,6 +5,7 @@ import android.view.View
 import androidx.appcompat.app.AppCompatActivity
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.data.OrderQuoteDetailData
+import cn.muchinfo.rma.global.utils.VIewUtils
 import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.autoSize
 import cn.muchinfo.rma.view.autoWidget.onThrottleFirstClick
@@ -116,6 +117,13 @@ class BusinessBuyHallViewHolder(private val activity : AppCompatActivity, privat
                 }
 
                 textView {
+                    data.bindOptional(context){
+                        if (it?.buyorsell == "1"){
+                            visibility = View.VISIBLE
+                        }else{
+                            visibility = View.GONE
+                        }
+                    }
                     onThrottleFirstClick {
                         onThrottleFirstClick {
                             viewModel.selectData.postValue(data.value)

+ 163 - 5
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallActivity.kt

@@ -19,6 +19,8 @@ import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.data.*
 import cn.muchinfo.rma.global.database.DataBase
+import cn.muchinfo.rma.global.toPercentage
+import cn.muchinfo.rma.global.toWanPercentage
 import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
@@ -655,6 +657,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                 if (it == true) {
                     creatFinancingDialog(
                         type = type ?: "",
+                        pricetype = pricetype ?: "",
                         buyOrSelldata = viewModel.selectData.value ?: OrderQuoteDetailData(),
                         data = viewModel.orderQuoteData.value ?: OrderQuoteData()
                     )
@@ -1693,14 +1696,19 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
         }.show()
     }
 
-    //融资摘牌 type 1 一口价 2 浮动价
+    //融资摘牌 pricetype 1 一口价 2 浮动价
+    @SuppressLint("SetTextI18n")
     @RequiresApi(Build.VERSION_CODES.O)
     fun creatFinancingDialog(
         buyOrSelldata: OrderQuoteDetailData,
-        type: String,
+        pricetype: String,
+        type: String,// 1仓单贸易 2是仓单预售
         data: OrderQuoteData
     ) {
 
+        val dialog1 by lazy {
+            SelectFincningDialog(this@BusinessHallActivity, viewModel, data)
+        }
         /** 摘牌数量 **/
         lateinit var onePriceInputNumberEdittext: MangeNumberEditText2
 
@@ -1710,10 +1718,11 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
         /*** 浮动价价摘牌金额 **/
         lateinit var float_delisting_amount: TextView
 
+        //履约保证金
+        lateinit var performance_bond_amount: TextView
 
         lateinit var one_seekbar: SeekBar
 
-
         createCustomDialog(cancelable = false) { dialog ->
             selectAccountData.postValue(GlobalDataCollection.instance?.accountData)
             backgroundColor = Color.parseColor("#5f000000")
@@ -1958,7 +1967,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                 linearLayout {
                     gravity = Gravity.CENTER_VERTICAL
                     onThrottleFirstClick {
-                        SelectFincningDialog(this@BusinessHallActivity, viewModel, data).show()
+                        dialog1.show()
                     }
                     textView {
                         text = "融资方案"
@@ -1969,6 +1978,24 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                     }
 
                     textView {
+                        viewModel.slectfinancingData.bindOptional(context){
+                            if (dialog1.isVisible){
+                                dialog1.dismiss()
+                            }
+                            var cost = ""//费用
+                            if (it?.interestratemode == "1"){
+                                cost = it.interestrate?.toPercentage() ?: ""
+                            }else if (it?.interestratemode == "2"){
+                                cost = it.interestrate?.toWanPercentage() ?: ""
+                            }else if (it?.interestratemode == "3"){//固定值
+                                cost = NumberUtils.roundNum(it.interestrate,2)
+                            }
+                            text = it?.username + "-" + it?.productname + "-" + it?.financingdays + "天-" + it?.marginratio?.toPercentage() + "-" + cost + "-" + if (it?.interestsettlemode == "1") {
+                                "日结"
+                            } else {
+                                 "月结"
+                            } + "-" + it?.interestminlen
+                        }
                         text = "请选择融资方案"
                         textSizeAuto = 29
                         textColorInt = R.color.rma_black_33
@@ -1988,12 +2015,53 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                     }
 
                     textView {
+                        text = NumberUtils.roundNum(
+                            buyOrSelldata.fixedprice?.toDouble()
+                                ?.times("1".toDouble()) ?: 0.0, 2
+                        )
                         float_delisting_amount = this
                         textSizeAuto = 29
                         textColorInt = R.color.rma_black_33
                     }.lparams(wrapContent, wrapContent)
                 }.lparams(matchParent, autoSize(143))
 
+                itemView()
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "履约保证金"
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(autoSize(214), wrapContent) {
+                        marginStart = autoSize(36)
+                    }
+
+                    textView {
+                        viewModel.slectfinancingData.bindOptional(context){
+                            if (float_delisting_amount.text.toString().isNullOrEmpty()){
+                                text = "--"
+                            }else{
+                                text = NumberUtils.roundNum(float_delisting_amount.text.toString().toDouble().times(it?.marginratio?.toDouble() ?: 0.0),2)
+                            }
+                        }
+                        performance_bond_amount = this
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(matchParent, autoSize(143))
+
+                textView {
+                    viewModel.usedAccountData.bindOptional(context) {
+                        text = "可用资金  " +  NumberUtils.roundNum(it?.canUserAmount.toString(), 2)
+                    }
+                    textSizeAuto = 29
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    topMargin = autoSize(20)
+                    marginStart = autoSize(250)
+                }
+
                 verticalEmptyView()
 
                 linearLayout {
@@ -2001,7 +2069,97 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                     gravity = Gravity.CENTER_VERTICAL
                     textView {
                         onThrottleFirstClick {
-
+                            if (type == "1"){//仓单贸易
+                                if (pricetype == "1"){//一口价
+                                    viewModel.HdWRDealOrderReq(
+                                        pricetype = pricetype,
+                                        type = type,
+                                        data = data,
+                                        RelatedWRTradeOrderID = buyOrSelldata.wrtradeorderid?.toLong()
+                                            ?: 0,
+                                        WRTransferUserID = buyOrSelldata.userid?.toInt() ?: 0,
+                                        OrderQty = onePriceInputNumberEdittext.text.toString()
+                                            .toLong(),
+                                        BuyOrSell = 0,
+                                        LadingBillId = 0,
+                                        SubNum = 0,
+                                        WRFactorTypeId = data.wrfactortypeid?.toLong() ?: 0,
+                                        DeliveryMonth = data.deliverymonth ?: "",
+                                        HasWr = 1,
+                                        IsFinancing = 1,
+                                        ProductDetailID = viewModel.slectfinancingData.value?.productdetailid?.toLong() ?: 0
+                                    ) {
+                                        viewModel.queryOneOrderQuote(wrpricetype = pricetype,haswr = if (type == "1"){"1" }else{"0"},wrfactortypeid = data.wrfactortypeid ?: "")
+                                        dialog.dismiss()
+                                    }
+                                }else{//浮动价
+                                    viewModel.HdWRDealOrderReq(
+                                        pricetype = pricetype,
+                                        type = type,
+                                        data = data,
+                                        RelatedWRTradeOrderID = buyOrSelldata.wrtradeorderid?.toLong()
+                                            ?: 0,
+                                        WRTransferUserID = buyOrSelldata.userid?.toInt() ?: 0,
+                                        OrderQty = onePriceInputNumberEdittext.text.toString().toLong(),
+                                        BuyOrSell = 0,
+                                        LadingBillId = 0,
+                                        SubNum = 0,
+                                        WRFactorTypeId = data.wrfactortypeid?.toLong() ?: 0,
+                                        DeliveryMonth = data.deliverymonth ?: "",
+                                        HasWr = 1,
+                                        IsFinancing = 1,
+                                        ProductDetailID = viewModel.slectfinancingData.value?.productdetailid?.toLong() ?: 0
+                                    ) {
+                                        viewModel.queryOneOrderQuote(wrpricetype = pricetype,haswr = if (type == "1"){"1" }else{"0"},wrfactortypeid = data.wrfactortypeid ?: "")
+                                        dialog.dismiss()
+                                    }
+                                }
+                            }else{//仓单预售
+                                 if (pricetype == "1"){//一口价
+                                     viewModel.HdWRDealOrderReq(
+                                         pricetype = pricetype,
+                                         type = type,
+                                         data = data,
+                                         RelatedWRTradeOrderID = buyOrSelldata.wrtradeorderid?.toLong()
+                                             ?: 0,
+                                         WRTransferUserID = buyOrSelldata.userid?.toInt() ?: 0,
+                                         OrderQty = onePriceInputNumberEdittext.text.toString()
+                                             .toLong(),
+                                         BuyOrSell = 0,
+                                         LadingBillId = 0,
+                                         SubNum = 0,
+                                         WRFactorTypeId = data.wrfactortypeid?.toLong() ?: 0,
+                                         DeliveryMonth = data.deliverymonth ?: "",
+                                         HasWr = 0,
+                                         IsFinancing = 1,
+                                         ProductDetailID = viewModel.slectfinancingData.value?.productdetailid?.toLong() ?: 0
+                                     ) {
+                                         viewModel.queryOneOrderQuote(wrpricetype = pricetype,haswr = if (type == "1"){"1" }else{"0"},wrfactortypeid = data.wrfactortypeid ?: "")
+                                         dialog.dismiss()
+                                     }
+                                }else{//浮动价
+                                     viewModel.HdWRDealOrderReq(
+                                         pricetype = pricetype,
+                                         type = type,
+                                         data = data,
+                                         RelatedWRTradeOrderID = buyOrSelldata.wrtradeorderid?.toLong()
+                                             ?: 0,
+                                         WRTransferUserID = buyOrSelldata.userid?.toInt() ?: 0,
+                                         OrderQty = onePriceInputNumberEdittext.text.toString().toLong(),
+                                         BuyOrSell = 0,
+                                         LadingBillId = 0,
+                                         SubNum = 0,
+                                         WRFactorTypeId = data.wrfactortypeid?.toLong() ?: 0,
+                                         DeliveryMonth = data.deliverymonth ?: "",
+                                         HasWr = 0,
+                                         IsFinancing = 1,
+                                         ProductDetailID = viewModel.slectfinancingData.value?.productdetailid?.toLong() ?: 0
+                                     ) {
+                                         viewModel.queryOneOrderQuote(wrpricetype = pricetype,haswr = if (type == "1"){"1" }else{"0"},wrfactortypeid = data.wrfactortypeid ?: "")
+                                         dialog.dismiss()
+                                     }
+                                }
+                            }
                         }
                         gravity = Gravity.CENTER
                         backgroundResource = R.drawable.qhj_main_blue_bg

+ 6 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallViewModel.kt

@@ -272,6 +272,8 @@ class BusinessHallViewModel : BaseViewModel(){
         WRFactorTypeId: Long = 0,//仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
         DeliveryMonth: String = "",//交收月
         HasWr: Int = 0,//是否有仓单-0:没有仓单 1:有仓单
+        IsFinancing : Int = 0,//是否融资购买(买摘牌时有效)-0:否 1:是
+        ProductDetailID : Long = 0,//金融机构产品组合ID(融资购买时有效)
         isSuccess: (isCompleted: Boolean) -> Unit
     ){
         loadingDialogStatus.value = TaskUiModel.inFlight()
@@ -281,6 +283,8 @@ class BusinessHallViewModel : BaseViewModel(){
                 RelatedWRTradeOrderID = RelatedWRTradeOrderID,
                 WRTransferUserID = WRTransferUserID,
                 OrderQty = OrderQty,
+                IsFinancing = IsFinancing,
+                ProductDetailID = ProductDetailID,
                 DeliveryMonth = DeliveryMonth,
                 SubNum = SubNum,
                 WRFactorTypeId = WRFactorTypeId,
@@ -369,6 +373,7 @@ class BusinessHallViewModel : BaseViewModel(){
 //        MatchAccIDsString : List<String> = arrayListOf(),//仓单贸易对手用户ID集合(指定对手时填写)
 //        DeliveryMonth : String = "",//交收月
         HasWr: Int = 0,//是否有仓单-0:没有仓单 1:有仓单
+        DelistMinQty : Long = 0,//起摘数量
         WRStandardID: Int = 0,//现货品种ID
         isSuccess: (isCompleted: Boolean) -> Unit
     ){
@@ -390,6 +395,7 @@ class BusinessHallViewModel : BaseViewModel(){
                 WRTradeGoods = WRTradeGoods,
                 PriceFactor = PriceFactor,
                 PriceMove = PriceMove,
+                DelistMinQty = DelistMinQty,
                 TimevalidType = TimevalidType,
                 FirstRatio = FirstRatio,
                 PerformanceTemplateID = PerformanceTemplateID,

+ 39 - 7
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/FloatListedDialog.kt

@@ -316,6 +316,11 @@ class FloatSellListedUI(
                 }.lparams(autoSize(250), wrapContent)
 
                 numberEditText3 {
+                    viewModel.quoteDayData.bindOptional(context){
+                        val MarketTradeConfig = GlobalDataCollection.instance?.marketTradeConfigData
+                        max = it?.preclose?.times(MarketTradeConfig?.basisupratio?.toDouble() ?: 0.0) ?: 0.0
+                        min = it?.preclose?.times(-1.0)?.times(MarketTradeConfig?.basisdownratio?.toDouble() ?: 0.0) ?: 0.0
+                    }
                     basisInputEdittext = this
                     isdefineByBasis = true
                     text = "0"
@@ -450,12 +455,12 @@ class FloatSellListedUI(
                 verticalLayout {
                     linearLayout {
                         editText {
-                            isEnabled = false
+                            setText(data.minivalue)
                             startInputNumber = this
                             hint = "请输入起摘数量"
                             background = null
                             inputType = EditorInfo.TYPE_CLASS_NUMBER
-                            setDecimalInputType()
+//                            setDecimalInputType()
                             hintColorStr = "#CCCCCC"
                             textSizeAuto = 31
                             textColorStr = "#333333"
@@ -469,7 +474,7 @@ class FloatSellListedUI(
                     }.lparams(matchParent, autoSize(100))
 
                     textView {
-                        text = "最小单位1吨"
+                        text = "最小单位" + data.minivalue + data.enumdicname
                         textSizeAuto = 29
                         textColorInt = R.color.rma_hint_text_color_ccc
                     }.lparams(wrapContent, wrapContent)
@@ -565,6 +570,16 @@ class FloatSellListedUI(
                             ToastUtils.showLong("请输入基差")
                             return@onThrottleFirstClick
                         }
+
+                        if (startInputNumber.text.toString().isNotEmpty()) {
+                            ToastUtils.showLong("请输入起摘数量")
+                            return@onThrottleFirstClick
+                        }
+                        if (startInputNumber.text.toString().toLong() < data.minivalue?.toLong() ?: 0){
+                            ToastUtils.showLong("起摘数量不能小于" + data.minivalue)
+                            return@onThrottleFirstClick
+                        }
+
                         if (type == "1"){
                             viewModel.requeryWRListingOrderReq(
                                 LadingBillId = selectSpotDetailsData.value?.ladingbillid?.toLong() ?: 0,
@@ -589,6 +604,7 @@ class FloatSellListedUI(
                                 ApplyID = 0,
                                 CanPart = 1,
                                 HasWr = 1,
+                                DelistMinQty = startInputNumber.text.toString().toLong(),
                                 WRStandardID = data.wrstandardid?.toInt() ?: 0
                             ){
                                 viewModel.controlDialogDisappear.postValue(true)
@@ -617,6 +633,7 @@ class FloatSellListedUI(
                                 ApplyID = 0,
                                 CanPart = 1,
                                 HasWr = 0,
+                                DelistMinQty = startInputNumber.text.toString().toLong(),
                                 WRStandardID = data.wrstandardid?.toInt() ?: 0
                             ){
                                 viewModel.controlDialogDisappear.postValue(true)
@@ -776,7 +793,11 @@ class FloatBuyListedUI(
                     text = "0"
                     basisInputEdittext = this
                     isdefineByBasis = true
-
+                    viewModel.quoteDayData.bindOptional(context){
+                        val MarketTradeConfig = GlobalDataCollection.instance?.marketTradeConfigData
+                        max = it?.preclose?.times(MarketTradeConfig?.basisupratio?.toDouble() ?: 0.0) ?: 0.0
+                        min = it?.preclose?.times(-1.0)?.times(MarketTradeConfig?.basisdownratio?.toDouble() ?: 0.0) ?: 0.0
+                    }
                     setOnTextChangeListener { view, value ->
                         if (value.isNotEmpty()){
                             // 计算挂牌金额 = (基差价格+期货合约价)* 挂牌数量
@@ -897,12 +918,12 @@ class FloatBuyListedUI(
                 verticalLayout {
                     linearLayout {
                         editText {
-
+                            setText(data.minivalue)
                             startInputNumber = this
                             hint = "请输入起摘数量"
                             background = null
 //                            inputType = EditorInfo.TYPE_CLASS_NUMBER or EditorInfo.TYPE_NUMBER_FLAG_DECIMAL or EditorInfo.TYPE_NUMBER_FLAG_SIGNED
-                            setDecimalInputType()
+//                            setDecimalInputType()
                             hintColorStr = "#CCCCCC"
                             textSizeAuto = 31
                             textColorStr = "#333333"
@@ -916,7 +937,7 @@ class FloatBuyListedUI(
                     }.lparams(matchParent, autoSize(100))
 
                     textView {
-                        text = "最小单位1吨"
+                        text = "最小单位" + data.minivalue + data.enumdicname
                         textSizeAuto = 29
                         textColorInt = R.color.rma_hint_text_color_ccc
                     }.lparams(wrapContent, wrapContent)
@@ -1015,6 +1036,15 @@ class FloatBuyListedUI(
                             ToastUtils.showLong("挂牌数量不能为零")
                             return@onThrottleFirstClick
                         }
+
+                        if (startInputNumber.text.toString().isNotEmpty()) {
+                            ToastUtils.showLong("请输入起摘数量")
+                            return@onThrottleFirstClick
+                        }
+                        if (startInputNumber.text.toString().toLong() < data.minivalue?.toLong() ?: 0){
+                            ToastUtils.showLong("起摘数量不能小于" + data.minivalue)
+                            return@onThrottleFirstClick
+                        }
                         if (type == "1"){
                             viewModel.requeryWRListingOrderReq(
                                 TradeDate = TimeUtils.getNowTime("yyyyMMdd"),
@@ -1036,6 +1066,7 @@ class FloatBuyListedUI(
                                 ApplyID = 0,
                                 CanPart = 1,
                                 HasWr = 1,
+                                DelistMinQty = startInputNumber.text.toString().toLong(),
                                 WRStandardID = data.wrstandardid?.toInt() ?: 0
                             ){
                                 viewModel.controlDialogDisappear.postValue(true)
@@ -1061,6 +1092,7 @@ class FloatBuyListedUI(
                                 ApplyID = 0,
                                 CanPart = 1,
                                 HasWr = 0,
+                                DelistMinQty = startInputNumber.text.toString().toLong(),
                                 WRStandardID = data.wrstandardid?.toInt() ?: 0
                             ){
                                 viewModel.controlDialogDisappear.postValue(true)

+ 29 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/OneListedDialog.kt

@@ -461,11 +461,12 @@ class OneSellListedUI(
                 verticalLayout {
                     linearLayout {
                         editText {
+                            setText(data.minivalue)
                             startInputNumber = this
                             hint = "请输入起摘数量"
                             background = null
                             inputType = EditorInfo.TYPE_CLASS_NUMBER
-                            setDecimalInputType()
+//                            setDecimalInputType()
                             hintColorStr = "#CCCCCC"
                             textSizeAuto = 31
                             textColorStr = "#333333"
@@ -482,7 +483,7 @@ class OneSellListedUI(
                     }.lparams(matchParent, autoSize(100))
 
                     textView {
-                        text = "最小单位1吨"
+                        text = "最小单位" + data.minivalue + data.enumdicname
                         textSizeAuto = 29
                         textColorInt = R.color.rma_hint_text_color_ccc
                     }.lparams(wrapContent, wrapContent)
@@ -550,6 +551,15 @@ class OneSellListedUI(
                             ToastUtils.showLong("挂牌数量不能为零")
                             return@onThrottleFirstClick
                         }
+
+                        if (startInputNumber.text.toString().isNotEmpty()) {
+                            ToastUtils.showLong("请输入起摘数量")
+                            return@onThrottleFirstClick
+                        }
+                        if (startInputNumber.text.toString().toLong() < data.minivalue?.toLong() ?: 0){
+                            ToastUtils.showLong("起摘数量不能小于" + data.minivalue)
+                            return@onThrottleFirstClick
+                        }
                         val selectDetailsData = selectSpotDetailsData.value
                         if (type == "1") {
                             viewModel.requeryWRListingOrderReq(
@@ -574,6 +584,7 @@ class OneSellListedUI(
                                 ApplyID = 0,
                                 CanPart = 1,
                                 HasWr = 1,
+                                DelistMinQty = startInputNumber.text.toString().toLong(),
                                 WRStandardID = data.wrstandardid?.toInt() ?: 0
                             ) {
                                 viewModel.controlDialogDisappear.postValue(true)
@@ -601,6 +612,7 @@ class OneSellListedUI(
                                 ApplyID = 0,
                                 CanPart = 1,
                                 HasWr = 0,
+                                DelistMinQty = startInputNumber.text.toString().toLong(),
                                 WRStandardID = data.wrstandardid?.toInt() ?: 0
                             ) {
                                 viewModel.controlDialogDisappear.postValue(true)
@@ -895,11 +907,12 @@ class OneBuyListedUI(
                 verticalLayout {
                     linearLayout {
                         editText {
+                            setText(data.minivalue)
                             startInputNumber = this
                             hint = "请输入起摘数量"
                             background = null
                             inputType = EditorInfo.TYPE_CLASS_NUMBER
-                            setDecimalInputType()
+//                            setDecimalInputType()
                             hintColorStr = "#CCCCCC"
                             textSizeAuto = 31
                             textColorStr = "#333333"
@@ -917,7 +930,7 @@ class OneBuyListedUI(
                     }.lparams(matchParent, autoSize(100))
 
                     textView {
-                        text = "最小单位1吨"
+                        text = "最小单位" + data.minivalue + data.enumdicname
                         textSizeAuto = 29
                         textColorInt = R.color.rma_hint_text_color_ccc
                     }.lparams(wrapContent, wrapContent)
@@ -982,6 +995,16 @@ class OneBuyListedUI(
                             ToastUtils.showLong("挂牌数量不能为零")
                             return@onThrottleFirstClick
                         }
+
+                        if (startInputNumber.text.toString().isNotEmpty()) {
+                            ToastUtils.showLong("请输入起摘数量")
+                            return@onThrottleFirstClick
+                        }
+                        if (startInputNumber.text.toString().toLong() < data.minivalue?.toLong() ?: 0){
+                            ToastUtils.showLong("起摘数量不能小于" + data.minivalue)
+                            return@onThrottleFirstClick
+                        }
+
                         if (type == "1") {
                             viewModel.requeryWRListingOrderReq(
                                 TradeDate = TimeUtils.getNowTime("yyyyMMdd"),
@@ -1003,6 +1026,7 @@ class OneBuyListedUI(
                                 ApplyID = 0,
                                 CanPart = 1,
                                 HasWr = 1,
+                                DelistMinQty = startInputNumber.text.toString().toLong(),
                                 WRStandardID = data.wrstandardid?.toInt() ?: 0
                             ) {
                                 viewModel.controlDialogDisappear.postValue(true)
@@ -1028,6 +1052,7 @@ class OneBuyListedUI(
                                 ApplyID = 0,
                                 CanPart = 1,
                                 HasWr = 0,
+                                DelistMinQty = startInputNumber.text.toString().toLong(),
                                 WRStandardID = data.wrstandardid?.toInt() ?: 0
                             ) {
                                 viewModel.controlDialogDisappear.postValue(true)

+ 92 - 72
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/SelectFincningDialog.kt

@@ -8,8 +8,10 @@ import cn.muchinfo.rma.global.data.FaProductDetailData
 import cn.muchinfo.rma.global.data.OrderQuoteData
 import cn.muchinfo.rma.global.data.OrderQuoteDetailData
 import cn.muchinfo.rma.global.toPercentage
+import cn.muchinfo.rma.global.toWanPercentage
 import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
 import cn.muchinfo.rma.view.base.future.trade.itemView
 import cn.muchinfo.rma.view.base.home.contract.emptyView
 import mtp.polymer.com.autowidget.adapter.BaseAdapter
@@ -21,7 +23,7 @@ import org.jetbrains.anko.*
 fun AppCompatActivity.SelectFincningDialog(
     activity: AppCompatActivity,
     viewModel: BusinessHallViewModel,
-    data : OrderQuoteData
+    data: OrderQuoteData
 ): CustomDialogFragment {
 
     // 下拉刷新
@@ -39,11 +41,11 @@ fun AppCompatActivity.SelectFincningDialog(
     return createCustomDialog(cancelable = false) { dialog ->
         backgroundColor = Color.parseColor("#5f000000")
         verticalLayout {
-            viewModel.slectfinancingData.bindOptional(context){
-                if (it?.accountid.isNullOrEmpty().not()){
-                    dialog.dismiss()
-                }
-            }
+//            viewModel.slectfinancingData.bindOptional(context) {
+//                if (it?.accountid.isNullOrEmpty().not()) {
+//                    dialog.dismiss()
+//                }
+//            }
             linearLayout {
                 background = resources.getDrawable(R.color.white)
                 gravity = Gravity.CENTER_VERTICAL
@@ -52,7 +54,7 @@ fun AppCompatActivity.SelectFincningDialog(
                         dialog.dismiss()
                     }
                     imageResource = R.mipmap.rydz_close_icon
-                }.lparams(autoSize(46), autoSize(46)){
+                }.lparams(autoSize(30), autoSize(30)) {
                     marginStart = autoSize(36)
                 }
 
@@ -68,11 +70,48 @@ fun AppCompatActivity.SelectFincningDialog(
 
                 view {
 
-                }.lparams(autoSize(46), autoSize(46)){
+                }.lparams(autoSize(46), autoSize(46)) {
                     marginEnd = autoSize(36)
                 }
             }.lparams(matchParent, autoSize(100))
 
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+
+                linearLayout {
+                    textView {
+                        text = "融出方/名称"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(0, wrapContent, 2f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER_HORIZONTAL
+                    textView {
+                        text = "天数/保证金/利息(天)"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, wrapContent, 3f)
+
+                linearLayout {
+                    emptyView()
+                    textView {
+                        text = "结息/起息天数"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent) {
+                        marginEnd = autoSize(36)
+                    }
+                }.lparams(0, wrapContent, 2f)
+
+
+            }.lparams(matchParent, autoSize(90))
+
             statusLayout(contentBlock = {
                 background = resources.getDrawable(R.color.white)
                 statusLayout = this
@@ -99,20 +138,23 @@ fun AppCompatActivity.SelectFincningDialog(
             }, emptyBlock = {
                 emptyView(hint = resources.getString(R.string.now_no_data))
             }).lparams(matchParent, matchParent)
-            if (viewModel.financingSelectDataList.value?.size ?: 0 > 0){
+            if (viewModel.financingSelectDataList.value?.size ?: 0 > 0) {
                 statusLayout.showSuccess()
                 selectFincningAdapter.setNewData(viewModel.financingSelectDataList.value)
-            }else{
+            } else {
                 statusLayout.showEmpty()
             }
 
-        }.lparams(matchParent, matchParent){
+        }.lparams(matchParent, matchParent) {
             topMargin = autoSize(120)
         }
     }
 }
 
-class SelectFincningViewHolder(private val activity: AppCompatActivity,private val viewModel: BusinessHallViewModel) : BaseViewHolder<FaProductDetailData>(activity){
+class SelectFincningViewHolder(
+    private val activity: AppCompatActivity,
+    private val viewModel: BusinessHallViewModel
+) : BaseViewHolder<FaProductDetailData>(activity) {
 
     override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
 
@@ -124,26 +166,26 @@ class SelectFincningViewHolder(private val activity: AppCompatActivity,private v
             linearLayout {
                 gravity = Gravity.CENTER_VERTICAL
                 textView {
-                    data.bindOptional(context){
+                    data.bindOptional(context) {
                         text = it?.username
                     }
                     textSizeAuto = 34
                     textColorInt = R.color.rma_black_33
-                }.lparams(wrapContent, wrapContent){
+                }.lparams(wrapContent, wrapContent) {
                     marginStart = autoSize(36)
                 }
 
                 emptyView()
 
                 textView {
-                    data.bindOptional(context){
-                        if (it?.isautoloan == "1"){
+                    data.bindOptional(context) {
+                        if (it?.isautoloan == "1") {
                             text = "放款快"
                         }
                     }
                     textSizeAuto = 32
                     textColorInt = R.color.rma_green_color
-                }.lparams(wrapContent, wrapContent){
+                }.lparams(wrapContent, wrapContent) {
                     marginEnd = autoSize(36)
                 }
             }.lparams(matchParent, autoSize(100))
@@ -152,118 +194,96 @@ class SelectFincningViewHolder(private val activity: AppCompatActivity,private v
                 verticalLayout {
                     gravity = Gravity.LEFT
                     textView {
-                        data.bindOptional(context){
+                        data.bindOptional(context) {
                             text = it?.productname
                         }
                         textSizeAuto = 32
                         textColorInt = R.color.buy_hall_color
-                    }.lparams(wrapContent, wrapContent){
+                    }.lparams(wrapContent, wrapContent) {
                         topMargin = autoSize(20)
                         marginStart = autoSize(36)
                     }
+                }.lparams(0, autoSize(140), 2f)
 
-                    textView {
-                        text = "名称"
-                        textSizeAuto = 32
-                        textColorInt = R.color.rma_hint_text_color_ccc
-                    }.lparams(wrapContent, wrapContent){
-                        marginStart = autoSize(36)
-                    }
-                }.lparams(0, autoSize(140),2f)
-
+                //天数
                 verticalLayout {
                     gravity = Gravity.CENTER_HORIZONTAL
                     textView {
-                        data.bindOptional(context){
+                        data.bindOptional(context) {
                             text = it?.financingdays
                         }
                         textSizeAuto = 32
                         textColorInt = R.color.rma_black_33
-                    }.lparams(wrapContent, wrapContent){
+                    }.lparams(wrapContent, wrapContent) {
                         topMargin = autoSize(20)
-                        marginStart = autoSize(36)
-                    }
 
-                    textView {
-                        text = "天数"
-                        textSizeAuto = 32
-                        textColorInt = R.color.rma_hint_text_color_ccc
-                    }.lparams(wrapContent, wrapContent){
-                        marginStart = autoSize(36)
                     }
-                }.lparams(0, autoSize(140),1f)
 
+                }.lparams(0, autoSize(140), 1f)
+
+                //保证金比例
                 verticalLayout {
                     gravity = Gravity.CENTER_HORIZONTAL
                     textView {
-                        data.bindOptional(context){
+                        data.bindOptional(context) {
                             text = it?.marginratio?.toPercentage()
                         }
                         textSizeAuto = 32
                         textColorInt = R.color.rma_black_33
-                    }.lparams(wrapContent, wrapContent){
+                    }.lparams(wrapContent, wrapContent) {
                         topMargin = autoSize(20)
-                        marginStart = autoSize(36)
                     }
 
-                    textView {
-                        text = "保证金"
-                        textSizeAuto = 32
-                        textColorInt = R.color.rma_hint_text_color_ccc
-                    }.lparams(wrapContent, wrapContent){
-                        marginStart = autoSize(36)
-                    }
-                }.lparams(0, autoSize(140),1f)
+                }.lparams(0, autoSize(140), 1f)
 
+                //费用
                 verticalLayout {
                     gravity = Gravity.CENTER_HORIZONTAL
                     textView {
-                       data.bindOptional(context){
-                            text = it?.interestratemode?.toPercentage()
+                        data.bindOptional(context) {
+                            if (it?.interestratemode == "1"){
+                                text = it.interestrate?.toPercentage()
+                            }else if (it?.interestratemode == "2"){
+                                text = it.interestrate?.toWanPercentage()
+                            }else if (it?.interestratemode == "3"){//固定值
+                                text = NumberUtils.roundNum(it.interestrate,2)
+                            }
                         }
                         textSizeAuto = 32
                         textColorInt = R.color.rma_black_33
-                    }.lparams(wrapContent, wrapContent){
+                    }.lparams(wrapContent, wrapContent) {
                         topMargin = autoSize(20)
-                        marginStart = autoSize(36)
                     }
 
-                    textView {
-                        text = "利息"
-                        textSizeAuto = 32
-                        textColorInt = R.color.rma_hint_text_color_ccc
-                    }.lparams(wrapContent, wrapContent){
-                        marginStart = autoSize(36)
-                    }
-                }.lparams(0, autoSize(140),1f)
+                }.lparams(0, autoSize(140), 1f)
 
                 verticalLayout {
                     gravity = Gravity.RIGHT
                     textView {
-                        data.bindOptional(context){
-                            if (it?.interestsettlemode == "1"){
+                        data.bindOptional(context) {
+                            if (it?.interestsettlemode == "1") {
                                 text = "日结"
-                            }else{
+                            } else {
                                 text = "月结"
                             }
                         }
                         textSizeAuto = 32
                         textColorInt = R.color.rma_black_33
-                    }.lparams(wrapContent, wrapContent){
+                    }.lparams(wrapContent, wrapContent) {
                         topMargin = autoSize(20)
-                        marginStart = autoSize(36)
+                        marginEnd = autoSize(36)
                     }
 
                     textView {
-                        data.bindOptional(context){
-                            text = it?.interestminlen + "天起息"
+                        data.bindOptional(context) {
+                            text = it?.interestminlen + "天"
                         }
                         textSizeAuto = 32
                         textColorInt = R.color.rma_black_33
-                    }.lparams(wrapContent, wrapContent){
-                        marginStart = autoSize(36)
+                    }.lparams(wrapContent, wrapContent) {
+                        marginEnd = autoSize(36)
                     }
-                }.lparams(0, autoSize(140),2f)
+                }.lparams(0, autoSize(140), 2f)
             }.lparams(matchParent, autoSize(140))
 
             itemView()

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

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

BIN
RMA/app/src/main/res/mipmap-hdpi/ic_launcher_qhj.png


BIN
RMA/app/src/main/res/mipmap-hdpi/ic_launcher_rma.png


+ 0 - 0
RMA/app/src/main/res/mipmap-hdpi/ic_launcher.png → RMA/app/src/main/res/mipmap-hdpi/ic_launcher_yrdz.png


BIN
RMA/app/src/main/res/mipmap-mdpi/ic_launcher_qhj.png


BIN
RMA/app/src/main/res/mipmap-mdpi/ic_launcher_rma.png


+ 0 - 0
RMA/app/src/main/res/mipmap-mdpi/ic_launcher.png → RMA/app/src/main/res/mipmap-mdpi/ic_launcher_yrdz.png


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


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


+ 0 - 0
RMA/app/src/main/res/mipmap-xhdpi/ic_launcher.png → RMA/app/src/main/res/mipmap-xhdpi/ic_launcher_yrdz.png


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


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


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


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


+ 0 - 0
RMA/app/src/main/res/mipmap-xhdpi/img_start.png → RMA/app/src/main/res/mipmap-xhdpi/yrdz_img_start.png


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


BIN
RMA/app/src/main/res/mipmap-xxhdpi/ic_launcher_qhj.png


BIN
RMA/app/src/main/res/mipmap-xxhdpi/ic_launcher_rma.png


+ 0 - 0
RMA/app/src/main/res/mipmap-xxhdpi/ic_launcher.png → RMA/app/src/main/res/mipmap-xxhdpi/ic_launcher_yrdz.png


BIN
RMA/app/src/main/res/mipmap-xxxhdpi/ic_launcher_qhj.png


BIN
RMA/app/src/main/res/mipmap-xxxhdpi/ic_launcher_rma.png


+ 0 - 0
RMA/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png → RMA/app/src/main/res/mipmap-xxxhdpi/ic_launcher_yrdz.png