From e0cb3db06d484e979cda82c5888a90c632af460c Mon Sep 17 00:00:00 2001
From: liuxm <liuxm_a@163.com>
Date: 星期三, 29 五月 2024 08:59:52 +0800
Subject: [PATCH] 生产流程添加创建人名称
---
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionProcess.java | 2 ++
pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml | 7 ++++++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionProcess.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionProcess.java
index 0cca70a..6615bc6 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionProcess.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionProcess.java
@@ -51,6 +51,8 @@
*/
@JSONField(serializeUsing= ObjectWriterImplToString.class)
public Long creator;
+ @TableField(exist = false)
+ public String creatorName;
/**
* 鍒涘缓鏃堕棿
diff --git a/pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml
index e8dfbc1..588e6d3 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml
@@ -15,6 +15,8 @@
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<association property="proName" column="pro_id" javaType="java.lang.Long"
select="selectProNameById" fetchType="eager" />
+ <association property="creatorName" column="creator" javaType="java.lang.Long"
+ select="selectNameByUserId" fetchType="eager" />
<collection property="nodes" ofType="com.dy.pmsGlobal.pojoPr.PrProductionNode"
select="selectByProcess" fetchType="eager" column="id" />
</resultMap>
@@ -26,7 +28,10 @@
</sql>
<select id="selectProNameById" parameterType="java.lang.Long" resultType="java.lang.String">
- select name proName from plt_product where id=#{id}
+ select name proName from plt_product where id=#{creator}
+ </select>
+ <select id="selectNameByUserId" parameterType="java.lang.Long" resultType="java.lang.String">
+ select name from ba_user where id=#{id}
</select>
<select id="selectByProcess" resultMap="com.dy.pmsGlobal.daoPr.PrProductionNodeMapper.BaseResultMap">
select *
--
Gitblit v1.8.0