Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
3b7d0076
Commit
3b7d0076
authored
Nov 16, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
58fd3a31
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
1 deletions
+95
-1
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+22
-0
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
+73
-1
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
3b7d0076
...
@@ -229,6 +229,28 @@ public class ClockInTool {
...
@@ -229,6 +229,28 @@ public class ClockInTool {
return
strArrLast
;
return
strArrLast
;
}
}
/***
* 去除String数组中的空值
*/
public
static
String
[]
deleteArrayNull2
(
String
string
[])
{
String
strArr
[]
=
string
;
// step1: 定义一个list列表,并循环赋值
ArrayList
<
String
>
strList
=
new
ArrayList
<
String
>();
for
(
int
i
=
0
;
i
<
strArr
.
length
;
i
++)
{
strList
.
add
(
strArr
[
i
]);
}
// step2: 删除list列表中所有的空值
while
(
strList
.
remove
(
null
));
// while (strList.remove(""));
// step3: 把list列表转换给一个新定义的中间数组,并赋值给它
String
strArrLast
[]
=
strList
.
toArray
(
new
String
[
strList
.
size
()]);
return
strArrLast
;
}
public
static
Date
strToDateLong
(
String
strDate
)
{
public
static
Date
strToDateLong
(
String
strDate
)
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
ParsePosition
pos
=
new
ParsePosition
(
0
);
ParsePosition
pos
=
new
ParsePosition
(
0
);
...
...
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
3b7d0076
...
@@ -34,6 +34,8 @@ import cn.hutool.core.lang.tree.TreeUtil;
...
@@ -34,6 +34,8 @@ import cn.hutool.core.lang.tree.TreeUtil;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.admin.AdminMenuTemplate
;
import
cn.timer.api.bean.qyzx.QyzxAdminMenu
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
...
@@ -42,12 +44,14 @@ import cn.timer.api.bean.zzgl.ZzglPostMenu;
...
@@ -42,12 +44,14 @@ import cn.timer.api.bean.zzgl.ZzglPostMenu;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enuminterface.YgEnumInterface
;
import
cn.timer.api.config.enuminterface.YgEnumInterface
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dao.zzgl.ZzglLogDgjlMapper
;
import
cn.timer.api.dao.zzgl.ZzglLogDgjlMapper
;
import
cn.timer.api.dao.zzgl.ZzglMenuMapper
;
import
cn.timer.api.dao.zzgl.ZzglMenuMapper
;
import
cn.timer.api.dao.zzgl.ZzglPostMenuMapper
;
import
cn.timer.api.dao.zzgl.ZzglPostMenuMapper
;
import
cn.timer.api.dto.qyzx.MenuStructureDto
;
import
cn.timer.api.dto.zzgl.DepartmentStaffDto
;
import
cn.timer.api.dto.zzgl.DepartmentStaffDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsQueryDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsQueryDto
;
...
@@ -412,7 +416,75 @@ public class ZzglController {
...
@@ -412,7 +416,75 @@ public class ZzglController {
wp
.
select
(
ZzglAuth:
:
getMenuId
,
ZzglAuth:
:
getBmgwId
).
eq
(
ZzglAuth:
:
getOrgCode
,
orgCode
)
wp
.
select
(
ZzglAuth:
:
getMenuId
,
ZzglAuth:
:
getBmgwId
).
eq
(
ZzglAuth:
:
getOrgCode
,
orgCode
)
.
and
(
i
->
i
.
in
(
ZzglAuth:
:
getBmgwId
,
list
.
toArray
()));
.
and
(
i
->
i
.
in
(
ZzglAuth:
:
getBmgwId
,
list
.
toArray
()));
List
<
ZzglAuth
>
zas
=
ZzglAuth
.
builder
().
build
().
selectList
(
wp
);
List
<
ZzglAuth
>
zas
=
ZzglAuth
.
builder
().
build
().
selectList
(
wp
);
return
ResultUtil
.
data
(
zas
);
List
<
MenuStructureDto
>
mestrs
=
new
ArrayList
<
MenuStructureDto
>();
List
<
QyzxAdminMenu
>
qyme
=
QyzxAdminMenu
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
QyzxAdminMenu
>().
lambda
().
eq
(
QyzxAdminMenu:
:
getOrgCode
,
userBean
.
getOrgCode
()).
orderByAsc
(
QyzxAdminMenu:
:
getSortNumber
));
String
[]
zdy
=
new
String
[
qyme
.
size
()];
int
i
=
0
;
for
(
QyzxAdminMenu
me
:
qyme
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
me
.
getMenuCode
());
metr
.
setMenuName
(
me
.
getMenuName
());
metr
.
setSortNumber
(
me
.
getSortNumber
());
AdminMenuTemplate
adte
=
AdminMenuTemplate
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
AdminMenuTemplate
>().
lambda
().
eq
(
AdminMenuTemplate:
:
getMenuCode
,
me
.
getMenuCode
()));
metr
.
setPath
(
adte
.
getPath
());
mestrs
.
add
(
metr
);
zdy
[
i
]
=
me
.
getMenuCode
();
i
++;
}
//
List
<
AdminMenuTemplate
>
adtes
=
AdminMenuTemplate
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
AdminMenuTemplate
>().
lambda
().
eq
(
AdminMenuTemplate:
:
getEnable
,
1
).
orderByAsc
(
AdminMenuTemplate:
:
getSortNumber
));
for
(
AdminMenuTemplate
adm
:
adtes
)
{
if
(!
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull
(
zdy
),
adm
.
getMenuCode
()))
{
if
(
adm
.
getDistribution
()
==
0
&&
userBean
.
getOrgCode
()
==
3
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
adm
.
getMenuCode
());
metr
.
setMenuName
(
adm
.
getMenuName
());
metr
.
setSortNumber
(
adm
.
getSortNumber
());
metr
.
setPath
(
adm
.
getPath
());
mestrs
.
add
(
metr
);
}
else
if
(
adm
.
getDistribution
()
==
1
)
{
MenuStructureDto
metr
=
MenuStructureDto
.
builder
().
build
();
metr
.
setMenuCode
(
adm
.
getMenuCode
());
metr
.
setMenuName
(
adm
.
getMenuName
());
metr
.
setSortNumber
(
adm
.
getSortNumber
());
metr
.
setPath
(
adm
.
getPath
());
mestrs
.
add
(
metr
);
}
}
}
List
<
ZzglAuth
>
zas_
=
new
ArrayList
<
ZzglAuth
>();
String
[]
qhf
=
new
String
[
mestrs
.
size
()];
int
y
=
0
;
for
(
MenuStructureDto
metu
:
mestrs
)
{
ZzglAuth
zd
=
ZzglAuth
.
builder
().
build
();
for
(
ZzglAuth
zg
:
zas
)
{
if
(
metu
.
getPath
().
equals
(
zg
.
getMenuId
()))
{
zd
.
setBmgwId
(
zg
.
getBmgwId
());
zd
.
setMenuId
(
zg
.
getMenuId
());
zas_
.
add
(
zd
);
qhf
[
y
]
=
zg
.
getMenuId
();
y
++;
break
;
}
}
}
for
(
ZzglAuth
zg
:
zas
)
{
if
(!
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull2
(
qhf
),
zg
.
getMenuId
()))
{
ZzglAuth
zd
=
ZzglAuth
.
builder
().
build
();
zd
.
setBmgwId
(
zg
.
getBmgwId
());
zd
.
setMenuId
(
zg
.
getMenuId
());
zas_
.
add
(
zd
);
}
}
return
ResultUtil
.
data
(
zas_
);
}
}
}
}
...
...
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