Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
property-management
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
chenjunxiong
property-management
Commits
d6cf2b50
Commit
d6cf2b50
authored
Feb 24, 2021
by
zhangdaiscott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量导入部门以后,不能追加下一级部门 #2245
parent
c741d779
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
+5
-1
No files found.
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
View file @
d6cf2b50
...
...
@@ -16,6 +16,7 @@ import org.jeecg.common.system.query.QueryGenerator;
import
org.jeecg.common.system.util.JwtUtil
;
import
org.jeecg.common.system.vo.LoginUser
;
import
org.jeecg.common.util.ImportExcelUtil
;
import
org.jeecg.common.util.YouBianCodeUtil
;
import
org.jeecg.common.util.oConvertUtils
;
import
org.jeecg.modules.system.entity.SysDepart
;
import
org.jeecg.modules.system.entity.SysUser
;
...
...
@@ -332,7 +333,7 @@ public class SysDepartController {
params
.
setNeedSave
(
true
);
try
{
// orgCode编码长度
int
codeLength
=
3
;
int
codeLength
=
YouBianCodeUtil
.
zhanweiLength
;
listSysDeparts
=
ExcelImportUtil
.
importExcel
(
file
.
getInputStream
(),
SysDepart
.
class
,
params
);
//按长度排序
Collections
.
sort
(
listSysDeparts
,
new
Comparator
<
SysDepart
>()
{
...
...
@@ -362,6 +363,9 @@ public class SysDepartController {
}
else
{
sysDepart
.
setParentId
(
""
);
}
//update-begin---author:liusq Date:20210223 for:批量导入部门以后,不能追加下一级部门 #2245------------
sysDepart
.
setOrgType
(
sysDepart
.
getOrgCode
().
length
()/
codeLength
+
""
);
//update-end---author:liusq Date:20210223 for:批量导入部门以后,不能追加下一级部门 #2245------------
sysDepart
.
setDelFlag
(
CommonConstant
.
DEL_FLAG_0
.
toString
());
ImportExcelUtil
.
importDateSaveOne
(
sysDepart
,
ISysDepartService
.
class
,
errorMessageList
,
num
,
CommonConstant
.
SQL_INDEX_UNIQ_DEPART_ORG_CODE
);
num
++;
...
...
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