| | |
| | | c.volume as gs_volume, |
| | | c.price as gs_price, |
| | | c.wholesale as gs_wholesale, |
| | | c.img as gs_img, |
| | | a.shop_id, |
| | | a.company_id |
| | | from |
| | |
| | | </if> |
| | | <if test="record.batch != null and record.batch !='' "> |
| | | and batch = #{record.batch} |
| | | </if> |
| | | |
| | | <if test="record.queryKey != null and record.queryKey !='' "> |
| | | and (instr(c.name,#{record.queryKey}) or instr(c.goods_no, #{record.queryKey}) or instr(c.zjm, #{record.queryKey})) |
| | | </if> |
| | | <if test="record.storeId != null and record.storeId !='' "> |
| | | and STORE_ID = #{record.storeId} |
| | |
| | | </if> |
| | | <if test="record.batch != null and record.batch !='' "> |
| | | and batch = #{record.batch} |
| | | </if> |
| | | <if test="record.queryKey != null and record.queryKey !='' "> |
| | | and (instr(c.name,#{record.queryKey}) or instr(c.goods_no, #{record.queryKey}) or instr(c.zjm, #{record.queryKey})) |
| | | </if> |
| | | <if test="record.storeId != null and record.storeId !='' "> |
| | | and STORE_ID = #{record.storeId} |
| | |
| | | <if test=" record.endTime!=null "> |
| | | <![CDATA[ and #{record.endTime} >=b.create_time]]> |
| | | </if> |
| | | <if test="record.companyId != null and record.companyId !='' "> |
| | | and b.company_id = #{record.companyId} |
| | | </if> |
| | | </where> |
| | | UNION ALL |
| | | SELECT |
| | |
| | | <if test=" record.endTime!=null "> |
| | | <![CDATA[ and #{record.endTime} >= t2_b.create_time ]]> |
| | | </if> |
| | | <if test="record.companyId != null and record.companyId !='' "> |
| | | and t2_b.company_id = #{record.companyId} |
| | | </if> |
| | | </where> |
| | | ) t |
| | | |