Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
e67f9ef9
Commit
e67f9ef9
authored
Jul 09, 2021
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
7852ec98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
27 deletions
+28
-27
DutyCarController.java
.../boot/module/common/biz/controller/DutyCarController.java
+2
-2
IDutyCommonService.java
...os/boot/module/common/biz/service/IDutyCommonService.java
+2
-1
DutyCommonServiceImpl.java
...module/common/biz/service/impl/DutyCommonServiceImpl.java
+24
-24
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyCarController.java
View file @
e67f9ef9
...
@@ -117,9 +117,9 @@ public class DutyCarController extends BaseController {
...
@@ -117,9 +117,9 @@ public class DutyCarController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
"/exportExcel"
)
@GetMapping
(
"/exportExcel"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆执勤导出"
,
notes
=
"车辆执勤导出"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆执勤导出"
,
notes
=
"车辆执勤导出"
)
public
void
exportExcel
(
HttpServletResponse
response
,
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
public
ResponseModel
exportExcel
(
HttpServletResponse
response
,
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
)
throws
ParseException
{
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
)
throws
ParseException
{
iDutyCarService
.
downloadList
(
beginDate
,
endDate
,
response
);
return
ResponseHelper
.
buildResponse
(
iDutyCarService
.
downloadList
(
beginDate
,
endDate
,
response
)
);
}
}
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/IDutyCommonService.java
View file @
e67f9ef9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.text.ParseException
;
...
@@ -47,7 +48,7 @@ public interface IDutyCommonService {
...
@@ -47,7 +48,7 @@ public interface IDutyCommonService {
*/
*/
String
getGroupCode
();
String
getGroupCode
();
void
downloadList
(
String
beginDate
,
String
endDate
,
HttpServletResponse
response
)
throws
ParseException
;
List
<
DutyCarDto
>
downloadList
(
String
beginDate
,
String
endDate
,
HttpServletResponse
response
)
throws
ParseException
;
/**
/**
* 值班数据入库
* 值班数据入库
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyCommonServiceImpl.java
View file @
e67f9ef9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyShift
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyShift
;
...
@@ -88,7 +90,7 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
...
@@ -88,7 +90,7 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
.
le
(
endDate
!=
null
,
DutyPersonShift:
:
getDutyDate
,
endDate
)).
stream
().
map
(
e
->
{
.
le
(
endDate
!=
null
,
DutyPersonShift:
:
getDutyDate
,
endDate
)).
stream
().
map
(
e
->
{
DutyPersonShiftDto
dto
=
new
DutyPersonShiftDto
();
DutyPersonShiftDto
dto
=
new
DutyPersonShiftDto
();
Bean
.
copyExistPropertis
(
e
,
dto
);
Bean
.
copyExistPropertis
(
e
,
dto
);
dto
.
setShiftName
(
keyNameMap
.
get
(
e
.
getS
equenceNbr
()));
dto
.
setShiftName
(
keyNameMap
.
get
(
e
.
getS
hiftId
()));
return
dto
;
return
dto
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
m
.
put
(
"dutyShift"
,
personShiftList
);
m
.
put
(
"dutyShift"
,
personShiftList
);
...
@@ -175,30 +177,28 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
...
@@ -175,30 +177,28 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
}
}
@Override
@Override
public
void
downloadList
(
String
beginDate
,
String
endDate
,
HttpServletResponse
response
)
throws
ParseException
{
public
List
<
DutyCarDto
>
downloadList
(
String
beginDate
,
String
endDate
,
HttpServletResponse
response
)
throws
ParseException
{
List
<
Map
<
String
,
Object
>>
maps
=
this
.
list
(
beginDate
,
endDate
);
List
<
Map
<
String
,
Object
>>
maps
=
this
.
list
(
beginDate
,
endDate
);
String
groupCode
=
this
.
getGroupCode
();
JSONArray
jsonArray
=
new
JSONArray
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
);
jsonArray
.
addAll
(
maps
);
Date
d
=
sdf
.
parse
(
beginDate
);
List
<
DutyCarDto
>
list
=
jsonArray
.
toJavaList
(
DutyCarDto
.
class
);
Calendar
calendar
=
Calendar
.
getInstance
();
return
list
;
calendar
.
setTime
(
d
);
// String groupCode = this.getGroupCode();
List
<
String
>
dayByMonth
=
DateUtils
.
getDayByMonth
(
calendar
.
get
(
Calendar
.
YEAR
),
calendar
.
get
(
Calendar
.
MONTH
));
// String fileName;
List
<
Map
<
String
,
Object
>>
contentList
=
new
ArrayList
<>();
// List<Map<String, Object>> contentList = new ArrayList<>();
String
fileName
;
// if (0 < maps.size()) {
if
(
0
<
maps
.
size
())
{
// for (Map<String, Object> map : maps) {
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
//
// }
}
// }
}
// if ("dutyCar".equals(groupCode)) {
if
(
"dutyCar"
.
equals
(
groupCode
))
{
// fileName = "车辆执勤值班表";
fileName
=
"车辆执勤值班表"
;
//
// } else {
}
else
{
// fileName = "消防人员值班表";
fileName
=
"消防人员值班表"
;
//
// }
}
// return null;
// Workbook workbook = initExcel(appKey, orgCode, getTitleMap(year, mouth), contentList);
// ExcelUtils.exportExcel(workbook, fileName, response);
}
}
@Override
@Override
...
...
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