Commit 725c3f9d by bajianlin

加分公司名称,中心相关字段

parent 1f5f6de8
...@@ -17,6 +17,8 @@ public class PersonnelPageDTO { ...@@ -17,6 +17,8 @@ public class PersonnelPageDTO {
private String username; private String username;
@ApiModelProperty(value = "部门id") @ApiModelProperty(value = "部门id")
private String department; private String department;
@ApiModelProperty(value = "部门名称")
private String departmentname;
@ApiModelProperty(value = "派驻标识") @ApiModelProperty(value = "派驻标识")
private String paizhu; private String paizhu;
@ApiModelProperty(value = "职位") @ApiModelProperty(value = "职位")
...@@ -84,6 +86,9 @@ public class PersonnelPageDTO { ...@@ -84,6 +86,9 @@ public class PersonnelPageDTO {
@ApiModelProperty(value = "分公司ID") @ApiModelProperty(value = "分公司ID")
private String branchCompanyId; private String branchCompanyId;
@ApiModelProperty(value = "分公司名称")
private String branchCompanyName;
} }
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id" />
<result column="username" jdbcType="VARCHAR" property="username" /> <result column="username" jdbcType="VARCHAR" property="username" />
<result column="department" jdbcType="VARCHAR" property="department" /> <result column="department" jdbcType="VARCHAR" property="department" />
<result column="departmentname" jdbcType="VARCHAR" property="departmentname" />
<result column="paizhu" jdbcType="VARCHAR" property="paizhu" /> <result column="paizhu" jdbcType="VARCHAR" property="paizhu" />
<result column="position" jdbcType="VARCHAR" property="position" /> <result column="position" jdbcType="VARCHAR" property="position" />
<result column="account" jdbcType="VARCHAR" property="number" /> <result column="account" jdbcType="VARCHAR" property="number" />
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
<result column="metrocenterid" jdbcType="VARCHAR" property="metrocenterid" /> <result column="metrocenterid" jdbcType="VARCHAR" property="metrocenterid" />
<result column="metrocentername" jdbcType="VARCHAR" property="metrocentername" /> <result column="metrocentername" jdbcType="VARCHAR" property="metrocentername" />
<result column="branch_company_id" jdbcType="VARCHAR" property="branchCompanyId" /> <result column="branch_company_id" jdbcType="VARCHAR" property="branchCompanyId" />
<result column="branch_company_name" jdbcType="VARCHAR" property="branchCompanyName" />
</resultMap> </resultMap>
<resultMap id="PageResultMap2" type="com.platform.springboot.domain.dto.PersonnelPageDTO"> <resultMap id="PageResultMap2" type="com.platform.springboot.domain.dto.PersonnelPageDTO">
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id" />
...@@ -157,7 +159,7 @@ ...@@ -157,7 +159,7 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, username, sex, birthday, account, password, phone_number, tel_number, email, id, username, sex, birthday, account, password, phone_number, tel_number, email,
nickname, address, mobile, telecom, office, department, position, identity, role, nickname, address, mobile, telecom, office, department, departmentname, position, identity, role,
addtime, credit, political, paizhu, fuze,avatar,metrocenterid,metrocentername,status, branch_company_id as branchCompanyId, addtime, credit, political, paizhu, fuze,avatar,metrocenterid,metrocentername,status, branch_company_id as branchCompanyId,
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
...@@ -196,7 +198,8 @@ ...@@ -196,7 +198,8 @@
<!--查询所有员工关联部门--> <!--查询所有员工关联部门-->
<select id="selectByExample2" parameterType="com.platform.springboot.domain.entity.PersonnelExample" resultMap="PageResultMap"> <select id="selectByExample2" parameterType="com.platform.springboot.domain.entity.PersonnelExample" resultMap="PageResultMap">
select select
a.id,a.username,a.department,a.paizhu,a.position,a.account,a.avatar,a.metrocenterid,a.metrocentername,b.name as bmmc a.id,a.username,a.department, a.departmentname, a.branch_company_id, a.paizhu,a.position,a.account,a.avatar,a.metrocenterid,a.metrocentername,b.name as bmmc,
(SELECT p.NAME FROM platform_department p WHERE p.id = a.branch_company_id LIMIT 1) AS branch_company_name
from platform_personnel a left join platform_department b on a.department=b.id from platform_personnel a left join platform_department b on a.department=b.id
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
...@@ -241,16 +244,18 @@ ...@@ -241,16 +244,18 @@
<select id="selectByPrimaryKey2" parameterType="java.lang.Integer" resultMap="PageResultMap"> <select id="selectByPrimaryKey2" parameterType="java.lang.Integer" resultMap="PageResultMap">
select select
a.id,a.username,a.department,a.paizhu,a.position,a.account,a.avatar,b.name as bmmc, a.branch_company_id a.id,a.username,a.department, a.departmentname, a.metrocenterid, a.metrocentername, a.paizhu,a.position,a.account,a.avatar,b.name as bmmc, a.branch_company_id,
(SELECT p.NAME FROM platform_department p WHERE p.id = a.branch_company_id LIMIT 1) AS branch_company_name
from platform_personnel a left join platform_department b on a.department=b.id from platform_personnel a left join platform_department b on a.department=b.id
where a.id = #{id,jdbcType=INTEGER} where a.id = #{id,jdbcType=INTEGER}
</select> </select>
<select id="selectByPrimaryKey3" parameterType="java.lang.Integer" resultMap="PageResultMap2"> <select id="selectByPrimaryKey3" parameterType="java.lang.Integer" resultMap="PageResultMap2">
select select
a.id, a.username, a.sex, a.birthday, a.account, a.password, a.phone_number, a.tel_number, a.email, a.id, a.username, a.sex, a.birthday, a.account, a.password, a.phone_number, a.tel_number, a.email,
a.nickname, a.address, a.mobile, a.telecom, a.office, a.department, a.position, a.identity, a.role, a.nickname, a.address, a.mobile, a.telecom, a.office, a.department, a.departmentname, a.metrocenterid, a.metrocentername, a.position, a.identity, a.role,
a.addtime, a.credit, a.political, a.paizhu, a.fuze,a.auth, a.app_id,a.avatar a.addtime, a.credit, a.political, a.paizhu, a.fuze,a.auth, a.app_id,a.avatar
,b.name as bmmc, a.branch_company_id ,b.name as bmmc, a.branch_company_id,
(SELECT p.NAME FROM platform_department p WHERE p.id = a.branch_company_id LIMIT 1) AS branch_company_name
from platform_personnel a left join platform_department b on a.department=b.id from platform_personnel a left join platform_department b on a.department=b.id
where a.id = #{id,jdbcType=INTEGER} where a.id = #{id,jdbcType=INTEGER}
</select> </select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论