查询原料绑定供应商列表

This commit is contained in:
sxu 2025-07-17 16:52:18 +08:00
parent cfede26a22
commit ea6e07cc26
2 changed files with 9 additions and 0 deletions

View File

@ -92,4 +92,6 @@ public class SupplierBindMaterial extends BaseEntity {
@ApiModelProperty(value = "供应商名称")
private String supplierName;
private List<Long> materialTypeIds;
}

View File

@ -44,10 +44,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="canteenId != null "> and isbm.canteen_id = #{canteenId}</if>
<if test="supplierId != null "> and isbm.supplier_id = #{supplierId}</if>
<if test="supplierName != null and supplierName != ''"> and isu.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="materialId != null "> and isbm.material_id = #{materialId}</if>
<if test="categoryId != null "> and isbm.category_id = #{categoryId}</if>
<if test="alternativeSupplier != null and alternativeSupplier != ''"> and isbm.alternative_supplier = #{alternativeSupplier}</if>
<if test="ifSupply != null "> and isbm.if_supply = #{ifSupply}</if>
<if test="materialTypeIds != null and materialTypeIds.size() > 0">
and cm.material_type_id in
<foreach collection="materialTypeIds" item="materialTypeId" separator="," open="(" close=")">
#{materialTypeId}
</foreach>
</if>
</where>
</select>