Przeglądaj źródła

1.现货报表 +业务类型、币种字段
2.现货损益报表 +业务类型、币种字段

zou.yingbin 4 lat temu
rodzic
commit
7b8c191f06
4 zmienionych plików z 118 dodań i 0 usunięć
  1. 36 0
      docs/docs.go
  2. 36 0
      docs/swagger.json
  3. 27 0
      docs/swagger.yaml
  4. 19 0
      models/ermcp3Report.go

+ 36 - 0
docs/docs.go

@@ -14662,6 +14662,10 @@ var doc = `{
                     "description": "账户所属机构",
                     "type": "integer"
                 },
+                "biztype": {
+                    "description": "业务类型  1-套保 2-套利",
+                    "type": "integer"
+                },
                 "brandname": {
                     "description": "品牌名称",
                     "type": "string"
@@ -14682,6 +14686,14 @@ var doc = `{
                     "description": "采购合同交收量",
                     "type": "number"
                 },
+                "currencyid": {
+                    "description": "币种id",
+                    "type": "integer"
+                },
+                "currencyname": {
+                    "description": "币种名称",
+                    "type": "string"
+                },
                 "deliverygoodscode": {
                     "description": "现货商品代码",
                     "type": "string"
@@ -14827,6 +14839,10 @@ var doc = `{
                     "description": "所属机构",
                     "type": "integer"
                 },
+                "biztype": {
+                    "description": "业务类型  1-套保 2-套利",
+                    "type": "integer"
+                },
                 "brandname": {
                     "description": "品牌名称",
                     "type": "string"
@@ -14855,6 +14871,14 @@ var doc = `{
                     "description": "期末量",
                     "type": "number"
                 },
+                "currencyid": {
+                    "description": "币种id",
+                    "type": "integer"
+                },
+                "currencyname": {
+                    "description": "币种名称",
+                    "type": "string"
+                },
                 "cursellamount": {
                     "description": "期末销售总额(销售额)",
                     "type": "number"
@@ -14995,6 +15019,10 @@ var doc = `{
                     "description": "账户所属机构",
                     "type": "integer"
                 },
+                "biztype": {
+                    "description": "业务类型  1-套保 2-套利",
+                    "type": "integer"
+                },
                 "brandname": {
                     "description": "品牌名称",
                     "type": "string"
@@ -15015,6 +15043,14 @@ var doc = `{
                     "description": "采购合同交收量【期末】",
                     "type": "number"
                 },
+                "currencyid": {
+                    "description": "币种id",
+                    "type": "integer"
+                },
+                "currencyname": {
+                    "description": "币种名称",
+                    "type": "string"
+                },
                 "cycletime": {
                     "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
                     "type": "string"

+ 36 - 0
docs/swagger.json

@@ -14646,6 +14646,10 @@
                     "description": "账户所属机构",
                     "type": "integer"
                 },
+                "biztype": {
+                    "description": "业务类型  1-套保 2-套利",
+                    "type": "integer"
+                },
                 "brandname": {
                     "description": "品牌名称",
                     "type": "string"
@@ -14666,6 +14670,14 @@
                     "description": "采购合同交收量",
                     "type": "number"
                 },
+                "currencyid": {
+                    "description": "币种id",
+                    "type": "integer"
+                },
+                "currencyname": {
+                    "description": "币种名称",
+                    "type": "string"
+                },
                 "deliverygoodscode": {
                     "description": "现货商品代码",
                     "type": "string"
@@ -14811,6 +14823,10 @@
                     "description": "所属机构",
                     "type": "integer"
                 },
+                "biztype": {
+                    "description": "业务类型  1-套保 2-套利",
+                    "type": "integer"
+                },
                 "brandname": {
                     "description": "品牌名称",
                     "type": "string"
@@ -14839,6 +14855,14 @@
                     "description": "期末量",
                     "type": "number"
                 },
+                "currencyid": {
+                    "description": "币种id",
+                    "type": "integer"
+                },
+                "currencyname": {
+                    "description": "币种名称",
+                    "type": "string"
+                },
                 "cursellamount": {
                     "description": "期末销售总额(销售额)",
                     "type": "number"
@@ -14979,6 +15003,10 @@
                     "description": "账户所属机构",
                     "type": "integer"
                 },
+                "biztype": {
+                    "description": "业务类型  1-套保 2-套利",
+                    "type": "integer"
+                },
                 "brandname": {
                     "description": "品牌名称",
                     "type": "string"
@@ -14999,6 +15027,14 @@
                     "description": "采购合同交收量【期末】",
                     "type": "number"
                 },
+                "currencyid": {
+                    "description": "币种id",
+                    "type": "integer"
+                },
+                "currencyname": {
+                    "description": "币种名称",
+                    "type": "string"
+                },
                 "cycletime": {
                     "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
                     "type": "string"

+ 27 - 0
docs/swagger.yaml

@@ -3958,6 +3958,9 @@ definitions:
       areauserid:
         description: 账户所属机构
         type: integer
+      biztype:
+        description: 业务类型  1-套保 2-套利
+        type: integer
       brandname:
         description: 品牌名称
         type: string
@@ -3973,6 +3976,12 @@ definitions:
       buyreckonqty:
         description: 采购合同交收量
         type: number
+      currencyid:
+        description: 币种id
+        type: integer
+      currencyname:
+        description: 币种名称
+        type: string
       deliverygoodscode:
         description: 现货商品代码
         type: string
@@ -4084,6 +4093,9 @@ definitions:
       areauserid:
         description: 所属机构
         type: integer
+      biztype:
+        description: 业务类型  1-套保 2-套利
+        type: integer
       brandname:
         description: 品牌名称
         type: string
@@ -4105,6 +4117,12 @@ definitions:
       curqty:
         description: 期末量
         type: number
+      currencyid:
+        description: 币种id
+        type: integer
+      currencyname:
+        description: 币种名称
+        type: string
       cursellamount:
         description: 期末销售总额(销售额)
         type: number
@@ -4207,6 +4225,9 @@ definitions:
       areauserid:
         description: 账户所属机构
         type: integer
+      biztype:
+        description: 业务类型  1-套保 2-套利
+        type: integer
       brandname:
         description: 品牌名称
         type: string
@@ -4222,6 +4243,12 @@ definitions:
       buyreckonqty:
         description: 采购合同交收量【期末】
         type: number
+      currencyid:
+        description: 币种id
+        type: integer
+      currencyname:
+        description: 币种名称
+        type: string
       cycletime:
         description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
         type: string

+ 19 - 0
models/ermcp3Report.go

@@ -199,6 +199,10 @@ type Ermcp3ReportAreaSpotPL struct {
 	DELIVERYGOODSID       int32   `json:"deliverygoodsid"  xorm:"'DELIVERYGOODSID'"`             // 现货品种id
 	DELIVERYGOODSCODE     string  `json:"deliverygoodscode"  xorm:"'DELIVERYGOODSCODE'"`         // 现货品种代码
 	DELIVERYGOODSNAME     string  `json:"deliverygoodsname"  xorm:"'DELIVERYGOODSNAME'"`         // 现货品种名称
+	BIZTYPE               int32   `json:"biztype"  xorm:"'BIZTYPE'"`                             // 业务类型  1-套保 2-套利
+	CURRENCYID            int32   `json:"currencyid"  xorm:"'CURRENCYID'"`                       // 币种id
+
+	CURRENCYNAME string `json:"currencyname"` // 币种名称
 
 	ENUMDICNAME   string `json:"enumdicname"`   // 现货商品单位名称
 	WRENUMDICNAME string `json:"gbenumdicname"` // 品类单位名称
@@ -210,6 +214,7 @@ type Ermcp3ReportAreaSpotPL struct {
 func (r *Ermcp3ReportAreaSpotPL) calc() {
 	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.GBUNITID)
 	r.WRENUMDICNAME = mtpcache.GetEnumDicitemName(r.WRUNITID)
+	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
 }
 
 func (r *Ermcp3ReportAreaSpotPL) buildSql() string {
@@ -240,6 +245,8 @@ func (r *Ermcp3ReportAreaSpotPL) buildSql() string {
 		"       t.CURMARKETVALUE," +
 		"       t.ACTUALPL," +
 		"       t.FLOATPL," +
+		"       t.currencyid," +
+		"       t.biztype," +
 		"       to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME," +
 		"       w.wrstandardcode," +
 		"       w.wrstandardname," +
@@ -331,7 +338,10 @@ type Ermcp3ReckonAreaSpotSub struct {
 	GOODSUNITID           int32   `json:"goodsunitid"  xorm:"'goodsunitid'"`                                    // 现货商品单位id
 	BRANDNAME             string  `json:"brandname"  xorm:"'brandname'"`                                        // 品牌名称
 	ACCOUNTNAME           string  `json:"accountname"  xorm:"'accountname'"`                                    // 所属机构名称
+	BIZTYPE               int32   `json:"biztype"  xorm:"'BIZTYPE'"`                                            // 业务类型  1-套保 2-套利
+	CURRENCYID            int32   `json:"currencyid"  xorm:"'CURRENCYID'"`                                      // 币种id
 
+	CURRENCYNAME       string  `json:"currencyname"`       // 币种名称
 	TOTALBUYPRICEDQTY  float64 `json:"totalbuypricedqty"`  // 采购定价量 = 期末 - 期初
 	TOTALSELLPRICEDQTY float64 `json:"totalsellpricedqty"` // 销售定价量 = 期末 - 期初
 	BeginDate          string  `json:"-"`                  // 开始日期
@@ -341,6 +351,7 @@ type Ermcp3ReckonAreaSpotSub struct {
 func (r *Ermcp3ReckonAreaSpotSub) calc() {
 	r.TOTALBUYPRICEDQTY = r.BUYPRICEDQTY - r.ORIBUYPRICEDQTY
 	r.TOTALSELLPRICEDQTY = r.SELLPRICEDQTY - r.ORISELLPRICEDQTY
+	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
 }
 
 func (r *Ermcp3ReckonAreaSpotSub) buildSql() string {
@@ -375,6 +386,8 @@ func (r *Ermcp3ReckonAreaSpotSub) buildSql() string {
 		"       t.ORISELLPRICEDAMOUNT," +
 		"       t.BUYPRICEDAMOUNT," +
 		"       t.SELLPRICEDAMOUNT," +
+		"       t.currencyid," +
+		"       t.biztype," +
 		"       w.wrstandardname," +
 		"       w.wrstandardcode," +
 		"       g.deliverygoodscode," +
@@ -472,12 +485,16 @@ type Ermcp3ReportAreaSpotSub struct {
 	GOODSUNITID           int32   `json:"goodsunitid"  xorm:"'goodsunitid'"`                                    // 现货商品单位id
 	BRANDNAME             string  `json:"brandname"  xorm:"'brandname'"`                                        // 品牌名称
 	ACCOUNTNAME           string  `json:"accountname"  xorm:"'accountname'"`                                    // 所属机构名称
+	BIZTYPE               int32   `json:"biztype"  xorm:"'BIZTYPE'"`                                            // 业务类型  1-套保 2-套利
+	CURRENCYID            int32   `json:"currencyid"  xorm:"'CURRENCYID'"`                                      // 币种id
 
+	CURRENCYNAME       string  `json:"currencyname"`       // 币种名称
 	TOTALBUYPRICEDQTY  float64 `json:"totalbuypricedqty"`  // 采购定价量 = 期末 - 期初
 	TOTALSELLPRICEDQTY float64 `json:"totalsellpricedqty"` // 销售定价量 = 期末 - 期初
 }
 
 func (r *Ermcp3ReportAreaSpotSub) calc() {
+	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
 	r.TOTALBUYPRICEDQTY = r.BUYPRICEDQTY - r.ORIBUYPRICEDQTY
 	r.TOTALSELLPRICEDQTY = r.SELLPRICEDQTY - r.ORISELLPRICEDQTY
 }
@@ -515,6 +532,8 @@ func (r *Ermcp3ReportAreaSpotSub) buildSql() string {
 		"       t.ORISELLPRICEDAMOUNT," +
 		"       t.BUYPRICEDAMOUNT," +
 		"       t.SELLPRICEDAMOUNT," +
+		"       t.currencyid," +
+		"       t.biztype," +
 		"       w.wrstandardname," +
 		"       w.wrstandardcode," +
 		"       g.deliverygoodscode," +