|
@ -28,22 +28,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="photoAttachId" column="photo_attach_id" /> |
|
|
<result property="photoAttachId" column="photo_attach_id" /> |
|
|
<result property="photoUrl" column="photo_url" /> |
|
|
<result property="photoUrl" column="photo_url" /> |
|
|
<result property="instanceId" column="instance_id" /> |
|
|
<result property="instanceId" column="instance_id" /> |
|
|
|
|
|
<result property="instanceType" column="instance_type" /> |
|
|
|
|
|
<result property="instanceTypeName" column="instance_type_name" /> |
|
|
|
|
|
<result property="submitInstanceId" column="submit_instance_id" /> |
|
|
|
|
|
<result property="cancelInstanceId" column="cancel_instance_id" /> |
|
|
|
|
|
<result property="restoreInstanceId" column="restore_instance_id" /> |
|
|
<result property="applyTitle" column="apply_title" /> |
|
|
<result property="applyTitle" column="apply_title" /> |
|
|
<result property="applyUser" column="apply_user" /> |
|
|
<result property="applyUser" column="apply_user" /> |
|
|
<result property="applyTime" column="apply_time" /> |
|
|
<result property="applyTime" column="apply_time" /> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<sql id="selectErpMaterialVo"> |
|
|
<sql id="selectErpMaterialVo"> |
|
|
select id, del_flag, create_by, create_time, update_by, update_time, remark,bomNo, material_no, material_name, audit_status, use_status, hava_product_tem,product_item,itemName, material_type, process_method, unit, brand, `describe`, warehouse_dept,instance_id,apply_title,apply_user,apply_time from erp_material |
|
|
select id, del_flag, create_by, create_time, update_by, update_time, remark,bomNo, material_no, material_name, audit_status, use_status, hava_product_tem,product_item,itemName, material_type, process_method, unit, brand, `describe`, warehouse_dept,instance_id,instance_type,submit_instance_id,cancel_instance_id,restore_instance_id,apply_title,apply_user,apply_time from erp_material |
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
|
<select id="selectErpMaterialList" parameterType="ErpMaterialVo" resultMap="ErpMaterialResult"> |
|
|
<select id="selectErpMaterialList" parameterType="ErpMaterialVo" resultMap="ErpMaterialResult"> |
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bomNo, erp.material_no |
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bomNo, erp.material_no |
|
|
, erp.material_name, erp.audit_status, erp.use_status, erp.hava_product_tem, erp.product_item,erp.`itemName`, erp.material_type, erp.process_method |
|
|
, erp.material_name, erp.audit_status, erp.use_status, erp.hava_product_tem, erp.product_item,erp.`itemName`, erp.material_type, erp.process_method |
|
|
, erp.unit, erp.brand, erp.`describe`, erp.warehouse_dept |
|
|
, erp.unit, erp.brand, erp.`describe`, erp.warehouse_dept |
|
|
,erp.instance_id,erp.apply_title,erp.apply_user,erp.apply_time |
|
|
,erp.instance_id,erp.instance_type,process_type_dict.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 |
|
|
,file.url as photo_url |
|
|
,file.url as photo_url |
|
|
from erp_material as erp |
|
|
from erp_material erp |
|
|
|
|
|
left join( |
|
|
|
|
|
select dict_value,dict_label from sys_dict_data |
|
|
|
|
|
where dict_type = 'processType' |
|
|
|
|
|
)process_type_dict |
|
|
|
|
|
on erp.instance_type = process_type_dict.dict_value |
|
|
left join ( |
|
|
left join ( |
|
|
select |
|
|
select |
|
|
att.rel_id |
|
|
att.rel_id |
|
@ -75,6 +85,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="describe != null and describe != ''"> and erp.`describe` = #{describe}</if> |
|
|
<if test="describe != null and describe != ''"> and erp.`describe` = #{describe}</if> |
|
|
<if test="warehouseDept != null and warehouseDept != ''"> and erp.warehouse_dept = #{warehouseDept}</if> |
|
|
<if test="warehouseDept != null and warehouseDept != ''"> and erp.warehouse_dept = #{warehouseDept}</if> |
|
|
<if test="instanceId != null and instanceId != ''"> and erp.instance_id = #{instanceId}</if> |
|
|
<if test="instanceId != null and instanceId != ''"> and erp.instance_id = #{instanceId}</if> |
|
|
|
|
|
<if test="instanceType != null and instanceType != ''"> and erp.instance_type = #{instanceType}</if> |
|
|
|
|
|
<if test="submitInstanceId != null and submitInstanceId != ''"> and erp.submit_instance_id = #{submitInstanceId}</if> |
|
|
|
|
|
<if test="cancelInstanceId != null and cancelInstanceId != ''"> and erp.cancel_instance_id = #{cancelInstanceId}</if> |
|
|
|
|
|
<if test="restoreInstanceId != null and restoreInstanceId != ''"> and erp.restore_instance_id = #{restoreInstanceId}</if> |
|
|
<if test="applyTitle != null and applyTitle != ''"> and erp.apply_title = #{applyTitle}</if> |
|
|
<if test="applyTitle != null and applyTitle != ''"> and erp.apply_title = #{applyTitle}</if> |
|
|
<if test="applyUser != null and applyUser != ''"> and erp.apply_user = #{applyUser}</if> |
|
|
<if test="applyUser != null and applyUser != ''"> and erp.apply_user = #{applyUser}</if> |
|
|
<if test="applyTime != null "> and erp.apply_time = #{applyTime}</if> |
|
|
<if test="applyTime != null "> and erp.apply_time = #{applyTime}</if> |
|
@ -86,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bomNo, erp.material_no |
|
|
select erp.id, erp.del_flag, erp.create_by, erp.create_time, erp.update_by, erp.update_time, erp.remark,erp.bomNo, erp.material_no |
|
|
, erp.material_name, erp.audit_status, erp.use_status, erp.hava_product_tem,erp.product_item,erp.itemName, erp.material_type |
|
|
, erp.material_name, erp.audit_status, erp.use_status, erp.hava_product_tem,erp.product_item,erp.itemName, erp.material_type |
|
|
, erp.process_method, erp.unit, erp.brand, erp.describe, erp.warehouse_dept |
|
|
, erp.process_method, erp.unit, erp.brand, erp.describe, erp.warehouse_dept |
|
|
,erp.instance_id,erp.apply_title,erp.apply_user,erp.apply_time |
|
|
,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 |
|
|
,att.id as photo_attach_id |
|
|
,att.id as photo_attach_id |
|
|
from erp_material erp |
|
|
from erp_material erp |
|
|
left join sys_attach att |
|
|
left join sys_attach att |
|
@ -119,6 +133,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="auditStatus != null">audit_status,</if> |
|
|
<if test="auditStatus != null">audit_status,</if> |
|
|
<if test="useStatus != null">use_status,</if> |
|
|
<if test="useStatus != null">use_status,</if> |
|
|
<if test="instanceId != null">instance_id,</if> |
|
|
<if test="instanceId != null">instance_id,</if> |
|
|
|
|
|
<if test="instanceType != null">instance_type,</if> |
|
|
|
|
|
<if test="submitInstanceId != null">submit_instance_id,</if> |
|
|
|
|
|
<if test="cancelInstanceId != null">cancel_instance_id,</if> |
|
|
|
|
|
<if test="restoreInstanceId != null">restore_instance_id,</if> |
|
|
<if test="applyTitle != null">apply_title,</if> |
|
|
<if test="applyTitle != null">apply_title,</if> |
|
|
<if test="applyUser != null">apply_user,</if> |
|
|
<if test="applyUser != null">apply_user,</if> |
|
|
<if test="applyTime != null">apply_time,</if> |
|
|
<if test="applyTime != null">apply_time,</if> |
|
@ -145,6 +163,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="auditStatus != null">#{auditStatus},</if> |
|
|
<if test="auditStatus != null">#{auditStatus},</if> |
|
|
<if test="useStatus != null">#{useStatus},</if> |
|
|
<if test="useStatus != null">#{useStatus},</if> |
|
|
<if test="instanceId != null">#{instanceId},</if> |
|
|
<if test="instanceId != null">#{instanceId},</if> |
|
|
|
|
|
<if test="instanceType != null">#{instanceType},</if> |
|
|
|
|
|
<if test="submitInstanceId != null">#{submitInstanceId},</if> |
|
|
|
|
|
<if test="cancelInstanceId != null">#{cancelInstanceId},</if> |
|
|
|
|
|
<if test="restoreInstanceId != null">#{restoreInstanceId},</if> |
|
|
<if test="applyTitle != null">#{applyTitle},</if> |
|
|
<if test="applyTitle != null">#{applyTitle},</if> |
|
|
<if test="applyUser != null">#{applyUser},</if> |
|
|
<if test="applyUser != null">#{applyUser},</if> |
|
|
<if test="applyTime != null">#{applyTime},</if> |
|
|
<if test="applyTime != null">#{applyTime},</if> |
|
@ -177,6 +199,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="describe != null">`describe` = #{describe},</if> |
|
|
<if test="describe != null">`describe` = #{describe},</if> |
|
|
<if test="warehouseDept != null">warehouse_dept = #{warehouseDept},</if> |
|
|
<if test="warehouseDept != null">warehouse_dept = #{warehouseDept},</if> |
|
|
<if test="instanceId != null">instance_id = #{instanceId},</if> |
|
|
<if test="instanceId != null">instance_id = #{instanceId},</if> |
|
|
|
|
|
<if test="instanceType != null">instance_type = #{instanceType},</if> |
|
|
|
|
|
<if test="submitInstanceId != null">submit_instance_id = #{submitInstanceId},</if> |
|
|
|
|
|
<if test="cancelInstanceId != null">cancel_instance_id = #{cancelInstanceId},</if> |
|
|
|
|
|
<if test="restoreInstanceId != null">restore_instance_id = #{restoreInstanceId},</if> |
|
|
<if test="applyTitle != null">apply_title = #{applyTitle},</if> |
|
|
<if test="applyTitle != null">apply_title = #{applyTitle},</if> |
|
|
<if test="applyUser != null">apply_user = #{applyUser},</if> |
|
|
<if test="applyUser != null">apply_user = #{applyUser},</if> |
|
|
<if test="applyTime != null">apply_time = #{applyTime},</if> |
|
|
<if test="applyTime != null">apply_time = #{applyTime},</if> |
|
|