|
|
@@ -94,7 +94,8 @@ func (r *ErmcpRealExposureModel) GetData() ([]ErmcpRealExposureModel, error) {
|
|
|
if len(ret) > 0 {
|
|
|
var data pb.ErmcpAreaExposure
|
|
|
if err := proto.Unmarshal([]byte(ret), &data); err == nil {
|
|
|
- var m ErmcpRealExposureModel
|
|
|
+ var m = ErmcpRealExposureModel{MiddleGoodsName: sGoods[i].MIDDLEGOODSNAME,
|
|
|
+ MiddleGoodsCode: sGoods[i].MIDDLEGOODSCODE, MiddleGoodsHedgeRatio: sGoods[i].NEEDHEDGERATIO}
|
|
|
m.ParseFromProto(&data)
|
|
|
sData = append(sData, m)
|
|
|
}
|
|
|
@@ -317,6 +318,10 @@ func (r *ErmcpAreaSpotDetailModel) Calc() {
|
|
|
contractTypeName = "采购"
|
|
|
} else {
|
|
|
contractTypeName = "销售"
|
|
|
+ if r.Qty > 0{
|
|
|
+ // 销售的数量转为负数
|
|
|
+ r.Qty = r.Qty * -1
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
r.Recordname = contractTypeName + logTypeName
|