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
1a46694a
Commit
1a46694a
authored
Nov 19, 2019
by
喻训浩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: avi修改
parent
41df7676
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
16 deletions
+47
-16
PDAController.java
...ar/zhongtong/avi/monitoring/controller/PDAController.java
+15
-4
PDAService.java
...t/vtstar/zhongtong/avi/monitoring/service/PDAService.java
+32
-12
No files found.
src/main/java/net/vtstar/zhongtong/avi/monitoring/controller/PDAController.java
View file @
1a46694a
package
net
.
vtstar
.
zhongtong
.
avi
.
monitoring
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
io.jsonwebtoken.lang.Assert
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -9,7 +8,10 @@ import net.vtstar.utils.asserts.ParamAssert;
import
net.vtstar.utils.domain.Return
;
import
net.vtstar.zhongtong.avi.monitoring.service.PDAService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@Slf4j
@Api
(
description
=
"PDA相关操作模块"
)
...
...
@@ -38,9 +40,13 @@ public class PDAController {
private
Return
changeSkid
(
@RequestBody
JSONObject
json
)
{
log
.
info
(
json
.
toJSONString
());
ParamAssert
.
notNull
(
json
.
get
(
"orderNo"
),
"orderNo is null"
);
String
orderNo
=
json
.
getString
(
"orderNo"
);
String
sourceStation
=
json
.
getString
(
"sourceStation"
);
String
targetStation
=
json
.
getString
(
"targetStation"
);
ParamAssert
.
notNull
(
orderNo
,
"orderNo is null"
);
ParamAssert
.
notNull
(
json
.
get
(
"sourceStation"
),
"sourceStation is null"
);
ParamAssert
.
notNull
(
json
.
get
(
"sourceStation"
),
"sourceStation is null"
);
pdaService
.
changeSkid
(
sourceStation
,
targetStation
);
return
Return
.
success
();
}
...
...
@@ -49,7 +55,12 @@ public class PDAController {
private
Return
repair
(
@RequestBody
JSONObject
json
)
{
log
.
info
(
json
.
toJSONString
());
ParamAssert
.
notNull
(
json
.
get
(
"busNo"
),
"param is null"
);
log
.
info
(
json
.
toJSONString
());
String
vehicleNo
=
json
.
getString
(
"vehicleNo"
);
String
busNo
=
json
.
getString
(
"busNo"
);
ParamAssert
.
notNull
(
vehicleNo
,
"param is null"
);
ParamAssert
.
notNull
(
busNo
,
"param is null"
);
pdaService
.
repair
(
vehicleNo
,
busNo
);
return
Return
.
success
();
}
...
...
src/main/java/net/vtstar/zhongtong/avi/monitoring/service/PDAService.java
View file @
1a46694a
...
...
@@ -7,6 +7,7 @@ import net.vtstar.zhongtong.avi.monitoring.domain.Vehicle;
import
org.springframework.data.redis.core.HashOperations
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.Assert
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
...
...
@@ -22,16 +23,6 @@ public class PDAService {
@Resource
(
name
=
"redisTemplate"
)
protected
ValueOperations
valueOperations
;
public
static
void
main
(
String
[]
args
)
{
boolean
a
=
true
;
boolean
b
=
false
;
boolean
c
=
false
;
boolean
d
=
true
;
System
.
out
.
println
(
a
&
b
);
System
.
out
.
println
(
a
&
d
);
System
.
out
.
println
(
b
&&
c
);
}
//钣金上车绑定
public
void
bound
(
String
vehicleNo
,
String
busNo
)
{
...
...
@@ -39,11 +30,40 @@ public class PDAService {
// TODO: 2019-11-02 判断车身工单号是否在计划中
if
(
vehicleNo
.
equals
(
"HZC1"
)){
if
(
vehicleNo
.
equals
(
"HZC1"
))
{
valueOperations
.
set
(
Constant
.
HANZHUANG_VEHICLE1_BUSNO_KEY
+
"rfid68"
,
busNo
);
}
if
(
vehicleNo
.
equals
(
"HZC2"
)){
if
(
vehicleNo
.
equals
(
"HZC2"
))
{
valueOperations
.
set
(
Constant
.
HANZHUANG_VEHICLE1_BUSNO_KEY
+
"rfid69"
,
busNo
);
}
}
public
void
changeSkid
(
String
sourceStation
,
String
targetStation
)
{
PaintshopStation
source
=
(
PaintshopStation
)
valueOperations
.
get
(
Constant
.
STATION_PREFIX
+
sourceStation
);
PaintshopStation
target
=
(
PaintshopStation
)
valueOperations
.
get
(
Constant
.
STATION_PREFIX
+
targetStation
);
Skid
sourceSkid
=
source
.
getSkid
();
Skid
targetSkid
=
target
.
getSkid
();
Assert
.
notNull
(
sourceSkid
,
sourceStation
+
":此工位没有滑撬!"
);
Assert
.
notNull
(
targetSkid
,
targetStation
+
":此工位没有滑撬!"
);
source
.
setBusNo
(
null
);
sourceSkid
.
setBusNo
(
null
);
source
.
setSkid
(
sourceSkid
);
target
.
setBusNo
(
sourceSkid
.
getBusNo
());
targetSkid
.
setBusNo
(
sourceSkid
.
getBusNo
());
target
.
setSkid
(
targetSkid
);
valueOperations
.
set
(
Constant
.
SKID_PREFIX
+
sourceSkid
.
getRfid
(),
source
);
valueOperations
.
set
(
Constant
.
STATION_PREFIX
+
sourceStation
,
source
);
valueOperations
.
set
(
Constant
.
STATION_PREFIX
+
targetStation
,
target
);
}
public
void
repair
(
String
vehicleNo
,
String
busNo
)
{
// TODO: 2019-11-02 平移车绑定车身号
}
}
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