|
@@ -41,12 +41,11 @@
|
|
|
|
|
|
<select id="findList" resultType="com.jeeplus.modules.projectmaterialstorage.entity.ProjectMaterialStorage" >
|
|
|
SELECT
|
|
|
- a.id,a.material_name,a.price,a.create_date as createDate,r.project_name,sys_area.name as 'areaName',a.project_number as 'projectNumber',a.unit as 'unit',r.project_id as 'projectId',a.create_by as 'createBy.id'
|
|
|
+ a.id,a.material_name,a.price,a.create_date as createDate,r.project_name,sys_area.name as 'areaName',a.project_number as 'projectNumber',a.unit as 'unit',prd.number as 'projectId',a.create_by as 'createBy.id'
|
|
|
FROM project_material_storage a
|
|
|
- left join rural_project_records as r
|
|
|
- on a.project_number = r.id
|
|
|
- LEFT JOIN sys_area
|
|
|
- on sys_area.id = r.area_id
|
|
|
+ left join rural_project_records as r on a.project_number = r.id
|
|
|
+ left join project_report_data as prd on a.project_number = prd.project_id
|
|
|
+ LEFT JOIN sys_area on sys_area.id = r.area_id
|
|
|
<where>
|
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
|
<if test="projectNumber != null and projectNumber != ''">
|
|
@@ -58,6 +57,9 @@
|
|
|
<if test="projectName != null and projectName != ''">
|
|
|
AND r.project_name like concat(concat('%',#{projectName}),'%')
|
|
|
</if>
|
|
|
+ <if test="projectId != null and projectId != ''">
|
|
|
+ AND prd.number like concat(concat('%',#{projectId}),'%')
|
|
|
+ </if>
|
|
|
<if test="materialName != null and materialName != ''">
|
|
|
AND a.material_name like concat(concat('%',#{materialName}),'%')
|
|
|
</if>
|
|
@@ -217,6 +219,7 @@
|
|
|
on a.project_number = r.id
|
|
|
LEFT JOIN sys_area
|
|
|
on sys_area.id = r.area_id
|
|
|
+ left join project_report_data as prd on a.project_number = prd.project_id
|
|
|
<where>
|
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
|
<if test="projectNumber != null and projectNumber != ''">
|
|
@@ -228,6 +231,9 @@
|
|
|
<if test="projectName != null and projectName != ''">
|
|
|
AND r.project_name like concat(concat('%',#{projectName}),'%')
|
|
|
</if>
|
|
|
+ <if test="projectId != null and projectId != ''">
|
|
|
+ AND prd.number like concat(concat('%',#{projectId}),'%')
|
|
|
+ </if>
|
|
|
<if test="materialName != null and materialName != ''">
|
|
|
AND a.material_name like concat(concat('%',#{materialName}),'%')
|
|
|
</if>
|