|
|
@@ -2879,4 +2879,41 @@
|
|
|
<select id="getDocNo" resultType="java.lang.String">
|
|
|
select dkic_b.f_create_note(#{cpId}, #{purId}::uuid, #{docCode})
|
|
|
</select>
|
|
|
+
|
|
|
+ <!--获取供应商-->
|
|
|
+ <select id="getSupplier" resultType="java.util.Map">
|
|
|
+ select tms.sup_code as "supplierCode",
|
|
|
+ tms.sup_name as "supplierName",
|
|
|
+ tms.sup_id as "supplierId",
|
|
|
+ tms.sup_type as "supplierType",
|
|
|
+ tms.flg_valid as "flgValid"
|
|
|
+ from dkic_b.t_mst_supplier tms
|
|
|
+ where tms.cp_id = #{cpId}
|
|
|
+ <if test="supplierName!=null and supplierName!=''" >
|
|
|
+ AND tms.sup_name LIKE concat('%', #{supplierName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="supplierCode!=null and supplierCode!=''" >
|
|
|
+ AND tms.sup_code LIKE concat('%', #{supplierCode}, '%')
|
|
|
+ </if>
|
|
|
+ order by tms.sup_code
|
|
|
+ <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
+ limit #{end} offset #{start}
|
|
|
+ </if>
|
|
|
+ <if test="limit != null and limit != 0 ">
|
|
|
+ limit #{limit}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--获取供应商数量-->
|
|
|
+ <select id="countSupplier" resultType="java.lang.Long">
|
|
|
+ select count(1)
|
|
|
+ from dkic_b.t_mst_supplier tms
|
|
|
+ where tms.cp_id = #{cpId}
|
|
|
+ <if test="supplierName!=null and supplierName!=''" >
|
|
|
+ AND tms.sup_name LIKE concat('%', #{supplierName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="supplierCode!=null and supplierCode!=''" >
|
|
|
+ AND tms.sup_code LIKE concat('%', #{supplierCode}, '%')
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|