Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
8fd3aa7e
Commit
8fd3aa7e
authored
Oct 16, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.admin不写部门
parent
d83a6478
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
DaoUtils.java
src/main/java/com/baosight/hpjx/core/dao/DaoUtils.java
+15
-4
No files found.
src/main/java/com/baosight/hpjx/core/dao/DaoUtils.java
View file @
8fd3aa7e
...
...
@@ -65,9 +65,12 @@ public class DaoUtils {
*/
public
static
void
batchInsert
(
String
sql
,
List
rows
)
{
// 创建人部门
String
depCode
=
""
;
if
(!
"admin"
.
equals
(
UserSessionUtils
.
getLoginName
()))
{
List
<
String
>
orgIds
=
UserSessionUtils
.
getOrgId
();
AssertUtils
.
isEmpty
(
orgIds
,
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
String
depCode
=
orgIds
.
get
(
0
);
depCode
=
orgIds
.
get
(
0
);
}
for
(
Object
row
:
rows
)
{
if
(
row
instanceof
DaoEPBase
)
{
DaoEPBase
daoEPBase
=
(
DaoEPBase
)
row
;
...
...
@@ -145,10 +148,14 @@ public class DaoUtils {
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
// 创建人组织机构
String
depCode
=
""
;
if
(!
"admin"
.
equals
(
userId
))
{
List
<
String
>
orgIds
=
UserSessionUtils
.
getOrgId
();
AssertUtils
.
isEmpty
(
orgIds
,
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
depCode
=
orgIds
.
get
(
0
);
}
try
{
BeanUtils
.
setProperty
(
bean
,
"depCode"
,
orgIds
.
get
(
0
)
);
BeanUtils
.
setProperty
(
bean
,
"depCode"
,
depCode
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人部门编码失败"
,
e
);
}
...
...
@@ -199,11 +206,15 @@ public class DaoUtils {
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
// 创建人部门编码
// 创建人组织机构
String
depCode
=
""
;
if
(!
"admin"
.
equals
(
userId
))
{
List
<
String
>
orgIds
=
UserSessionUtils
.
getOrgId
();
AssertUtils
.
isEmpty
(
orgIds
,
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
depCode
=
orgIds
.
get
(
0
);
}
try
{
map
.
put
(
"depCode"
,
orgIds
.
get
(
0
)
);
map
.
put
(
"depCode"
,
depCode
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
...
...
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