Browse Source

ERMCP2_HEDGEDITEMSPOT表使用SpotType区分类型

gitmuchinfo 3 years ago
parent
commit
2358a8ff02
1 changed files with 2 additions and 2 deletions
  1. 2 2
      models/ermcp8.go

+ 2 - 2
models/ermcp8.go

@@ -600,7 +600,7 @@ func (r *Ermcp2hedgeditemspot) buildSql() string {
 		LEFT JOIN WRStandard wr ON wr.wrstandardid = t.wrstandardid
 		LEFT JOIN WRStandard wr ON wr.wrstandardid = t.wrstandardid
 		LEFT JOIN enumdicitem e on wr.unitid=e.enumitemname and e.enumdiccode='goodsunit'
 		LEFT JOIN enumdicitem e on wr.unitid=e.enumitemname and e.enumdiccode='goodsunit'
 		LEFT JOIN ermcp_hedgeplan s ON s.HedgePlanID = t.RELATEDHEDGEPLANID
 		LEFT JOIN ermcp_hedgeplan s ON s.HedgePlanID = t.RELATEDHEDGEPLANID
-		WHERE t.HedgedType IN (1,2) AND t.hedgeditemid = %v
+		WHERE t.SPOTTYPE IN (1,2) AND t.hedgeditemid = %v
 		ORDER BY t.createtime
 		ORDER BY t.createtime
 	`
 	`
 	sqlId.FormatParam(r.HEDGEDITEMID)
 	sqlId.FormatParam(r.HEDGEDITEMID)
@@ -677,7 +677,7 @@ func (r *Ermcp2hedgeditemspotDetail) buildSql() string {
 	LEFT JOIN enumdicitem e on wr.unitid=e.enumitemname and e.enumdiccode='goodsunit'
 	LEFT JOIN enumdicitem e on wr.unitid=e.enumitemname and e.enumdiccode='goodsunit'
 	LEFT JOIN dgfactoryitem gb ON gb.dgfactoryitemid = t.SPOTGOODSBRANDID
 	LEFT JOIN dgfactoryitem gb ON gb.dgfactoryitemid = t.SPOTGOODSBRANDID
 	LEFT JOIN ermcp_spotcontract s on s.spotcontractid = t.RELATEDSPOTCONTRACTID
 	LEFT JOIN ermcp_spotcontract s on s.spotcontractid = t.RELATEDSPOTCONTRACTID
-	WHERE t.HedgedType IN (3,4,5) AND t.hedgeditemid = %v
+	WHERE t.SPOTTYPE IN (3,4,5) AND t.hedgeditemid = %v
 	ORDER BY t.createtime
 	ORDER BY t.createtime
 	`
 	`
 	sqlId.FormatParam(r.HEDGEDITEMID)
 	sqlId.FormatParam(r.HEDGEDITEMID)