|
|
|
@ -9,7 +9,7 @@ |
|
|
|
,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,bu_no,dbo.plm_get_bu_desc(site,bu_no) buDesc,parent_project_no, |
|
|
|
dbo.get_projectUserRoleName(site,project_id) userRoleName,parent_project_no, |
|
|
|
final_customer_id,dbo.plm_get_customer_desc(site,final_customer_id) finalCustomerName |
|
|
|
FROM plm_project_info |
|
|
|
<where> |
|
|
|
@ -35,7 +35,7 @@ |
|
|
|
,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,bu_no,dbo.plm_get_bu_desc(site,bu_no) buDesc,parent_project_no, |
|
|
|
dbo.get_projectUserRoleName(site,project_id) userRoleName,parent_project_no, |
|
|
|
final_customer_id,dbo.plm_get_customer_desc(site,final_customer_id) finalCustomerName |
|
|
|
FROM plm_project_info |
|
|
|
<where> |
|
|
|
@ -56,7 +56,6 @@ |
|
|
|
</if> |
|
|
|
<if test="query.userName != null and query.userName != '' and query.userName != 'admin'"> |
|
|
|
AND project_id in ( select project_id from AccessProject where site=#{query.site} and username=#{query.userName} and searchFlag='Y' ) |
|
|
|
AND bu_no in ( select bu_no from AccessBu where site=#{query.site} and username=#{query.userName}) |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
order by LEFT(project_id, CHARINDEX('-', project_id + '-') - 1) desc |
|
|
|
@ -68,7 +67,7 @@ |
|
|
|
,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,bu_no,dbo.plm_get_bu_desc(site,bu_no) buDesc,parent_project_no |
|
|
|
dbo.get_projectUserRoleName(site,project_id) userRoleName,parent_project_no |
|
|
|
FROM plm_project_info where id=#{id} |
|
|
|
</select> |
|
|
|
|
|
|
|
@ -122,16 +121,16 @@ |
|
|
|
<insert id="saveProjectInfo"> |
|
|
|
insert into plm_project_info |
|
|
|
(project_id,ori_project_id,project_type_db,project_name,status,project_source,customer_id,create_by, |
|
|
|
create_date,priority,site,project_desc,customer_remark,remark,need_date,bu_no,parent_project_no,final_customer_id) values |
|
|
|
create_date,priority,site,project_desc,customer_remark,remark,need_date,parent_project_no,final_customer_id) values |
|
|
|
(#{projectId},#{projectId},#{projectTypeDb},#{projectName},#{status},#{projectSource},#{customerId}, |
|
|
|
#{createBy},GetDate(),#{priority},#{site},#{projectDesc},#{customerRemark},#{remark},#{needDate},#{buNo},#{parentProjectNo} |
|
|
|
#{createBy},GetDate(),#{priority},#{site},#{projectDesc},#{customerRemark},#{remark},#{needDate},#{parentProjectNo} |
|
|
|
,#{finalCustomerId}) |
|
|
|
|
|
|
|
</insert> |
|
|
|
<update id="updateProjectInfo"> |
|
|
|
update plm_project_info set project_type_db=#{projectTypeDb},project_name=#{projectName},project_source=#{projectSource},status=#{status}, |
|
|
|
customer_id=#{customerId},priority=#{priority},project_desc=#{projectDesc},customer_remark=#{customerRemark},remark=#{remark},need_date=#{needDate}, |
|
|
|
update_by=#{updateBy},update_date=GetDate(),bu_no=#{buNo},parent_project_no = #{parentProjectNo},final_customer_id=#{finalCustomerId} |
|
|
|
update_by=#{updateBy},update_date=GetDate(),parent_project_no = #{parentProjectNo},final_customer_id=#{finalCustomerId} |
|
|
|
where id=#{id} |
|
|
|
</update> |
|
|
|
<delete id="deletePlmProjectTeam"> |
|
|
|
@ -281,7 +280,9 @@ |
|
|
|
a.final_part_no, |
|
|
|
a.part_no_source, |
|
|
|
a.unit_price, |
|
|
|
a.tax_unit_price |
|
|
|
a.tax_unit_price, |
|
|
|
a.bu_no, |
|
|
|
dbo.plm_get_bu_desc(a.site,a.bu_no) buDesc |
|
|
|
from plm_project_part as a |
|
|
|
LEFT JOIN part as b on a.site = b.site and a.test_part_no = b.part_no |
|
|
|
left join plm_project_info as c on a.site = c.site and a.project_id = c.project_id |
|
|
|
@ -473,7 +474,7 @@ |
|
|
|
|
|
|
|
<select id="getProjectData" resultType="com.spring.modules.project.entity.PlmProjectInfo"> |
|
|
|
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,need_date,bu_no,parent_project_no,final_customer_id |
|
|
|
update_by,update_date,priority,site,id,project_desc,customer_remark,remark,need_date,parent_project_no,final_customer_id |
|
|
|
from plm_project_info where site=#{site} and project_id=#{projectId} |
|
|
|
</select> |
|
|
|
|
|
|
|
|