diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js index 37d5b84..1593234 100644 --- a/api/app/lib/controllers/member/index.js +++ b/api/app/lib/controllers/member/index.js @@ -103,7 +103,8 @@ async function searchPepMember (ctx) { const userRes = await clickHouse.pepEmis.query(` SELECT user.id AS pepUserId, - user.people_code AS userCode, + user.people_code AS userCode, + basicdata_post.name AS userPost, user.name AS userName, role.name AS roleName, role.id AS roleId, @@ -118,7 +119,9 @@ async function searchPepMember (ctx) { LEFT JOIN department_user ON department_user.user = user.id LEFT JOIN department - ON department.id = department_user.department + ON department.id = department_user.department + LEFT JOIN basicdata_post + ON basicdata_post.id = user.post WHERE user.delete = '0' ${whereOption.length ? `AND ${whereOption.join(' OR ')}` : ''} @@ -154,6 +157,7 @@ async function searchPepMember (ctx) { id: u.roleId, name: u.roleName }] : [], + userPost:u.userPost }) } }) diff --git a/api/app/lib/utils/member.js b/api/app/lib/utils/member.js index f0ce54a..3f4c7a2 100644 --- a/api/app/lib/utils/member.js +++ b/api/app/lib/utils/member.js @@ -200,13 +200,11 @@ module.exports = function (app, opts) { `: ''} WHERE member.del = '0' - ${keywordTarget == 'role' && keyword ? ` - AND user.id IN ( - SELECT user_role.user - FROM ${pepEmis}.user_role AS user_role - INNER JOIN ${pepEmis}.role AS role - ON role.id = user_role.role - AND role.name LIKE '%${keyword}%' + ${keywordTarget == 'post' && keyword ? ` + AND user.post IN ( + SELECT basicDataPost.id + FROM ${pepEmis}.basicdata_post AS basicDataPost + where basicDataPost.name LIKE '%${keyword}%' ) ` : ''} ${keywordTarget == 'dep' && keyword ? ` diff --git a/web/client/src/sections/humanAffairs/components/personnelModal.jsx b/web/client/src/sections/humanAffairs/components/personnelModal.jsx index 425d835..30727fc 100644 --- a/web/client/src/sections/humanAffairs/components/personnelModal.jsx +++ b/web/client/src/sections/humanAffairs/components/personnelModal.jsx @@ -240,33 +240,10 @@ function pushModal (props) {
- 职位: + 岗位:
- { - peoplePro.role.map((ite, idx) => { - let roleArr = [] - for (let i = 0; i < peoplePro.role.length; i++) { - roleArr.push(peoplePro.role[i].name) - } - return ( -
- {idx == 0 ? - (ite.name) : ('') - } - { - peoplePro.role.length > 1 && idx == 1 ? ( - -
- +{peoplePro.role.length - 1} -
-
- ) : ('') - } -
- ) - }) - } + {peoplePro.userPost || ''}
diff --git a/web/client/src/sections/humanAffairs/containers/employeeInformation.jsx b/web/client/src/sections/humanAffairs/containers/employeeInformation.jsx index 13e28f0..553c264 100644 --- a/web/client/src/sections/humanAffairs/containers/employeeInformation.jsx +++ b/web/client/src/sections/humanAffairs/containers/employeeInformation.jsx @@ -492,7 +492,7 @@ const employeeInformation = (props) => { style={{ width: 200 }} initValue={"name"} > - 职位 + 岗位 部门 编号 姓名 diff --git a/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx b/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx index d3420f4..7dd5c49 100644 --- a/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx +++ b/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx @@ -87,7 +87,7 @@ const Rest = (props) => {