|
@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="processMethod" column="process_method" /> |
|
|
<result property="processMethod" column="process_method" /> |
|
|
<result property="engineer" column="engineer" /> |
|
|
<result property="engineer" column="engineer" /> |
|
|
<result property="unit" column="unit" /> |
|
|
<result property="unit" column="unit" /> |
|
|
|
|
|
<result property="materialModel" column="material_model" /> |
|
|
<result property="brand" column="brand" /> |
|
|
<result property="brand" column="brand" /> |
|
|
<result property="describe" column="describe" /> |
|
|
<result property="describe" column="describe" /> |
|
|
<result property="warehouseDept" column="warehouseDept" /> |
|
|
<result property="warehouseDept" column="warehouseDept" /> |
|
@ -58,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="processMethod" column="sub_process_method" /> |
|
|
<result property="processMethod" column="sub_process_method" /> |
|
|
<result property="engineer" column="sub_engineer" /> |
|
|
<result property="engineer" column="sub_engineer" /> |
|
|
<result property="unit" column="sub_unit" /> |
|
|
<result property="unit" column="sub_unit" /> |
|
|
|
|
|
<result property="materialModel" column="sub_material_model" /> |
|
|
<result property="brand" column="sub_brand" /> |
|
|
<result property="brand" column="sub_brand" /> |
|
|
<result property="describe" column="sub_describe" /> |
|
|
<result property="describe" column="sub_describe" /> |
|
|
<result property="warehouseDept" column="sub_warehouseDept" /> |
|
|
<result property="warehouseDept" column="sub_warehouseDept" /> |
|
@ -72,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
|
<sql id="selectErpBomVo"> |
|
|
<sql id="selectErpBomVo"> |
|
|
select id, del_flag, create_by, create_time, update_by, update_time, remark, bom_no, |
|
|
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`,warehouseDept, |
|
|
material_no, material_name, material_type, process_method, unit, material_model, brand, `describe`,warehouseDept, |
|
|
engineer,use_num, loss_rate, parent_id, `level`, sort_no, audit_status, use_status, |
|
|
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, |
|
|
instance_id,instance_type,submit_instance_id,cancel_instance_id,restore_instance_id, |
|
|
apply_title,apply_user,apply_time from erp_bom |
|
|
apply_title,apply_user,apply_time from erp_bom |
|
@ -81,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<select id="selectErpBomList" parameterType="ErpBomVo" resultMap="ErpBomResult"> |
|
|
<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 |
|
|
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.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.warehouseDept,erp.engineer, |
|
|
, erp.material_type, erp.process_method,erp.unit, erp.material_model, 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.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.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 |
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time |
|
@ -155,7 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
</select> |
|
|
</select> |
|
|
<select id="selectErpBomList1" resultMap="ErpBomResult"> |
|
|
<select id="selectErpBomList1" resultMap="ErpBomResult"> |
|
|
select bom_no, id, create_by, create_time, update_by, update_time, remark, |
|
|
select bom_no, id, create_by, create_time, update_by, update_time, remark, |
|
|
material_no, material_name, material_type, process_method, unit, |
|
|
material_no, material_name, material_type, process_method, unit, material_model, |
|
|
brand, `describe`,warehouseDept,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 |
|
|
sort_no, audit_status, use_status from erp_bom |
|
|
where bom_no != "" ORDER BY id DESC; |
|
|
where bom_no != "" ORDER BY id DESC; |
|
@ -163,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<select id="selectErpBomById" parameterType="Long" resultMap="ErpBomResult"> |
|
|
<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, |
|
|
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.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.warehouseDept, |
|
|
erp.material_type, erp.process_method, erp.unit, erp.material_model, erp.brand, erp.describe,erp.warehouseDept, |
|
|
erp.use_num, erp.engineer, |
|
|
erp.use_num, erp.engineer, |
|
|
erp.loss_rate, erp.parent_id, erp.level, erp.sort_no,erp.instance_id,erp.instance_type, |
|
|
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.submit_instance_id,erp.cancel_instance_id,erp.restore_instance_id,erp.apply_title, |
|
@ -255,6 +257,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="materialType != null and materialType != '' ">material_type,</if> |
|
|
<if test="materialType != null and materialType != '' ">material_type,</if> |
|
|
<if test="processMethod != null and processMethod != '' ">process_method,</if> |
|
|
<if test="processMethod != null and processMethod != '' ">process_method,</if> |
|
|
<if test="unit != null and unit != '' ">unit,</if> |
|
|
<if test="unit != null and unit != '' ">unit,</if> |
|
|
|
|
|
<if test="materialModel != null">material_model,</if> |
|
|
<if test="brand != null and brand != '' ">brand,</if> |
|
|
<if test="brand != null and brand != '' ">brand,</if> |
|
|
<if test="describe != null and describe != '' ">`describe`,</if> |
|
|
<if test="describe != null and describe != '' ">`describe`,</if> |
|
|
<if test="warehouseDept != null and warehouseDept != '' ">warehouseDept,</if> |
|
|
<if test="warehouseDept != null and warehouseDept != '' ">warehouseDept,</if> |
|
@ -286,6 +289,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="materialType != null and materialType != '' ">#{materialType},</if> |
|
|
<if test="materialType != null and materialType != '' ">#{materialType},</if> |
|
|
<if test="processMethod != null and processMethod != '' ">#{processMethod},</if> |
|
|
<if test="processMethod != null and processMethod != '' ">#{processMethod},</if> |
|
|
<if test="unit != null and unit != '' ">#{unit},</if> |
|
|
<if test="unit != null and unit != '' ">#{unit},</if> |
|
|
|
|
|
<if test="materialModel != null">#{materialModel},</if> |
|
|
<if test="brand != null and brand != '' ">#{brand},</if> |
|
|
<if test="brand != null and brand != '' ">#{brand},</if> |
|
|
<if test="describe != null and describe != '' ">#{describe},</if> |
|
|
<if test="describe != null and describe != '' ">#{describe},</if> |
|
|
<if test="warehouseDept != null and warehouseDept != '' ">#{warehouseDept},</if> |
|
|
<if test="warehouseDept != null and warehouseDept != '' ">#{warehouseDept},</if> |
|
@ -321,6 +325,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="materialType != null and materialType != '' ">material_type = #{materialType},</if> |
|
|
<if test="materialType != null and materialType != '' ">material_type = #{materialType},</if> |
|
|
<if test="processMethod != null and processMethod != '' ">process_method = #{processMethod},</if> |
|
|
<if test="processMethod != null and processMethod != '' ">process_method = #{processMethod},</if> |
|
|
<if test="unit != null and unit != '' ">unit = #{unit},</if> |
|
|
<if test="unit != null and unit != '' ">unit = #{unit},</if> |
|
|
|
|
|
<if test="materialModel != null">material_model = #{materialModel},</if> |
|
|
<if test="brand != null and brand != '' ">brand = #{brand},</if> |
|
|
<if test="brand != null and brand != '' ">brand = #{brand},</if> |
|
|
<if test="describe != null and describe != '' ">`describe` = #{describe},</if> |
|
|
<if test="describe != null and describe != '' ">`describe` = #{describe},</if> |
|
|
<if test="warehouseDept != null and warehouseDept != '' ">warehouseDept = #{warehouseDept},</if> |
|
|
<if test="warehouseDept != null and warehouseDept != '' ">warehouseDept = #{warehouseDept},</if> |
|
@ -379,7 +384,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
|
<insert id="batchErpBom"> |
|
|
<insert id="batchErpBom"> |
|
|
insert into erp_bom( id, del_flag, create_by, create_time, update_by, update_time, remark, bom_no, material_no, |
|
|
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`,warehouseDept, use_num, loss_rate, |
|
|
material_name, material_type, process_method, unit, material_model, brand, `describe`,warehouseDept, use_num, loss_rate, |
|
|
parent_id, `level`, sort_no, audit_status, use_status) values |
|
|
parent_id, `level`, sort_no, audit_status, use_status) values |
|
|
<foreach item="item" index="index" collection="list" separator=","> |
|
|
<foreach item="item" index="index" collection="list" separator=","> |
|
|
( #{item.id}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, |
|
|
( #{item.id}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, |
|
@ -418,7 +423,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<select id="selectErpBomByMaterialNo" parameterType="String" resultMap="ErpBomResult"> |
|
|
<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, |
|
|
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.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.warehouseDept,erp.engineer, |
|
|
erp.material_type, erp.process_method,erp.unit, erp.material_model, 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.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.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, |
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, |
|
@ -453,7 +458,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<select id="selectSubBomsByParentMaterialNo" parameterType="map" resultMap="ErpBomResult"> |
|
|
<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, |
|
|
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.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.warehouseDept,erp.engineer, |
|
|
erp.material_type, erp.process_method,erp.unit, erp.material_model, 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.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.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, |
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, |
|
@ -492,7 +497,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<select id="selectErpBomByMaterialNos" parameterType="String" resultMap="ErpBomResult"> |
|
|
<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, |
|
|
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.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.warehouseDept,erp.engineer, |
|
|
erp.material_type, erp.process_method,erp.unit, erp.material_model, 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.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.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, |
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, |
|
@ -526,7 +531,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<select id="selectErpBomByParentIds" parameterType="Map" resultMap="ErpBomResult"> |
|
|
<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, |
|
|
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.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.warehouseDept,erp.engineer, |
|
|
erp.material_type, erp.process_method,erp.unit, erp.material_model, 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.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.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, |
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, |
|
@ -560,7 +565,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<select id="selectErpBomListByBomNos" parameterType="String" resultMap="ErpBomResult"> |
|
|
<select id="selectErpBomListByBomNos" parameterType="String" resultMap="ErpBomResult"> |
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, |
|
|
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.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.warehouseDept,erp.engineer, |
|
|
erp.material_type, erp.process_method,erp.unit, erp.material_model, 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.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.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, |
|
|
erp.cancel_instance_id, erp.restore_instance_id,erp.apply_title,erp.apply_user,erp.apply_time, |
|
|