Browse Source

bis update

shjung 3 years ago
parent
commit
807c43d065

+ 10 - 10
src/main/java/com/its/api/bis/controller/BisWallController.java

@@ -27,34 +27,34 @@ public class BisWallController {
     }
 
     @ApiOperation(value = "BIT SEARCH LIST 조회(getBitSearchList)", response = BitInfoDto.class, responseContainer = "ArrayList")
-    @GetMapping(value = "/bit-search", produces = {"application/json; charset=utf8"})
-    public List<BitInfoDto> findAllBitSearchList(@RequestParam(required = false) String bit_name) {
+    @GetMapping(value = {"/bit-search/{bit_name}", "/bit-search"}, produces = {"application/json; charset=utf8"})
+    public List<BitInfoDto> findAllBitSearchList(@PathVariable(required = false) final String bit_name) {
         return service.findAllBitSearchList(bit_name);
     }
 
     // 팝업창
     @ApiOperation(value = "BIT ROUTE 조회(getBitRouteInfo)", response = BitRouteInfoDto.class, responseContainer = "ArrayList")
-    @GetMapping(value = "/bit-route", produces = {"application/json; charset=utf8"})
-    public List<BitRouteInfoDto> findAllBitRouteInfo(@RequestParam(required = false) String bit_id) {
+    @GetMapping(value = {"/bit-route/{bit_id}", "/bit-route"}, produces = {"application/json; charset=utf8"})
+    public List<BitRouteInfoDto> findAllBitRouteInfo(@PathVariable(required = false) String bit_id) {
         return service.findAllBitRouteInfo(bit_id);
     }
 
     // BUS
     @ApiOperation(value = "BUS VEHICLE LIST 정보조회(getBusVehicleList)", response = BusVehicleListDto.class, responseContainer = "ArrayList")
-    @GetMapping(value = "/bus-vehicle-plate", produces = {"application/json; charset=utf8"})
-    public List<BusVehicleListDto> findAllBusVehicleList(@RequestParam(required = false) String plate_no) {
+    @GetMapping(value = {"/bus-vehicle-plate/{plate_no}", "/bus-vehicle-plate"}, produces = {"application/json; charset=utf8"})
+    public List<BusVehicleListDto> findAllBusVehicleList(@PathVariable(required = false) String plate_no) {
         return service.findAllBusVehicleList(plate_no);
     }
 
     @ApiOperation(value = "BUS VEHICLE SEARCH LIST 조회(getBusVehicleSearchList)", response = BusVehicleDto.class, responseContainer = "ArrayList")
-    @GetMapping(value = "/bus-vehicle-bit", produces = {"application/json; charset=utf8"})
-    public List<BusVehicleDto> findAllBusVehicleSearchList(@RequestParam(required = false) String bit_name) {
+    @GetMapping(value = {"/bus-vehicle-bit/{bit_name}", "/bus-vehicle-bit"}, produces = {"application/json; charset=utf8"})
+    public List<BusVehicleDto> findAllBusVehicleSearchList(@PathVariable(required = false) String bit_name) {
         return service.findAllBusVehicleSearchList(bit_name);
     }
 
     @ApiOperation(value = "BUS ROUTE 정보조회(getBusrouteInfo)", response = BusRouteInfoDto.class, responseContainer = "ArrayList")
-    @GetMapping(value = "/bus-routes", produces = {"application/json; charset=utf8"})
-    public List<BusRouteInfoDto> findAllBusRoute(@RequestParam(required = false) String route_name) {
+    @GetMapping(value = {"/bus-routes/{route_name}", "/bus-routes"}, produces = {"application/json; charset=utf8"})
+    public List<BusRouteInfoDto> findAllBusRoute(@PathVariable(required = false) String route_name) {
         return service.findAllBusRoute(route_name);
     }
 

+ 4 - 0
src/main/java/com/its/api/bis/model/dto/wall/DrawBusVehicleDto.java

@@ -53,6 +53,10 @@ public class DrawBusVehicleDto implements Serializable {
     @JsonProperty("eventcode")
     private String eventcode;
 
+    @ApiModelProperty("")  // Y NUMBER(3)
+    @JsonProperty("eventcodename")
+    private String eventcodename;
+
     @ApiModelProperty("")  // Y NUMBER(0)
     @JsonProperty("coordx")
     private Double coordx;

+ 6 - 5
src/main/resources/mybatis/mapper/bis/BisWallMapper.xml

@@ -166,7 +166,8 @@
                      B.STATIONTYPE,
                      B.COORDX,
                      B.COORDY,
-                     (SELECT D.BASICCODEINFO FROM CODE_DEFINE D WHERE D.CODEKIND = 'A048' AND C.EVENTCODE = D.BASICCODE) AS EVENTCODE
+                     D.BASICCODE AS EVENTCODE,
+                     (SELECT D.BASICCODEINFO FROM CODE_DEFINE D WHERE D.CODEKIND = 'A048' AND C.EVENTCODE = D.BASICCODE) AS EVENTCODENAME
               FROM BUS_RUNSTATUS A, BUS_STATION B,
                    (
                        SELECT VEHID,
@@ -200,8 +201,8 @@
                HUMIDITY,
                FANSTATUS,
                FANOPSTATUS,
-               DECODE(B.WCOMMSTATUS,NULL,'CMS0',0,'CMS0',1,'CMS1') AS WCOMMSTATUS,
-               DECODE(B.WLCOMMSTATUS,NULL,'CMS0',0,'CMS0',1,'CMS1') AS WLCOMMSTATUS,
+               DECODE(B.WCOMMSTATUS,NULL,'CMS1',0,'CMS0',1,'CMS1') AS WCOMMSTATUS,
+               DECODE(B.WLCOMMSTATUS,NULL,'CMS1',0,'CMS0',1,'CMS1') AS WLCOMMSTATUS,
                HEATEROPSTATUS,
                CAMERASTATUS,
                DOORSTATUS,
@@ -252,8 +253,8 @@
         HUMIDITY,
         FANSTATUS,
         FANOPSTATUS,
-        DECODE(B.WCOMMSTATUS,NULL,'CMS0',0,'CMS0',1,'CMS1') WCOMMSTATUS,
-        DECODE(B.WLCOMMSTATUS,NULL,'CMS0',0,'CMS0',1,'CMS1') WLCOMMSTATUS,
+        DECODE(B.WCOMMSTATUS,NULL,'CMS1',0,'CMS0',1,'CMS1') WCOMMSTATUS,
+        DECODE(B.WLCOMMSTATUS,NULL,'CMS1',0,'CMS0',1,'CMS1') WLCOMMSTATUS,
         HEATEROPSTATUS,
         CAMERASTATUS,
         DOORSTATUS,