Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
efdfcc32
Commit
efdfcc32
authored
Jul 13, 2021
by
付培阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
值班导入导出
parent
908e4b7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
53 deletions
+62
-53
DutyPersonExcelDto.java
...n/amos/boot/module/common/api/dto/DutyPersonExcelDto.java
+3
-3
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+59
-50
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/DutyPersonExcelDto.java
View file @
efdfcc32
...
@@ -40,7 +40,7 @@ public class DutyPersonExcelDto implements Serializable {
...
@@ -40,7 +40,7 @@ public class DutyPersonExcelDto implements Serializable {
@ApiModelProperty
(
value
=
"部门id"
)
@ApiModelProperty
(
value
=
"部门id"
)
private
String
deptId
;
private
String
deptId
;
@Excel
Ignore
@Excel
Property
(
value
=
"单位/部门"
,
index
=
3
)
@ApiModelProperty
(
value
=
"部门名称"
)
@ApiModelProperty
(
value
=
"部门名称"
)
private
String
deptName
;
private
String
deptName
;
...
@@ -48,8 +48,8 @@ public class DutyPersonExcelDto implements Serializable {
...
@@ -48,8 +48,8 @@ public class DutyPersonExcelDto implements Serializable {
@ApiModelProperty
(
value
=
"岗位id"
)
@ApiModelProperty
(
value
=
"岗位id"
)
private
String
postType
;
private
String
postType
;
@ExplicitConstraint
(
type
=
"DUTY_POST_TYPE"
,
indexNum
=
3
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExplicitConstraint
(
type
=
"DUTY_POST_TYPE"
,
indexNum
=
4
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"岗位"
,
index
=
3
)
@ExcelProperty
(
value
=
"岗位"
,
index
=
4
)
@ApiModelProperty
(
value
=
"岗位名称"
)
@ApiModelProperty
(
value
=
"岗位名称"
)
private
String
postTypeName
;
private
String
postTypeName
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ExcelController.java
View file @
efdfcc32
...
@@ -238,31 +238,37 @@ public class ExcelController extends BaseController {
...
@@ -238,31 +238,37 @@ public class ExcelController extends BaseController {
Cell
cell
=
row
.
getCell
(
1
);
Cell
cell
=
row
.
getCell
(
1
);
if
(
cell
!=
null
)
{
if
(
cell
!=
null
)
{
dutyPersonDto
.
setUserId
(
cell
.
toString
());
dutyPersonDto
.
setUserId
(
cell
.
toString
());
}
cell
=
row
.
getCell
(
2
);
cell
=
row
.
getCell
(
2
);
if
(
cell
!=
null
)
{
if
(
cell
!=
null
)
{
dutyPersonDto
.
setUserName
(
cell
.
toString
());
dutyPersonDto
.
setUserName
(
cell
.
toString
());
}
}
cell
=
row
.
getCell
(
3
);
cell
=
row
.
getCell
(
3
);
if
(
cell
!=
null
)
{
if
(
cell
!=
null
)
{
String
[]
split
=
cell
.
toString
().
split
(
"@"
);
String
[]
split
=
cell
.
toString
().
split
(
"@"
);
dutyPersonDto
.
setDeptName
(
split
[
0
]);
dutyPersonDto
.
setPostTypeName
(
split
[
0
]);
dutyPersonDto
.
setDeptId
(
split
[
1
]);
dutyPersonDto
.
setPostType
(
split
[
1
]);
}
}
cell
=
row
.
getCell
(
4
);
List
<
DutyPersonShiftDto
>
dutyShift
=
new
ArrayList
<>();
if
(
cell
!=
null
)
{
for
(
int
j
=
0
;
j
<
dayByMonth
.
size
();
j
++)
{
String
[]
split
=
cell
.
toString
().
split
(
"@"
);
cell
=
row
.
getCell
(
4
+
j
);
dutyPersonDto
.
setPostTypeName
(
split
[
0
]);
String
dutyType
=
cell
==
null
?
""
:
cell
.
toString
();
dutyPersonDto
.
setPostType
(
split
[
1
]);
if
(!
StringUtils
.
isEmpty
(
dutyType
))
{
}
DutyPersonShiftDto
dutyPersonShiftDto
=
new
DutyPersonShiftDto
();
List
<
DutyPersonShiftDto
>
dutyShift
=
new
ArrayList
<>();
dutyPersonShiftDto
.
setDutyDate
(
dayByMonth
.
get
(
j
));
for
(
int
j
=
0
;
j
<
dayByMonth
.
size
();
j
++)
{
dutyPersonShiftDto
.
setShiftId
(
Long
.
valueOf
(
dutyType
.
split
(
"@"
)[
1
]));
cell
=
row
.
getCell
(
5
+
j
);
dutyShift
.
add
(
dutyPersonShiftDto
);
String
dutyType
=
cell
==
null
?
""
:
cell
.
toString
();
if
(!
StringUtils
.
isEmpty
(
dutyType
))
{
DutyPersonShiftDto
dutyPersonShiftDto
=
new
DutyPersonShiftDto
();
dutyPersonShiftDto
.
setDutyDate
(
dayByMonth
.
get
(
j
));
dutyPersonShiftDto
.
setShiftId
(
Long
.
valueOf
(
dutyType
.
split
(
"@"
)[
1
]));
dutyShift
.
add
(
dutyPersonShiftDto
);
}
}
}
dutyPersonDto
.
setDutyShift
(
dutyShift
);
Map
<
String
,
Object
>
dutyPersonDtoMap
=
Bean
.
BeantoMap
(
dutyPersonDto
);
dataList
.
add
(
dutyPersonDtoMap
);
}
}
dutyPersonDto
.
setDutyShift
(
dutyShift
);
Map
<
String
,
Object
>
dutyPersonDtoMap
=
Bean
.
BeantoMap
(
dutyPersonDto
);
dataList
.
add
(
dutyPersonDtoMap
);
}
}
}
}
...
@@ -283,35 +289,36 @@ public class ExcelController extends BaseController {
...
@@ -283,35 +289,36 @@ public class ExcelController extends BaseController {
}
}
cell
=
row
.
getCell
(
2
);
cell
=
row
.
getCell
(
2
);
if
(
cell
!=
null
)
{
if
(
cell
!=
null
)
{
String
[]
split
=
cell
.
toString
().
split
(
"@"
);
String
[]
userName
=
cell
.
toString
().
split
(
"@"
);
dutyCarDto
.
setUserName
(
split
[
0
]);
dutyCarDto
.
setUserName
(
userName
[
0
]);
dutyCarDto
.
setUserId
(
split
[
1
]);
dutyCarDto
.
setUserId
(
userName
[
1
]);
}
cell
=
row
.
getCell
(
3
);
cell
=
row
.
getCell
(
3
);
if
(
cell
!=
null
)
{
if
(
cell
!=
null
)
{
String
[]
split
=
cell
.
toString
().
split
(
"@"
);
String
[]
postType
=
cell
.
toString
().
split
(
"@"
);
dutyCarDto
.
setPostTypeName
(
split
[
0
]);
dutyCarDto
.
setPostTypeName
(
postType
[
0
]);
dutyCarDto
.
setPostType
(
split
[
1
]);
dutyCarDto
.
setPostType
(
postType
[
1
]);
}
}
cell
=
row
.
getCell
(
4
);
cell
=
row
.
getCell
(
4
);
if
(
cell
!=
null
)
{
if
(
cell
!=
null
)
{
String
[]
split
=
cell
.
toString
().
split
(
"@"
);
String
[]
carName
=
cell
.
toString
().
split
(
"@"
);
dutyCarDto
.
setCarName
(
split
[
0
]);
dutyCarDto
.
setCarName
(
carName
[
0
]);
dutyCarDto
.
setCarId
(
split
[
1
]);
dutyCarDto
.
setCarId
(
carName
[
1
]);
}
}
List
<
DutyPersonShiftDto
>
dutyShift
=
dutyCarDto
.
getDutyShift
();
List
<
DutyPersonShiftDto
>
dutyShift
=
dutyCarDto
.
getDutyShift
();
for
(
int
j
=
0
;
j
<
dayByMonth
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
dayByMonth
.
size
();
j
++)
{
cell
=
row
.
getCell
(
5
+
j
);
cell
=
row
.
getCell
(
5
+
j
);
String
dutyType
=
cell
==
null
?
""
:
cell
.
toString
();
String
dutyType
=
cell
==
null
?
""
:
cell
.
toString
();
if
(!
StringUtils
.
isEmpty
(
dutyType
))
{
if
(!
StringUtils
.
isEmpty
(
dutyType
))
{
DutyPersonShiftDto
dutyPersonShiftDto
=
new
DutyPersonShiftDto
();
DutyPersonShiftDto
dutyPersonShiftDto
=
new
DutyPersonShiftDto
();
dutyPersonShiftDto
.
setDutyDate
(
dayByMonth
.
get
(
j
));
dutyPersonShiftDto
.
setDutyDate
(
dayByMonth
.
get
(
j
));
dutyPersonShiftDto
.
setShiftId
(
Long
.
valueOf
(
dutyType
.
split
(
"@"
)[
1
]));
dutyPersonShiftDto
.
setShiftId
(
Long
.
valueOf
(
dutyType
.
split
(
"@"
)[
1
]));
dutyShift
.
add
(
dutyPersonShiftDto
);
dutyShift
.
add
(
dutyPersonShiftDto
);
}
}
}
Map
<
String
,
Object
>
dutyCarDtoMap
=
Bean
.
BeantoMap
(
dutyCarDto
);
dataList
.
add
(
dutyCarDtoMap
);
}
}
Map
<
String
,
Object
>
dutyCarDtoMap
=
Bean
.
BeantoMap
(
dutyCarDto
);
dataList
.
add
(
dutyCarDtoMap
);
}
}
}
}
...
@@ -593,6 +600,7 @@ public class ExcelController extends BaseController {
...
@@ -593,6 +600,7 @@ public class ExcelController extends BaseController {
list
.
add
(
row
.
getAndIncrement
());
list
.
add
(
row
.
getAndIncrement
());
list
.
add
(
o
.
getSequenceNbr
().
toString
());
list
.
add
(
o
.
getSequenceNbr
().
toString
());
list
.
add
(
o
.
getBizOrgName
());
list
.
add
(
o
.
getBizOrgName
());
list
.
add
(
item
.
getBizOrgName
()
+
"@"
+
item
.
getSequenceNbr
());
data
.
add
(
list
);
data
.
add
(
list
);
});
});
}
}
...
@@ -665,6 +673,7 @@ public class ExcelController extends BaseController {
...
@@ -665,6 +673,7 @@ public class ExcelController extends BaseController {
list
.
add
(
row
.
getAndIncrement
());
list
.
add
(
row
.
getAndIncrement
());
list
.
add
(
o
.
getUserId
());
list
.
add
(
o
.
getUserId
());
list
.
add
(
o
.
getUserName
());
list
.
add
(
o
.
getUserName
());
list
.
add
(
o
.
getDeptName
());
list
.
add
(
o
.
getPostTypeName
());
list
.
add
(
o
.
getPostTypeName
());
List
<
DutyPersonShiftDto
>
dutyShift
=
o
.
getDutyShift
();
List
<
DutyPersonShiftDto
>
dutyShift
=
o
.
getDutyShift
();
...
...
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