|
|
@@ -74,7 +74,7 @@ func (r *ErmcpDeliveryGoods) GetDataEx() (interface{}, error) {
|
|
|
return r.GetData()
|
|
|
}
|
|
|
|
|
|
-// GetData
|
|
|
+// GetData 从数据库中查询数据
|
|
|
func (r *ErmcpDeliveryGoods) GetData() ([]ErmcpDeliveryGoods, error) {
|
|
|
sData := make([]ErmcpDeliveryGoods, 0)
|
|
|
err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
|
|
|
@@ -123,7 +123,7 @@ func (r *ErmcpDGFactoryItem) GetDataEx() (interface{}, error) {
|
|
|
return r.GetData()
|
|
|
}
|
|
|
|
|
|
-// GetData
|
|
|
+// GetData 从数据库中查询数据
|
|
|
func (r *ErmcpDGFactoryItem) GetData() (interface{}, error) {
|
|
|
sData := make([]ErmcpDGFactoryItem, 0)
|
|
|
err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
|
|
|
@@ -139,7 +139,7 @@ type Ermcp3Brand struct {
|
|
|
ISVALID int32 `json:"isvalid" xorm:"'ISVALID'"` // 是否有效
|
|
|
}
|
|
|
|
|
|
-// GetDataEx
|
|
|
+// GetDataEx 从数据库中查询数据
|
|
|
func (r *Ermcp3Brand) GetDataEx() (interface{}, error) {
|
|
|
return r.GetData()
|
|
|
}
|
|
|
@@ -230,7 +230,7 @@ func (r *ErmcpDeliveryGoodsDetail) addGbList(lst []Ermcp3Brand) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// GetData
|
|
|
+// GetData 从数据库中查询数据
|
|
|
func (r *ErmcpDeliveryGoodsDetail) GetData() ([]ErmcpDeliveryGoodsDetail, error) {
|
|
|
sData := make([]ErmcpDeliveryGoodsDetail, 0)
|
|
|
m := ErmcpDeliveryGoods{AREAUSERID: r.Data.AREAUSERID, DELIVERYGOODSID: r.Data.DELIVERYGOODSID}
|
|
|
@@ -262,7 +262,7 @@ func (r *ErmcpDeliveryGoodsDetail) GetData() ([]ErmcpDeliveryGoodsDetail, error)
|
|
|
return sData, nil
|
|
|
}
|
|
|
|
|
|
-// GetDataEx
|
|
|
+// GetDataEx 从数据库中查询数据
|
|
|
func (r *ErmcpDeliveryGoodsDetail) GetDataEx() (interface{}, error) {
|
|
|
return r.GetData()
|
|
|
}
|
|
|
@@ -273,7 +273,7 @@ type ErmcpDeliveryGoodsDetailEx struct {
|
|
|
MgList []Ermcp3MiddleGoodsDetail2 `json:"mgList"` // 套保列表
|
|
|
}
|
|
|
|
|
|
-// GetData 获取现货商品详情(含套保信息列表)
|
|
|
+// GetDataEx 获取现货商品详情(含套保信息列表)
|
|
|
func (r *ErmcpDeliveryGoodsDetailEx) GetDataEx() (interface{}, error) {
|
|
|
sData := make([]ErmcpDeliveryGoodsDetailEx, 0)
|
|
|
mDg := r.ErmcpDeliveryGoodsDetail
|
|
|
@@ -429,7 +429,7 @@ func (r *Ermcp3MiddleGoodsDetailEx) addDgList(dglst []ErmcpDeliveryGoodsDetail,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// GetDataEx
|
|
|
+// GetDataEx 从数据库中查询数据
|
|
|
func (r *Ermcp3MiddleGoodsDetailEx) GetDataEx() (interface{}, error) {
|
|
|
sData := make([]Ermcp3MiddleGoodsDetailEx, 0)
|
|
|
// 查套保品种基本信息
|
|
|
@@ -543,9 +543,9 @@ type Ermcp3GoodsEx struct {
|
|
|
GPUNITID int32 `json:"gpunitid" xorm:"'gpunitid'"` // 商品组单位id
|
|
|
AGREEUNIT float32 `json:"agreeunit" xorm:"'agreeunit'"` // 合约单位(合约乘数)
|
|
|
|
|
|
- ENUMDICNAME string `json:"enumdicname"` // 单位名称
|
|
|
- GPENUMDICNAME string `json:"enumdicname"` // 商品组单位名称
|
|
|
- AREAUSERID int64 `json:"-"` // 所属机构id
|
|
|
+ ENUMDICNAME string `json:"enumdicname"` // 单位名称
|
|
|
+ GPENUMDICNAME string `json:"enumdicname2"` // 商品组单位名称
|
|
|
+ AREAUSERID int64 `json:"-"` // 所属机构id
|
|
|
}
|
|
|
|
|
|
func (r *Ermcp3GoodsEx) calc() {
|
|
|
@@ -581,7 +581,7 @@ func (r *Ermcp3GoodsEx) buildSql() string {
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
|
|
|
-// GetData
|
|
|
+// GetData 从数据库中查询数据
|
|
|
func (r *Ermcp3GoodsEx) GetData() ([]Ermcp3GoodsEx, error) {
|
|
|
sData := make([]Ermcp3GoodsEx, 0)
|
|
|
err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
|
|
|
@@ -591,7 +591,7 @@ func (r *Ermcp3GoodsEx) GetData() ([]Ermcp3GoodsEx, error) {
|
|
|
return sData, err
|
|
|
}
|
|
|
|
|
|
-// GetDataEx
|
|
|
+// GetDataEx 从数据库中查询数据
|
|
|
func (r *Ermcp3GoodsEx) GetDataEx() (interface{}, error) {
|
|
|
return r.GetData()
|
|
|
}
|
|
|
@@ -801,7 +801,7 @@ SELECT to_char(t.SPOTCONTRACTID) SPOTCONTRACTID,
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
|
|
|
-// GetDataEx
|
|
|
+// GetDataEx 从数据库中查询数据
|
|
|
func (r *Ermcp3Contract) GetDataEx() (interface{}, error) {
|
|
|
sData := make([]Ermcp3Contract, 0)
|
|
|
err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
|
|
|
@@ -1050,7 +1050,7 @@ select t.contractno,
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
|
|
|
-// GetDataEx
|
|
|
+// GetDataEx 从数据库中查询数据
|
|
|
func (r *Ermcp3SellBuyContract) GetDataEx() (interface{}, error) {
|
|
|
sData := make([]Ermcp3SellBuyContract, 0)
|
|
|
err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
|
|
|
@@ -1145,7 +1145,7 @@ select to_char(t.updatetime, 'yyyy-mm-dd hh24:mi:ss') createtime,
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
|
|
|
-// GetDataEx
|
|
|
+// GetDataEx 从数据库中查询数据
|
|
|
func (r *Ermcp3ExposureDetail) GetDataEx() (interface{}, error) {
|
|
|
e := db.GetEngine()
|
|
|
s := e.SQL(r.buildSql())
|
|
|
@@ -1228,7 +1228,7 @@ select distinct t.AREAUSERID,
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
|
|
|
-// GetDataEx
|
|
|
+// GetDataEx 从数据库中查询数据
|
|
|
func (r *Ermcp3AreaSpot) GetDataEx() (interface{}, error) {
|
|
|
e := db.GetEngine()
|
|
|
s := e.SQL(r.buildSql())
|
|
|
@@ -1338,7 +1338,7 @@ select *
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
|
|
|
-// GetDataEx
|
|
|
+// GetDataEx 从数据库中查询数据
|
|
|
func (r *Ermcp3AreaSpotDetail) GetDataEx() (interface{}, error) {
|
|
|
e := db.GetEngine()
|
|
|
s := e.SQL(r.buildSql())
|
|
|
@@ -1426,7 +1426,7 @@ select t.WRSTANDARDID,
|
|
|
return sqlId
|
|
|
}
|
|
|
|
|
|
-// GetDataEx
|
|
|
+// GetDataEx 从数据库中查询数据
|
|
|
func (r *Ermcp3Wrstandard) GetDataEx() (interface{}, error) {
|
|
|
e := db.GetEngine()
|
|
|
s := e.SQL(r.buildSql())
|
|
|
@@ -1658,7 +1658,7 @@ type Ermcp3AreaStockApplySum struct {
|
|
|
Key string `json:"-"` // 汇总主键
|
|
|
}
|
|
|
|
|
|
-// Calc
|
|
|
+// Calc 计算和处理
|
|
|
func (r *Ermcp3AreaStockApplySum) Calc() {
|
|
|
if len(r.DETAILJSON) > 0 {
|
|
|
// 解析qty字段
|
|
|
@@ -2191,7 +2191,7 @@ func (r *Ermcp3GoodsGroup) buildSql() string {
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
|
|
|
-// GetData
|
|
|
+// GetData 从数据库中查询数据
|
|
|
func (r *Ermcp3GoodsGroup) GetData() ([]Ermcp3GoodsGroup, error) {
|
|
|
sData := make([]Ermcp3GoodsGroup, 0)
|
|
|
err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
|