提交基础采购
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.klp.erp.mapper.ErpSupplierPriceMapper">
|
||||
|
||||
<resultMap id="ErpSupplierPriceResult" type="com.klp.erp.domain.ErpSupplierPrice">
|
||||
<result property="priceId" column="price_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="materialTypeCode" column="material_type_code"/>
|
||||
<result property="specification" column="specification"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="validFrom" column="valid_from"/>
|
||||
<result property="validTo" column="valid_to"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectMaterialTypeOptions" resultType="com.klp.erp.domain.vo.MaterialTypeOptionVo"
|
||||
parameterType="com.klp.erp.domain.bo.MaterialTypeQueryBo">
|
||||
SELECT DISTINCT
|
||||
esp.material_type_code AS materialTypeCode,
|
||||
esp.specification AS specification,
|
||||
esp.supplier_id AS supplierId,
|
||||
es.name AS supplierName,
|
||||
esp.price AS latestPrice
|
||||
FROM erp_supplier_price esp
|
||||
LEFT JOIN erp_supplier es ON esp.supplier_id = es.supplier_id
|
||||
<where>
|
||||
esp.del_flag = 0
|
||||
<if test="supplierId != null">
|
||||
AND esp.supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="materialTypeCode != null and materialTypeCode != ''">
|
||||
AND esp.material_type_code LIKE CONCAT('%', #{materialTypeCode}, '%')
|
||||
</if>
|
||||
<if test="specification != null and specification != ''">
|
||||
AND esp.specification LIKE CONCAT('%', #{specification}, '%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY esp.material_type_code, esp.specification
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user