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
fda94db2
Commit
fda94db2
authored
Nov 28, 2019
by
tank.li@mushiny.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
43fbbbb7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
13 deletions
+23
-13
InboundController.java
...va/com/mushiny/heli/xnr/controller/InboundController.java
+7
-2
JdbcRepository.java
...om/mushiny/heli/xnr/jdbc/repositories/JdbcRepository.java
+2
-2
RowMap.java
...n/java/com/mushiny/heli/xnr/jdbc/repositories/RowMap.java
+1
-1
InboundService.java
...ain/java/com/mushiny/heli/xnr/service/InboundService.java
+13
-8
No files found.
src/main/java/com/mushiny/heli/xnr/controller/InboundController.java
View file @
fda94db2
...
...
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -55,6 +56,7 @@ public class InboundController {
String
warehouseId
=
CommonUtils
.
parseString
(
"factory"
,
reqData
);
String
sectionId
=
CommonUtils
.
parseString
(
"section"
,
reqData
);
List
<
Map
>
data
=
this
.
inboundService
.
searchInbound
(
entryId
,
warehouseId
,
sectionId
);
return
ResponseEntity
.
ok
(
JsonUtils
.
list2Json
(
data
));
}
...
...
@@ -67,8 +69,11 @@ public class InboundController {
@RequestBody
String
json
){
Map
reqData
=
JsonUtils
.
json2Map
(
json
);
String
entryId
=
CommonUtils
.
parseString
(
"entryId"
,
reqData
);
Map
data
=
this
.
inboundService
.
searchInboundInfo
(
entryId
);
return
ResponseEntity
.
ok
(
JsonUtils
.
map2Json
(
data
));
Map
ret
=
new
HashMap
();
List
data
=
this
.
inboundService
.
searchInboundInfo
(
entryId
);
ret
.
put
(
"entryId"
,
entryId
);
ret
.
put
(
"content"
,
data
);
return
ResponseEntity
.
ok
(
JsonUtils
.
map2Json
(
ret
));
}
/**
...
...
src/main/java/com/mushiny/heli/xnr/jdbc/repositories/JdbcRepository.java
View file @
fda94db2
...
...
@@ -242,9 +242,9 @@ public class JdbcRepository implements CommandLineRunner {
}
Object
[]
_params
=
params
.
toArray
();
String
_paramsStr
=
paramsStr
(
_params
);
logger
.
debug
(
"查询语句是:"
+
sql
.
toUpperCase
()
+
" 参数是:"
+
_paramsStr
);
logger
.
debug
(
"查询语句是:"
+
sql
+
" 参数是:"
+
_paramsStr
);
long
start
=
System
.
currentTimeMillis
();
List
<
Map
>
rows
=
this
.
jdbcTemplate
.
query
(
sql
.
toUpperCase
()
,
_params
,
new
RowMap
());
List
<
Map
>
rows
=
this
.
jdbcTemplate
.
query
(
sql
,
_params
,
new
RowMap
());
logger
.
debug
(
"查询结果总数:"
+
rows
.
size
()+
" SQL查询耗时:"
+(
System
.
currentTimeMillis
()
-
start
)+
"毫秒!"
);
return
rows
;
}
...
...
src/main/java/com/mushiny/heli/xnr/jdbc/repositories/RowMap.java
View file @
fda94db2
...
...
@@ -21,7 +21,7 @@ public class RowMap implements RowMapper<Map> {
for
(
int
j
=
0
;
j
<
colCount
;
j
++)
{
String
key
=
resultSet
.
getMetaData
().
getColumnName
(
j
+
1
);
String
label
=
resultSet
.
getMetaData
().
getColumnLabel
(
j
+
1
);
data
.
put
(
key
.
toUpperCase
(),
resultSet
.
getObject
(
key
));
//
data.put(key.toUpperCase(),resultSet.getObject(key));
data
.
put
(
label
.
toUpperCase
(),
resultSet
.
getObject
(
label
));
}
//logger.debug("index:"+i,"row="+data);
...
...
src/main/java/com/mushiny/heli/xnr/service/InboundService.java
View file @
fda94db2
...
...
@@ -23,7 +23,7 @@ public class InboundService {
public
static
final
String
SQL_SEARCHINBOUND_FACTORY
=
" AND WAREHOUSE_ID=? "
;
public
static
final
String
SQL_SEARCHINBOUND_SECTION
=
" AND SECTION_ID=? "
;
public
static
final
String
SQL_SEARCHINBOUNDINFO
=
"SELECT
* FROM WMS_INBOUND_ORDER
WHERE ENTRYID = ?"
;
"SELECT
SKUID,AMOUNT,IFNULL(STORED,0) AS STORED,STATE FROM WMS_INBOUND_ORDERPOSITION
WHERE ENTRYID = ?"
;
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
InboundService
.
class
);
private
static
final
String
SQL_SEARCHINBOUND_ENTRYID
=
" AND ENTRYID like ? "
;
...
...
@@ -35,7 +35,10 @@ public class InboundService {
@Autowired
private
SystemPropertiesManager
systemPropertiesManager
;
public
static
final
String
SQL_SEARCHINBOUND
=
"SELECT * FROM WMS_INBOUND_ORDER WHERE 1=1 "
;
public
static
final
String
SQL_SEARCHINBOUND
=
"SELECT ENTRYID,STATE,DATE_FORMAT(CREATED_DATE,'%Y-%m-%d %H:%i:%s') as CREATED_DATE"
+
",WAREHOUSE_ID FACTORY,SECTION_ID as SECTION "
+
"FROM WMS_INBOUND_ORDER WHERE 1=1 "
;
public
List
<
Map
>
searchInbound
(
String
entryId
,
String
warehouseId
,
String
sectionId
)
{
...
...
@@ -59,16 +62,13 @@ public class InboundService {
return
this
.
jdbcRepository
.
queryBySql
(
sql
.
toString
(),
params
);
}
public
Map
searchInboundInfo
(
String
entryId
)
{
public
List
<
Map
>
searchInboundInfo
(
String
entryId
)
{
List
params
=
new
ArrayList
();
StringBuilder
sql
=
new
StringBuilder
();
sql
.
append
(
SQL_SEARCHINBOUNDINFO
);
params
.
add
(
entryId
);
List
<
Map
>
data
=
this
.
jdbcRepository
.
queryBySql
(
sql
.
toString
(),
params
);
if
(!
data
.
isEmpty
()){
return
data
.
get
(
0
);
}
throw
new
RuntimeException
(
"没有这条记录:"
+
entryId
);
return
data
;
}
public
MessageDTO
orderFinish
(
String
entryId
)
{
...
...
@@ -316,6 +316,7 @@ public class InboundService {
baseBpo
.
addKV
(
"SECTION_ID"
,
CommonUtils
.
parseString
(
"SECTION_ID"
,
map
));
this
.
jdbcRepository
.
insertBusinessObject
(
baseBpo
);
for
(
int
j
=
0
;
j
<
orderPosition
.
size
();
j
++)
{
//如果存在就不要再创建
Map
podOrders
=
orderPosition
.
get
(
j
);
BaseBpo
baseBpo2
=
new
BaseBpo
();
baseBpo2
.
setTable
(
"RCS_TRIPPOSITION"
);
...
...
@@ -419,7 +420,11 @@ public class InboundService {
}
public
MessageDTO
endInbound
(
String
stationName
)
{
return
null
;
MessageDTO
messageDTO
=
MessageDTO
.
success
();
/*if(){
}*/
return
messageDTO
;
}
public
Map
currentPodTask
(
String
stationName
)
{
...
...
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