|
|
@ -20,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="unit" column="unit" /> |
|
|
|
<result property="brand" column="brand" /> |
|
|
|
<result property="describe" column="describe" /> |
|
|
|
<result property="warehouseDept" column="warehouseDept" /> |
|
|
|
<result property="useNum" column="use_num" /> |
|
|
|
<result property="lossRate" column="loss_rate" /> |
|
|
|
<result property="parentId" column="parent_id" /> |
|
|
@ -59,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="unit" column="sub_unit" /> |
|
|
|
<result property="brand" column="sub_brand" /> |
|
|
|
<result property="describe" column="sub_describe" /> |
|
|
|
<result property="warehouseDept" column="warehouseDept" /> |
|
|
|
<result property="useNum" column="sub_use_num" /> |
|
|
|
<result property="lossRate" column="sub_loss_rate" /> |
|
|
|
<result property="parentId" column="sub_parent_id" /> |
|
|
@ -70,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
<sql id="selectErpBomVo"> |
|
|
|
select id, del_flag, create_by, create_time, update_by, update_time, remark, bom_no, |
|
|
|
material_no, material_name, material_type, process_method, unit, brand, `describe`, |
|
|
|
material_no, material_name, material_type, process_method, unit, brand, `describe`,warehouseDept, |
|
|
|
engineer,use_num, loss_rate, parent_id, `level`, sort_no, audit_status, use_status, |
|
|
|
instance_id,instance_type,submit_instance_id,cancel_instance_id,restore_instance_id, |
|
|
|
apply_title,apply_user,apply_time from erp_bom |
|
|
@ -79,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<select id="selectErpBomList" parameterType="ErpBomVo" resultMap="ErpBomResult"> |
|
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time |
|
|
|
, erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status |
|
|
|
, erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.engineer, |
|
|
|
, erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, |
|
|
|
erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, |
|
|
|
erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, |
|
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time |
|
|
@ -123,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="brand != null and brand != ''"> and erp.brand = #{brand}</if> |
|
|
|
<if test="describe != null and describe != ''"> and erp.`describe` = #{describe}</if> |
|
|
|
<if test="engineer != null and engineer != ''"> and erp.engineer = #{engineer}</if> |
|
|
|
<if test="warehouseDept != null and warehouseDept != ''"> and erp.warehouseDept = #{warehouseDept}</if> |
|
|
|
<if test="useNum != null "> and erp.use_num = #{useNum}</if> |
|
|
|
<if test="lossRate != null "> and erp.loss_rate = #{lossRate}</if> |
|
|
|
<if test="parentId != null "> and erp.parent_id = #{parentId}</if> |
|
|
@ -152,14 +155,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<select id="selectErpBomList1" resultMap="ErpBomResult"> |
|
|
|
select bom_no, id, create_by, create_time, update_by, update_time, remark, |
|
|
|
material_no, material_name, material_type, process_method, unit, |
|
|
|
brand, `describe`,engineer,use_num, loss_rate, parent_id, `level`, |
|
|
|
brand, `describe`,warehouseDept,engineer,use_num, loss_rate, parent_id, `level`, |
|
|
|
sort_no, audit_status, use_status from erp_bom |
|
|
|
where bom_no != "" ORDER BY id DESC; |
|
|
|
</select> |
|
|
|
<select id="selectErpBomById" parameterType="Long" resultMap="ErpBomResult"> |
|
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, |
|
|
|
erp.remark,erp.bom_no, erp.material_no , erp.material_name, erp.audit_status, erp.use_status, |
|
|
|
erp.material_type, erp.process_method, erp.unit, erp.brand, erp.describe, erp.use_num, erp.engineer, |
|
|
|
erp.material_type, erp.process_method, erp.unit, erp.brand, erp.describe,erp.warehouseDept, |
|
|
|
erp.use_num, erp.engineer, |
|
|
|
erp.loss_rate, erp.parent_id, erp.level, erp.sort_no,erp.instance_id,erp.instance_type, |
|
|
|
erp.submit_instance_id,erp.cancel_instance_id,erp.restore_instance_id,erp.apply_title, |
|
|
|
erp.apply_user,erp.apply_time, |
|
|
@ -192,6 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<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="warehouseDept != null and warehouseDept != ''"> and warehouseDept = #{warehouseDept}</if> |
|
|
|
<if test="engineer != null and engineer != ''"> and engineer = #{engineer}</if> |
|
|
|
<if test="useNum != null "> and use_num = #{useNum}</if> |
|
|
|
<if test="lossRate != null "> and loss_rate = #{lossRate}</if> |
|
|
@ -217,6 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="unit != null and unit != '' ">unit,</if> |
|
|
|
<if test="brand != null and brand != '' ">brand,</if> |
|
|
|
<if test="describe != null and describe != '' ">`describe`,</if> |
|
|
|
<if test="warehouseDept != null and warehouseDept != '' ">warehouseDept,</if> |
|
|
|
<if test="engineer != null and engineer != '' ">engineer,</if> |
|
|
|
<if test="useNum != null">use_num,</if> |
|
|
|
<if test="lossRate != null">loss_rate,</if> |
|
|
@ -247,6 +253,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="unit != null and unit != '' ">#{unit},</if> |
|
|
|
<if test="brand != null and brand != '' ">#{brand},</if> |
|
|
|
<if test="describe != null and describe != '' ">#{describe},</if> |
|
|
|
<if test="warehouseDept != null and warehouseDept != '' ">#{warehouseDept},</if> |
|
|
|
<if test="engineer != null and engineer != '' ">#{engineer},</if> |
|
|
|
<if test="useNum != null">#{useNum},</if> |
|
|
|
<if test="lossRate != null">#{lossRate},</if> |
|
|
@ -281,6 +288,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="unit != null and unit != '' ">unit = #{unit},</if> |
|
|
|
<if test="brand != null and brand != '' ">brand = #{brand},</if> |
|
|
|
<if test="describe != null and describe != '' ">`describe` = #{describe},</if> |
|
|
|
<if test="warehouseDept != null and warehouseDept != '' ">warehouseDept = #{warehouseDept},</if> |
|
|
|
<if test="engineer != null and engineer != '' ">engineer = #{engineer},</if> |
|
|
|
<if test="useNum != null">use_num = #{useNum},</if> |
|
|
|
<if test="lossRate != null">loss_rate = #{lossRate},</if> |
|
|
@ -336,13 +344,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
<insert id="batchErpBom"> |
|
|
|
insert into erp_bom( id, del_flag, create_by, create_time, update_by, update_time, remark, bom_no, material_no, |
|
|
|
material_name, material_type, process_method, unit, brand, `describe`, use_num, loss_rate, |
|
|
|
material_name, material_type, process_method, unit, brand, `describe`,warehouseDept, use_num, loss_rate, |
|
|
|
parent_id, `level`, sort_no, audit_status, use_status) values |
|
|
|
<foreach item="item" index="index" collection="list" separator=","> |
|
|
|
( #{item.id}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, |
|
|
|
#{item.updateBy}, #{item.updateTime}, #{item.remark}, #{item.bomNo}, |
|
|
|
#{item.materialNo}, #{item.materialName}, #{item.materialType}, #{item.processMethod}, |
|
|
|
#{item.unit}, #{item.brand}, #{item.describe}, #{item.useNum}, #{item.lossRate}, |
|
|
|
#{item.unit}, #{item.brand}, #{item.describe},#{item.warehouseDept}, #{item.useNum}, #{item.lossRate}, |
|
|
|
#{item.parentId}, #{item.level}, #{item.sortNo}, #{item.auditStatus}, #{item.useStatus}) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
@ -374,7 +382,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<select id="selectErpBomByMaterialNo" parameterType="String" resultMap="ErpBomResult"> |
|
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, |
|
|
|
erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, |
|
|
|
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.engineer, |
|
|
|
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, |
|
|
|
erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, |
|
|
|
erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, |
|
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, |
|
|
@ -409,7 +417,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<select id="selectSubBomsByParentMaterialNo" parameterType="map" resultMap="ErpBomResult"> |
|
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, |
|
|
|
erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, |
|
|
|
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.engineer, |
|
|
|
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, |
|
|
|
erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, |
|
|
|
erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, |
|
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, |
|
|
@ -448,7 +456,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<select id="selectErpBomByMaterialNos" parameterType="String" resultMap="ErpBomResult"> |
|
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, |
|
|
|
erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, |
|
|
|
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.engineer, |
|
|
|
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, |
|
|
|
erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, |
|
|
|
erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, |
|
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, |
|
|
@ -482,7 +490,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<select id="selectErpBomByParentIds" parameterType="Map" resultMap="ErpBomResult"> |
|
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, |
|
|
|
erp.remark,erp.bom_no,erp.material_no,erp.material_name, erp.audit_status, erp.use_status, |
|
|
|
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.engineer, |
|
|
|
erp.material_type, erp.process_method,erp.unit, erp.brand, erp.`describe`,erp.warehouseDept,erp.engineer, |
|
|
|
erp.use_num,erp.loss_rate, erp.parent_id, erp.`level`, erp.sort_no, erp.instance_id, |
|
|
|
erp.instance_type, processDict.dict_label as instance_type_name, erp.submit_instance_id, |
|
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, |
|
|
|