Commit 28cd574a authored by chenying's avatar chenying

3.20修改线路接口

parent f4a76c00
...@@ -43,6 +43,16 @@ public class ResultCircuitVo { ...@@ -43,6 +43,16 @@ public class ResultCircuitVo {
private String remark; private String remark;
private String createTime;
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getStartLongitude() { public String getStartLongitude() {
return startLongitude; return startLongitude;
} }
......
...@@ -68,7 +68,8 @@ public class CircuitController { ...@@ -68,7 +68,8 @@ public class CircuitController {
" deliveryAddress:交付地址," + " deliveryAddress:交付地址," +
" transportationType:运输类型" + " transportationType:运输类型" +
" circuitState:线路状态(0未开始,1运输中,2完成)," + " circuitState:线路状态(0未开始,1运输中,2完成)," +
" remark:备注") " remark:备注," +
" createTime:创建线路时间")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"), @ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
}) })
...@@ -110,7 +111,8 @@ public class CircuitController { ...@@ -110,7 +111,8 @@ public class CircuitController {
" deliveryAddress:交付地址," + " deliveryAddress:交付地址," +
" transportationType:运输类型" + " transportationType:运输类型" +
" circuitState:线路状态(0未开始,1运输中,2完成)," + " circuitState:线路状态(0未开始,1运输中,2完成)," +
" remark:备注") " remark:备注," +
" createTime:创建线路时间")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"), @ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
}) })
......
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!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"> <mapper namespace="com.example.tdl.mapper.CircuitMapper">
<select id="getAll" resultType="com.example.tdl.domain.vo.ResultCircuitVo"> <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, SELECT transportationNo,routeNumber,routeName,startLongitude,startLatitude,(select city from city_config where id=r.start_id) startCity,
IFNULL(from_unixtime((startTime/1000),'%Y-%m-%d %T'),"-") startTime,endLongitude,endLatitude,(select city from city_config where id=r.end_id) endCity, startAddress,startTime,endLongitude,endLatitude,(select city from city_config where id=r.end_id) endCity,endAddress,endTime,transport,
endAddress,IFNULL(from_unixtime((endTime/1000),'%Y-%m-%d %T'),"-") endTime,transport,(SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType, (SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType,boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark,createTime
boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark
from circuit c,route r WHERE c.route_id=r.id AND r.state=1 AND c.state=1 order BY c.id DESC 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>
<select id="getByTerm" resultType="com.example.tdl.domain.vo.ResultCircuitVo" parameterType="com.example.tdl.domain.vo.CircuitTermVo"> <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,endCity, SELECT transportationNo,routeNumber,routeName,startLongitude,startLatitude,(select city from city_config where id=r.start_id) startCity,
IFNULL(from_unixtime((endTime/1000),'%Y-%m-%d %T'),"-") endTime,transport,(SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType, startAddress,startTime,endLongitude,endLatitude,(select city from city_config where id=r.end_id) endCity,endAddress,endTime,transport,
boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark (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 from circuit c,route r WHERE c.route_id=r.id AND r.state=1 AND c.state=1
<if test="transportationNo!=null"> <if test="transportationNo!=null">
AND transportationNo like CONCAT(CONCAT('%',#{transportationNo,jdbcType=VARCHAR}),'%') AND transportationNo like CONCAT(CONCAT('%',#{transportationNo,jdbcType=VARCHAR}),'%')
...@@ -127,17 +126,15 @@ ...@@ -127,17 +126,15 @@
</delete> </delete>
<select id="getByTransportationNo" resultType="com.example.tdl.domain.vo.ResultCircuitVo" parameterType="String"> <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, SELECT transportationNo,routeNumber,routeName,startLongitude,startLatitude,(select city from city_config where id=r.start_id) startCity,
IFNULL(from_unixtime((startTime/1000),'%Y-%m-%d %T'),"-") startTime,endLongitude,endLatitude,(select city from city_config where id=r.end_id) endCity, startAddress,startTime,endLongitude,endLatitude,(select city from city_config where id=r.end_id) endCity,endAddress,endTime,transport,
endAddress,IFNULL(from_unixtime((endTime/1000),'%Y-%m-%d %T'),"-") endTime,transport,(SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType, (SELECT alarmType FROM alarm WHERE id=c.alarm_id) alarmType,boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark,createTime
boxNo,containerNo,deliveryAddress,transportationType,circuitState,c.remark
from circuit c,route r WHERE c.route_id=r.id AND r.state=1 AND c.state=1 AND transportationNo=#{transportationNo,jdbcType=VARCHAR} 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>
<select id="getByNo" parameterType="String" resultType="com.example.tdl.domain.vo.ResultGatewayVo"> <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 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 from gateway WHERE id=(SELECT gateway_id from tdldevice where circuit_id =(SELECT id from circuit WHERE transportationNo=#{transportationNo,jdbcType=VARCHAR}))
WHERE id=(SELECT gateway_id from tdldevice where circuit_id =(SELECT id from circuit WHERE transportationNo=#{transportationNo,jdbcType=VARCHAR}))
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment