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
28cd574a
Commit
28cd574a
authored
Mar 20, 2018
by
chenying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3.20修改线路接口
parent
f4a76c00
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
16 deletions
+25
-16
ResultCircuitVo.java
src/main/java/com/example/tdl/domain/vo/ResultCircuitVo.java
+10
-0
CircuitController.java
src/main/java/com/example/tdl/web/CircuitController.java
+4
-2
CircuitMapper.xml
src/main/resources/mapper/CircuitMapper.xml
+11
-14
No files found.
src/main/java/com/example/tdl/domain/vo/ResultCircuitVo.java
View file @
28cd574a
...
...
@@ -43,6 +43,16 @@ public class ResultCircuitVo {
private
String
remark
;
private
String
createTime
;
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getStartLongitude
()
{
return
startLongitude
;
}
...
...
src/main/java/com/example/tdl/web/CircuitController.java
View file @
28cd574a
...
...
@@ -68,7 +68,8 @@ public class CircuitController {
" deliveryAddress:交付地址,"
+
" transportationType:运输类型"
+
" circuitState:线路状态(0未开始,1运输中,2完成),"
+
" remark:备注"
)
" remark:备注,"
+
" createTime:创建线路时间"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
})
...
...
@@ -110,7 +111,8 @@ public class CircuitController {
" deliveryAddress:交付地址,"
+
" transportationType:运输类型"
+
" circuitState:线路状态(0未开始,1运输中,2完成),"
+
" remark:备注"
)
" remark:备注,"
+
" createTime:创建线路时间"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
})
...
...
src/main/resources/mapper/CircuitMapper.xml
View file @
28cd574a
...
...
@@ -2,17 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.example.tdl.mapper.CircuitMapper"
>
<select
id=
"getAll"
resultType=
"com.example.tdl.domain.vo.ResultCircuitVo"
>
SELECT transportationNo,routeNumber,routeName,startLongitude,startLatitude,(select city from city_config where id=r.start_id) startCity, startAddress,
IFNULL(from_unixtime((startTime/1000),'%Y-%m-%d %T'),"-") startTime,endLongitude,endLatitude,(select city from city_config where id=r.end_id) endCity,
endAddress,IFNULL(from_unixtime((endTime/1000),'%Y-%m-%d %T'),"-") endTime,transport,(SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType,
boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark
SELECT transportationNo,routeNumber,routeName,startLongitude,startLatitude,(select city from city_config where id=r.start_id) startCity,
startAddress,startTime,endLongitude,endLatitude,(select city from city_config where id=r.end_id) endCity,endAddress,endTime,transport,
(SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType,boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark,createTime
from circuit c,route r WHERE c.route_id=r.id AND r.state=1 AND c.state=1 order BY c.id DESC
</select>
<select
id=
"getByTerm"
resultType=
"com.example.tdl.domain.vo.ResultCircuitVo"
parameterType=
"com.example.tdl.domain.vo.CircuitTermVo"
>
SELECT transportationNo,routeNumber,routeName,
abbreviation,startCity,IFNULL(from_unixtime((startTime/1000),'%Y-%m-%d %T'),"-") startTime,end
City,
IFNULL(from_unixtime((endTime/1000),'%Y-%m-%d %T'),"-") endTime,transport,(SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType
,
boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark
SELECT transportationNo,routeNumber,routeName,
startLongitude,startLatitude,(select city from city_config where id=r.start_id) start
City,
startAddress,startTime,endLongitude,endLatitude,(select city from city_config where id=r.end_id) endCity,endAddress,endTime,transport
,
(SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType,boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark,createTime
from circuit c,route r WHERE c.route_id=r.id AND r.state=1 AND c.state=1
<if
test=
"transportationNo!=null"
>
AND transportationNo like CONCAT(CONCAT('%',#{transportationNo,jdbcType=VARCHAR}),'%')
...
...
@@ -127,17 +126,15 @@
</delete>
<select
id=
"getByTransportationNo"
resultType=
"com.example.tdl.domain.vo.ResultCircuitVo"
parameterType=
"String"
>
SELECT transportationNo,routeNumber,routeName,startLongitude,startLatitude,(select city from city_config where id=r.start_id) startCity, startAddress,
IFNULL(from_unixtime((startTime/1000),'%Y-%m-%d %T'),"-") startTime,endLongitude,endLatitude,(select city from city_config where id=r.end_id) endCity,
endAddress,IFNULL(from_unixtime((endTime/1000),'%Y-%m-%d %T'),"-") endTime,transport,(SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType,
boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark
SELECT transportationNo,routeNumber,routeName,startLongitude,startLatitude,(select city from city_config where id=r.start_id) startCity,
startAddress,startTime,endLongitude,endLatitude,(select city from city_config where id=r.end_id) endCity,endAddress,endTime,transport,
(SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType,boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark,createTime
from circuit c,route r WHERE c.route_id=r.id AND r.state=1 AND c.state=1 AND transportationNo=#{transportationNo,jdbcType=VARCHAR}
</select>
<select
id=
"getByNo"
parameterType=
"String"
resultType=
"com.example.tdl.domain.vo.ResultGatewayVo"
>
SELECT SN,`name`,type,state,bConfig,useScene,from_unixtime((createTime/1000),'%Y-%m-%d %T') createTime,from_unixtime((updateTime/1000),'%Y-%m-%d %T') updateTime
from gateway
WHERE id=(SELECT gateway_id from tdldevice where circuit_id =(SELECT id from circuit WHERE transportationNo=#{transportationNo,jdbcType=VARCHAR}))
SELECT SN,`name`,type,state,bConfig,useScene,from_unixtime((createTime/1000),'%Y-%m-%d %T') createTime,from_unixtime((updateTime/1000),'%Y-%m-%d %T') updateTime
from gateway WHERE id=(SELECT gateway_id from tdldevice where circuit_id =(SELECT id from circuit WHERE transportationNo=#{transportationNo,jdbcType=VARCHAR}))
</select>
</mapper>
\ No newline at end of file
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