Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
b19b1832
Commit
b19b1832
authored
Oct 08, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据权限修改
parent
3efc7b76
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
15 deletions
+106
-15
TEmployeeInfoMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
+3
-1
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+14
-1
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+89
-13
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
View file @
b19b1832
...
...
@@ -41,7 +41,9 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
long
getLeavePageCount
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
List
<
TEmployeeInfo
>
getLeavePage
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
,
@Param
(
"page"
)
Long
page
,
@Param
(
"size"
)
Long
size
);
List
<
TEmployeeInfo
>
getList
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
b19b1832
...
...
@@ -94,7 +94,20 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
@Override
public
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
)
{
return
baseMapper
.
getLeavePage
(
page
,
employeeInfo
);
long
leavePageCount
=
baseMapper
.
getLeavePageCount
(
employeeInfo
);
page
.
setTotal
(
leavePageCount
);
if
(
leavePageCount
>
0L
)
{
page
.
setPages
((
long
)
Math
.
ceil
(
leavePageCount
/
page
.
getSize
()));
}
if
(
page
.
getCurrent
()
<
1
)
{
page
.
setCurrent
(
1L
);
}
if
(
page
.
getSize
()
<
1
)
{
page
.
setSize
(
10L
);
}
List
<
TEmployeeInfo
>
list
=
baseMapper
.
getLeavePage
(
employeeInfo
,(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
(),
page
.
getSize
());
page
.
setRecords
(
list
);
return
page
;
}
@Override
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
b19b1832
...
...
@@ -505,26 +505,99 @@
<!-- hgw 分页查询 -->
<select
id=
"getLeavePage"
resultMap=
"tEmployeeExportMap"
>
SELECT * from (
SELECT
*
FROM
(
SELECT
a.ID,
<include
refid=
"Base_Export_List"
/>
,GROUP_CONCAT(DISTINCT b.unit_name) UNIT_NAME
,GROUP_CONCAT(DISTINCT b.unit_no) UNIT_NO
,a.LEAVE_TIME
,a.LEAVE_USER_NAME
,a.LEAVE_USER
,a.LEAVE_REASON
from t_employee_info a
left join t_employee_project b on a.id = b.EMP_ID and b.DELETE_FLAG = '0'
where a.DELETE_FLAG = '0'
a.EMP_CODE,
a.EMP_NATRUE,
a.EMP_NAME,
a.EMP_IDCARD,
a.VALIDITY_START,
a.VALIDITY_END,
a.EMP_MARRI_STATUS,
a.EMP_NATIONAL,
a.POLITICAL_STATUS,
a.EMP_PHONE,
a.EMP_EMAIL,
a.ID_PROVINCE,
a.ID_CITY,
a.ID_TOWN,
a.EMP_REGIS_TYPE,
a.FILE_PROVINCE,
a.FILE_CITY,
a.FILE_TOWN,
a.IS_COLLEGE,
a.HIGN_EDUCATION,
a.SCHOOL,
a.MAJOR,
a.ADMISSION_DATE,
a.GRADUTION_DATE,
a.REMARK,
a.FILE_SOURCE,
a.PROJECT_NUM,
a.CONTRACT_STATUS,
a.INSURANCE_STATUS,
a.SOCIAL_STATUS,
a.FUND_STATUS,
a.SALARY_STATUS,
a.CREATE_NAME,
a.CREATE_TIME,
a.CONTACT_ADDRESS,
a.LEAVE_TIME,
a.LEAVE_USER_NAME,
a.LEAVE_USER,
a.LEAVE_REASON
FROM
t_employee_info a
WHERE
a.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
<if
test=
"null != page and null != size"
>
limit #{page},#{size}
</if>
) c
LEFT JOIN (
SELECT
f.DEPT_ID,
f.EMP_ID,
GROUP_CONCAT(DISTINCT f.unit_name) UNIT_NAME,
GROUP_CONCAT(DISTINCT f.unit_no) UNIT_NO,
GROUP_CONCAT(DISTINCT f.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(DISTINCT f.DEPT_NO) DEPT_NO
FROM
t_employee_project f
WHERE
f.DELETE_FLAG = '0'
GROUP BY f.EMP_ID
) b ON c.id = b.EMP_ID
where 1 = 1
<if
test=
"tEmployeeInfo.unitName != null and tEmployeeInfo.unitName.trim() != ''"
>
AND b.UNIT_NAME like concat('%',#{tEmployeeInfo.unitName},'%')
</if>
<if
test=
"tEmployeeInfo.deptName != null and tEmployeeInfo.deptName.trim() != ''"
>
AND b.DEPT_NAME like concat('%',#{tEmployeeInfo.deptName},'%')
</if>
<if
test=
"tEmployeeInfo.deptNo != null and tEmployeeInfo.deptNo.trim() != ''"
>
AND b.DEPT_NO like concat('%',#{tEmployeeInfo.deptNo},'%')
</if>
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"
>
${tEmployeeInfo.authSql}
</if>
group by a.id order by a.CREATE_TIME desc
) b
ORDER BY c.CREATE_TIME DESC
</select>
<select
id=
"getLeavePageCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_employee_info a
LEFT JOIN t_employee_project b
ON a.id = b.EMP_ID
where 1=1
and a.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
<if
test=
"tEmployeeInfo.unitName != null and tEmployeeInfo.unitName.trim() != ''"
>
AND b.UNIT_NAME like concat('%',#{tEmployeeInfo.unitName},'%')
</if>
...
...
@@ -534,6 +607,9 @@
<if
test=
"tEmployeeInfo.deptNo != null and tEmployeeInfo.deptNo.trim() != ''"
>
AND b.DEPT_NO like concat('%',#{tEmployeeInfo.deptNo},'%')
</if>
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"
>
${tEmployeeInfo.authSql}
</if>
</select>
<!-- hgw list查询 -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment