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
23db72e4
Commit
23db72e4
authored
Dec 18, 2019
by
tank.li@mushiny.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
盘点任务回复
parent
fd0d1b10
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
43 deletions
+101
-43
WMSController.java
...n/java/com/mushiny/heli/xnr/controller/WMSController.java
+18
-0
ICQAService.java
src/main/java/com/mushiny/heli/xnr/service/ICQAService.java
+23
-12
InboundService.java
...ain/java/com/mushiny/heli/xnr/service/InboundService.java
+24
-18
Sql_Table.java
src/main/java/com/mushiny/heli/xnr/service/Sql_Table.java
+18
-12
WMSRespService.java
...ain/java/com/mushiny/heli/xnr/service/WMSRespService.java
+1
-1
WMSService.java
src/main/java/com/mushiny/heli/xnr/service/WMSService.java
+17
-0
No files found.
src/main/java/com/mushiny/heli/xnr/controller/WMSController.java
View file @
23db72e4
...
@@ -88,4 +88,22 @@ public class WMSController {
...
@@ -88,4 +88,22 @@ public class WMSController {
return
ResponseEntity
.
ok
(
dto
);
return
ResponseEntity
.
ok
(
dto
);
}
}
@PostMapping
(
value
=
"/unlock"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ResponseEntity
<
MessageDTO
>
unlock
(
@RequestBody
String
json
)
{
MessageDTO
dto
=
MessageDTO
.
success
();
try
{
int
count
=
this
.
wmsService
.
unlock
();
if
(
count
==
0
)
{
dto
.
setCODE
(
1
);
//失败
dto
.
setMESSAGE
(
"解锁失败!"
);
}
}
catch
(
Exception
e
)
{
dto
.
setMESSAGE
(
e
.
getMessage
());
dto
.
setCODE
(
1
);
}
return
ResponseEntity
.
ok
(
dto
);
}
}
}
src/main/java/com/mushiny/heli/xnr/service/ICQAService.java
View file @
23db72e4
...
@@ -37,8 +37,8 @@ public class ICQAService {
...
@@ -37,8 +37,8 @@ public class ICQAService {
*/
*/
public
Map
currentPodTask
(
String
stationName
)
{
public
Map
currentPodTask
(
String
stationName
)
{
Map
dto
=
new
HashMap
();
Map
dto
=
new
HashMap
();
//如果没有锁定 就没有任务
//如果没有锁定 就没有任务
if
(
isLocked
(
stationName
)
){
if
(
this
.
inboundService
.
isLockedByOthers
(
stationName
,
Sql_Table
.
STOWPOD
)
){
dto
.
put
(
"CODE"
,
1
);
dto
.
put
(
"CODE"
,
1
);
dto
.
put
(
"MSG"
,
"工作站"
+
stationName
+
"被占用,没有当前任务!"
);
dto
.
put
(
"MSG"
,
"工作站"
+
stationName
+
"被占用,没有当前任务!"
);
return
dto
;
return
dto
;
...
@@ -127,29 +127,32 @@ public class ICQAService {
...
@@ -127,29 +127,32 @@ public class ICQAService {
@Scheduled
(
fixedDelay
=
10
*
1000L
)
@Scheduled
(
fixedDelay
=
10
*
1000L
)
public
void
startICQATrip
(){
public
void
startICQATrip
(){
//6db9c7c0-4f93-4fa1-82c0-fb6435af7aae
//6db9c7c0-4f93-4fa1-82c0-fb6435af7aae
if
(
isLocked
(
WMSService
.
stationId
)){
if
(
this
.
inboundService
.
isLockedByOthers
(
WMSService
.
stationId
,
Sql_Table
.
ICQAPOD
)){
logger
.
error
(
"工作站被锁定,无法启动
盘点
任务!"
);
logger
.
error
(
"工作站被锁定,无法启动
ICQA
任务!"
);
return
;
return
;
}
}
//TODO 根据工作站查找
//TODO 根据工作站查找
String
pods
=
this
.
systemPropertiesManager
.
getProperty
(
"EN_ROUTE_MAX_PODS_BINCHENK"
,
Sql_Table
.
WAREHOUSE
);
String
pods
=
this
.
systemPropertiesManager
.
getProperty
(
"EN_ROUTE_MAX_PODS_BINCHENK"
,
Sql_Table
.
WAREHOUSE
);
List
<
Map
>
runningPods
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_RUNNINGPODS
,
if
(
pods
==
null
){
"ICQAPod"
,
Sql_Table
.
AVAILABLE
,
Sql_Table
.
PROCESS
,
Sql_Table
.
NEW
);
pods
=
"5"
;
}
List
<
Map
>
runningPods
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_RUNNINGPODS_ICQA
,
WMSService
.
stationId
,
Sql_Table
.
AVAILABLE
,
Sql_Table
.
PROCESS
);
Integer
limit
=
Integer
.
parseInt
(
pods
)
-
runningPods
.
size
();
//TODO 按工作站区分
Integer
limit
=
Integer
.
parseInt
(
pods
)
-
runningPods
.
size
();
//TODO 按工作站区分
//先找这么多货架 然后加载所有任务
//先找这么多货架 然后加载所有任务
List
<
Map
>
podIds
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_ICQAPODS
,
"ICQAPod"
,
Sql_Table
.
AVAILABLE
);
List
<
Map
>
podIds
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_ICQAPODS
,
Sql_Table
.
AVAILABLE
,
Sql_Table
.
PROCESS
);
for
(
int
i
=
0
;
i
<
podIds
.
size
()
&&
i
<
limit
;
i
++)
{
for
(
int
i
=
0
;
i
<
podIds
.
size
()
&&
i
<
limit
;
i
++)
{
Map
map
=
podIds
.
get
(
i
);
Map
map
=
podIds
.
get
(
i
);
String
podId
=
CommonUtils
.
parseString
(
"POD_ID"
,
map
);
String
podId
=
CommonUtils
.
parseString
(
"POD_ID"
,
map
);
String
workStation
=
CommonUtils
.
parseString
(
"WORKSTATION_ID"
,
map
);
String
workStation
=
CommonUtils
.
parseString
(
"WORKSTATION_ID"
,
map
);
List
<
Map
>
orderPosition
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_PODORDERS
List
<
Map
>
orderPosition
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_PODORDERS
_ICQA
,
podId
,
Sql_Table
.
NEW
);
//New Available Finish 没有Process
,
podId
,
Sql_Table
.
AVAILABLE
);
//New Available Finish 没有Process //TODO
if
(
orderPosition
.
isEmpty
()){
if
(
orderPosition
.
isEmpty
()){
logger
.
error
(
"当前货架没有调度任务 podId:"
+
podId
);
logger
.
error
(
"当前货架没有调度任务 podId:"
+
podId
);
continue
;
continue
;
}
}
BaseBpo
baseBpo
=
new
BaseBpo
();
/*
BaseBpo baseBpo = new BaseBpo();
baseBpo.setTable("RCS_TRIP");
baseBpo.setTable("RCS_TRIP");
String tripId = CommonUtils.genUUID();
String tripId = CommonUtils.genUUID();
baseBpo.addKV("ID",tripId);
baseBpo.addKV("ID",tripId);
...
@@ -159,7 +162,7 @@ public class ICQAService {
...
@@ -159,7 +162,7 @@ public class ICQAService {
baseBpo.addKV("TRIP_STATE",Sql_Table.NEW);
baseBpo.addKV("TRIP_STATE",Sql_Table.NEW);
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.parseString("WAREHOUSE_ID",map));
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.parseString("WAREHOUSE_ID",map));
baseBpo.addKV("SECTION_ID",CommonUtils.parseString("SECTION_ID",map));
baseBpo.addKV("SECTION_ID",CommonUtils.parseString("SECTION_ID",map));
this
.
jdbcRepository
.
insertBusinessObject
(
baseBpo
);
this.jdbcRepository.insertBusinessObject(baseBpo);
*/
//序号生成 从1开始
//序号生成 从1开始
//Map<String,Integer> index = this.genIndexMap();
//Map<String,Integer> index = this.genIndexMap();
for
(
int
j
=
0
;
j
<
orderPosition
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
orderPosition
.
size
();
j
++)
{
...
@@ -236,7 +239,15 @@ public class ICQAService {
...
@@ -236,7 +239,15 @@ public class ICQAService {
//启动时 如果包含全库启动的 只能单起 不能混合
//启动时 如果包含全库启动的 只能单起 不能混合
String
type
=
CommonUtils
.
parseString
(
"type"
,
data
);
String
type
=
CommonUtils
.
parseString
(
"type"
,
data
);
String
stationName
=
CommonUtils
.
parseString
(
"stationName"
,
data
);
String
stationName
=
CommonUtils
.
parseString
(
"stationName"
,
data
);
if
(!
this
.
inboundService
.
lockStowStation
(
stationName
))
{
//查询是否为空
if
(
this
.
inboundService
.
isLockedByOthers
(
stationName
,
Sql_Table
.
STOWPOD
)){
messageDTO
.
setCODE
(
1
);
messageDTO
.
setMESSAGE
(
"工作站被锁定或不存在,无法启动盘点任务!"
);
return
messageDTO
;
}
if
(!
this
.
inboundService
.
lockStowStation
(
stationName
,
Sql_Table
.
ICQAPOD
))
{
messageDTO
.
setCODE
(
1
);
messageDTO
.
setCODE
(
1
);
messageDTO
.
setMESSAGE
(
"工作站不存在 或 锁定工作站失败:"
+
stationName
);
messageDTO
.
setMESSAGE
(
"工作站不存在 或 锁定工作站失败:"
+
stationName
);
return
messageDTO
;
return
messageDTO
;
...
...
src/main/java/com/mushiny/heli/xnr/service/InboundService.java
View file @
23db72e4
...
@@ -272,12 +272,12 @@ public class InboundService {
...
@@ -272,12 +272,12 @@ public class InboundService {
//成功
//成功
MessageDTO
dto
=
MessageDTO
.
success
();
MessageDTO
dto
=
MessageDTO
.
success
();
//查询是否为空
//查询是否为空
if
(
isLocked
(
stationName
)){
if
(
isLocked
ByOthers
(
stationName
,
Sql_Table
.
STOWPOD
)){
dto
.
setCODE
(
1
);
dto
.
setCODE
(
1
);
dto
.
setMESSAGE
(
"工作站被锁定或不存在,无法启动上架任务!"
);
dto
.
setMESSAGE
(
"工作站被锁定或不存在,无法启动上架任务!"
);
return
dto
;
return
dto
;
}
}
if
(!
this
.
lockStowStation
(
stationName
)){
if
(!
this
.
lockStowStation
(
stationName
,
Sql_Table
.
STOWPOD
)){
dto
.
setCODE
(
1
);
dto
.
setCODE
(
1
);
dto
.
setMESSAGE
(
"工作站锁定失败,无法启动上架任务!"
);
dto
.
setMESSAGE
(
"工作站锁定失败,无法启动上架任务!"
);
return
dto
;
return
dto
;
...
@@ -338,36 +338,42 @@ public class InboundService {
...
@@ -338,36 +338,42 @@ public class InboundService {
private String stationId = "6db9c7c0-4f93-4fa1-82c0-fb6435af7aae";*/
private String stationId = "6db9c7c0-4f93-4fa1-82c0-fb6435af7aae";*/
/**
/**
* 定时启动任务
生成RCS_TRIP表数据
* 定时启动任务
*/
*/
@Scheduled
(
fixedDelay
=
10
*
1000L
)
@Scheduled
(
fixedDelay
=
10
*
1000L
)
public
void
startInboundTrip
(){
public
void
startInboundTrip
(){
//6db9c7c0-4f93-4fa1-82c0-fb6435af7aae
//6db9c7c0-4f93-4fa1-82c0-fb6435af7aae
if
(
isLocked
(
WMSService
.
stationId
)){
if
(
this
.
isLockedByOthers
(
WMSService
.
stationId
,
Sql_Table
.
STOWPOD
)){
logger
.
error
(
"工作站被锁定,无法启动上架任务!"
);
logger
.
error
(
"工作站被锁定,无法启动上架任务!"
);
return
;
return
;
}
}
//TODO
//TODO 根据工作站查找
//TODO 根据工作站查找
String
pods
=
this
.
systemPropertiesManager
.
getProperty
(
"StowPodStationMaxPod"
,
Sql_Table
.
WAREHOUSE
);
String
pods
=
this
.
systemPropertiesManager
.
getProperty
(
"StowPodStationMaxPod"
,
Sql_Table
.
WAREHOUSE
);
List
<
Map
>
runningPods
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_RUNNINGPODS
,
if
(
pods
==
null
){
"StowPod"
,
Sql_Table
.
AVAILABLE
,
Sql_Table
.
PROCESS
,
Sql_Table
.
NEW
);
pods
=
"5"
;
}
List
<
Map
>
runningPods
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_RUNNINGPODS_INBOUND
,
WMSService
.
stationId
,
Sql_Table
.
AVAILABLE
,
Sql_Table
.
PROCESS
);
Integer
limit
=
Integer
.
parseInt
(
pods
)
-
runningPods
.
size
();
//TODO 按工作站区分
Integer
limit
=
Integer
.
parseInt
(
pods
)
-
runningPods
.
size
();
//TODO 按工作站区分
//先找这么多货架 然后加载所有任务
//先找这么多货架 然后加载所有任务
List
<
Map
>
podIds
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_PODS
,
"StowPod"
,
Sql_Table
.
AVAILABLE
);
List
<
Map
>
podIds
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_PODS
,
Sql_Table
.
AVAILABLE
,
Sql_Table
.
PROCESS
);
for
(
int
i
=
0
;
i
<
podIds
.
size
()
&&
i
<
limit
;
i
++)
{
for
(
int
i
=
0
;
i
<
podIds
.
size
()
&&
i
<
limit
;
i
++)
{
Map
map
=
podIds
.
get
(
i
);
Map
map
=
podIds
.
get
(
i
);
String
podId
=
CommonUtils
.
parseString
(
"POD_ID"
,
map
);
String
podId
=
CommonUtils
.
parseString
(
"POD_ID"
,
map
);
String
workStation
=
CommonUtils
.
parseString
(
"WORKSTATION_ID"
,
map
);
String
workStation
=
CommonUtils
.
parseString
(
"WORKSTATION_ID"
,
map
);
List
<
Map
>
orderPosition
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_PODORDERS
List
<
Map
>
orderPosition
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_PODORDERS
_INBOUND
,
podId
,
Sql_Table
.
NEW
);
//New Available
Finish 没有Process
,
podId
,
Sql_Table
.
AVAILABLE
);
//Available Process
Finish 没有Process
if
(
orderPosition
.
isEmpty
()){
if
(
orderPosition
.
isEmpty
()){
logger
.
error
(
"当前货架没有调度任务 podId:"
+
podId
);
logger
.
error
(
"当前货架没有调度任务 podId:"
+
podId
);
continue
;
continue
;
}
}
//TODO 如有正在执行的POD任务 应该是添加到明细里
//TODO 如有正在执行的POD任务 应该是添加到明细里
BaseBpo
baseBpo
=
new
BaseBpo
();
/*
BaseBpo baseBpo = new BaseBpo();
baseBpo.setTable("RCS_TRIP");
baseBpo.setTable("RCS_TRIP");
String tripId = CommonUtils.genUUID();
String tripId = CommonUtils.genUUID();
baseBpo.addKV("ID",tripId);
baseBpo.addKV("ID",tripId);
...
@@ -377,7 +383,7 @@ public class InboundService {
...
@@ -377,7 +383,7 @@ public class InboundService {
baseBpo.addKV("TRIP_STATE",Sql_Table.NEW);
baseBpo.addKV("TRIP_STATE",Sql_Table.NEW);
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.parseString("WAREHOUSE_ID",map));
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.parseString("WAREHOUSE_ID",map));
baseBpo.addKV("SECTION_ID",CommonUtils.parseString("SECTION_ID",map));
baseBpo.addKV("SECTION_ID",CommonUtils.parseString("SECTION_ID",map));
this
.
jdbcRepository
.
insertBusinessObject
(
baseBpo
);
this.jdbcRepository.insertBusinessObject(baseBpo);
*/
//序号生成 从1开始
//序号生成 从1开始
//Map<String,Integer> index = this.genIndexMap();
//Map<String,Integer> index = this.genIndexMap();
for
(
int
j
=
0
;
j
<
orderPosition
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
orderPosition
.
size
();
j
++)
{
...
@@ -512,7 +518,7 @@ public class InboundService {
...
@@ -512,7 +518,7 @@ public class InboundService {
storageLocation
.
setpName
(
pName
);
storageLocation
.
setpName
(
pName
);
}
}
public
synchronized
boolean
lockStowStation
(
String
stationId
)
{
public
synchronized
boolean
lockStowStation
(
String
stationId
,
String
type
)
{
List
<
Map
>
stations
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_WORKSTATION
,
stationId
);
List
<
Map
>
stations
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_WORKSTATION
,
stationId
);
if
(
stations
.
isEmpty
()){
if
(
stations
.
isEmpty
()){
...
@@ -524,7 +530,7 @@ public class InboundService {
...
@@ -524,7 +530,7 @@ public class InboundService {
newValue
.
put
(
"VERSION"
,
version
+
1
);
newValue
.
put
(
"VERSION"
,
version
+
1
);
newValue
.
put
(
"ISCALLPOD"
,
Boolean
.
TRUE
);
newValue
.
put
(
"ISCALLPOD"
,
Boolean
.
TRUE
);
newValue
.
put
(
"OPERATOR_ID"
,
"LISI"
);
newValue
.
put
(
"OPERATOR_ID"
,
"LISI"
);
newValue
.
put
(
"STATION_NAME"
,
"stowPod"
);
newValue
.
put
(
"STATION_NAME"
,
type
);
Map
con
=
new
HashMap
();
Map
con
=
new
HashMap
();
con
.
put
(
"ID"
,
stationId
);
con
.
put
(
"ID"
,
stationId
);
...
@@ -534,17 +540,17 @@ public class InboundService {
...
@@ -534,17 +540,17 @@ public class InboundService {
return
count
!=
0
;
return
count
!=
0
;
}
}
//用户名写死为 LISI
//用户名写死为 LISI
p
rivate
boolean
isLocked
(
String
stationId
)
{
p
ublic
boolean
isLockedByOthers
(
String
stationId
,
String
type
)
{
List
<
Map
>
rows
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_WORKSTATION
,
stationId
);
List
<
Map
>
rows
=
this
.
jdbcRepository
.
queryBySql
(
Sql_Table
.
SQL_QUERY_WORKSTATION
,
stationId
);
if
(
rows
.
isEmpty
()){
if
(
rows
.
isEmpty
()){
return
fals
e
;
return
tru
e
;
}
}
Map
data
=
rows
.
get
(
0
);
Map
data
=
rows
.
get
(
0
);
String
operator_id
=
CommonUtils
.
parseString
(
"OPERATOR_ID"
,
data
);
String
operator_id
=
CommonUtils
.
parseString
(
"OPERATOR_ID"
,
data
);
String
station_name
=
CommonUtils
.
parseString
(
"STATION_NAME"
,
data
);
String
station_name
=
CommonUtils
.
parseString
(
"STATION_NAME"
,
data
);
if
(!
CommonUtils
.
isEmpty
(
operator_id
)
if
(!
CommonUtils
.
isEmpty
(
operator_id
)
&&
!
Objects
.
equals
(
operator_id
,
"LISI"
)
&&
!
Objects
.
equals
(
operator_id
,
"LISI"
)
&&
!
Objects
.
equals
(
station_name
,
"StowPod"
)){
&&
!
Objects
.
equals
(
station_name
,
type
)){
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -581,7 +587,7 @@ public class InboundService {
...
@@ -581,7 +587,7 @@ public class InboundService {
public
Map
currentPodTask
(
String
stationName
)
{
public
Map
currentPodTask
(
String
stationName
)
{
Map
dto
=
new
HashMap
();
Map
dto
=
new
HashMap
();
//如果没有锁定 就没有任务
//如果没有锁定 就没有任务
if
(
isLocked
(
stationName
)
){
if
(
isLocked
ByOthers
(
stationName
,
Sql_Table
.
STOWPOD
)
){
dto
.
put
(
"CODE"
,
1
);
dto
.
put
(
"CODE"
,
1
);
dto
.
put
(
"MSG"
,
"工作站"
+
stationName
+
"被占用,没有当前任务!"
);
dto
.
put
(
"MSG"
,
"工作站"
+
stationName
+
"被占用,没有当前任务!"
);
return
dto
;
return
dto
;
...
@@ -668,7 +674,7 @@ public class InboundService {
...
@@ -668,7 +674,7 @@ public class InboundService {
/*public Map prePodTask(String stationName) {
/*public Map prePodTask(String stationName) {
Map dto = new HashMap();
Map dto = new HashMap();
//如果没有锁定 就没有任务
//如果没有锁定 就没有任务
if(isLocked(stationName) ){
if(isLocked
ByOthers
(stationName) ){
dto.put("CODE",1);
dto.put("CODE",1);
dto.put("MSG","工作站"+stationName+"被占用,没有当前任务!");
dto.put("MSG","工作站"+stationName+"被占用,没有当前任务!");
return dto;
return dto;
...
...
src/main/java/com/mushiny/heli/xnr/service/Sql_Table.java
View file @
23db72e4
...
@@ -32,7 +32,8 @@ public interface Sql_Table {
...
@@ -32,7 +32,8 @@ public interface Sql_Table {
"AND INV_UNITLOAD.ID = INV_STOCKUNIT.UNITLOAD_ID\n"
+
"AND INV_UNITLOAD.ID = INV_STOCKUNIT.UNITLOAD_ID\n"
+
"AND INV_UNITLOAD.STORAGELOCATION_ID = MD_STORAGELOCATION.ID\n"
+
"AND INV_UNITLOAD.STORAGELOCATION_ID = MD_STORAGELOCATION.ID\n"
+
"AND AMOUNT > 0 AND MD_STORAGELOCATION.`NAME` LIKE 'P00%'\n"
+
"AND AMOUNT > 0 AND MD_STORAGELOCATION.`NAME` LIKE 'P00%'\n"
+
"GROUP BY MD_ITEMDATA.ITEM_NO,MD_ITEMDATA.NAME LIMIT 200"
;
"GROUP BY MD_ITEMDATA.ITEM_NO,MD_ITEMDATA.NAME, "
+
"MD_STORAGELOCATION.SECTION_ID,MD_ITEMDATA.CLIENT_ID LIMIT 200"
;
String
SQL_FINDITEM_BYITENNO
=
"SELECT SUM(AMOUNT) AS SUMALL,MD_ITEMDATA.`ITEM_NO`,\n"
+
String
SQL_FINDITEM_BYITENNO
=
"SELECT SUM(AMOUNT) AS SUMALL,MD_ITEMDATA.`ITEM_NO`,\n"
+
"MD_ITEMDATA.`NAME` , \n"
+
"MD_ITEMDATA.`NAME` , \n"
+
...
@@ -73,19 +74,22 @@ public interface Sql_Table {
...
@@ -73,19 +74,22 @@ public interface Sql_Table {
"AND MD_ITEMDATA.ITEM_NO=MD_ITEMDATA_SKUNO.ITEM_NO \n"
+
"AND MD_ITEMDATA.ITEM_NO=MD_ITEMDATA_SKUNO.ITEM_NO \n"
+
"AND MD_ITEMDATA_SKUNO.SKU_NO=? AND POD_ID IS NOT NULL LIMIT 1"
;
"AND MD_ITEMDATA_SKUNO.SKU_NO=? AND POD_ID IS NOT NULL LIMIT 1"
;
String
WMS_INBOUND_PODORDER
=
"WMS_INBOUND_PODORDER"
;
String
WMS_INBOUND_PODORDER
=
"WMS_INBOUND_PODORDER"
;
String
SQL_QUERY_PODS
=
"SELECT DISTINCT POD_ID,WORKSTATION_ID,WAREHOUSE_ID,SECTION_ID "
+
String
SQL_QUERY_PODS
=
"SELECT DISTINCT POD_ID,WORKSTATION_ID,WAREHOUSE_ID,SECTION_ID "
+
" FROM WMS_INBOUND_PODORDER
"
+
" FROM WMS_INBOUND_PODORDER WHERE STATE=? AND POD_ID NOT IN
"
+
" WHERE POD_ID NOT IN (SELECT POD_ID FROM RCS_TRIP WHERE TRIP_TYPE=? AND TRIP_STATE=?) "
+
"(SELECT POD_ID FROM WMS_INBOUND_PODORDER WHERE STATE=?) LIMIT 10"
;
" LIMIT 10"
;
String
SQL_QUERY_ICQAPODS
=
"SELECT DISTINCT POD_ID,WORKSTATION_ID,WAREHOUSE_ID,SECTION_ID "
+
String
SQL_QUERY_ICQAPODS
=
"SELECT DISTINCT POD_ID,WORKSTATION_ID,WAREHOUSE_ID,SECTION_ID "
+
" FROM WMS_ICQA_PODORDER"
+
" FROM WMS_ICQA_PODORDER WHERE STATE=? AND POD_ID NOT IN "
+
" WHERE POD_ID NOT IN (SELECT POD_ID FROM RCS_TRIP WHERE TRIP_TYPE=? AND TRIP_STATE=?) "
+
"(SELECT POD_ID FROM WMS_ICQA_PODORDER WHERE STATE=?) LIMIT 10"
;
" LIMIT 10"
;
String
SQL_QUERY_RUNNINGPODS_INBOUND
=
"SELECT * FROM WMS_INBOUND_PODORDER WHERE WORKSTATION_ID=? "
+
String
SQL_QUERY_RUNNINGPODS
=
"SELECT DISTINCT POD_ID "
+
"AND (STATE=? OR STATE=?) LIMIT 10"
;
"FROM RCS_TRIP WHERE TRIP_TYPE=? "
+
String
SQL_QUERY_RUNNINGPODS_ICQA
=
"SELECT * FROM WMS_ICQA_PODORDER WHERE WORKSTATION_ID=? "
+
"AND (TRIP_STATE=? OR TRIP_STATE=? OR TRIP_STATE=?)"
+
"AND (STATE=? OR STATE=?) LIMIT 10"
;
" LIMIT 10"
;
String
SQL_QUERY_PODORDERS_INBOUND
=
"SELECT * FROM WMS_INBOUND_PODORDER WHERE POD_ID=? AND STATE=? "
;
String
SQL_QUERY_PODORDERS
=
"SELECT * FROM WMS_INBOUND_PODORDER WHERE POD_ID=? AND STATE=? "
;
String
SQL_QUERY_PODORDERS_ICQA
=
"SELECT * FROM WMS_INBOUND_PODORDER WHERE POD_ID=? AND STATE=? "
;
String
TABLE_MD_WORKSTATION
=
"MD_WORKSTATION"
;
String
TABLE_MD_WORKSTATION
=
"MD_WORKSTATION"
;
String
WMS_INBOUND_ORDER
=
"WMS_INBOUND_ORDER"
;
String
WMS_INBOUND_ORDER
=
"WMS_INBOUND_ORDER"
;
String
WMS_INBOUND_ORDERPOSITION
=
"WMS_INBOUND_ORDERPOSITION"
;
String
WMS_INBOUND_ORDERPOSITION
=
"WMS_INBOUND_ORDERPOSITION"
;
...
@@ -231,4 +235,6 @@ public interface Sql_Table {
...
@@ -231,4 +235,6 @@ public interface Sql_Table {
"AND NOT EXISTS (SELECT 1 FROM WMS_INBOUND_ORDERPOSITION \n"
+
"AND NOT EXISTS (SELECT 1 FROM WMS_INBOUND_ORDERPOSITION \n"
+
"WHERE WMS_INBOUND_ORDERPOSITION.STATE<>'Finish' \n"
+
"WHERE WMS_INBOUND_ORDERPOSITION.STATE<>'Finish' \n"
+
"AND WMS_INBOUND_ORDERPOSITION.ENTRYID=WMS_INBOUND_ORDER.ENTRYID)"
;
"AND WMS_INBOUND_ORDERPOSITION.ENTRYID=WMS_INBOUND_ORDER.ENTRYID)"
;
String
STOWPOD
=
"StowPod"
;
String
ICQAPOD
=
"IcqaPod"
;
}
}
src/main/java/com/mushiny/heli/xnr/service/WMSRespService.java
View file @
23db72e4
...
@@ -310,7 +310,7 @@ public class WMSRespService {
...
@@ -310,7 +310,7 @@ public class WMSRespService {
return
new
ArrayList
<>(
temp
.
values
());
return
new
ArrayList
<>(
temp
.
values
());
}
}
@Scheduled
(
fixedDelay
=
1
0
*
1000L
)
@Scheduled
(
fixedDelay
=
500
0
*
1000L
)
@Transactional
@Transactional
public
void
storageResp
(){
public
void
storageResp
(){
List
<
Map
>
rows
=
this
.
jdbcRepository
List
<
Map
>
rows
=
this
.
jdbcRepository
...
...
src/main/java/com/mushiny/heli/xnr/service/WMSService.java
View file @
23db72e4
...
@@ -335,4 +335,21 @@ public class WMSService {
...
@@ -335,4 +335,21 @@ public class WMSService {
//String sectionId = CommonUtils.parseString("sectionId",req);
//String sectionId = CommonUtils.parseString("sectionId",req);
this
.
wmsToWcsService
.
releasePod
(
stationId
,
podIndex
);
this
.
wmsToWcsService
.
releasePod
(
stationId
,
podIndex
);
}
}
/**
*
*/
public
int
unlock
()
{
//货架号(数字)、工作站号(ID)/ SectionID
Map
newValue
=
new
HashMap
();
newValue
.
put
(
"ISCALLPOD"
,
Boolean
.
FALSE
);
newValue
.
put
(
"OPERATOR_ID"
,
""
);
newValue
.
put
(
"STATION_NAME"
,
""
);
Map
con
=
new
HashMap
();
con
.
put
(
"ID"
,
this
.
stationId
);
int
count
=
this
.
jdbcRepository
.
updateRecords
(
Sql_Table
.
TABLE_MD_WORKSTATION
,
newValue
,
con
);
return
count
;
}
}
}
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