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
cc0c64d8
Commit
cc0c64d8
authored
Oct 10, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
线上问题修改
parent
53ccc2aa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
43 deletions
+80
-43
TEmployeeInfoMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
+3
-4
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+15
-21
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+62
-18
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
View file @
cc0c64d8
...
@@ -41,12 +41,11 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
...
@@ -41,12 +41,11 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
long
getLeavePageCount
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
,
@Param
(
"idList"
)
List
<
String
>
idList
);
long
getLeavePageCount
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
List
<
String
>
getProjectEmpId
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
List
<
TEmployeeInfo
>
getLeavePage
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
,
@Param
(
"page"
)
Long
page
,
@Param
(
"size"
)
Long
size
);
List
<
TEmployeeInfo
>
getLeavePage
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
,
IPage
<
TEmployeeInfo
>
getLeaveIPage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
@Param
(
"page"
)
Long
page
,
@Param
(
"size"
)
Long
size
);
List
<
TEmployeeInfo
>
getList
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
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 @
cc0c64d8
...
@@ -97,16 +97,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -97,16 +97,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
long
leavePageCount
;
long
leavePageCount
;
if
(
Common
.
isEmpty
(
employeeInfo
.
getUnitName
())
&&
Common
.
isEmpty
(
employeeInfo
.
getDeptName
())
if
(
Common
.
isEmpty
(
employeeInfo
.
getUnitName
())
&&
Common
.
isEmpty
(
employeeInfo
.
getDeptName
())
&&
Common
.
isEmpty
(
employeeInfo
.
getDeptNo
())
&&
Common
.
isEmpty
(
employeeInfo
.
getAuthSql
()))
{
&&
Common
.
isEmpty
(
employeeInfo
.
getDeptNo
())
&&
Common
.
isEmpty
(
employeeInfo
.
getAuthSql
()))
{
leavePageCount
=
baseMapper
.
getLeavePageCount
(
employeeInfo
,
null
);
leavePageCount
=
baseMapper
.
getLeavePageCount
(
employeeInfo
);
}
else
{
List
<
String
>
projectList
;
projectList
=
baseMapper
.
getProjectEmpId
(
employeeInfo
);
if
(
projectList
.
isEmpty
())
{
leavePageCount
=
0L
;
}
else
{
leavePageCount
=
baseMapper
.
getLeavePageCount
(
employeeInfo
,
projectList
);
}
}
page
.
setTotal
(
leavePageCount
);
page
.
setTotal
(
leavePageCount
);
if
(
leavePageCount
>
0L
)
{
if
(
leavePageCount
>
0L
)
{
page
.
setPages
((
long
)
Math
.
ceil
(
leavePageCount
/
page
.
getSize
()));
page
.
setPages
((
long
)
Math
.
ceil
(
leavePageCount
/
page
.
getSize
()));
...
@@ -120,6 +111,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -120,6 +111,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
List
<
TEmployeeInfo
>
list
=
baseMapper
.
getLeavePage
(
employeeInfo
,(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
(),
page
.
getSize
());
List
<
TEmployeeInfo
>
list
=
baseMapper
.
getLeavePage
(
employeeInfo
,(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
(),
page
.
getSize
());
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
return
page
;
return
page
;
}
else
{
return
baseMapper
.
getLeaveIPage
(
page
,
employeeInfo
);
}
}
}
@Override
@Override
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
cc0c64d8
...
@@ -576,27 +576,61 @@
...
@@ -576,27 +576,61 @@
ORDER BY c.CREATE_TIME DESC
ORDER BY c.CREATE_TIME DESC
</select>
</select>
<select
id=
"getLeavePageCount"
resultType=
"java.lang.Long"
>
<!-- hgw 分页查询 -->
<select
id=
"getLeaveIPage"
resultMap=
"tEmployeeExportMap"
>
SELECT
SELECT
count(1)
c.ID,
FROM t_employee_info a
c.EMP_CODE,
where 1=1
c.EMP_NATRUE,
and a.DELETE_FLAG = '0'
c.EMP_NAME,
c.EMP_IDCARD,
c.EMP_PHONE,
c.FILE_PROVINCE,
c.FILE_CITY,
c.FILE_TOWN,
c.LEAVE_TIME,
c.LEAVE_USER_NAME,
c.CREATE_TIME,
b.DEPT_ID,
b.EMP_ID,
b.UNIT_NAME,
b.DEPT_NAME,
b.DEPT_NO
FROM
(
SELECT
a.ID,
a.EMP_CODE,
a.EMP_NATRUE,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_PHONE,
a.FILE_PROVINCE,
a.FILE_CITY,
a.FILE_TOWN,
a.LEAVE_TIME,
a.LEAVE_USER_NAME,
a.CREATE_TIME
FROM
t_employee_info a
WHERE
a.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
<include
refid=
"employeeInfo_where"
/>
<if
test=
"idList != null and idList.size>0"
>
) c
AND a.id in
LEFT JOIN (
<foreach
item=
"idStr"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</if>
</select>
<select
id=
"getProjectEmpId"
resultType=
"java.lang.String"
>
SELECT
SELECT
b.EMP_ID
f.DEPT_ID,
FROM t_employee_project b
f.EMP_ID,
where 1=1
GROUP_CONCAT(DISTINCT f.UNIT_NAME) UNIT_NAME,
AND b.DELETE_FLAG = '0'
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() != ''"
>
<if
test=
"tEmployeeInfo.unitName != null and tEmployeeInfo.unitName.trim() != ''"
>
AND b.UNIT_NAME like concat('%',#{tEmployeeInfo.unitName},'%')
AND b.UNIT_NAME like concat('%',#{tEmployeeInfo.unitName},'%')
</if>
</if>
...
@@ -609,6 +643,16 @@
...
@@ -609,6 +643,16 @@
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"
>
<if
test=
"tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"
>
${tEmployeeInfo.authSql}
${tEmployeeInfo.authSql}
</if>
</if>
ORDER BY c.CREATE_TIME DESC
</select>
<select
id=
"getLeavePageCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_employee_info a
where 1=1
and a.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
</select>
</select>
<!-- hgw list查询 -->
<!-- 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