|
@@ -37,8 +37,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
</select>
|
|
</select>
|
|
<select id="getListByDept" resultMap="BizSupplierResult">
|
|
<select id="getListByDept" resultMap="BizSupplierResult">
|
|
- select * from biz_supplier where id not in (select supplier_id from sys_dept where del_flag = 0 and dept_id != #{deptId} )
|
|
|
|
- and deleted = 0 and is_inner_outsource = 1
|
|
|
|
|
|
+ select * from biz_supplier
|
|
|
|
+ <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
|
|
|
|
+ id not in (select supplier_id from sys_dept where del_flag = 0 and dept_id != #{deptId} ) and
|
|
|
|
+ deleted = 0 and is_inner_outsource = 1
|
|
|
|
+ <if test="tenantId != null and tenantId != 0"> AND tenant_id = #{tenantId}</if>
|
|
|
|
+ <if test="isInnerOutsource != null "> AND is_inner_outsource = #{isInnerOutsource}</if>
|
|
|
|
+ <if test="name != null and name != ''"> AND name LIKE CONCAT('%', #{name}, '%')</if>
|
|
|
|
+ <if test="mnemonicCode != null and mnemonicCode != ''"> AND mnemonic_code LIKE CONCAT('%', #{mnemonicCode}, '%')</if>
|
|
|
|
+ <if test="code != null and code != ''"> AND code LIKE CONCAT('%', #{code}, '%')</if>
|
|
|
|
+
|
|
|
|
+ </trim>
|
|
|
|
+
|
|
</select>
|
|
</select>
|
|
<select id="getOutsourceDept" resultMap="BizSupplierResult">
|
|
<select id="getOutsourceDept" resultMap="BizSupplierResult">
|
|
select t2.*,t1.dept_id as outsourceDeptId,t1.dept_name as outsourceDeptName from sys_dept t1 left join biz_supplier t2 on t1.supplier_id = t2.id where
|
|
select t2.*,t1.dept_id as outsourceDeptId,t1.dept_name as outsourceDeptName from sys_dept t1 left join biz_supplier t2 on t1.supplier_id = t2.id where
|