瀏覽代碼

现货报表更新 ERMCP3

zhangpeng 4 年之前
父節點
當前提交
6051816a62
共有 2 個文件被更改,包括 308 次插入88 次删除
  1. 18 4
      src/services/go/ermcp/spot-report/index.ts
  2. 290 84
      src/services/go/ermcp/spot-report/interface.ts

+ 18 - 4
src/services/go/ermcp/spot-report/index.ts

@@ -6,6 +6,20 @@ import { QuerySpotDayReportReq } from './interface';
 import { QuerySpotDayReportDetailReq } from './interface';
 import { QuerySpotMonthReportReq } from './interface';
 import { QuerySpotMonthReportDetailReq } from './interface';
+import { QuerySpotPLReportReq } from './interface';
+/**
+ * 查询现货损益报表
+ * @param queryInfo 查询条件
+ * @returns 现货损益报表
+ */
+export async function QuerySpotPLReport(queryInfo: QuerySpotPLReportReq): Promise<type.QuerySpotPLReportRsp[]> {
+    try {
+        return commonSearch_go('/Ermcp3/QryReportAreaSpotPL', queryInfo);
+    } catch (err) {
+        throw new Error(`查询现货损益报表: ${err.message}`);
+    }
+}
+
 /**
  * 查询现货报表
  * @param queryInfo 查询信息
@@ -13,7 +27,7 @@ import { QuerySpotMonthReportDetailReq } from './interface';
  */
 export async function QuerySpotDayReport(queryInfo: QuerySpotDayReportReq): Promise<type.QuerySpotDayReportRsp[]> {
     try {
-        return commonSearch_go('/Ermcp/QryReportDaySpot', queryInfo);
+        return commonSearch_go('/Ermcp3/QryReportDaySpot', queryInfo);
     } catch (err) {
         throw new Error(err.message);
     }
@@ -26,7 +40,7 @@ export async function QuerySpotDayReport(queryInfo: QuerySpotDayReportReq): Prom
  */
 export async function QuerySpotDayReportDetail(queryInfo: QuerySpotDayReportDetailReq): Promise<type.QuerySpotDayReportDetailRsp[]> {
     try {
-        return commonSearch_go('/Ermcp/QryReportDaySpotDetail', queryInfo);
+        return commonSearch_go('/Ermcp3/QryReportDaySpotDetail', queryInfo);
     } catch (err) {
         throw new Error(err.message);
     }
@@ -39,7 +53,7 @@ export async function QuerySpotDayReportDetail(queryInfo: QuerySpotDayReportDeta
  */
 export async function QuerySpotMonthReport(queryInfo: QuerySpotMonthReportReq): Promise<type.QuerySpotMonthReportRsp[]> {
     try {
-        return commonSearch_go('/Ermcp/QryReportMonthSpot', { queryInfo });
+        return commonSearch_go('/Ermcp3/QryReportMonthSpot', { queryInfo });
     } catch (err) {
         throw new Error(err.message);
     }
@@ -52,7 +66,7 @@ export async function QuerySpotMonthReport(queryInfo: QuerySpotMonthReportReq):
  */
 export async function QuerySpotMonthReportDetail(queryInfo: QuerySpotMonthReportDetailReq): Promise<type.QuerySpotMonthReportDetailRsp[]> {
     try {
-        return commonSearch_go('/Ermcp/QryReportMonthSpotDetail', { queryInfo });
+        return commonSearch_go('/Ermcp3/QryReportMonthSpotDetail', { queryInfo });
     } catch (err) {
         throw new Error(err.message);
     }

+ 290 - 84
src/services/go/ermcp/spot-report/interface.ts

@@ -2,115 +2,321 @@
 /**
  * 查询现货报表请求
  */
- export interface QuerySpotDayReportReq{
-    userid:number;    
-    tradedate:string;    
+export interface QuerySpotDayReportReq {
+    /**用户ID */
+    userid: number;
+    /**交易日(格式:yyyyMMdd) */
+    tradedate: string;
 }
 
 /**
- * 查询现货报表回应
+ * 查询现货日报表(菜单:报表查询/现货报表/现货日报表)
  */
-export interface QuerySpotDayReportRsp{
-areauserid:number;
-buyinqty:number;
-enumdicname:string;
-reckondate:string;
-selloutqty:number;
-todaybuyreckonqty:number;
-todaysellreckonqty:number;
-totalbuypricedqty:number;
-totalsellpricedqty:number;
-wrstandardcode:string;
-wrstandardid:number;
-wrstandardname:string;
+export interface QuerySpotDayReportRsp {
+    /**所属机构 */
+    areauserid: number;
+    /**采购入库量 */
+    buyinqty: number;
+    /**现货品种代码 */
+    deliverygoodscode: string;
+    /**现货品种id */
+    deliverygoodsid: number;
+    /**现货品种名称 */
+    deliverygoodsname: string;
+    /**现货商品单位名称 */
+    enumdicname: string;
+    /**日照时期(yyyyMMdd) */
+    reckondate: string;
+    /**销售出库量 */
+    selloutqty: number;
+    /**采购确定量 */
+    todaybuyreckonqty: number;
+    /**销售确定量 */
+    todaysellreckonqty: number;
+    /**采购定价量 = 期末 - 期初 */
+    totalbuypricedqty: number;
+    /**销售定价量 = 期末 - 期初 */
+    totalsellpricedqty: number;
 }
 
 /**
- * 查询现货报表明细请求
+ * 查询现货日报表详情(菜单:报表查询/现货报表/现货日报表详情)
  */
- export interface QuerySpotDayReportDetailReq{
-    userid:number;    
-    wrstandardid:number;
-    tradedate:string;    
+export interface QuerySpotDayReportDetailReq {
+    /**用户ID */
+    userid: number;
+    /**现货商品id */
+    deliverygoodsid: number;
+    /**交易日(格式:yyyyMMdd) */
+    tradedate: string;
 }
 
 /**
  * 查询现货报表明细回应
  */
-export interface QuerySpotDayReportDetailRsp{
-        applyid:number;
-        applyname:string;
-        biztype:number;
-        brandname:string;
-        contracttype:number;
-        enumdicname:string;
-        logdatetime:string;
-        logid:number;
-        logtypename:string;
-        logvalue:string;
-        modelname:string;
-        operatelogtype:number;
-        optypename:string;
-        relatedid:number;
-        relatedno:string;
-        tradedate:string;
-        userid:number;
-        wrstandardcode:string;
-        wrstandardid:number;
-        wrstandardname:string;
+export interface QuerySpotDayReportDetailRsp {
+    /**操作人 */
+    applyid: number;
+    /**操作人名称 */
+    applyname: string;
+    /**业务类型 - 1:套保计划 2:现货合同 */
+    biztype: number;
+    /**品牌名称 */
+    brandname: string;
+    /**现货合同类型 - 1:采购 -1:销售 */
+    contracttype: number;
+    /**现货品种代码 */
+    deliverygoodscode: string;
+    /**现货品种id */
+    deliverygoodsid: number;
+    /**现货品种名称 */
+    deliverygoodsname: string;
+    /**单位名称 */
+    enumdicname: string;
+    /**流水日期(时间) */
+    logdatetime: string;
+    /**流水ID(604+Unix秒时间戳(10位)+xxxxxx) */
+    logid: number;
+    /**合同类型(名称) */
+    logtypename: string;
+    /**数值 */
+    logvalue: string;
+
+    /**操作流水类型 */
+    operatelogtype: number;
+    /**流水类型名称 */
+    optypename: string;
+    /**现货合同ID\套保计划 */
+    relatedid: number;
+    /**合同编号 */
+    relatedno: string;
+    /**交易日(yyyyMMdd) */
+    tradedate: string;
+    /**机构ID */
+    userid: number;
 }
 
 /**
- * 查询现货月报表请求
+ * 查询现货月报表(菜单:报表查询/现货报表/现货月报表)
  */
-export interface QuerySpotMonthReportReq{
-    userid:number;    
-    cycletime:string;    
+export interface QuerySpotMonthReportReq {
+    /**用户ID */
+    userid: number;
+    /**周期时间:月(格式:yyyyMM) */
+    cycletime: string;
 }
 
 /**
  * 查询现货月报表回应
  */
- export interface QuerySpotMonthReportRsp{
-    areauserid:number;
-    buyinqty:number;
-    cycletime:string;
-    cycletype:number;
-    enumdicname:string;    
-    selloutqty:number;
-    todaybuyreckonqty:number;
-    todaysellreckonqty:number;
-    totalbuypricedqty:number;
-    totalsellpricedqty:number;
-    wrstandardcode:string;
-    wrstandardid:number;
-    wrstandardname:string;
-    }
-
-
-    /**
- * 查询现货月报表明细请求
- */
- export interface QuerySpotMonthReportDetailReq{
-    userid:number;    
-    wrstandardid:number;
-    cycletime:string;    
+export interface QuerySpotMonthReportRsp {
+    /**所属机构id */
+    areauserid: number;
+    /**采购入库量 */
+    buyinqty: number;
+    /**周期时间 月(YYYYMM) 季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】 */
+    cycletime: string;
+    /**周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】 */
+    cycletype: number;
+    /**现货品种代码 */
+    deliverygoodscode: string;
+    /**现货品种id */
+    deliverygoodsid: number;
+    /**现货品种名称 */
+    deliverygoodsname: string;
+    /**现货商品单位名称 */
+    enumdicname: string;
+    /**销售出库量 */
+    selloutqty: number;
+    /**采购确定量 */
+    todaybuyreckonqty: number;
+    /**销售确定量 */
+    todaysellreckonqty: number;
+    /**采购定价量 = 期末 - 期初 */
+    totalbuypricedqty: number;
+    /**销售定价量 = 期末 - 期初 */
+    totalsellpricedqty: number;
+}
+
+
+/**
+* 查询现货月报表详情(菜单:报表查询/现货月报表/现货月报表详情)
+*/
+export interface QuerySpotMonthReportDetailReq {
+    /**用户ID */
+    userid: number;
+    /**现货商品id */
+    deliverygoodsid: number;
+    /**周期时间:月(格式:yyyyMM) */
+    cycletime: string;
 }
 
 /**
  * 查询现货月报表明细回应
  */
-export interface QuerySpotMonthReportDetailRsp{
-    areauserid:number;
-    buyinqty:number;   
-    enumdicname:string;    
-    reckondate:string;
-    selloutqty:number;
-    todaybuyreckonqty:number;
-    todaysellreckonqty:number;
-    totalbuypricedqty:number;
-    totalsellpricedqty:number;
-    wrstandardcode:string;
-    wrstandardid:number;
-    wrstandardname:string;
+export interface QuerySpotMonthReportDetailRsp {
+    /**所属机构 */
+    areauserid: number;
+    /**采购入库量 */
+    buyinqty: number;
+    /**现货品种代码 */
+    deliverygoodscode: string;
+    /**现货品种id */
+    deliverygoodsid: number;
+    /**现货品种名称 */
+    deliverygoodsname: string;
+    /**现货商品单位名称 */
+    enumdicname: string;
+    /**日照时期(yyyyMMdd) */
+    reckondate: string;
+    /**销售出库量 */
+    selloutqty: number;
+    /**采购确定量 */
+    todaybuyreckonqty: number;
+    /**销售确定量 */
+    todaysellreckonqty: number;
+    /**采购定价量 = 期末 - 期初 */
+    totalbuypricedqty: number;
+    /**销售定价量 = 期末 - 期初 */
+    totalsellpricedqty: number;
+
+}
+
+/**
+ * 查询现货损益报表(现货损益报表)
+ */
+export interface QuerySpotPLReportReq {
+    /**用户ID */
+    userid: number;
+    /**查询类型 1-日报表 2-月报表 */
+    querytype: number;
+    /**查询日期(格式 日报表YYYYMMDD, 月报表YYYYMM) */
+    querydate: string;
+    /**现货商品ID */
+    deliverygoodsid: number;
+    /**品牌ID */
+    spotgoodsbrandid: number;
+    /**品类ID */
+    wrstandardid: number;
+}
+
+/**
+ * 现货损益报表回应
+ */
+export interface QuerySpotPLReportRsp {
+    /**实际损益 */
+    actualpl: number;
+    /**所属机构 */
+    areauserid: number;
+
+    /**品牌名称 */
+    brandname: string;
+
+    /**期末额 */
+    curamount: number;
+
+    /**期末均价 */
+    curaverageprice: number;
+
+    /**期末采购总额(采购额) */
+    curbuyamount: number;
+
+    /**期末采购总量 */
+    curbuyqty: number;
+
+    /**参考市值 */
+    curmarketvalue: number;
+
+    /**期末量 */
+    curqty: number;
+
+    /**期末销售总额(销售额) */
+    cursellamount: number;
+
+    /**期末销售总量 */
+    cursellqty: number;
+
+    /**参考市价 */
+    curspotprice: number;
+
+    /**现货品种代码 */
+    deliverygoodscode: string;
+
+    /**现货品种id */
+    deliverygoodsid: number;
+
+    /**现货品种名称 */
+    deliverygoodsname: string;
+
+    /**现货商品单位名称 */
+    enumdicname: string;
+
+    /**浮动损益 */
+    floatpl: number;
+
+    /**品类单位名称 */
+    gbenumdicname: string;
+
+    /**现货单位id */
+    gbunitid: number;
+
+    /**品类名称 */
+    modelname: string;
+
+    /**期初额 */
+    oriamount: number;
+
+    /**期初均价 */
+    oriaverageprice: number;
+
+    /**期初采购总额 */
+    oribuyamount: number;
+
+    /**期初采购总量 */
+    oribuyqty: number;
+
+    /**期初量 */
+    oriqty: number;
+
+    /**期初销售总额 */
+    orisellamount: number;
+
+    /**期初销售总量 */
+    orisellqty: number;
+
+    /**现货品牌ID */
+    spotgoodsbrandid: number;
+
+    /**今日采购额 */
+    todaybuyamount: number;
+
+    /**今日采购均价(采购均价) */
+    todaybuyaverageprice: number;
+
+    /**今日采购量(采购增量) */
+    todaybuyqty: number;
+
+    /**今日销售额 */
+    todaysellamount: number;
+
+    /**今日销售均价(销售均价) */
+    todaysellaverageprice: number;
+
+    /**今日销售量(销售增量) */
+    todaysellqty: number;
+
+    /**品类单位id */
+    unitid: number;
+
+    /**更新时间 */
+    updatetime: string;
+
+    /**品类代码 */
+    wrstandardcode: string;
+
+    /**品类ID */
+    wrstandardid: number;
+
+    /**品类名称 */
+    wrstandardname: string;
 }