Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes
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
ximai
mes
Commits
11c43d59
Commit
11c43d59
authored
Jan 18, 2025
by
温志超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月、周产能报表导出
parent
0c95606f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
210 additions
and
15 deletions
+210
-15
DailyProductionReportController.java
...es/report/controller/DailyProductionReportController.java
+34
-6
FeedbackController.java
...a/com/ximai/mes/report/controller/FeedbackController.java
+8
-0
MonthlyProductionReportController.java
.../report/controller/MonthlyProductionReportController.java
+73
-0
WeeklyProductionReportController.java
...s/report/controller/WeeklyProductionReportController.java
+86
-2
WorkOrderProgressController.java
...ai/mes/report/controller/WorkOrderProgressController.java
+1
-0
DailyProductionReportService.java
...imai/mes/report/service/DailyProductionReportService.java
+2
-1
DailyProductionReportServiceImp.java
.../report/service/impl/DailyProductionReportServiceImp.java
+6
-6
No files found.
mes/src/main/java/com/ximai/mes/report/controller/DailyProductionReportController.java
View file @
11c43d59
...
...
@@ -6,6 +6,7 @@ import com.ximai.common.core.controller.BaseController;
import
com.ximai.common.core.domain.AjaxResult
;
import
com.ximai.common.core.page.TableDataInfo
;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.common.utils.data.ExceptionUtil
;
import
com.ximai.common.utils.poi.ExcelUtil
;
import
com.ximai.mes.report.request.DailyProductionReportRequest
;
import
com.ximai.mes.report.request.FeedbackRequest
;
...
...
@@ -25,6 +26,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -61,9 +63,14 @@ public class DailyProductionReportController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"日产能对比统计:统计方式工序导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByProcess/export"
)
@ApiOperation
(
"日产能对比统计:统计方式工序导出"
)
public
void
export
(
HttpServletResponse
response
,
DailyProductionReportRequest
dailyProductionReportRequest
)
{
List
data
=
dailyProductionReportService
.
getListByProcess
(
dailyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"日产能对比统计-统计方式工序导出"
,
"工序名称"
,
"工序编码"
,
"工序"
,
dailyProductionReportRequest
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
startDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getStartDate
());
String
endDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getEndDate
());
List
<
String
>
dateList
=
dailyProductionReportService
.
getAscDateList
(
startDate
,
endDate
);
dailyProductionReportService
.
export
(
response
,
data
,
"日产能对比统计-统计方式工序导出"
,
"工序名称"
,
"工序编码"
,
"工序"
,
dateList
);
}
@ApiOperation
(
"日产能对比统计:统计方式车间"
)
...
...
@@ -81,9 +88,14 @@ public class DailyProductionReportController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"日产能对比统计:统计方式车间导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkshop/export"
)
@ApiOperation
(
"日产能对比统计:统计方式工序导出"
)
public
void
getListByWorkshopExport
(
HttpServletResponse
response
,
DailyProductionReportRequest
dailyProductionReportRequest
)
{
List
data
=
dailyProductionReportService
.
getListByWorkshop
(
dailyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"日产能对比统计-统计方式车间导出"
,
"车间名称"
,
"车间编码"
,
"车间"
,
dailyProductionReportRequest
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
startDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getStartDate
());
String
endDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getEndDate
());
List
<
String
>
dateList
=
dailyProductionReportService
.
getAscDateList
(
startDate
,
endDate
);
dailyProductionReportService
.
export
(
response
,
data
,
"日产能对比统计-统计方式车间导出"
,
"车间名称"
,
"车间编码"
,
"车间"
,
dateList
);
}
...
...
@@ -102,9 +114,15 @@ public class DailyProductionReportController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"日产能对比统计:统计方式工作中心导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkstation/export"
)
@ApiOperation
(
"日产能对比统计:统计方式工作中心导出"
)
public
void
getListByWorkstationExport
(
HttpServletResponse
response
,
DailyProductionReportRequest
dailyProductionReportRequest
)
{
List
data
=
dailyProductionReportService
.
getListByWorkstation
(
dailyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"日产能对比统计-统计方式工作中心导出"
,
"工作中心名称"
,
"工作中心编码"
,
"工作中心"
,
dailyProductionReportRequest
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
startDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getStartDate
());
String
endDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getEndDate
());
List
<
String
>
dateList
=
dailyProductionReportService
.
getAscDateList
(
startDate
,
endDate
);
dailyProductionReportService
.
export
(
response
,
data
,
"日产能对比统计-统计方式工作中心导出"
,
"工作中心名称"
,
"工作中心编码"
,
"工作中心"
,
dateList
);
}
...
...
@@ -127,9 +145,14 @@ public class DailyProductionReportController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"日产能对比统计:统计方式工作单元导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkunit/export"
)
@ApiOperation
(
"日产能对比统计:统计方式工作单元导出"
)
public
void
getListByWorkunitExport
(
HttpServletResponse
response
,
DailyProductionReportRequest
dailyProductionReportRequest
)
{
List
data
=
dailyProductionReportService
.
getListByWorkunit
(
dailyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"日产能对比统计-统计方式工作单元导出"
,
"工作单元名称"
,
"工作单元编码"
,
"工作单元"
,
dailyProductionReportRequest
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
startDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getStartDate
());
String
endDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getEndDate
());
List
<
String
>
dateList
=
dailyProductionReportService
.
getAscDateList
(
startDate
,
endDate
);
dailyProductionReportService
.
export
(
response
,
data
,
"日产能对比统计-统计方式工作单元导出"
,
"工作单元名称"
,
"工作单元编码"
,
"工作单元"
,
dateList
);
}
...
...
@@ -148,10 +171,15 @@ public class DailyProductionReportController extends BaseController {
* 日产能对比统计:统计方式工作中心导出
*/
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"日产能对比统计:统计方式
工作单元导出
"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"日产能对比统计:统计方式
报工人员
"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByUser/export"
)
@ApiOperation
(
"日产能对比统计:统计方式报工人员"
)
public
void
getListByUserExport
(
HttpServletResponse
response
,
DailyProductionReportRequest
dailyProductionReportRequest
)
{
List
data
=
dailyProductionReportService
.
getListByUser
(
dailyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"日产能对比统计-统计方式工作单元导出"
,
"报工人员名称"
,
"报工人员编码"
,
"报工人员"
,
dailyProductionReportRequest
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
startDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getStartDate
());
String
endDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getEndDate
());
List
<
String
>
dateList
=
dailyProductionReportService
.
getAscDateList
(
startDate
,
endDate
);
dailyProductionReportService
.
export
(
response
,
data
,
"日产能对比统计-统计方式报工人员导出"
,
"报工人员名称"
,
"报工人员编码"
,
"报工人员"
,
dateList
);
}
}
mes/src/main/java/com/ximai/mes/report/controller/FeedbackController.java
View file @
11c43d59
...
...
@@ -49,6 +49,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"生产报工记录:明细界面导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getList/export"
)
@ApiOperation
(
"生产报工记录:明细界面导出"
)
public
void
export
(
HttpServletResponse
response
,
FeedbackRequest
feedbackRequest
)
{
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getList
(
feedbackRequest
);
ExcelUtil
<
FeedbackResponse
>
util
=
new
ExcelUtil
<>(
FeedbackResponse
.
class
);
...
...
@@ -83,6 +84,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"生产报工记录:统计方式工单界面导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkOrder/export"
)
@ApiOperation
(
"生产报工记录:统计方式工单界面导出"
)
public
void
getListByWorkOrderExport
(
HttpServletResponse
response
,
FeedbackRequest
feedbackRequest
)
{
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkOrder
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -128,6 +130,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"生产报工记录:统计方式车间界面导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkshop/export"
)
@ApiOperation
(
"生产报工记录:统计方式车间界面导出"
)
public
void
getListByWorkshopExport
(
HttpServletResponse
response
,
FeedbackRequest
feedbackRequest
)
{
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkshop
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -172,6 +175,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"生产报工记录:统计方式工作中心导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkstation/export"
)
@ApiOperation
(
"生产报工记录:统计方式工作中心导出"
)
public
void
getListByWorkstationExport
(
HttpServletResponse
response
,
FeedbackRequest
feedbackRequest
)
{
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkstation
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -215,6 +219,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"生产报工记录:统计统计方式工作单元导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkunit/export"
)
@ApiOperation
(
"生产报工记录:统计统计方式工作单元导出"
)
public
void
getListByWorkunitExport
(
HttpServletResponse
response
,
FeedbackRequest
feedbackRequest
)
{
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkunit
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -259,6 +264,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"生产报工记录:统计方式工序导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByProcess/export"
)
@ApiOperation
(
"生产报工记录:统计方式工序导出"
)
public
void
getListByProcessExport
(
HttpServletResponse
response
,
FeedbackRequest
feedbackRequest
)
{
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByProcess
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -301,6 +307,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"生产报工记录:统计方式用户导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByUser/export"
)
@ApiOperation
(
"生产报工记录:统计方式用户导出"
)
public
void
getListByUserExport
(
HttpServletResponse
response
,
FeedbackRequest
feedbackRequest
)
{
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByUser
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -349,6 +356,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"生产报工记录:统计方式不合格原因导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByDefect/export"
)
@ApiOperation
(
"生产报工记录:统计方式不合格原因导出"
)
public
void
getListByDefectExport
(
HttpServletResponse
response
,
FeedbackRequest
feedbackRequest
)
{
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByDefect
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
mes/src/main/java/com/ximai/mes/report/controller/MonthlyProductionReportController.java
View file @
11c43d59
...
...
@@ -3,17 +3,25 @@ package com.ximai.mes.report.controller;
import
com.ximai.common.annotation.Log
;
import
com.ximai.common.core.domain.AjaxResult
;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.mes.report.request.DailyProductionReportRequest
;
import
com.ximai.mes.report.request.MonthlyProductionReportRequest
;
import
com.ximai.mes.report.request.MonthlyProductionReportRequest
;
import
com.ximai.mes.report.service.DailyProductionReportService
;
import
com.ximai.mes.report.service.MonthlyProductionReportService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
@Api
(
"月产能对比统计"
)
...
...
@@ -24,6 +32,12 @@ public class MonthlyProductionReportController {
@Autowired
MonthlyProductionReportService
monthlyProductionReportService
;
@Autowired
DailyProductionReportService
dailyProductionReportService
;
private
List
<
String
>
dateList
=
new
ArrayList
<
String
>(
Arrays
.
asList
(
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"06"
,
"07"
,
"08"
,
"09"
,
"10"
,
"11"
,
"12"
));
@ApiOperation
(
"月产能对比统计:统计方式工序"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:dailyProductionReport:get')"
)
@Log
(
title
=
"月产能对比统计:统计方式工序"
,
businessType
=
BusinessType
.
QUERY
)
...
...
@@ -33,6 +47,14 @@ public class MonthlyProductionReportController {
return
AjaxResult
.
success
(
data
);
}
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"月产能对比统计:统计方式工序导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByProcess/export"
)
@ApiOperation
(
"月产能对比统计:统计方式工序导出"
)
public
void
export
(
HttpServletResponse
response
,
MonthlyProductionReportRequest
monthlyProductionReportRequest
)
{
List
data
=
monthlyProductionReportService
.
getListByProcess
(
monthlyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"月产能对比统计-统计方式工序导出"
,
"工序名称"
,
"工序编码"
,
"工序"
,
dateList
);
}
@ApiOperation
(
"月产能对比统计:统计方式车间"
)
...
...
@@ -44,6 +66,17 @@ public class MonthlyProductionReportController {
return
AjaxResult
.
success
(
data
);
}
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"月产能对比统计:统计方式车间导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkshop/export"
)
@ApiOperation
(
"月产能对比统计:统计方式车间导出"
)
public
void
getListByWorkshopExport
(
HttpServletResponse
response
,
MonthlyProductionReportRequest
monthlyProductionReportRequest
)
{
List
data
=
monthlyProductionReportService
.
getListByWorkshop
(
monthlyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"月产能对比统计-统计方式车间导出"
,
"车间名称"
,
"车间编码"
,
"车间"
,
dateList
);
}
@ApiOperation
(
"月产能对比统计:统计方式工作中心"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:dailyProductionReport:get')"
)
...
...
@@ -53,6 +86,20 @@ public class MonthlyProductionReportController {
List
data
=
monthlyProductionReportService
.
getListByWorkstation
(
monthlyProductionReportRequest
);
return
AjaxResult
.
success
(
data
);
}
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"月产能对比统计:统计方式工作中心导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkstation/export"
)
@ApiOperation
(
"月产能对比统计:统计方式工作中心导出"
)
public
void
getListByWorkstationExport
(
HttpServletResponse
response
,
MonthlyProductionReportRequest
monthlyProductionReportRequest
)
{
List
data
=
monthlyProductionReportService
.
getListByWorkstation
(
monthlyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"月产能对比统计-统计方式工作中心导出"
,
"工作中心名称"
,
"工作中心编码"
,
"工作中心"
,
dateList
);
}
@ApiOperation
(
"月产能对比统计:统计方式工作单元"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:dailyProductionReport:get')"
)
@Log
(
title
=
"月产能对比统计:统计方式工作单元"
,
businessType
=
BusinessType
.
QUERY
)
...
...
@@ -62,6 +109,20 @@ public class MonthlyProductionReportController {
return
AjaxResult
.
success
(
data
);
}
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"月产能对比统计:统计方式工作单元导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkunit/export"
)
@ApiOperation
(
"月产能对比统计:统计方式工作单元导出"
)
public
void
getListByWorkunitExport
(
HttpServletResponse
response
,
MonthlyProductionReportRequest
monthlyProductionReportRequest
)
{
List
data
=
monthlyProductionReportService
.
getListByWorkunit
(
monthlyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"月产能对比统计-统计方式工作单元导出"
,
"工作单元名称"
,
"工作单元编码"
,
"工作单元"
,
dateList
);
}
@ApiOperation
(
"月产能对比统计:统计方式报工人员"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:dailyProductionReport:get')"
)
@Log
(
title
=
"月产能对比统计:统计方式报工人员"
,
businessType
=
BusinessType
.
QUERY
)
...
...
@@ -71,4 +132,16 @@ public class MonthlyProductionReportController {
return
AjaxResult
.
success
(
data
);
}
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"月产能对比统计:统计方式报工人员导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByUser/export"
)
@ApiOperation
(
"月产能对比统计:统计方式报工人员导出"
)
public
void
getListByUserExport
(
HttpServletResponse
response
,
MonthlyProductionReportRequest
monthlyProductionReportRequest
)
{
List
data
=
monthlyProductionReportService
.
getListByUser
(
monthlyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"月产能对比统计-统计方式报工人员导出"
,
"报工人员名称"
,
"报工人员编码"
,
"报工人员"
,
dateList
);
}
}
mes/src/main/java/com/ximai/mes/report/controller/WeeklyProductionReportController.java
View file @
11c43d59
...
...
@@ -5,6 +5,7 @@ import com.ximai.common.core.domain.AjaxResult;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.mes.report.request.DailyProductionReportRequest
;
import
com.ximai.mes.report.request.WeeklyProductionReportRequest
;
import
com.ximai.mes.report.service.DailyProductionReportService
;
import
com.ximai.mes.report.service.MonthlyProductionReportService
;
import
com.ximai.mes.report.service.WeeklyProductionReportService
;
import
io.swagger.annotations.Api
;
...
...
@@ -12,9 +13,11 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
@Api
(
"周产能对比统计"
)
...
...
@@ -24,10 +27,13 @@ public class WeeklyProductionReportController {
@Autowired
WeeklyProductionReportService
weeklyProductionReportService
;
@Autowired
DailyProductionReportService
dailyProductionReportService
;
@ApiOperation
(
"
日
产能对比统计:获取周表头"
)
@ApiOperation
(
"
周
产能对比统计:获取周表头"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:dailyProductionReport:get')"
)
@Log
(
title
=
"
日
产能对比统计:获取周表头"
,
businessType
=
BusinessType
.
QUERY
)
@Log
(
title
=
"
周
产能对比统计:获取周表头"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getDatas"
)
public
AjaxResult
<
List
>
getDatas
(
WeeklyProductionReportRequest
weeklyProductionReportRequest
)
{
List
data
=
weeklyProductionReportService
.
getDatas
(
weeklyProductionReportRequest
);
...
...
@@ -47,6 +53,20 @@ public class WeeklyProductionReportController {
}
/**
* 日产能对比统计:统计方式工作中心导出
*/
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"周产能对比统计:统计方式工序导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByProcess/export"
)
@ApiOperation
(
"周产能对比统计:统计方式工序导出"
)
public
void
getListByProcessExport
(
HttpServletResponse
response
,
WeeklyProductionReportRequest
weeklyProductionReportRequest
)
{
List
data
=
weeklyProductionReportService
.
getListByProcess
(
weeklyProductionReportRequest
);
List
date
=
weeklyProductionReportService
.
getDatas
(
weeklyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"周产能对比统计-统计方式工序导出"
,
"工序名称"
,
"工序编码"
,
"工序"
,
date
);
}
@ApiOperation
(
"周产能对比统计:统计方式车间"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:dailyProductionReport:get')"
)
...
...
@@ -58,6 +78,21 @@ public class WeeklyProductionReportController {
}
/**
* 日产能对比统计:统计方式工作中心导出
*/
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"周产能对比统计:统计方式车间导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkshop/export"
)
@ApiOperation
(
"周产能对比统计:统计方式车间导出"
)
public
void
getListByWorkshopExport
(
HttpServletResponse
response
,
WeeklyProductionReportRequest
weeklyProductionReportRequest
)
{
List
data
=
weeklyProductionReportService
.
getListByWorkshop
(
weeklyProductionReportRequest
);
List
date
=
weeklyProductionReportService
.
getDatas
(
weeklyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"周产能对比统计-统计方式车间导出"
,
"车间名称"
,
"车间编码"
,
"车间"
,
date
);
}
@ApiOperation
(
"周产能对比统计:统计方式工作中心"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:dailyProductionReport:get')"
)
@Log
(
title
=
"周产能对比统计:统计方式工作中心"
,
businessType
=
BusinessType
.
QUERY
)
...
...
@@ -66,6 +101,22 @@ public class WeeklyProductionReportController {
List
data
=
weeklyProductionReportService
.
getListByWorkstation
(
weeklyProductionReportRequest
);
return
AjaxResult
.
success
(
data
);
}
/**
* 日产能对比统计:统计方式工作中心导出
*/
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"周产能对比统计:统计方式工作中心导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkstation/export"
)
@ApiOperation
(
"周产能对比统计:统计方式工作中心导出"
)
public
void
getListByWorkstationExport
(
HttpServletResponse
response
,
WeeklyProductionReportRequest
weeklyProductionReportRequest
)
{
List
data
=
weeklyProductionReportService
.
getListByWorkstation
(
weeklyProductionReportRequest
);
List
date
=
weeklyProductionReportService
.
getDatas
(
weeklyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"周产能对比统计-统计方式工作中心导出"
,
"工作中心名称"
,
"工作中心编码"
,
"工作中心"
,
date
);
}
@ApiOperation
(
"周产能对比统计:统计方式工作单元"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:dailyProductionReport:get')"
)
@Log
(
title
=
"周产能对比统计:统计方式工作单元"
,
businessType
=
BusinessType
.
QUERY
)
...
...
@@ -75,6 +126,24 @@ public class WeeklyProductionReportController {
return
AjaxResult
.
success
(
data
);
}
/**
* 日产能对比统计:统计方式工作中心导出
*/
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"周产能对比统计:统计方式工作单元导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByWorkunit/export"
)
@ApiOperation
(
"周产能对比统计:统计方式工作单元导出"
)
public
void
getListByWorkunitExport
(
HttpServletResponse
response
,
WeeklyProductionReportRequest
weeklyProductionReportRequest
)
{
List
data
=
weeklyProductionReportService
.
getListByWorkunit
(
weeklyProductionReportRequest
);
List
date
=
weeklyProductionReportService
.
getDatas
(
weeklyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"周产能对比统计-统计方式工作单元导出"
,
"工作单元名称"
,
"工作单元编码"
,
"工作单元"
,
date
);
}
@ApiOperation
(
"周产能对比统计:统计方式报工人员"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:dailyProductionReport:get')"
)
@Log
(
title
=
"周产能对比统计:统计方式报工人员"
,
businessType
=
BusinessType
.
QUERY
)
...
...
@@ -84,4 +153,19 @@ public class WeeklyProductionReportController {
return
AjaxResult
.
success
(
data
);
}
/**
* 日产能对比统计:统计方式工作中心导出
*/
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"周产能对比统计:统计方式报工人员导出"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/getListByUser/export"
)
@ApiOperation
(
"周产能对比统计:统计方式报工人员导出"
)
public
void
getListByUserExport
(
HttpServletResponse
response
,
WeeklyProductionReportRequest
weeklyProductionReportRequest
)
{
List
data
=
weeklyProductionReportService
.
getListByUser
(
weeklyProductionReportRequest
);
List
date
=
weeklyProductionReportService
.
getDatas
(
weeklyProductionReportRequest
);
dailyProductionReportService
.
export
(
response
,
data
,
"周产能对比统计-统计方式报工人员导出"
,
"报工人员名称"
,
"报工人员编码"
,
"报工人员"
,
date
);
}
}
mes/src/main/java/com/ximai/mes/report/controller/WorkOrderProgressController.java
View file @
11c43d59
...
...
@@ -45,6 +45,7 @@ public class WorkOrderProgressController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('pro:materialReturn:export')"
)
@Log
(
title
=
"生产进度:明细界面导出"
,
businessType
=
BusinessType
.
EXPORT
)
@ApiOperation
(
"生产进度:明细界面导出"
)
@PostMapping
(
"/getList/export"
)
public
void
export
(
HttpServletResponse
response
,
WorkOrderProgressRequest
workOrderProgressRequest
)
{
List
<
WorkOrderProgressListResponse
>
workOrderProgressListResponses
=
workOrderProgressService
.
getList
(
workOrderProgressRequest
);
...
...
mes/src/main/java/com/ximai/mes/report/service/DailyProductionReportService.java
View file @
11c43d59
...
...
@@ -19,5 +19,6 @@ public interface DailyProductionReportService {
List
getListByUser
(
DailyProductionReportRequest
dailyProductionReportRequest
);
public
void
export
(
HttpServletResponse
response
,
List
<
Map
>
returnList
,
String
filename
,
String
name
,
String
code
,
String
key
,
DailyProductionReportRequest
dailyProductionReportRequest
);
public
void
export
(
HttpServletResponse
response
,
List
<
Map
>
returnList
,
String
filename
,
String
name
,
String
code
,
String
key
,
List
<
String
>
dataList
);
public
List
<
String
>
getAscDateList
(
String
start
,
String
end
);
}
mes/src/main/java/com/ximai/mes/report/service/impl/DailyProductionReportServiceImp.java
View file @
11c43d59
...
...
@@ -119,7 +119,7 @@ public class DailyProductionReportServiceImp implements DailyProductionReportSer
return
dateList
;
}
public
static
List
<
String
>
getAscDateList
(
String
start
,
String
end
)
{
public
List
<
String
>
getAscDateList
(
String
start
,
String
end
)
{
LocalDate
startDate
=
LocalDate
.
parse
(
start
);
LocalDate
endDate
=
LocalDate
.
parse
(
end
);
...
...
@@ -222,7 +222,7 @@ public class DailyProductionReportServiceImp implements DailyProductionReportSer
public
void
export
(
HttpServletResponse
response
,
List
<
Map
>
returnList
,
String
filename
,
String
name
,
String
code
,
String
key
,
DailyProductionReportRequest
dailyProductionReportReque
st
){
public
void
export
(
HttpServletResponse
response
,
List
<
Map
>
returnList
,
String
filename
,
String
name
,
String
code
,
String
key
,
List
<
String
>
dataLi
st
){
// 第一步,创建一个Workbook,对应一个Excel文件
XSSFWorkbook
wb
=
new
XSSFWorkbook
();
// 第二步,在Workbook中添加一个sheet,对应Excel文件中的sheet
...
...
@@ -253,10 +253,10 @@ public class DailyProductionReportServiceImp implements DailyProductionReportSer
XSSFCell
r1c1
=
row1
.
createCell
(
1
);
r1c1
.
setCellStyle
(
headerStyle
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
startDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getStartDate
());
String
endDate
=
simpleDateFormat
.
format
(
dailyProductionReportRequest
.
getEndDate
());
List
<
String
>
dataList
=
getAscDateList
(
startDate
,
endDate
);
//
String startDate = simpleDateFormat.format(dailyProductionReportRequest.getStartDate());
//
String endDate = simpleDateFormat.format(dailyProductionReportRequest.getEndDate());
//
//
List<String> dataList = getAscDateList(startDate, endDate);
for
(
int
size
=
0
;
size
<
dataList
.
size
()
*
4
+
6
;
size
++){
sheet
.
setColumnWidth
(
size
,
3000
);
}
...
...
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