Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
TDLCloud
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
WitCloud
TDLCloud
Commits
fe7adea4
Commit
fe7adea4
authored
Jul 31, 2020
by
Carit Zhu
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the gatewayName "null" error for getWarehouseData interface.
parent
2e4c3dd1
Pipeline
#495
passed with stage
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
9 deletions
+4
-9
CircuitController.java
src/main/java/com/example/tdl/web/CircuitController.java
+0
-5
WarehouseController.java
src/main/java/com/example/tdl/web/WarehouseController.java
+2
-2
GatewayMapper.xml
src/main/resources/mapper/GatewayMapper.xml
+2
-2
No files found.
src/main/java/com/example/tdl/web/CircuitController.java
View file @
fe7adea4
package
com
.
example
.
tdl
.
web
;
package
com
.
example
.
tdl
.
web
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.example.tdl.domain.dto.CommFeedback
;
import
com.example.tdl.domain.dto.CommFeedback
;
...
@@ -12,7 +11,6 @@ import com.example.tdl.service.redis.InfoRedisService;
...
@@ -12,7 +11,6 @@ import com.example.tdl.service.redis.InfoRedisService;
import
com.example.tdl.service.redis.TokenRedisService
;
import
com.example.tdl.service.redis.TokenRedisService
;
import
com.example.tdl.util.AlarmRule
;
import
com.example.tdl.util.AlarmRule
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.sun.org.apache.regexp.internal.RE
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -26,10 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
...
@@ -26,10 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.data.influxdb.InfluxDBTemplate
;
import
org.springframework.data.influxdb.InfluxDBTemplate
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
retrofit2.http.POST
;
import
javax.print.DocFlavor
;
import
javax.print.attribute.standard.RequestingUserName
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
...
src/main/java/com/example/tdl/web/WarehouseController.java
View file @
fe7adea4
...
@@ -1006,7 +1006,7 @@ public class WarehouseController {
...
@@ -1006,7 +1006,7 @@ public class WarehouseController {
}
}
List
<
WarehouseGatewayDateVo
>
warehouseGatewayDateVoList
=
new
ArrayList
<>();
List
<
WarehouseGatewayDateVo
>
warehouseGatewayDateVoList
=
new
ArrayList
<>();
List
<
GatewayOnLineVo
>
gatewayOnLineVos
=
gatewayService
.
getByWarehouseNo
(
warehouseVo
.
getWarehouseNo
());
List
<
GatewayOnLineVo
>
gatewayOnLineVos
=
gatewayService
.
getByWarehouseNo
(
warehouseVo
.
getWarehouseNo
());
Long
endTime
=
System
.
currentTimeMillis
()
+
2
*
24
*
3600
*
1000
l
;
Long
endTime
=
System
.
currentTimeMillis
()
+
2
*
24
*
3600
*
1000L
;
for
(
int
a
=
0
;
a
<
gatewayOnLineVos
.
size
();
a
++){
for
(
int
a
=
0
;
a
<
gatewayOnLineVos
.
size
();
a
++){
if
(
gatewayOnLineVos
.
get
(
a
)
==
null
){
if
(
gatewayOnLineVos
.
get
(
a
)
==
null
){
continue
;
continue
;
...
@@ -1038,7 +1038,7 @@ public class WarehouseController {
...
@@ -1038,7 +1038,7 @@ public class WarehouseController {
}
else
{
}
else
{
warehouseGatewayDateVo
.
setState
(
6
);
warehouseGatewayDateVo
.
setState
(
6
);
}
}
//List<String> tdls=tdlDeviceService.getByGatewaySN(gatewayOnLineVos.get(a).getgSN(),gatewayOnLineVos.get(a).getType());
List
<
TDLDeviceVo
>
tdlDeviceVoList
=
tdlDeviceService
.
getTdlByGatewaySN
(
List
<
TDLDeviceVo
>
tdlDeviceVoList
=
tdlDeviceService
.
getTdlByGatewaySN
(
gatewayOnLineVos
.
get
(
a
).
getgSN
(),
gatewayOnLineVos
.
get
(
a
).
getType
());
gatewayOnLineVos
.
get
(
a
).
getgSN
(),
gatewayOnLineVos
.
get
(
a
).
getType
());
List
<
WarehouseDataVo
>
warehouseDataVos
=
new
ArrayList
<>();
List
<
WarehouseDataVo
>
warehouseDataVos
=
new
ArrayList
<>();
...
...
src/main/resources/mapper/GatewayMapper.xml
View file @
fe7adea4
...
@@ -119,8 +119,8 @@
...
@@ -119,8 +119,8 @@
<!--根据仓库编号查询网关信息-->
<!--根据仓库编号查询网关信息-->
<select
id=
"getByWarehouseNo"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.GatewayOnLineVo"
>
<select
id=
"getByWarehouseNo"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.GatewayOnLineVo"
>
SELECT DISTINCT
gatewaySN gSN, gatewayType type,
createTime startTime
SELECT DISTINCT
tgl.gatewaySN gSN, tgl.gatewayType type, g.name, tgl.
createTime startTime
from tdl_gateway_log
from tdl_gateway_log
tgl inner join gateway g on tgl.gatewaySN = g.SN and tgl.gatewayType = g.type
where warehouseNo=#{warehouseNo,jdbcType=VARCHAR}
where warehouseNo=#{warehouseNo,jdbcType=VARCHAR}
and ISNULL(endTime)
and ISNULL(endTime)
GROUP BY gSN
GROUP BY gSN
...
...
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