SELECT ${sel_col} FROM "_SYS_BIC"."CB.AL.YW/ZAL_STOCK_BQPRICE" (PLACEHOLDER."$$ZIP_STDATE$$"=>${user_date_from} --查询开始日期 ,PLACEHOLDER."$$ZIP_ENDDATE$$"=>${user_date_to}) A LEFT JOIN (select (CASE WHEN ZICYY0313 IS NOT NULL THEN ZICYY0313 ELSE '未做标记单' END ) ZICYY0313, (CASE WHEN ZICYY3030 IS NOT NULL THEN ZICYY3030 WHEN ZICYY3030 IS NULL THEN '无货位' END ) ZICYY3030 ,ZICZS0000 BM,ZICZB0000 PC from "_SYS_BIC"."CB.AL.YW/ZAL_STOCK_BQPRICEJGFDS_KWBS" (PLACEHOLDER."$$ZIP_STDATE$$"=>${user_date_from} --查询开始日期 ,PLACEHOLDER."$$ZIP_ENDDATE$$"=>${user_date_to}) -- 当前日期 ) G ON A.ZICZS0000=G.BM AND A.ZICZB0000=G.PC LEFT JOIN "_SYS_BIC"."CB.BL.YW/ZBL_ZDEMM012" B ON A.ZICZS0000=B.ZICZS0000 AND A.ZICZB0000=B.ZICZB0000 LEFT JOIN (SELECT COMP_CODE,ZICZB0000,ZICZA0000,ZICKA0012 AS GSRKRQ FROM "_SYS_BIC"."CB.BL.YW/ZBL_ZDEMM013" ) C ON A.COMP_CODE=C.COMP_CODE AND A.ZICZB0000=C.ZICZB0000 AND A.ZICZA0000=C.ZICZA0000 WHERE 1=1 -- A.ZICZA0003 <> '1110' AND -- 不取旧饰 AND A.ZJS_TO<>0 AND LENGTH(A.ZICZB0000)>0 AND LENGTH(A.ZICZB0001)>0 AND A.ZJS_TO <>'0.001' ${user_ziczs0000_auth} --部门(含权限) ${user_zicza0004} --商品大类 ${user_zicza0015} --品种 ORDER BY ${sel_col} |