Browse Source

项目BU修改

master
DouDou 2 years ago
parent
commit
d32777e7ea
  1. 6
      src/main/java/com/spring/modules/part/entity/PartInformationEntity.java
  2. 11
      src/main/java/com/spring/modules/project/data/PlmProjectInfoData.java
  3. 19
      src/main/java/com/spring/modules/project/entity/PlmProjectPart.java
  4. 4
      src/main/resources/mapper/base/BaseMapper.xml
  5. 8
      src/main/resources/mapper/part/PartInformationMapper.xml
  6. 19
      src/main/resources/mapper/project/ProjectDao.xml

6
src/main/java/com/spring/modules/part/entity/PartInformationEntity.java

@ -370,4 +370,10 @@ public class PartInformationEntity extends QueryPage implements Serializable {
*/
@TableField(exist = false)
private String partNoSource;
/*2024-09-25 LR 新增项目物料的 BU字段*/
@TableField(exist = false)
private String buNo;
@TableField(exist = false)
private String buDesc;
}

11
src/main/java/com/spring/modules/project/data/PlmProjectInfoData.java

@ -7,7 +7,7 @@ import org.apache.ibatis.type.Alias;
import java.util.List;
@Alias("PlmProjectInfoData")
public class PlmProjectInfoData extends PlmProjectInfo{
public class PlmProjectInfoData extends PlmProjectInfo {
private String projectType;
private String projectManagerName;
@ -18,7 +18,6 @@ public class PlmProjectInfoData extends PlmProjectInfo{
private String finalCustomerName;
private String priorityDesc;
private String type;
private String buDesc;
private String userRoleName;
private List<String> projectManagerList;
private List<String> projectOwnerList;
@ -148,14 +147,6 @@ public class PlmProjectInfoData extends PlmProjectInfo{
this.userName = userName;
}
public String getBuDesc() {
return buDesc;
}
public void setBuDesc(String buDesc) {
this.buDesc = buDesc;
}
public String getFinalCustomerName() {
return finalCustomerName;
}

19
src/main/java/com/spring/modules/project/entity/PlmProjectPart.java

@ -87,6 +87,9 @@ public class PlmProjectPart extends QueryPage {
// 含税单价
private BigDecimal taxUnitPrice;
//项目物料新增Bu 2024-09-25
private String buNo;
private String buDesc;
public BigDecimal getUnitPrice() {
return unitPrice;
@ -263,5 +266,21 @@ public class PlmProjectPart extends QueryPage {
public void setProductGroupId2(String productGroupId2) {
this.productGroupId2 = productGroupId2;
}
public String getBuNo() {
return buNo;
}
public void setBuNo(String buNo) {
this.buNo = buNo;
}
public String getBuDesc() {
return buDesc;
}
public void setBuDesc(String buDesc) {
this.buDesc = buDesc;
}
}

4
src/main/resources/mapper/base/BaseMapper.xml

@ -184,10 +184,8 @@
,isnull(c.updateFlag,'N') updateFlag,isnull(c.downFlag,'N') downFlag,isnull(c.deleteFlag,'N') deleteFlag,#{username} as username
from plm_project_info a left join AccessSite b on a.site=b.site
left join AccessProject c on a.project_id=c.project_id and c.site=#{site} and c.username=#{username}
left join AccessBu d on a.bu_NO=D.bu_NO AND D.site=#{site}
<where>
and b.UserID=#{username}
and D.username=#{username}
and a.site=#{site}
</where>
order by a.project_id desc
@ -275,8 +273,6 @@
<select id="getUserAccessProjectInfoList" resultType="com.spring.modules.project.data.PlmProjectInfoData">
SELECT
b.site,
b.bu_no,
dbo.plm_get_bu_desc(b.site,b.bu_no) bu_desc,
b.project_id,
b.project_name,
b.status,

8
src/main/resources/mapper/part/PartInformationMapper.xml

@ -1044,9 +1044,9 @@
<!-- 新增项目物料 -->
<insert id="saveProjectPart" parameterType="PartInformationEntity">
insert into plm_project_part
(site, project_id, test_part_no, base_no, rev_no, part_no_source)
(site, project_id, test_part_no, base_no, rev_no, part_no_source,bu_no)
values
(#{site}, #{projectId}, #{partNo}, #{baseNo}, #{revNo}, #{partNoSource})
(#{site}, #{projectId}, #{partNo}, #{baseNo}, #{revNo}, #{partNoSource}, #{buNo})
</insert>
<!-- 修改项目物料finalPart -->
@ -1267,7 +1267,9 @@
a.create_by,
a.update_date,
a.update_by,
d.customer_part_no
d.customer_part_no,
b.bu_no,
dbo.plm_get_bu_desc(b.site,b.bu_no) buDesc
FROM part as a
LEFT JOIN plm_project_part as b on a.site = b.site and a.part_no = b.test_part_no
LEFT JOIN plm_project_info as c on b.site = c.site and b.project_id = c.project_id

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

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

Loading…
Cancel
Save