Commit e21e03b1 by 胡懿

二维码findlist增加根据货品信息查询

parent 00f7e678
......@@ -13,11 +13,24 @@
a.update_by AS "updateBy.id",
a.update_date AS "updateDate",
a.remarks AS "remarks",
a.del_flag AS "delFlag"
a.del_flag AS "delFlag",
type.id AS "goodsInfo.type.id",
type.code AS "goodsInfo.type.code",
type.name AS "goodsInfo.type.name",
gi.id AS "goodsInfo.id",
gi.NAME AS "goodsInfo.name",
gi.model AS "goodsInfo.model",
gi.amount AS "goodsInfo.amount",
gi.goods_id AS "goodsInfo.goods.id",
g.batch_num AS "goodsInfo.goods.batchNum"
</sql>
<sql id="qrCodeJoins">
LEFT JOIN t_wh_goods_info gi ON a.goods_info_id = gi.id
LEFT JOIN t_wh_material_type type ON type.id = gi.type_id
LEFT JOIN t_wh_goods g ON g.id = gi.goods_id
</sql>
......@@ -38,7 +51,22 @@
a.del_flag = #{DEL_FLAG_NORMAL}
${dataScope}
<if test="code != null and code != ''">
AND a.code = #{code}
AND a.code like concat('%',#{code},'%')
</if>
<if test="goodsInfo.goods.batchNum != null and goodsInfo.goods.batchNum != ''">
AND g.batch_num = #{goodsInfo.goods.batchNum}
</if>
<if test="goodsInfo.type.id != null and goodsInfo.type.id != ''">
AND gi.type_id = #{goodsInfo.type.id}
</if>
<if test="state != null and state != ''">
AND a.state = #{state}
</if>
<if test="goodsInfo.modelList != null and goodsInfo.modelList.size() != 0">
AND
<foreach collection="goodsInfo.modelList" item="model" index="index" separator=" AND" open="(" close=")">
gi.model like concat('%',#{model},'%')
</foreach>
</if>
</where>
<choose>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment