|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.op.wms.mapper.BpRawMaterialInMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="BpRawMaterialIn" id="BpRawMaterialInResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="factoryCode" column="factory_code" />
|
|
|
|
@ -27,12 +27,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBpRawMaterialInVo">
|
|
|
|
|
select id, factory_code, wa_code, wl_code, material_code, material_name, unit, supply_name, amnount_plan, amount_real, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, create_by, gmt_create, modified_by, gmt_modified from bp_raw_material_in
|
|
|
|
|
SELECT
|
|
|
|
|
id,
|
|
|
|
|
factory_code,
|
|
|
|
|
wa_code,
|
|
|
|
|
wl_code,
|
|
|
|
|
material_code,
|
|
|
|
|
material_name,
|
|
|
|
|
unit,
|
|
|
|
|
supply_name,
|
|
|
|
|
amnount_plan,
|
|
|
|
|
COALESCE(amount_real, 0) AS amount_real, -- 使用COALESCE函数处理NULL值
|
|
|
|
|
user_defined1,
|
|
|
|
|
user_defined2,
|
|
|
|
|
user_defined3,
|
|
|
|
|
user_defined4,
|
|
|
|
|
user_defined5,
|
|
|
|
|
create_by,
|
|
|
|
|
gmt_create,
|
|
|
|
|
modified_by,
|
|
|
|
|
gmt_modified
|
|
|
|
|
FROM
|
|
|
|
|
bp_raw_material_in
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBpRawMaterialInList" parameterType="BpRawMaterialIn" resultMap="BpRawMaterialInResult">
|
|
|
|
|
<include refid="selectBpRawMaterialInVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="waCode != null and waCode != ''"> and wa_code = #{waCode}</if>
|
|
|
|
|
<if test="wlCode != null and wlCode != ''"> and wl_code = #{wlCode}</if>
|
|
|
|
@ -52,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="gmtModified != null "> and gmt_modified = #{gmtModified}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBpRawMaterialInById" parameterType="String" resultMap="BpRawMaterialInResult">
|
|
|
|
|
<include refid="selectBpRawMaterialInVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
@ -140,9 +160,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBpRawMaterialInByIds" parameterType="String">
|
|
|
|
|
delete from bp_raw_material_in where id in
|
|
|
|
|
delete from bp_raw_material_in where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</mapper>
|
|
|
|
|
</mapper>
|
|
|
|
|