|
|
@@ -1379,26 +1379,43 @@ func (r *Ermcp3Wrstandard) calc() {
|
|
|
}
|
|
|
|
|
|
func (r *Ermcp3Wrstandard) buildSql() string {
|
|
|
- sqlId := "select t.WRSTANDARDID," +
|
|
|
- " t.WRSTANDARDCODE," +
|
|
|
- " t.DELIVERYGOODSID," +
|
|
|
- " t.UNITID," +
|
|
|
- " t.MINIVALUE," +
|
|
|
- " t.MINIVALUEDP," +
|
|
|
- " t.REALMINIVALUE," +
|
|
|
- " t.REALMINIVALUEDP," +
|
|
|
- " t.CREATORID," +
|
|
|
- " to_char(t.CREATETIME, 'yyyy-mm-dd hh24:mi:ss') CREATETIME," +
|
|
|
- " t.WRSTANDARDNAME," +
|
|
|
- " t.ISVALID," +
|
|
|
- " to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME," +
|
|
|
- " t.REMARK," +
|
|
|
- " t.CONVERTFACTOR," +
|
|
|
- " t.AREAUSERID," +
|
|
|
- " nvl(m.cantrade,-1) cantrade" +
|
|
|
- " from wrstandard t" +
|
|
|
- " left join marketspotgoodsconfig m on t.wrstandardid = m.wrstandardid" +
|
|
|
- " where 1 = 1"
|
|
|
+ /*
|
|
|
+ 任务 #2587
|
|
|
+ 描述
|
|
|
+
|
|
|
+ 【Go查询服务】仓单贸易可交易现货商品查询变更:根据系统参数989判断
|
|
|
+ 1. 无989 或 989 = 0: 查询所有现货商品
|
|
|
+ 2. 989 = 1: 原逻辑查询本市场设置的现货商品(MarketSpotGoodsConfig)
|
|
|
+
|
|
|
+ --989: 仓单贸易是否限制商品交易 默认为0, 云融为1
|
|
|
+ */
|
|
|
+ sqlId := `
|
|
|
+select t.WRSTANDARDID,
|
|
|
+ t.WRSTANDARDCODE,
|
|
|
+ t.DELIVERYGOODSID,
|
|
|
+ t.UNITID,
|
|
|
+ t.MINIVALUE,
|
|
|
+ t.MINIVALUEDP,
|
|
|
+ t.REALMINIVALUE,
|
|
|
+ t.REALMINIVALUEDP,
|
|
|
+ t.CREATORID,
|
|
|
+ to_char(t.CREATETIME, 'yyyy-mm-dd hh24:mi:ss') CREATETIME,
|
|
|
+ t.WRSTANDARDNAME,
|
|
|
+ t.ISVALID,
|
|
|
+ to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME,
|
|
|
+ t.REMARK,
|
|
|
+ t.CONVERTFACTOR,
|
|
|
+ t.AREAUSERID,
|
|
|
+ nvl(m.cantrade, 1) cantrade
|
|
|
+ from wrstandard t
|
|
|
+ left join marketspotgoodsconfig m
|
|
|
+ on t.wrstandardid = m.wrstandardid
|
|
|
+ and exists (select 1
|
|
|
+ from systemparam c
|
|
|
+ where c.paramcode = '989'
|
|
|
+ and c.paramvalue = '1')
|
|
|
+ where 1 = 1
|
|
|
+`
|
|
|
if r.AREAUSERID > 0 {
|
|
|
sqlId += fmt.Sprintf(" and t.AREAUSERID=%v", r.AREAUSERID)
|
|
|
}
|