|
|
|
@ -4,52 +4,58 @@ |
|
|
|
<mapper namespace="com.spring.modules.project.dao.ProjectDao"> |
|
|
|
|
|
|
|
<select id="selectProjectInfoList" resultType="PlmProjectInfoData"> |
|
|
|
SELECT project_id, |
|
|
|
ori_project_id, |
|
|
|
project_type_db, |
|
|
|
project_name, |
|
|
|
status, |
|
|
|
project_source, |
|
|
|
customer_id, |
|
|
|
create_by, |
|
|
|
create_date, |
|
|
|
update_by, |
|
|
|
update_date, |
|
|
|
priority, |
|
|
|
site, |
|
|
|
id, |
|
|
|
project_desc, |
|
|
|
customer_remark, |
|
|
|
remark, |
|
|
|
dbo.get_projectTeamName(site, project_id, 'owner') projectOwnerName, |
|
|
|
dbo.get_projectTeamName(site, project_id, 'manager') ProjectManagerName, |
|
|
|
dbo.plm_get_dictDataLabel('project_info_type_db', project_type_db, site) projectType, |
|
|
|
dbo.plm_get_projectBaseDesc(status, 'project_status') projectStatusDesc, |
|
|
|
dbo.plm_get_dictDataLabel('project_info_source', project_source, site) projectSourceDesc, |
|
|
|
dbo.plm_get_customer_desc(site, customer_id) customerName, |
|
|
|
dbo.plm_get_dictDataLabel('project_info_priority', priority, site) priorityDesc, |
|
|
|
need_date, |
|
|
|
dbo.get_projectUserRoleName(site, project_id) userRoleName, |
|
|
|
parent_project_no, |
|
|
|
final_customer_id, |
|
|
|
dbo.plm_get_dictDataLabel('finalCustomer', final_customer_id, site) finalCustomerName, |
|
|
|
productSet |
|
|
|
FROM plm_project_info |
|
|
|
SELECT a.project_id, |
|
|
|
a.ori_project_id, |
|
|
|
a.project_type_db, |
|
|
|
a.project_name, |
|
|
|
a.status, |
|
|
|
a.project_source, |
|
|
|
a.customer_id, |
|
|
|
a.create_by, |
|
|
|
a.create_date, |
|
|
|
a.update_by, |
|
|
|
a.update_date, |
|
|
|
a.priority, |
|
|
|
a.site, |
|
|
|
a.id, |
|
|
|
a.project_desc, |
|
|
|
a.customer_remark, |
|
|
|
a.remark, |
|
|
|
dbo.get_projectTeamName(a.site, a.project_id, 'owner') projectOwnerName, |
|
|
|
dbo.get_projectTeamName(a.site, a.project_id, 'manager') ProjectManagerName, |
|
|
|
dbo.plm_get_dictDataLabel('project_info_type_db', a.project_type_db, a.site) projectType, |
|
|
|
dbo.plm_get_projectBaseDesc(a.status, 'project_status') projectStatusDesc, |
|
|
|
dbo.plm_get_dictDataLabel('project_info_source', a.project_source, a.site) projectSourceDesc, |
|
|
|
dbo.plm_get_customer_desc(a.site, a.customer_id) customerName, |
|
|
|
dbo.plm_get_dictDataLabel('project_info_priority', a.priority, a.site) priorityDesc, |
|
|
|
a.need_date, |
|
|
|
dbo.get_projectUserRoleName(a.site, a.project_id) userRoleName, |
|
|
|
a.parent_project_no, |
|
|
|
a.final_customer_id, |
|
|
|
dbo.plm_get_dictDataLabel('finalCustomer', a.final_customer_id, a.site) finalCustomerName, |
|
|
|
a.productSet |
|
|
|
FROM plm_project_info as a |
|
|
|
<if test="testPartNo != null and testPartNo != ''"> |
|
|
|
left outer join view_Project_Part as b on a.project_id = b.project_id and a.site = b.site |
|
|
|
</if> |
|
|
|
<where> |
|
|
|
<if test="site != null and site != ''"> |
|
|
|
AND site = #{site} |
|
|
|
AND a.site = #{site} |
|
|
|
</if> |
|
|
|
<if test="projectId != null and projectId != ''"> |
|
|
|
AND project_id like #{projectId} |
|
|
|
AND a.project_id like #{projectId} |
|
|
|
</if> |
|
|
|
<if test="projectName != null and projectName != ''"> |
|
|
|
AND project_name like #{projectName} |
|
|
|
AND a.project_name like #{projectName} |
|
|
|
</if> |
|
|
|
<if test="customerId != null and customerId != ''"> |
|
|
|
AND customer_id like #{customerId} |
|
|
|
AND a.customer_id like #{customerId} |
|
|
|
</if> |
|
|
|
<if test="testPartNo != null and testPartNo != ''"> |
|
|
|
AND b.test_part_no like #{testPartNo} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
order by LEFT(project_id, CHARINDEX('-', project_id + '-') - 1) desc |
|
|
|
order by LEFT(a.project_id, CHARINDEX('-', a.project_id + '-') - 1) desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="projectInfoSearch" parameterType="PlmProjectInfoData" resultType="PlmProjectInfoData"> |
|
|
|
@ -104,9 +110,9 @@ |
|
|
|
<if test="query.projectType != null and query.projectType != ''"> |
|
|
|
AND plm_project_info.project_type_db like #{query.projectType} |
|
|
|
</if> |
|
|
|
<if test="query.projectOwnerName != null and query.projectOwnerName != ''"> |
|
|
|
<!-- <if test="query.projectOwnerName != null and query.projectOwnerName != ''"> |
|
|
|
AND dbo.get_projectTeamName(site,project_id,'owner') like #{query.projectOwnerName} |
|
|
|
</if> |
|
|
|
</if>--> |
|
|
|
<!-- <if test="query.roleId != 1">--> |
|
|
|
<!-- AND project_id in ( select project_id from AccessProject where site=#{query.site} and username=#{query.userName} and searchFlag='Y' )--> |
|
|
|
<!-- </if>--> |
|
|
|
|