ソースを参照

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

marymelisa 4 年 前
コミット
79cf1dd531

+ 2 - 2
src/services/go/ermcp/exposure-report/index.ts

@@ -6,7 +6,7 @@ import { commonSearch_go } from '@/services/go/index';
 import { QueryExposureDayReportReq } from './interface';
 
 /**
- * 查询敞口日报表
+ * 查询敞口日报表(菜单:报表查询/敞口报表/敞口日报表)
  * @param queryInfo 查询信息
  * @returns 敞口日报表
  */
@@ -14,6 +14,6 @@ export async function QueryExposureDayReport(queryInfo: QueryExposureDayReportRe
     try {
         return commonSearch_go('/Ermcp/QryReportDayExposure', queryInfo);
     } catch (err) {
-        throw new Error(err.message);
+        throw new Error(`查询财务日报表发票: ${err.message}`);
     }
 }

+ 66 - 34
src/services/go/ermcp/exposure-report/interface.ts

@@ -1,42 +1,74 @@
 /**
  * 查询敞口日报表请求
  */
-export interface QueryExposureDayReportReq{
-    userid:number;  
-    tradedate:string;   
+export interface QueryExposureDayReportReq {
+    /**用户ID */
+    userid: number;
+    /**交易日(格式:yyyyMMdd) */
+    tradedate: string;
 }
 /**
  * 查询敞口日报表回应
  */
-export interface QueryExposureDayReportRsp{
-    areauserid:number;
-    buyfutureqty:number;
-    buyplanqty:number;
-    buypricedqty:number;
-    diffFutuqty:number;
-    diffSpotqty:number;
-    enumdicname:string;
-    middlegoodscode:string;
-    middlegoodshedgeratio:number;
-    middlegoodsid:number;
-    middlegoodsname:string;
-    needhedgeexposoure:number;
-    needhedgeratio:number;
-    oritotalFutuqty:number;
-    oritotalspotqty:number;
-    oribuyfutureqty:number;
-    oribuyplanqty:number;
-    oribuypricedqty:number;
-    orisellfutureqty:number;
-    orisellplanqty:number;
-    orisellpricedqty:number;
-    reckondate:string;
-    sellfutureqty:number;
-    sellplanqty:number;
-    sellpricedqty:number;
-    totalexposure:number;
-    totalfutureqty:number;
-    totalhedgeratio:number;
-    totalneedhedgeqty:number;
-    totalspotqty:number;   
+export interface QueryExposureDayReportRsp {
+    /**所属机构 */
+    areauserid: number;
+    /**买入期货数量 */
+    buyfutureqty: number;
+    /**采购计划数量 */
+    buyplanqty: number;
+    /**采购合同已定价数量 */
+    buypricedqty: number;
+    /**今日变动量(期货) = (买入 - 买入期初) - (卖出 - 卖出期初) */
+    diffFutuqty: number;
+    /**今日变动量(现货) = 现货数量 - 期初现货数量 */
+    diffSpotqty: number;
+    /**单位名称 */
+    enumdicname: string;
+    /**套保品种代码 */
+    middlegoodscode: string;
+    /**应套保比例 */
+    middlegoodshedgeratio: number;
+    /**套保品种ID */
+    middlegoodsid: number;
+    /**套保品种名称 */
+    middlegoodsname: string;
+    /**应套保敞口 */
+    needhedgeexposoure: number;
+    /**应套保敞口比例 */
+    needhedgeratio: number;
+    /**期初期货数量=期初买入期货数量-期初卖出期货数量 */
+    oritotalFutuqty: number;
+    /**期初现货数量=(期初销售计划数量-期初销售合同已定价数量)-(期初采购计划数量-期初采购合同已定价数量) */
+    oritotalspotqty: number;
+    /**期初买入期货数量 */
+    oribuyfutureqty: number;
+    /**期初采购计划数量 */
+    oribuyplanqty: number;
+    /**期初采购合同已定价数量 */
+    oribuypricedqty: number;
+    /**期初卖出期货数量 */
+    orisellfutureqty: number;
+    /**期初销售计划数量 */
+    orisellplanqty: number;
+    /**期初销售合同已定价数量 */
+    orisellpricedqty: number;
+    /**日照时期(yyyyMMdd) */
+    reckondate: string;
+    /**卖出期货数量 */
+    sellfutureqty: number;
+    /**销售计划数量 */
+    sellplanqty: number;
+    /**销售合同已定价数量 */
+    sellpricedqty: number;
+    /**总敞口 */
+    totalexposure: number;
+    /**期货数量 */
+    totalfutureqty: number;
+    /**敞口比例 */
+    totalhedgeratio: number;
+    /**期货应套保量 */
+    totalneedhedgeqty: number;
+    /**现货数量 */
+    totalspotqty: number;
 }

+ 9 - 9
src/services/go/ermcp/finance-report/index.ts

@@ -7,7 +7,7 @@ import { QueryFinanceDayReportReq } from './interface';
 import { QueryFinanceMonthReportReq } from './interface';
 
 /**
- * 查询财务日报表
+ * 查询财务日报表(菜单:报表查询/财务报表/日报表)
  * @param queryInfo 查询信息
  * @returns 财务日报表数据
  */
@@ -15,33 +15,33 @@ export async function QueryFinanceDayReport(queryInfo: QueryFinanceDayReportReq)
     try {
         return commonSearch_go('/Ermcp/QryReportDayFinance', queryInfo);
     } catch (err) {
-        throw new Error(err.message);
+        throw new Error(`查询财务日报表: ${err.message}`);
     }
 }
 
 /**
- * 查询财务发票日报表
+ * 查询财务日报表发票(菜单:报表查询/财务报表/日报表/发票)
  * @param queryInfo 查询信息
  * @returns 财务发票日报表
  */
 export async function QueryFinanceInvoiceDayReport(queryInfo: QueryFinanceDayReportReq): Promise<type.QueryFinanceInvoiceDayReportRsp[]> {
     try {
-        return commonSearch_go('/Ermcp/QryReportDayFinanceFp', queryInfo);
+        return commonSearch_go('/Ermcp3/QryReportDayFinanceFp', queryInfo);
     } catch (err) {
-        throw new Error(err.message);
+        throw new Error(`查询财务日报表发票: ${err.message}`);
     }
 }
 
 /**
- * 查询财务付款日报表
+ * 查询财务日报表款项(菜单:报表查询/财务报表/日报表/款项)
  * @param queryInfo 查询信息
  * @returns 财务付款日报表
  */
 export async function QueryFinancePayDayReport(queryInfo: QueryFinanceDayReportReq): Promise<type.QueryFinancePayDayReportRsp[]> {
     try {
-        return commonSearch_go('/Ermcp/QryReportDayFinanceKx', { queryInfo });
+        return commonSearch_go('/Ermcp3/QryReportDayFinanceKx', { queryInfo });
     } catch (err) {
-        throw new Error(err.message);
+        throw new Error(`查询财务日报表款项: ${err.message}`);
     }
 }
 
@@ -54,6 +54,6 @@ export async function QueryFinanceMonthReport(queryInfo: QueryFinanceMonthReport
     try {
         return commonSearch_go('/Ermcp/QryReportMonthFinance', { queryInfo });
     } catch (err) {
-        throw new Error(err.message);
+        throw new Error(`查询财务月报表: ${err.message}`);
     }
 }

+ 141 - 77
src/services/go/ermcp/finance-report/interface.ts

@@ -1,102 +1,166 @@
- /**
-  * 财务报表查询请求
-  */
- export interface QueryFinanceDayReportReq{
-    userid:number;  
-    tradedate:string;   
+/**
+ * 财务报表查询请求
+ */
+export interface QueryFinanceDayReportReq {
+    /**用户ID */
+    userid: number;
+    /**交易日(格式:yyyyMMdd) */
+    tradedate: string;
 }
 /**
  * 财务日报表查询回应
  */
-export interface QueryFinanceDayReportRsp{
-    areauserid:number;
-    collectinvoiceamount:number;
-    collectinvoicecount:number;
-    collectmoneyamount:number;
-    collectmoneycount:number;
-    payinvoiceamount:number;
-    payinvoicecount:number;
-    paymoneyamount:number;
-    paymoneycount:number;
-    reckondate:string;
-    updatetime:string;
+export interface QueryFinanceDayReportRsp {
+    /**所属机构 */
+    areauserid: number;
+    /**今日开票金额 */
+    collectinvoiceamount: number;
+    /**今日开票笔数 */
+    collectinvoicecount: number;
+    /**今日收款金额 */
+    collectmoneyamount: number;
+    /**今日收款笔数 */
+    collectmoneycount: number;
+    /**今日收票金额 */
+    payinvoiceamount: number;
+    /**今日收票笔数 */
+    payinvoicecount: number;
+    /**今日付款金额 */
+    paymoneyamount: number;
+    /**今日付款笔数 */
+    paymoneycount: number;
+    /**日照时期(yyyyMMdd) */
+    reckondate: string;
+    /**更新时间 */
+    updatetime: string;
 }
 /**
  * 财务发票日报表查询回应
  */
-export interface QueryFinanceInvoiceDayReportRsp{
-    applyid:number;
-    applyname:string;
-    biztype:number;
-    brandname:string;
-    contracttype:number;
-    enumdicname:string;
-    logdatetime:string;
-    logid:string;
-    logtypename:string;
-    logvalue:string;
-    modelname:string;
-    operatelogtype:number;
-    optypename:string;
-    relatedid:string;
-    relatedno:string;
-    tradedate:string;
-    userid:number;
-    wrstandardcode:string;
-    wrstandardid:number;
-    wrstandardname:string;
+export interface QueryFinanceInvoiceDayReportRsp {
+    /**操作人 */
+    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: string;
+    /**合同类型(名称) */
+    logtypename: string;
+    /**数值 */
+    logvalue: string;
+    /**操作流水类型  */
+    operatelogtype: number;
+    /**流水类型名称 */
+    optypename: string;
+    /**现货合同ID\套保计划 */
+    relatedid: string;
+    /**合同编号 */
+    relatedno: string;
+    /**交易日(yyyyMMdd) */
+    tradedate: string;
+    /**机构ID */
+    userid: number;
 }
 /**
  * 财务付款日报表查询回应
  */
-export interface QueryFinancePayDayReportRsp{
-    applyid:number;
-    applyname:string;
-    biztype:number;
-    brandname:string;
-    contracttype:number;
-    enumdicname:string;
-    logdatetime:string;
-    logid:string;
-    logtypename:string;
-    logvalue:string;
-    modelname:string;
-    operatelogtype:number;
-    optypename:string;
-    relatedid:string;
-    relatedno:string;
-    tradedate:string;
-    userid:number;
-    wrstandardcode:string;
-    wrstandardid:number;
-    wrstandardname:string;
+export interface QueryFinancePayDayReportRsp {
+    /**操作人 */
+    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: string;
+    /**合同类型(名称) */
+    logtypename: string;
+    /**数值 */
+    logvalue: string;
+    /**操作流水类型  */
+    operatelogtype: number;
+    /**流水类型名称 */
+    optypename: string;
+    /**现货合同ID\套保计划 */
+    relatedid: string;
+    /**合同编号 */
+    relatedno: string;
+    /**交易日(yyyyMMdd) */
+    tradedate: string;
+    /**机构ID */
+    userid: number;
 }
 
 
 /**
   * 财务月报表查询请求
   */
- export interface QueryFinanceMonthReportReq{
-    userid:number;  
-    cycletime:string;   
+export interface QueryFinanceMonthReportReq {
+    /**用户ID */
+    userid: number;
+    /**周期时间:月(格式:yyyyMM) */
+    cycletime: string;
 }
 
 /**
  * 财务月报表查询回应
  */
- export interface QueryFinanceMonthReportRsp{
-    areauserid:number;
-    collectinvoiceamount:number;
-    collectinvoicecount:number;
-    collectmoneyamount:number;
-    collectmoneycount:number;
-    cycletime:string;
-    cycletype:number;
-    dayfr:QueryFinanceDayReportRsp[];
-    payinvoiceamount:number;
-    payinvoicecount:number;
-    paymoneyamount:number;
-    paymoneycount:number;
-    updatetime:string;
+export interface QueryFinanceMonthReportRsp {
+    /**所属机构【原值】 */
+    areauserid: number;
+    /**今日开票金额【汇总】 */
+    collectinvoiceamount: number;
+    /**今日开票笔数【汇总】 */
+    collectinvoicecount: number;
+    /**今日收款金额【汇总】 */
+    collectmoneyamount: number;
+    /**今日收款笔数【汇总】 */
+    collectmoneycount: number;
+    /**周期时间 月(YYYYMM) 季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】 */
+    cycletime: string;
+    /**周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】 */
+    cycletype: number;
+    /**日报表明细 */
+    dayfr: QueryFinanceDayReportRsp[];
+    /**今日收票金额【汇总】 */
+    payinvoiceamount: number;
+    /**今日收票笔数【汇总】 */
+    payinvoicecount: number;
+    /**今日付款金额【汇总】 */
+    paymoneyamount: number;
+    /**今日付款笔数【汇总】 */
+    paymoneycount: number;
+    /**更新时间 */
+    updatetime: string;
 }
 

+ 2 - 2
src/services/go/ermcp/inventory-report/index.ts

@@ -13,7 +13,7 @@ export async function QueryAreaStockReport(queryInfo: QueryAreaStockReportReq):
     try {
         return commonSearch_go('/Ermcp3/QueryAreaStockReport', queryInfo);
     } catch (err) {
-        throw new Error(err.message);
+        throw new Error(`查询库存报表: ${err.message}`);
     }
 }
 
@@ -26,6 +26,6 @@ export async function QueryAreaStockReportDetail(queryInfo: QueryAreaStockReport
     try {
         return commonSearch_go('/Ermcp3/QueryAreaStockReportDetail', queryInfo);
     } catch (err) {
-        throw new Error(err.message);
+        throw new Error(`查询库存明细报表: ${err.message}`);
     }
 }

+ 165 - 88
src/services/go/ermcp/inventory-report/interface.ts

@@ -2,106 +2,183 @@
 /**
  * 查询库存报表请求
  */
-export interface QueryAreaStockReportReq{
-    userid:number;
-    querytype:number;
-    querydate:string;
-    deliverygoodsid?:number;
-    wrstandardid?:number;
-    spotgoodsbrandid?:number;
-    warehouseinfoid?:number;
-
+export interface QueryAreaStockReportReq {
+    /**用户ID */
+    userid: number;
+    /**查询类型 1-日报表 2-月报表 */
+    querytype: number;
+    /**查询日期(格式 日报表YYYYMMDD, 月报表YYYYMM) */
+    querydate: string;
+    /**现货商品ID */
+    deliverygoodsid?: number;
+    /**品类ID */
+    wrstandardid?: number;
+    /**品牌ID */
+    spotgoodsbrandid?: number;
+    /**仓库ID */
+    warehouseinfoid?: number;
 }
 
 /**
  * 查询库存报表回应
  */
-export interface QueryAreaStockReportRsp{
-brandname:string;
-curstock:number;
-deliverygoodscode:string;
-deliverygoodsid:number;
-deliverygoodsname:string;
-enumdicname:string;
-goodsunitid:number;
-oristock:number;
-spotgoodsbrandid:number;
-todaybuyinqty:number;
-todayproduceinqty:number;
-todayproduceoutqty:number;
-todayselloutqty:number;
-unitid:number;
-updatetime:string;
-userid:number;
-username:string;
-warehousecode:string;
-warehouseinfoid:string;
-warehousename:string;
-warehousetype:number;
-wrstandardcode:string;
-wrstandardid:number;
-wrstandardname:string;
+export interface QueryAreaStockReportRsp {
+    /**品牌名称 */
+    brandname: string;
+    /**期末库存量 */
+    curstock: number;
+    /**现货品种代码 */
+    deliverygoodscode: string;
+    /**现货品种id */
+    deliverygoodsid: number;
+    /**现货品种名称 */
+    deliverygoodsname: string;
+    /**单位名称 */
+    enumdicname: string;
+    /**现货单位id */
+    goodsunitid: number;
+    /**期初库存量 */
+    oristock: number;
+    /**现货品牌ID */
+    spotgoodsbrandid: number;
+    /**今日采购入库量 */
+    todaybuyinqty: number;
+    /**今日生产入库量 */
+    todayproduceinqty: number;
+    /**今日生产出库量 */
+    todayproduceoutqty: number;
+    /**今日销售出库量 */
+    todayselloutqty: number;
+    /**品类单位id */
+    unitid: number;
+    /**更新时间 */
+    updatetime: string;
+    /**机构ID */
+    userid: number;
+    /**机构名称 */
+    username: string;
+    /**仓库代码 */
+    warehousecode: string;
+    /**仓库ID */
+    warehouseinfoid: string;
+    /**仓库名称 */
+    warehousename: string;
+    /**仓库类型 - 1 厂库 2 自有库 3 合作库 */
+    warehousetype: number;
+    /**品类代码 */
+    wrstandardcode: string;
+    /**品类ID */
+    wrstandardid: number;
+    /**品类名称 */
+    wrstandardname: string;
 }
 
 /**
  * 查询库存报表明细请求
  */
-export interface QueryAreaStockReportDetailReq{
-    userid:number;
-    querytype:number;
-    detailtype:number;
-    querydate:string;
-    deliverygoodsid?:number;
-    wrstandard?:number;
-    spotgoodsbrandid?:number;
-    warehouseinfoid?:number;
+export interface QueryAreaStockReportDetailReq {
+    /**用户ID */
+    userid: number;
+    /**查询类型 1-日报表明细 2-月报表明细 */
+    querytype: number;
+    /**明细类型 1:入库明细(采购入库+生产入库) 2:出库明细(销售出库+生产出库) */
+    detailtype: number;
+    /**查询日期(格式 日报表YYYYMMDD, 月报表YYYYMM) */
+    querydate: string;
+    /**现货商品ID */
+    deliverygoodsid?: number;
+    /**品类ID */
+    wrstandard?: number;
+    /**品牌ID */
+    spotgoodsbrandid?: number;
+    /**仓库ID */
+    warehouseinfoid?: number;
 }
 
 /**
  * 查询库存报表明细回应
  */
-export interface QueryAreaStockReportDetailRsp{
-    applyid:number;
-    applyname:string;
-    applyremark:string;
-    applysrc:number;
-    applystatus:number;
-    applytime:string;
-    auditid:number;
-    auditname:string;
-    auditremark:string;
-    auditsrc:number;
-    audittime:string;
-    audittradedate:string;  
-    brandname:string;
-    buynickname:string;
-    buyuserid:number;
-    buyusername:string;
-    contractno:string;
-    contractqty:number;
-    contracttype:number;
-    deliverygoodscode:string;
-    deliverygoodsid:number;
-    deliverygoodsname:string;
-    enumdicname:string;
-    inoutapplyid:string;
-    inouttype:number;
-    pricetype:number;
-    qty:number;
-    sellnickname:string;
-    selluserid:number;
-    sellusername:string;
-    spotcontractid:string;
-    spotgoodsbrandid:number;
-    unitid:number;
-    //updatetime:string;
-    userid:number;
-    //username:string;
-    warehousecode:string;
-    warehouseinfoid:string;
-    warehousename:string;
-    warehousetype:number;
-    wrstandardcode:string;
-    wrstandardid:number;
-    wrstandardname:string;
-  }
+export interface QueryAreaStockReportDetailRsp {
+    /**申请人 */
+    applyid: number;
+    /**申请人名称 */
+    applyname: string;
+    /**申请备注 */
+    applyremark: string;
+    /**申请来源 - 1:管理端 2:终端 */
+    applysrc: number;
+    /**申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回 */
+    applystatus: number;
+    /**申请时间 */
+    applytime: string;
+    /**审核人 */
+    auditid: number;
+    /**审核人名称 */
+    auditname: string;
+    /**审核备注 */
+    auditremark: string;
+    /**审核来源 - 1:管理端 2:终端 */
+    auditsrc: number;
+    /**审核时间 */
+    audittime: string;
+    /**审核交易日(yyyyMMdd) */
+    audittradedate: string;
+    /**品牌名称 */
+    brandname: string;
+    /**采购方昵称 */
+    buynickname: string;
+    /**采购方userid */
+    buyuserid: number;
+    /**采购方名称 */
+    buyusername: string;
+    /**合同编号 */
+    contractno: string;
+    /**合同量 */
+    contractqty: number;
+    /**现货合同类型 - 1:采购 -1:销售 */
+    contracttype: number;
+    /**现货品种代码 */
+    deliverygoodscode: string;
+    /**现货品种id */
+    deliverygoodsid: number;
+    /**现货品种名称 */
+    deliverygoodsname: string;
+    /**现货商品单位名称 */
+    enumdicname: string;
+    /**申请ID(607+Unix秒时间戳(10位)+xxxxxx) */
+    inoutapplyid: string;
+    /**出入库类型 - 1:采购入库 2:销售出库 3:生产入库 4:生产出库 */
+    inouttype: number;
+    /**定价类型 - 1:一口价 2:点价 3:暂定价 */
+    pricetype: number;
+    /**数量 */
+    qty: number;
+    /**销售方昵称 */
+    sellnickname: string;
+    /**销售方userid */
+    selluserid: number;
+    /**销售方名称 */
+    sellusername: string;
+    /**关联现货合同ID */
+    spotcontractid: string;
+    /**现货品牌ID */
+    spotgoodsbrandid: number;
+    /**单位id */
+    unitid: number;
+    /**机构ID */
+    userid: number;
+    /**仓库代码 */
+    warehousecode: string;
+    /**现货仓库ID */
+    warehouseinfoid: string;
+    /**仓库名称 */
+    warehousename: string;
+    /**仓库类型 - 1 厂库 2 自有库 3 合作库 */
+    warehousetype: number;
+    /**品类代码 */
+    wrstandardcode: string;
+    /**品类ID */
+    wrstandardid: number;
+    /**品类名称 */
+    wrstandardname: string;
+}

+ 22 - 8
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,9 +27,9 @@ 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);
+        throw new Error(`查询现货报表: ${err.message}`);
     }
 }
 
@@ -26,9 +40,9 @@ 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);
+        throw new Error(`查询现货明细报表: ${err.message}`);
     }
 }
 
@@ -39,9 +53,9 @@ 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);
+        throw new Error(`查询现货月报表: ${err.message}`);
     }
 }
 
@@ -52,8 +66,8 @@ 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);
+        throw new Error(`查询现货月报表明细: ${err.message}`);
     }
 }

+ 251 - 82
src/services/go/ermcp/spot-report/interface.ts

@@ -2,115 +2,284 @@
 /**
  * 查询现货报表请求
  */
- 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 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{
-    userid:number;    
-    wrstandardid:number;
-    cycletime:string;    
+/**
+* 查询现货月报表详情(菜单:报表查询/现货月报表/现货月报表详情)
+*/
+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;
 }