|
|
@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectErpMaterialVo"> |
|
|
|
select id, del_flag, create_by, create_time, update_by, update_time, remark, material_no, material_name, audit_status, use_status, hava_product_tem, material_type, process_method, unit, brand, describe, warehouse_dept from erp_material |
|
|
|
select id, del_flag, create_by, create_time, update_by, update_time, remark, material_no, material_name, audit_status, use_status, hava_product_tem, material_type, process_method, unit, brand, `describe`, warehouse_dept from erp_material |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectErpMaterialList" parameterType="ErpMaterial" resultMap="ErpMaterialResult"> |
|
|
@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="processMethod != null and processMethod != ''"> and process_method = #{processMethod}</if> |
|
|
|
<if test="unit != null and unit != ''"> and unit = #{unit}</if> |
|
|
|
<if test="brand != null and brand != ''"> and brand = #{brand}</if> |
|
|
|
<if test="describe != null and describe != ''"> and describe = #{describe}</if> |
|
|
|
<if test="describe != null and describe != ''"> and `describe` = #{describe}</if> |
|
|
|
<if test="warehouseDept != null and warehouseDept != ''"> and warehouse_dept = #{warehouseDept}</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
@ -53,6 +53,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
where id = #{id} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="checkMaterialNoUnique" resultType="java.lang.Integer"> |
|
|
|
select count(1) from erp_material where material_no = #{materialNo} limit 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertErpMaterial" parameterType="ErpMaterial" useGeneratedKeys="true" keyProperty="id"> |
|
|
|
insert into erp_material |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
@ -71,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="processMethod != null">process_method,</if> |
|
|
|
<if test="unit != null">unit,</if> |
|
|
|
<if test="brand != null">brand,</if> |
|
|
|
<if test="describe != null">describe,</if> |
|
|
|
<if test="describe != null">`describe`,</if> |
|
|
|
<if test="warehouseDept != null">warehouse_dept,</if> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
@ -113,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="processMethod != null">process_method = #{processMethod},</if> |
|
|
|
<if test="unit != null">unit = #{unit},</if> |
|
|
|
<if test="brand != null">brand = #{brand},</if> |
|
|
|
<if test="describe != null">describe = #{describe},</if> |
|
|
|
<if test="describe != null">`describe` = #{describe},</if> |
|
|
|
<if test="warehouseDept != null">warehouse_dept = #{warehouseDept},</if> |
|
|
|
</trim> |
|
|
|
where id = #{id} |
|
|
|