|
|
@@ -3,6 +3,7 @@ package cn.muchinfo.rma.business.spot
|
|
|
import cn.muchinfo.rma.business.account.adapter.AccountAdapter
|
|
|
import cn.muchinfo.rma.global.data.AccMgrLoginUserData
|
|
|
import cn.muchinfo.rma.global.data.PaAreaSubjectData
|
|
|
+import cn.muchinfo.rma.global.data.SCMiddleGoodsData
|
|
|
import cn.muchinfo.rma.global.data.SpotGoodsPriceData
|
|
|
import cn.muchinfo.rma.netManage.base.ResponseCallback
|
|
|
import cn.muchinfo.rma.netManage.utils.MyOkHttpUtils
|
|
|
@@ -23,6 +24,33 @@ import java.lang.Exception
|
|
|
class SpotManager {
|
|
|
|
|
|
/**
|
|
|
+ * 查询现货订单
|
|
|
+ * 页面 app 现货->期现关联->期现单据关联->点"关联"按钮->弹出界面 : 现货订单
|
|
|
+ * @param params Map<String, String>
|
|
|
+ * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<SpotGoodsPriceData>?, [@kotlin.ParameterName] Error?, Unit>
|
|
|
+ */
|
|
|
+ fun querySCMiddleGoods(
|
|
|
+ params: Map<String, String>,
|
|
|
+ responseBack: (isSuccess: Boolean, respData: List<SCMiddleGoodsData>?, error: Error?) -> Unit
|
|
|
+ ){
|
|
|
+ MyOkHttpUtils().query(
|
|
|
+ URL = SPUtils.getInstance()
|
|
|
+ .getString(Constant.goCommonSearchUrl) + "/Ermcp3/QuerySCMiddleGoods",
|
|
|
+ params = params,
|
|
|
+ type = "1",
|
|
|
+ callback = object : ResponseCallback<BaseResult<List<SCMiddleGoodsData>>>() {
|
|
|
+ override fun onResponse(response: BaseResult<List<SCMiddleGoodsData>>?, id: Int) {
|
|
|
+ responseBack(true, response?.data, null)
|
|
|
+ }
|
|
|
+
|
|
|
+ override fun onError(call: Call?, e: Exception?, id: Int) {
|
|
|
+ responseBack(false, null, Error(e?.message))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 交易主体请求
|
|
|
*/
|
|
|
fun ermcpPaAreaSubjectReq(
|