Browse Source

2025/7/10

master
Aoi_Tori 6 months ago
parent
commit
a8ef32fdd0
  1. 5
      src/main/java/com/spring/modules/project/controller/ProjectController.java
  2. 3
      src/main/java/com/spring/modules/project/dao/ProjectDao.java
  3. 3
      src/main/java/com/spring/modules/project/service/ProjectService.java
  4. 5
      src/main/java/com/spring/modules/project/service/impl/ProjectServiceImpl.java
  5. 82
      src/main/resources/mapper/project/ProjectDao.xml

5
src/main/java/com/spring/modules/project/controller/ProjectController.java

@ -64,8 +64,9 @@ public class ProjectController {
public R searchProjectInfoList(String site,
String projectId,
String projectName,
String customerId){
List<PlmProjectInfoData> rows = projectService.projectInfoListSearch(site,projectId,projectName,customerId);
String customerId,
String testPartNo){
List<PlmProjectInfoData> rows = projectService.projectInfoListSearch(site,projectId,projectName,customerId, testPartNo);
return R.ok().put("rows",rows);
}

3
src/main/java/com/spring/modules/project/dao/ProjectDao.java

@ -40,7 +40,8 @@ public interface ProjectDao extends BaseMapper<PlmProjectInfo> {
List<PlmProjectInfoData> selectProjectInfoList( @Param("site")String site,
@Param("projectId")String projectId,
@Param("projectName")String projectName,
@Param("customerId")String customerId);
@Param("customerId")String customerId,
@Param("testPartNo")String testPartNo);
PlmProjectInfoData checkPlmProjectInfoData(PlmProjectInfoData inData);
/**

3
src/main/java/com/spring/modules/project/service/ProjectService.java

@ -36,7 +36,8 @@ public interface ProjectService {
List<PlmProjectInfoData> projectInfoListSearch(String site,
String projectId,
String projectName,
String customerId);
String customerId,
String testPartNo);
/**
* @Description TODO

5
src/main/java/com/spring/modules/project/service/impl/ProjectServiceImpl.java

@ -119,7 +119,8 @@ public class ProjectServiceImpl implements ProjectService {
public List<PlmProjectInfoData> projectInfoListSearch(String site,
String projectId,
String projectName,
String customerId){
String customerId,
String testPartNo){
// SysUserEntity user = (SysUserEntity)SecurityUtils.getSubject().getPrincipal();
// List<Long> list = sysRoleService.findRoleIdByUsername(user.getUsername(),1);
@ -128,7 +129,7 @@ public class ProjectServiceImpl implements ProjectService {
// if (!list.isEmpty()){
//
// }
return projectDao.selectProjectInfoList(site,projectId,projectName,customerId);
return projectDao.selectProjectInfoList(site,projectId,projectName,customerId,testPartNo);
}
@Override

82
src/main/resources/mapper/project/ProjectDao.xml

@ -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>-->

Loading…
Cancel
Save