|
@@ -266,12 +266,22 @@
|
|
<if test="status != null">
|
|
<if test="status != null">
|
|
AND g.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
AND g.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="groupGoods!=null and groupGoods==0">
|
|
|
|
+ AND g.complement_goods_id_list_ IS NULL
|
|
|
|
+ </if>
|
|
|
|
+ <if test="groupGoods!=null and groupGoods==1">
|
|
|
|
+ AND g.complement_goods_id_list_ IS NOT NULL
|
|
|
|
+ </if>
|
|
|
|
+ <if test="search!=null and search!=''">
|
|
|
|
+ AND (g.sn_=#{search} OR g.name_ LIKE CONCAT('%', #{search}, '%') OR gp.supply_channel_ LIKE CONCAT('%', #{search}, '%'))
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="findGoodsBySubId" resultMap="Goods">
|
|
<select id="findGoodsBySubId" resultMap="Goods">
|
|
SELECT g.* FROM subject_goods_mapper sgm
|
|
SELECT g.* FROM subject_goods_mapper sgm
|
|
LEFT JOIN goods g ON sgm.goods_category_id_ = g.goods_category_id_
|
|
LEFT JOIN goods g ON sgm.goods_category_id_ = g.goods_category_id_
|
|
|
|
+ LEFT JOIN goods_procurement gp ON g.id_=gp.goods_id_
|
|
WHERE sgm.subject_id_ = #{subjectId} AND g.type_ = #{type} and g.status_ != 0
|
|
WHERE sgm.subject_id_ = #{subjectId} AND g.type_ = #{type} and g.status_ != 0
|
|
</select>
|
|
</select>
|
|
|
|
|