Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xnr-interface
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
heli_wms
xnr-interface
Commits
57b06d39
Commit
57b06d39
authored
Dec 17, 2019
by
tank.li@mushiny.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wcs任务发送
parent
07915eeb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
14 deletions
+46
-14
ICQAService.java
src/main/java/com/mushiny/heli/xnr/service/ICQAService.java
+21
-5
InboundService.java
...ain/java/com/mushiny/heli/xnr/service/InboundService.java
+0
-0
Sql_Table.java
src/main/java/com/mushiny/heli/xnr/service/Sql_Table.java
+8
-0
WMSService.java
src/main/java/com/mushiny/heli/xnr/service/WMSService.java
+3
-3
WmsToWcsService.java
src/main/java/com/mushiny/heli/xnr/wcs/WmsToWcsService.java
+14
-6
No files found.
src/main/java/com/mushiny/heli/xnr/service/ICQAService.java
View file @
57b06d39
...
...
@@ -6,6 +6,7 @@ import com.mushiny.heli.xnr.comm.JsonUtils;
import
com.mushiny.heli.xnr.dto.MessageDTO
;
import
com.mushiny.heli.xnr.dto.StorageLocation
;
import
com.mushiny.heli.xnr.jdbc.repositories.JdbcRepository
;
import
com.mushiny.heli.xnr.wcs.WmsToWcsService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -26,6 +27,8 @@ public class ICQAService {
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ICQAService
.
class
);
@Autowired
private
SystemPropertiesManager
systemPropertiesManager
;
@Autowired
private
WmsToWcsService
wmsToWcsService
;
/**
* 当前货架的盘点任务
...
...
@@ -165,9 +168,9 @@ public class ICQAService {
String
needFace
=
CommonUtils
.
parseString
(
"POD_FACE"
,
podOrder
);
//int sameFaceIndex = index.get(needFace);
String
tripPositionID
;
List
<
Map
>
tripPositions
=
this
.
inboundService
.
existTripPosition
(
workStation
,
podId
,
needFace
,
"ICQAPod"
);
List
<
Map
>
tripPositions
=
this
.
existTripPosition
(
workStation
,
podId
,
needFace
);
if
(
tripPositions
.
isEmpty
())
{
BaseBpo
baseBpo2
=
new
BaseBpo
();
/*
BaseBpo baseBpo2 = new BaseBpo();
baseBpo2.setTable("RCS_TRIPPOSITION");
tripPositionID = CommonUtils.genUUID();
baseBpo2.addKV("ID", tripPositionID);
...
...
@@ -177,14 +180,21 @@ public class ICQAService {
baseBpo2.addKV("POSITION_NO", j + 1);
baseBpo2.addKV("WAREHOUSE_ID", CommonUtils.parseString("WAREHOUSE_ID", map));
baseBpo2.addKV("SECTION_ID", CommonUtils.parseString("SECTION_ID", map));
this
.
jdbcRepository
.
insertBusinessObject
(
baseBpo2
);
this.jdbcRepository.insertBusinessObject(baseBpo2);*/
Integer
podIndex
=
CommonUtils
.
parseInteger
(
"POD_INDEX"
,
podOrder
);
Integer
stopCellId
=
CommonUtils
.
parseInteger
(
"STOPPOINT"
,
podOrder
);
Integer
sectId
=
CommonUtils
.
parseInteger
(
"RCS_SECTIONID"
,
podOrder
);
Integer
face
=
CommonUtils
.
faceToInteger
(
needFace
);
Integer
wsDirect
=
CommonUtils
.
wsFace2Direct
(
CommonUtils
.
parseInteger
(
"WORKING_FACE_ORIENTATION"
,
podOrder
));
tripPositionID
=
this
.
wmsToWcsService
.
sendSingleTripToWcs
(
podIndex
,
sectId
,
stopCellId
,
wsDirect
,
face
);
}
else
{
Map
data
=
tripPositions
.
get
(
0
);
tripPositionID
=
CommonUtils
.
parseString
(
"ID"
,
data
);
}
Map
newValue
=
new
HashMap
();
newValue
.
put
(
"STATE"
,
Sql_Table
.
AVAILABLE
);
//生成就结束了 是不是执行完看TRIPPOSITION_ID
newValue
.
put
(
"STATE"
,
Sql_Table
.
PROCESS
);
//生成就结束了 是不是执行完看TRIPPOSITION_ID
newValue
.
put
(
"TRIPPOSITION_ID"
,
tripPositionID
);
CommonUtils
.
modifyUselessInfo
(
newValue
);
...
...
@@ -196,6 +206,12 @@ public class ICQAService {
}
}
public
List
<
Map
>
existTripPosition
(
String
workStation
,
String
podId
,
String
needFace
)
{
List
<
Map
>
datas
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_ICQA_PODORDER
,
needFace
,
podId
,
workStation
);
return
datas
;
}
public
Map
searchIcqa
(
Map
data
)
{
String
taskId
=
CommonUtils
.
parseString
(
"taskId"
,
data
);
...
...
@@ -329,7 +345,7 @@ public class ICQAService {
baseBpo
.
addKV
(
"WORKSTATION_ID"
,
stationName
);
baseBpo
.
addKV
(
"PODINDEX"
,
storageLocation
.
getPodIndex
());
baseBpo
.
addKV
(
"AMOUNT"
,
CommonUtils
.
parseString
(
"AMOUNT"
,
map
));
baseBpo
.
addKV
(
"STATE"
,
Sql_Table
.
NEW
);
baseBpo
.
addKV
(
"STATE"
,
Sql_Table
.
AVAILABLE
);
baseBpo
.
addKV
(
"WAREHOUSE_ID"
,
CommonUtils
.
parseString
(
"WAREHOUSE_ID"
,
map
));
baseBpo
.
addKV
(
"SECTION_ID"
,
CommonUtils
.
parseString
(
"SECTION_ID"
,
map
));
//插入货架搬运任务 指令
...
...
src/main/java/com/mushiny/heli/xnr/service/InboundService.java
View file @
57b06d39
This diff is collapsed.
Click to expand it.
src/main/java/com/mushiny/heli/xnr/service/Sql_Table.java
View file @
57b06d39
...
...
@@ -98,6 +98,7 @@ public interface Sql_Table {
String
SQL_QUERY_CURRENTPOD
=
"SELECT WMS_POD_STATION.POD_ID, WMS_POD_STATION.POD_INDEX, WMS_POD_STATION.TOWARD, \n"
+
" MD_WORKSTATION.WORKING_FACE_ORIENTATION, \n"
+
" WMS_POD_STATION.TRIP_TASKID, \n"
+
" WMS_POD_STATION.SECTION_ID, \n"
+
" WMS_POD_STATION.PLACEMARK FROM WMS_POD_STATION, MD_WORKSTATION \n"
+
" WHERE WMS_POD_STATION.PLACEMARK = MD_WORKSTATION.STOPPOINT \n"
+
" AND MD_WORKSTATION.ID = ?"
;
...
...
@@ -207,4 +208,11 @@ public interface Sql_Table {
"AND RCS_TRIP.TRIP_STATE= ?\n"
+
"AND RCS_TRIPPOSITION.TRIPPOSITION_STATE=? \n"
+
"ORDER BY POD_INDEX"
;
String
SQL_QUERY_INBOUND_PODORDER
=
"SELECT * FROM WMS_INBOUND_PODORDER "
+
"WHERE STATE='Available' AND POD_FACE=? "
+
"AND POD_ID=? AND WORKSTATION_ID=? limit 1"
;
String
SQL_QUERY_ICQA_PODORDER
=
"SELECT * FROM WMS_ICQA_PODORDER "
+
"WHERE STATE='Available' AND POD_FACE=? "
+
"AND POD_ID=? AND WORKSTATION_ID=? limit 1"
;
String
SQL_QUERY_INBOUND_PODORDER_BYENTRYID
=
"SELECT * FROM WMS_INBOUND_PODORDER WHERE ENTRYID=?"
;
}
src/main/java/com/mushiny/heli/xnr/service/WMSService.java
View file @
57b06d39
...
...
@@ -331,8 +331,8 @@ public class WMSService {
public
void
podRelease
(
Map
req
)
{
//货架号(数字)、工作站号(ID)/ SectionID
Integer
podIndex
=
CommonUtils
.
parseInteger
(
"podIndex"
,
req
);
String
stationId
=
CommonUtils
.
parseString
(
"station
Id
"
,
req
);
String
sectionId
=
CommonUtils
.
parseString
(
"sectionId"
,
req
);
this
.
wmsToWcsService
.
releasePod
(
stationId
,
sectionId
,
podIndex
);
String
stationId
=
CommonUtils
.
parseString
(
"station
Name
"
,
req
);
//
String sectionId = CommonUtils.parseString("sectionId",req);
this
.
wmsToWcsService
.
releasePod
(
stationId
,
podIndex
);
}
}
src/main/java/com/mushiny/heli/xnr/wcs/WmsToWcsService.java
View file @
57b06d39
...
...
@@ -130,10 +130,10 @@ public class WmsToWcsService{
@Transactional
public
void
releasePod
(
String
workStationId
,
String
sectionId
,
Integer
podIndex
)
{
logger
.
info
(
"工作站 = {} 释放pod = {}
,sectionId = {} "
,
workStationId
,
podIndex
,
sectionId
);
public
void
releasePod
(
String
workStationId
,
Integer
podIndex
)
{
logger
.
info
(
"工作站 = {} 释放pod = {}
"
,
workStationId
,
podIndex
);
//先查询该停止点是否有任务
Map
podStation
=
this
.
getByWorkStationIdAndPodIndex
(
workStationId
,
sectionId
,
podIndex
);
Map
podStation
=
this
.
getByWorkStationIdAndPodIndex
(
workStationId
,
podIndex
);
if
(
podStation
==
null
){
logger
.
info
(
"工作站 :{} 没有pod : {} ,无法释放。。"
,
workStationId
,
podIndex
);
...
...
@@ -152,6 +152,7 @@ public class WmsToWcsService{
logger
.
info
(
"工作站 = {} 释放pod = {} ,wcs返回taskId:{}"
,
workStationId
,
podIndex
);
//更显pod状态
String
sectionId
=
CommonUtils
.
parseString
(
"SECTION_ID"
,
podStation
);
updatePodState
(
podIndex
,
sectionId
,
Sql_Table
.
AVAILABLE
);
}
...
...
@@ -159,9 +160,8 @@ public class WmsToWcsService{
return
this
.
jdbcRepository
.
queryOneBySql
(
Sql_Table
.
SQL_QUERYPODBYINDEX
,
sectionId
,
podIndex
);
}
private
Map
getByWorkStationIdAndPodIndex
(
String
workStationId
,
String
sectionId
,
Integer
podIndex
)
{
logger
.
debug
(
"条件 workStationId :"
+
workStationId
+
" sectionId:"
+
sectionId
+
" pod: "
+
podIndex
);
private
Map
getByWorkStationIdAndPodIndex
(
String
workStationId
,
Integer
podIndex
)
{
logger
.
debug
(
"条件 workStationId :"
+
workStationId
+
" pod: "
+
podIndex
);
Map
data
=
this
.
jdbcRepository
.
queryOneBySql
(
Sql_Table
.
SQL_QUERY_CURRENTPOD
,
workStationId
);
if
(
Objects
.
equals
(
podIndex
,
CommonUtils
.
parseInteger
(
"POD_INDEX"
,
data
))){
return
data
;
...
...
@@ -172,7 +172,15 @@ public class WmsToWcsService{
private
void
updatePodState
(
Integer
podId
,
String
sectionId
,
String
status
)
{
Map
newValue
=
new
HashMap
();
newValue
.
put
(
"STATE"
,
Sql_Table
.
AVAILABLE
);
CommonUtils
.
modifyUselessInfo
(
newValue
);
Map
con
=
new
HashMap
();
con
.
put
(
"SECTION_ID"
,
sectionId
);
con
.
put
(
"POD_INDEX"
,
podId
);
this
.
jdbcRepository
.
updateRecords
(
"MD_POD"
,
newValue
,
con
);
}
...
...
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