文献种类:专题技术总结文献;
开发工具与关键技术:
作者:彭浩达 ;年级: 2017 ;撰写时间: 2020 年 4 月 28 日
MyBatis多条件查询
使用等判断拼接成多条件查询
select (a.shenhefo)shenhefo,b.,d.,e.,c.effectivedates,(b.date)dates,(e.costpriceb.quantity)chengbeiz,(e.retailprice*b.quantity)lingshouz from rwarehouse a,purchase b,purcharis c,crwarehouse d,drug e where a.rwarehouseid = b.rwarehouseid and b.purcharisid = c.purcharisid and a.crwarehouseid = d.crwarehouseid and c.drugid = e.drugid
and b.date >= #{drugMed.date,jdbcType=DATE}
and b.date <= #{drugMed.effectivedate,jdbcType=DATE}
and b.medicineid = #{drugMed.medicineid,jdbcType=INTEGER}
and b.receipts = #{drugMed.receipts,jdbcType=VARCHAR}
and a.crwarehouseid = #{drugMed.crwarehouseid,jdbcType=INTEGER}
and e.drugname = #{drugMed.drugname,jdbcType=VARCHAR}
and b.invoice is not null
and b.invoice is null
and b.officeid = #{drugMed.officeid,jdbcType=VARCHAR}
and c.medicalid = #{drugMed.medicalid,jdbcType=VARCHAR}
limit #{currentPages,jdbcType=INTEGER},#{pageSize,jdbcType=INTEGER}
结果图: