Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhongtong-avi-service
Project
Project
Details
Activity
Releases
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
中通客车项目
zhongtong-avi-service
Commits
7596a614
Commit
7596a614
authored
Oct 12, 2019
by
喻训浩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 测试数据
parent
855dd6bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
18 deletions
+50
-18
EquipmentController.java
...ongtong/avi/equipment/controller/EquipmentController.java
+1
-1
EquipmentService.java
...tar/zhongtong/avi/equipment/service/EquipmentService.java
+6
-1
AreaController.java
...r/zhongtong/avi/monitoring/controller/AreaController.java
+43
-16
No files found.
src/main/java/net/vtstar/zhongtong/avi/equipment/controller/EquipmentController.java
View file @
7596a614
...
@@ -36,7 +36,7 @@ public class EquipmentController {
...
@@ -36,7 +36,7 @@ public class EquipmentController {
""
)
""
)
@PostMapping
(
value
=
"/realTime/data"
)
@PostMapping
(
value
=
"/realTime/data"
)
private
Return
getRealTimeData
(
@RequestBody
SearchVo
pageFilter
)
{
private
Return
getRealTimeData
(
@RequestBody
SearchVo
pageFilter
)
{
Object
realTimeData
=
equipmentService
.
findRealTimeData
();
Object
realTimeData
=
equipmentService
.
findRealTimeData
(
pageFilter
);
List
<
Map
<
String
,
Object
>>
data
=
(
List
<
Map
<
String
,
Object
>>)
realTimeData
;
List
<
Map
<
String
,
Object
>>
data
=
(
List
<
Map
<
String
,
Object
>>)
realTimeData
;
return
Return
.
success
(
new
PageInfo
<>(
data
));
return
Return
.
success
(
new
PageInfo
<>(
data
));
}
}
...
...
src/main/java/net/vtstar/zhongtong/avi/equipment/service/EquipmentService.java
View file @
7596a614
package
net
.
vtstar
.
zhongtong
.
avi
.
equipment
.
service
;
package
net
.
vtstar
.
zhongtong
.
avi
.
equipment
.
service
;
import
net.vtstar.user.search.controller.vo.SearchVo
;
import
net.vtstar.zhongtong.avi.stamping.domain.LaserCuttingMachine
;
import
net.vtstar.zhongtong.avi.stamping.domain.LaserCuttingMachine
;
import
org.apache.poi.hssf.util.HSSFColor
;
import
org.apache.poi.hssf.util.HSSFColor
;
import
org.apache.poi.ss.usermodel.BorderStyle
;
import
org.apache.poi.ss.usermodel.BorderStyle
;
...
@@ -9,6 +10,7 @@ import org.apache.poi.xssf.usermodel.XSSFFont;
...
@@ -9,6 +10,7 @@ import org.apache.poi.xssf.usermodel.XSSFFont;
import
org.apache.poi.xssf.usermodel.XSSFRow
;
import
org.apache.poi.xssf.usermodel.XSSFRow
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
...
@@ -23,7 +25,10 @@ import java.util.List;
...
@@ -23,7 +25,10 @@ import java.util.List;
@Service
@Service
public
class
EquipmentService
{
public
class
EquipmentService
{
public
<
T
>
T
findRealTimeData
()
{
@Autowired
private
EquipmentService
equipmentService
;
public
<
T
>
T
findRealTimeData
(
SearchVo
pageFilter
)
{
List
<
LaserCuttingMachine
>
ma
=
new
ArrayList
<>();
List
<
LaserCuttingMachine
>
ma
=
new
ArrayList
<>();
LaserCuttingMachine
machine
=
new
LaserCuttingMachine
();
LaserCuttingMachine
machine
=
new
LaserCuttingMachine
();
machine
.
setBeginTime
(
new
Date
());
machine
.
setBeginTime
(
new
Date
());
...
...
src/main/java/net/vtstar/zhongtong/avi/monitoring/controller/AreaController.java
View file @
7596a614
...
@@ -35,26 +35,53 @@ public class AreaController {
...
@@ -35,26 +35,53 @@ public class AreaController {
private
Return
getAreaInfo
(
@RequestParam
(
value
=
"areaNo"
,
required
=
false
)
String
areaNo
)
{
private
Return
getAreaInfo
(
@RequestParam
(
value
=
"areaNo"
,
required
=
false
)
String
areaNo
)
{
List
<
PaintshopArea
>
areas
=
new
ArrayList
<>();
List
<
PaintshopArea
>
areas
=
new
ArrayList
<>();
PaintshopArea
area
=
new
PaintshopArea
();
PaintshopArea
area
=
new
PaintshopArea
();
area
.
setCode
(
"
1
"
);
area
.
setCode
(
"
2
"
);
area
.
setName
(
"
钣金
"
);
area
.
setName
(
"
电泳
"
);
area
.
setOnlineNum
(
"44"
);
area
.
setOnlineNum
(
"44"
);
Map
<
String
,
PaintshopStation
>
stationMap
=
new
HashMap
<>();
Map
<
String
,
PaintshopStation
>
stationMap
=
new
HashMap
<>();
PaintshopStation
station
=
new
PaintshopStation
();
Map
<
String
,
PaintshopStation
>
stationMap2
=
new
HashMap
<>();
station
.
setBusNo
(
"aaa"
);
Map
<
String
,
PaintshopStation
>
stationMap3
=
new
HashMap
<>();
station
.
setKeyStation
(
true
);
for
(
int
i
=
0
;
i
<
9
;
i
++)
{
station
.
setCode
(
"HDG1-4"
);
PaintshopStation
station
=
new
PaintshopStation
();
station
.
setState
(
StationState
.
USE
);
station
.
setBusNo
(
"No"
+
i
);
station
.
setBusType
(
ProductionType
.
OWN
);
station
.
setKeyStation
(
true
);
stationMap
.
put
(
"HDG1-4"
,
station
);
station
.
setCode
(
"HDG1-4"
+
i
);
PaintshopStation
station2
=
new
PaintshopStation
();
station
.
setState
(
StationState
.
USE
);
station2
.
setBusNo
(
"bbb"
);
station
.
setBusType
(
ProductionType
.
OWN
);
station2
.
setKeyStation
(
false
);
stationMap
.
put
(
"HDG1-4"
+
i
,
station
);
station2
.
setBusType
(
ProductionType
.
OTHER
);
}
station2
.
setState
(
StationState
.
FREE
);
PaintshopArea
area2
=
new
PaintshopArea
();
station2
.
setCode
(
"HDG1-3"
);
area2
.
setCode
(
"1"
);
stationMap
.
put
(
"HDG1-3"
,
station2
);
area2
.
setName
(
"钣金"
);
area2
.
setOnlineNum
(
"44"
);
for
(
int
i
=
0
;
i
<
9
;
i
++)
{
PaintshopStation
station
=
new
PaintshopStation
();
station
.
setBusNo
(
"No"
+
i
);
station
.
setKeyStation
(
true
);
station
.
setCode
(
"HDG1-1"
+
i
);
station
.
setState
(
StationState
.
USE
);
station
.
setBusType
(
ProductionType
.
OWN
);
stationMap2
.
put
(
"HDG1-1"
+
i
,
station
);
}
PaintshopArea
area3
=
new
PaintshopArea
();
area3
.
setCode
(
"6"
);
area3
.
setName
(
"喷涂"
);
area3
.
setOnlineNum
(
"44"
);
for
(
int
i
=
0
;
i
<
9
;
i
++)
{
PaintshopStation
station
=
new
PaintshopStation
();
station
.
setBusNo
(
"No"
+
i
);
station
.
setKeyStation
(
true
);
station
.
setCode
(
"HDG1-19"
+
i
);
station
.
setState
(
StationState
.
USE
);
station
.
setBusType
(
ProductionType
.
OWN
);
stationMap3
.
put
(
"HDG1-19"
+
i
,
station
);
}
area
.
setStationMap
(
stationMap
);
area
.
setStationMap
(
stationMap
);
area2
.
setStationMap
(
stationMap2
);
area3
.
setStationMap
(
stationMap3
);
areas
.
add
(
area
);
areas
.
add
(
area
);
areas
.
add
(
area2
);
areas
.
add
(
area3
);
return
Return
.
success
(
areas
);
return
Return
.
success
(
areas
);
}
}
...
...
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