You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.4 KiB
75 lines
2.4 KiB
<?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.xujie.sys.modules.erf.mapper.ErfExpRawMaterialMapper">
|
|
|
|
<!-- 结果映射 -->
|
|
<resultMap id="ErfExpRawMaterialMap" type="com.xujie.sys.modules.erf.entity.ErfExpRawMaterial">
|
|
<id property="id" column="id" />
|
|
<result property="applyNo" column="apply_no" />
|
|
<result property="site" column="site" />
|
|
<result property="partNo" column="part_no" />
|
|
<result property="partDesc" column="part_desc" />
|
|
<result property="quantity" column="quantity" />
|
|
<result property="umid" column="umid" />
|
|
<result property="remark" column="remark" />
|
|
<result property="createdBy" column="created_by" />
|
|
<result property="createdDate" column="created_date" />
|
|
<result property="updatedBy" column="updated_by" />
|
|
<result property="updatedDate" column="updated_date" />
|
|
<result property="isDeleted" column="is_deleted" />
|
|
</resultMap>
|
|
|
|
<!-- 根据申请单号查询原材料清单列表 -->
|
|
<select id="getRawMaterialListByApplyNo" resultMap="ErfExpRawMaterialMap">
|
|
SELECT
|
|
id,
|
|
apply_no,
|
|
site,
|
|
part_no,
|
|
part_desc,
|
|
quantity,
|
|
umid,
|
|
remark,
|
|
created_by,
|
|
created_date,
|
|
updated_by,
|
|
updated_date,
|
|
is_deleted
|
|
FROM erf_exp_raw_material
|
|
WHERE apply_no = #{applyNo}
|
|
AND is_deleted = '0'
|
|
ORDER BY id ASC
|
|
</select>
|
|
|
|
<!-- 根据ID查询单条原材料记录 -->
|
|
<select id="getRawMaterialById" resultMap="ErfExpRawMaterialMap">
|
|
SELECT
|
|
id,
|
|
apply_no,
|
|
site,
|
|
part_no,
|
|
part_desc,
|
|
quantity,
|
|
umid,
|
|
remark,
|
|
created_by,
|
|
created_date,
|
|
updated_by,
|
|
updated_date,
|
|
is_deleted
|
|
FROM erf_exp_raw_material
|
|
WHERE id = #{id}
|
|
AND is_deleted = '0'
|
|
</select>
|
|
|
|
<!-- 批量删除原材料记录(逻辑删除) -->
|
|
<delete id="batchDeleteByIds">
|
|
delete erf_exp_raw_material
|
|
WHERE id IN
|
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper>
|