Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
e303fe1e
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e303fe1e
编写于
7月 13, 2021
作者:
L
luojing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化人员组织导入导出(保证distinguishedName值相同)
上级
9f0d7395
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
64 addition
and
34 deletion
+64
-34
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/export/ActionExportAll.java
...zation/assemble/control/jaxrs/export/ActionExportAll.java
+19
-25
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/ActionInputAll.java
...on/assemble/control/jaxrs/inputperson/ActionInputAll.java
+13
-1
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/ActionTemplate.java
...on/assemble/control/jaxrs/inputperson/ActionTemplate.java
+8
-4
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/DutySheetConfigurator.java
...mble/control/jaxrs/inputperson/DutySheetConfigurator.java
+8
-0
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/GroupSheetConfigurator.java
...ble/control/jaxrs/inputperson/GroupSheetConfigurator.java
+2
-2
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/IdentityItem.java
...tion/assemble/control/jaxrs/inputperson/IdentityItem.java
+5
-0
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/IdentitySheetConfigurator.java
.../control/jaxrs/inputperson/IdentitySheetConfigurator.java
+8
-0
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/UnitSheetConfigurator.java
...mble/control/jaxrs/inputperson/UnitSheetConfigurator.java
+1
-2
未找到文件。
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/export/ActionExportAll.java
浏览文件 @
e303fe1e
...
...
@@ -251,7 +251,6 @@ public class ActionExportAll extends BaseAction {
}
else
{
row
.
createCell
(
2
).
setCellValue
(
""
);
}
String
superior
=
unit
.
getSuperior
();
if
(
StringUtils
.
isEmpty
(
superior
)){
row
.
createCell
(
3
).
setCellValue
(
""
);
...
...
@@ -348,7 +347,8 @@ public class ActionExportAll extends BaseAction {
row
=
sheet
.
createRow
(
0
);
row
.
createCell
(
0
).
setCellValue
(
"人员唯一编码 *"
);
row
.
createCell
(
1
).
setCellValue
(
"组织唯一编码 *"
);
row
.
createCell
(
2
).
setCellValue
(
"主兼职"
);
row
.
createCell
(
2
).
setCellValue
(
"身份编码"
);
row
.
createCell
(
3
).
setCellValue
(
"主兼职"
);
for
(
int
i
=
0
;
i
<
identityList
.
size
();
i
++)
{
identity
=
identityList
.
get
(
i
);
...
...
@@ -362,17 +362,8 @@ public class ActionExportAll extends BaseAction {
String
unitId
=
""
;
unitId
=
unit
.
getId
();
row
.
createCell
(
1
).
setCellValue
(
unit
.
getUnique
());
/*List<UnitDuty> unitDutyList = this.listDutyWithIdentity(business,identity.getId());
if(ListTools.isNotEmpty(unitDutyList)){
for(UnitDuty duty :unitDutyList){
//if(unitId.equals(duty.getUnit())){
idutyList.add(duty.getUnique());
//}
}
}
row.createCell(2).setCellValue(StringUtils.join(idutyList.toArray(), "#"));*/
row
.
createCell
(
2
).
setCellValue
(
String
.
valueOf
(
identity
.
getMajor
()));
row
.
createCell
(
2
).
setCellValue
(
identity
.
getUnique
());
row
.
createCell
(
3
).
setCellValue
(
String
.
valueOf
(
identity
.
getMajor
()));
}
}
...
...
@@ -391,9 +382,10 @@ public class ActionExportAll extends BaseAction {
row
=
sheet
.
createRow
(
0
);
row
.
createCell
(
0
).
setCellValue
(
"职务名称 *"
);
row
.
createCell
(
1
).
setCellValue
(
"职务所在组织唯一编码 *"
);
row
.
createCell
(
2
).
setCellValue
(
"职务描述"
);
row
.
createCell
(
3
).
setCellValue
(
"职务所含人员唯一编码"
);
row
.
createCell
(
4
).
setCellValue
(
"职务所含人员所在组织唯一编码"
);
row
.
createCell
(
2
).
setCellValue
(
"职务编码"
);
row
.
createCell
(
3
).
setCellValue
(
"职务描述"
);
row
.
createCell
(
4
).
setCellValue
(
"职务所含人员唯一编码"
);
row
.
createCell
(
5
).
setCellValue
(
"职务所含人员所在组织唯一编码"
);
int
currentRow
=
0
;
for
(
int
i
=
0
;
i
<
dutyList
.
size
();
i
++)
{
duty
=
dutyList
.
get
(
i
);
...
...
@@ -412,18 +404,19 @@ public class ActionExportAll extends BaseAction {
}
else
{
row
.
createCell
(
1
).
setCellValue
(
""
);
}
row
.
createCell
(
2
).
setCellValue
(
duty
.
getDescription
());
row
.
createCell
(
2
).
setCellValue
(
duty
.
getUnique
());
row
.
createCell
(
3
).
setCellValue
(
duty
.
getDescription
());
Person
iperson
=
emc
.
flag
(
identity
.
getPerson
(),
Person
.
class
);
Unit
iunit
=
emc
.
flag
(
identity
.
getUnit
(),
Unit
.
class
);
if
(
iperson
!=
null
)
{
row
.
createCell
(
3
).
setCellValue
(
iperson
.
getUnique
());
row
.
createCell
(
4
).
setCellValue
(
iperson
.
getUnique
());
}
else
{
row
.
createCell
(
3
).
setCellValue
(
""
);
row
.
createCell
(
4
).
setCellValue
(
""
);
}
if
(
iunit
!=
null
)
{
row
.
createCell
(
4
).
setCellValue
(
iunit
.
getUnique
());
row
.
createCell
(
5
).
setCellValue
(
iunit
.
getUnique
());
}
else
{
row
.
createCell
(
4
).
setCellValue
(
""
);
row
.
createCell
(
5
).
setCellValue
(
""
);
}
}
}
...
...
@@ -436,9 +429,10 @@ public class ActionExportAll extends BaseAction {
}
else
{
row
.
createCell
(
1
).
setCellValue
(
""
);
}
row
.
createCell
(
2
).
setCellValue
(
duty
.
get
Description
());
row
.
createCell
(
3
).
setCellValue
(
""
);
row
.
createCell
(
2
).
setCellValue
(
duty
.
get
Unique
());
row
.
createCell
(
3
).
setCellValue
(
duty
.
getDescription
()
);
row
.
createCell
(
4
).
setCellValue
(
""
);
row
.
createCell
(
5
).
setCellValue
(
""
);
}
}
}
...
...
@@ -456,10 +450,10 @@ public class ActionExportAll extends BaseAction {
// 先创建表头
row
=
sheet
.
createRow
(
0
);
row
.
createCell
(
0
).
setCellValue
(
"群组名称 *"
);
row
.
createCell
(
1
).
setCellValue
(
"群组编
号
*"
);
row
.
createCell
(
1
).
setCellValue
(
"群组编
码
*"
);
row
.
createCell
(
2
).
setCellValue
(
"人员唯一编码"
);
row
.
createCell
(
3
).
setCellValue
(
"组织唯一编码"
);
row
.
createCell
(
4
).
setCellValue
(
"子群组编
号
"
);
row
.
createCell
(
4
).
setCellValue
(
"子群组编
码
"
);
row
.
createCell
(
5
).
setCellValue
(
"描述"
);
for
(
int
i
=
0
;
i
<
groupList
.
size
();
i
++)
{
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/ActionInputAll.java
浏览文件 @
e303fe1e
...
...
@@ -364,12 +364,18 @@ class ActionInputAll extends BaseAction {
if
(
majorStr
.
equals
(
"true"
)){
major
=
BooleanUtils
.
toBooleanObject
(
majorStr
);
}
//if (StringUtils.isNotEmpty(name) && StringUtils.isNotEmpty(mobile)) {
IdentityItem
identityItem
=
new
IdentityItem
();
identityItem
.
setRow
(
i
);
identityItem
.
setPersonCode
(
unique
);
identityItem
.
setUnitCode
(
unitCode
);
identityItem
.
setMajor
(
major
);
if
(
null
!=
configurator
.
getIdentityUniqueColumnColumn
())
{
String
identityUnique
=
configurator
.
getCellStringValue
(
row
.
getCell
(
configurator
.
getIdentityUniqueColumnColumn
()));
identityUnique
=
StringUtils
.
trimToEmpty
(
identityUnique
);
identityItem
.
setUnique
(
identityUnique
);
}
EntityManagerContainer
emc
=
business
.
entityManagerContainer
();
Person
personobj
=
null
;
...
...
@@ -486,9 +492,15 @@ class ActionInputAll extends BaseAction {
DutyItem
dutyItem
=
new
DutyItem
();
dutyItem
.
setRow
(
i
);
dutyItem
.
setName
(
dutyNmae
);
dutyItem
.
setUnique
(
UUID
.
randomUUID
().
toString
()+
unitCode
);
//
dutyItem.setUnique(UUID.randomUUID().toString()+unitCode);
dutyItem
.
setDescription
(
description
);
if
(
null
!=
configurator
.
getDutyUniqueColumn
())
{
String
dutyUnique
=
configurator
.
getCellStringValue
(
row
.
getCell
(
configurator
.
getDutyUniqueColumn
()));
dutyUnique
=
StringUtils
.
trimToEmpty
(
dutyUnique
);
dutyItem
.
setUnique
(
dutyUnique
);
}
if
(
StringUtils
.
isNotEmpty
(
unitCode
)){
Unit
iUnit
=
emc
.
flag
(
unitCode
,
Unit
.
class
);
if
(
iUnit
!=
null
)
{
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/ActionTemplate.java
浏览文件 @
e303fe1e
...
...
@@ -122,6 +122,8 @@ public class ActionTemplate extends BaseAction {
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
"组织唯一编码 *"
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"身份编码"
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
"主兼职"
);
CellStyle
cellStyle
=
workbook
.
createCellStyle
();
cellStyle
.
setWrapText
(
true
);
...
...
@@ -138,10 +140,12 @@ public class ActionTemplate extends BaseAction {
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
"职务所在组织唯一编码 *"
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"职务
描述
"
);
cell
.
setCellValue
(
"职务
编码
"
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
"职务
所含人员唯一编码
"
);
cell
.
setCellValue
(
"职务
描述
"
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
"职务所含人员唯一编码"
);
cell
=
row
.
createCell
(
5
);
cell
.
setCellValue
(
"职务所含人员所在组织唯一编码"
);
CellStyle
cellStyle
=
workbook
.
createCellStyle
();
cellStyle
.
setWrapText
(
true
);
...
...
@@ -156,13 +160,13 @@ public class ActionTemplate extends BaseAction {
Cell
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"群组名称 *"
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
"群组编
号
*"
);
cell
.
setCellValue
(
"群组编
码
*"
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"人员唯一编码"
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
"组织唯一编码"
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
"子群组编
号
"
);
cell
.
setCellValue
(
"子群组编
码
"
);
cell
=
row
.
createCell
(
5
);
cell
.
setCellValue
(
"描述"
);
CellStyle
cellStyle
=
workbook
.
createCellStyle
();
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/DutySheetConfigurator.java
浏览文件 @
e303fe1e
...
...
@@ -30,6 +30,7 @@ public class DutySheetConfigurator extends GsonPropertyObject {
private
Integer
descriptionColumn
;
private
Integer
unitColumn
;
private
Integer
ipersonColumn
;
private
Integer
dutyUniqueColumn
;
private
Map
<
String
,
Integer
>
attributes
=
new
HashMap
<>();
...
...
@@ -55,6 +56,8 @@ public class DutySheetConfigurator extends GsonPropertyObject {
this
.
unitColumn
=
i
;
}
else
if
(
ipersonItems
.
contains
(
str
)){
this
.
ipersonColumn
=
i
;
}
else
if
(
dutyUniqueItems
.
contains
(
str
))
{
this
.
dutyUniqueColumn
=
i
;
}
else
{
Matcher
matcher
=
attributePattern
.
matcher
(
str
);
if
(
matcher
.
matches
())
{
...
...
@@ -72,6 +75,7 @@ public class DutySheetConfigurator extends GsonPropertyObject {
private
static
List
<
String
>
descriptionItems
=
Arrays
.
asList
(
new
String
[]
{
"描述"
,
"职务描述"
,
"description"
});
private
static
List
<
String
>
ipersonItems
=
Arrays
.
asList
(
new
String
[]
{
"职务所含人员唯一编码"
,
"iperson"
});
private
static
List
<
String
>
iunitItems
=
Arrays
.
asList
(
new
String
[]
{
"职务所含人员所在组织唯一编码"
,
"iunit"
});
private
static
List
<
String
>
dutyUniqueItems
=
Arrays
.
asList
(
new
String
[]
{
"职务编码"
,
"dutyUnique"
});
public
String
getCellStringValue
(
Cell
cell
)
{
if
(
null
!=
cell
)
{
...
...
@@ -127,6 +131,10 @@ public class DutySheetConfigurator extends GsonPropertyObject {
return
descriptionColumn
;
}
public
Integer
getDutyUniqueColumn
()
{
return
dutyUniqueColumn
;
}
public
Integer
getFirstRow
()
{
return
firstRow
;
}
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/GroupSheetConfigurator.java
浏览文件 @
e303fe1e
...
...
@@ -70,11 +70,11 @@ public class GroupSheetConfigurator extends GsonPropertyObject {
}
}
private
static
List
<
String
>
uniqueItems
=
Arrays
.
asList
(
new
String
[]
{
"群组编
号
*"
,
"unique"
});
private
static
List
<
String
>
uniqueItems
=
Arrays
.
asList
(
new
String
[]
{
"群组编
码
*"
,
"unique"
});
private
static
List
<
String
>
nameItems
=
Arrays
.
asList
(
new
String
[]
{
"群组名称 *"
,
"name"
});
private
static
List
<
String
>
personCodeItems
=
Arrays
.
asList
(
new
String
[]
{
"人员编号"
,
"人员唯一编码"
});
private
static
List
<
String
>
unitCodeItems
=
Arrays
.
asList
(
new
String
[]
{
"组织编号"
,
"组织唯一编码"
});
private
static
List
<
String
>
groupCodeItems
=
Arrays
.
asList
(
new
String
[]
{
"子群组编
号"
,
"群组编号
"
,
"groupCode"
});
private
static
List
<
String
>
groupCodeItems
=
Arrays
.
asList
(
new
String
[]
{
"子群组编
码
"
,
"groupCode"
});
private
static
List
<
String
>
descriptionItems
=
Arrays
.
asList
(
new
String
[]
{
"描述"
,
"群组描述"
,
"description"
});
public
String
getCellStringValue
(
Cell
cell
)
{
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/IdentityItem.java
浏览文件 @
e303fe1e
...
...
@@ -14,6 +14,7 @@ public class IdentityItem extends GsonPropertyObject {
private
String
personCode
;
private
String
unitCode
;
private
Boolean
major
;
private
String
unique
;
private
Integer
row
;
...
...
@@ -90,6 +91,10 @@ public class IdentityItem extends GsonPropertyObject {
this
.
major
=
major
;
}
public
String
getUnique
()
{
return
unique
;
}
public
void
setUnique
(
String
unique
)
{
this
.
unique
=
unique
;
}
public
Integer
getRow
()
{
return
row
;
}
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/IdentitySheetConfigurator.java
浏览文件 @
e303fe1e
...
...
@@ -28,6 +28,7 @@ public class IdentitySheetConfigurator extends GsonPropertyObject {
private
Integer
uniqueColumn
;
private
Integer
unitCodeColumn
;
private
Integer
majorColumn
;
private
Integer
identityUniqueColumn
;
private
Map
<
String
,
Integer
>
attributes
=
new
HashMap
<>();
...
...
@@ -48,6 +49,8 @@ public class IdentitySheetConfigurator extends GsonPropertyObject {
this
.
unitCodeColumn
=
i
;
}
else
if
(
majorItems
.
contains
(
str
))
{
this
.
majorColumn
=
i
;
}
else
if
(
identityUniqueItems
.
contains
(
str
))
{
this
.
identityUniqueColumn
=
i
;
}
else
{
Matcher
matcher
=
attributePattern
.
matcher
(
str
);
if
(
matcher
.
matches
())
{
...
...
@@ -63,6 +66,7 @@ public class IdentitySheetConfigurator extends GsonPropertyObject {
private
static
List
<
String
>
uniqueItems
=
Arrays
.
asList
(
new
String
[]
{
"人员唯一编码 *"
,
"员工账号 *"
,
"unique"
});
private
static
List
<
String
>
unitCodeItems
=
Arrays
.
asList
(
new
String
[]
{
"组织编号 *"
,
"组织唯一编码 *"
,
"unitCode"
});
private
static
List
<
String
>
majorItems
=
Arrays
.
asList
(
new
String
[]
{
"主兼职"
,
"major"
});
private
static
List
<
String
>
identityUniqueItems
=
Arrays
.
asList
(
new
String
[]
{
"身份编码"
,
"identityUnique"
});
public
String
getCellStringValue
(
Cell
cell
)
{
if
(
null
!=
cell
)
{
...
...
@@ -110,6 +114,10 @@ public class IdentitySheetConfigurator extends GsonPropertyObject {
return
attributes
;
}
public
Integer
getIdentityUniqueColumnColumn
()
{
return
identityUniqueColumn
;
}
public
Integer
getFirstRow
()
{
return
firstRow
;
}
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/UnitSheetConfigurator.java
浏览文件 @
e303fe1e
...
...
@@ -56,7 +56,7 @@ public class UnitSheetConfigurator extends GsonPropertyObject {
}
else
if
(
orderNumberItems
.
contains
(
str
))
{
this
.
orderNumberColumn
=
i
;
}
else
if
(
descriptionItems
.
contains
(
str
))
{
this
.
descriptionColumn
=
i
;
this
.
descriptionColumn
=
i
;
}
else
{
Matcher
matcher
=
attributePattern
.
matcher
(
str
);
if
(
matcher
.
matches
())
{
...
...
@@ -145,5 +145,4 @@ public class UnitSheetConfigurator extends GsonPropertyObject {
public
Integer
getSheetIndex
()
{
return
sheetIndex
;
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录