select SPDM '商品编号',GG1DM '颜色',GG2DM '尺码',CKDM '仓库',shop '门店',QTY '数量',RQ '日期',DJBH '单据编号' from SPA_ShopBHResult5 where CONVERT(CHAR(5), rq, 14) BETWEEN '00:30' AND '03:30' and CONVERT(VARCHAR(10),RQ,23) BETWEEN '${StrTime}' AND '${EndTime}'
AND 1=1 ${if(len( Stroid ) == 0,"","and shop in ('" + Stroid + "')")}