shjung 3 anni fa
parent
commit
6e79f04bb2

+ 8 - 8
src/main/java/com/its/api/its/controller/database/CodeTableController.java

@@ -31,12 +31,12 @@ public class CodeTableController {
 
    /* @ApiOperation(value = "대분류코드-개별조회(TB_CMMN_CLSF_CD)", response = CmmnClsfCdDto.CmmnClsfCdInfo.class)
     @GetMapping(value = "/clsf-cd/{id}", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<CmmnClsfCdDto.CmmnClsfCdInfo> findByIdCmmnClsfCd(@PathVariable final String id) {
+    public CmmnClsfCdDto.CmmnClsfCdInfo findByIdCmmnClsfCd(@PathVariable final String id) {
         CmmnClsfCd obj = this.cmmnClsfCdService.findById(id);
         if (obj != null) {
-            return new ResponseEntity<>(new CmmnClsfCdDto.CmmnClsfCdInfo(obj), HttpStatus.OK);
+            return new CmmnClsfCdDto.CmmnClsfCdInfo(obj);
         }
-        return new ResponseEntity<>(null, HttpStatus.OK);
+        return null;
     }
 */
     @ApiOperation(value = "대분류코드-정보변경/생성(TB_CMMN_CLSF_CD)", response = TbCmmnClsfCdDto.TbCmmnClsfCdUpdReq.class)
@@ -55,13 +55,13 @@ public class CodeTableController {
     ////////////////////////////////////// 소분류코드
     /*@ApiOperation(value = "소분류코드-전체조회(TB_CMMN_CD)", response = CmmnCdDto.CmmnCdInfo.class)
     @GetMapping(value = "/cmmn-cd", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<List<CmmnCdDto.CmmnCdInfo>> findAllCmmnCd() {
+    public List<CmmnCdDto.CmmnCdInfo> findAllCmmnCd() {
         List<CmmnCdDto.CmmnCdInfo> result = new ArrayList<>();
         List<CmmnCd> data = this.cmmnCdService.findAll();
         for (CmmnCd obj: data) {
             result.add(new CmmnCdDto.CmmnCdInfo(obj));
         }
-        return new ResponseEntity<>(result, HttpStatus.OK);
+        return result;
     }
 */
     @ApiOperation(value = "소분류코드-개별조회-목록(TB_CMMN_CD)", response = TbCmmnCdDto.class, responseContainer = "ArrayList")
@@ -72,12 +72,12 @@ public class CodeTableController {
 
     /*@ApiOperation(value = "소분류코드-개별조회-단일(TB_CMMN_CD)", response = CmmnCdDto.CmmnCdInfo.class)
     @GetMapping(value = "/cmmn-cd/{id}/{sub}", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<CmmnCdDto.CmmnCdInfo> findByIdCmmnCd(@PathVariable final String id, @PathVariable final String sub) {
+    public CmmnCdDto.CmmnCdInfo findByIdCmmnCd(@PathVariable final String id, @PathVariable final String sub) {
         CmmnCd data = this.cmmnCdService.findAllByCmmnClsfCdCmmnCd(id, sub);
         if (data != null) {
-            return new ResponseEntity<>(new CmmnCdDto.CmmnCdInfo(data), HttpStatus.OK);
+            return new CmmnCdDto.CmmnCdInfo(data);
         }
-        return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);
+        return null;
     }
 */
     @ApiOperation(value = "소분류코드-정보변경/생성(TB_CMMN_CD)", response = TbCmmnCdDto.class)

+ 10 - 12
src/main/java/com/its/api/its/controller/database/LinkParaClctSystController.java

@@ -7,8 +7,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
@@ -26,7 +24,7 @@ public class LinkParaClctSystController {
     /*
     @ApiOperation(value = "전체조회(TB_LINK_PARA_CLCT_SYST)", response = LinkParaClctSystDto.LinkParaClctSystInfo.class)
     @GetMapping(value = "", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<List<LinkParaClctSystDto.LinkParaClctSystInfo>> findAll() {
+    public List<LinkParaClctSystDto.LinkParaClctSystInfo> findAll() {
         List<LinkParaClctSyst> objList = this.service.findAll();
         List<LinkParaClctSystDto.LinkParaClctSystInfo> result = new ArrayList<>();
         if (objList != null) {
@@ -34,13 +32,13 @@ public class LinkParaClctSystController {
                 result.add(new LinkParaClctSystDto.LinkParaClctSystInfo(obj));
             }
         }
-        return new ResponseEntity<>(result, HttpStatus.OK);
+        return result;
     }
 */
 
     @ApiOperation(value = "개별목록조회(TB_LINK_PARA_CLCT_SYST)", response = LinkParaClctSystDto.LinkParaClctSystInfo.class)
     @GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<List<LinkParaClctSystDto.LinkParaClctSystInfo>> findById(@PathVariable final Long id) {
+    public List<LinkParaClctSystDto.LinkParaClctSystInfo> findById(@PathVariable final Long id) {
         List<TbLinkParaClctSyst> objList = this.service.findListById(id);
         List<LinkParaClctSystDto.LinkParaClctSystInfo> result = new ArrayList<>();
         if (objList != null) {
@@ -48,24 +46,24 @@ public class LinkParaClctSystController {
                 result.add(new LinkParaClctSystDto.LinkParaClctSystInfo(obj));
             }
         }
-        return new ResponseEntity<>(result, HttpStatus.OK);
+        return result;
     }
 
     @ApiOperation(value = "개별정보변경/생성(TB_LINK_PARA_CLCT_SYST)", response = LinkParaClctSystDto.LinkParaClctSystUpdateReq.class)
     @PostMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<List<LinkParaClctSystDto.LinkParaClctSystUpdateReq>> updateById(
+    public List<LinkParaClctSystDto.LinkParaClctSystUpdateReq> updateById(
             @PathVariable final Long id,
             @RequestBody final List<LinkParaClctSystDto.LinkParaClctSystUpdateReq> req) {
 
-        List<LinkParaClctSystDto.LinkParaClctSystUpdateReq> objList = this.service.mergeById(id, req);
-        return new ResponseEntity<>(objList, HttpStatus.OK);
+        List<LinkParaClctSystDto.LinkParaClctSystUpdateReq> result = this.service.mergeById(id, req);
+        return result;
     }
 
     @ApiOperation(value = "전체정보변경/생성(TB_LINK_PARA_CLCT_SYST)", response = LinkParaClctSystDto.LinkParaClctSystUpdateReq.class)
     @PostMapping(value = "", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<List<LinkParaClctSystDto.LinkParaClctSystUpdateReq>> updateById(@RequestBody final List<LinkParaClctSystDto.LinkParaClctSystUpdateReq> req) {
-        List<LinkParaClctSystDto.LinkParaClctSystUpdateReq> objList = this.service.mergeAll(req);
-        return new ResponseEntity<>(objList, HttpStatus.OK);
+    public List<LinkParaClctSystDto.LinkParaClctSystUpdateReq> updateById(@RequestBody final List<LinkParaClctSystDto.LinkParaClctSystUpdateReq> req) {
+        List<LinkParaClctSystDto.LinkParaClctSystUpdateReq> result = this.service.mergeAll(req);
+        return result;
     }
 
 }

+ 11 - 14
src/main/java/com/its/api/its/controller/database/LinkParaDetlController.java

@@ -1,14 +1,12 @@
 package com.its.api.its.controller.database;
 
-import com.its.api.its.service.link.LinkParaDetlService;
 import com.its.api.its.model.dto.link.LinkParaDetlDto;
 import com.its.api.its.model.entity.link.TbLinkParaDetl;
+import com.its.api.its.service.link.LinkParaDetlService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 @Slf4j
@@ -23,44 +21,43 @@ public class LinkParaDetlController {
     /*
     @ApiOperation(value = "전체조회(TB_LINK_PARA_DETL)", response = LinkParaDetlDto.LinkParaDetlInfo.class)
     @GetMapping(value = "", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<List<LinkParaDetlDto.LinkParaDetlInfo>> findAll() {
+    public List<LinkParaDetlDto.LinkParaDetlInfo> findAll() {
         List<LinkParaDetl> data = this.service.findAll();
         List<LinkParaDetlDto.LinkParaDetlInfo> result = new ArrayList<>();
         for (LinkParaDetl obj: data) {
             result.add(new LinkParaDetlDto.LinkParaDetlInfo(obj));
         }
-        return new ResponseEntity<>(result, HttpStatus.OK);
+        return result;
     }
 */
 
     @ApiOperation(value = "개별조회(TB_LINK_PARA_DETL)", response = LinkParaDetlDto.LinkParaDetlInfo.class)
     @GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<LinkParaDetlDto.LinkParaDetlInfo> findById(@PathVariable final Long id) {
+    public LinkParaDetlDto.LinkParaDetlInfo findById(@PathVariable final Long id) {
         TbLinkParaDetl obj = this.service.findById(id);
         if (obj != null) {
-            return new ResponseEntity<>(new LinkParaDetlDto.LinkParaDetlInfo(obj), HttpStatus.OK);
+            return new LinkParaDetlDto.LinkParaDetlInfo(obj);
         }
-        return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);//NO_CONTENT);
+        return null;
     }
 
     @ApiOperation(value = "개별정보변경/생성(TB_LINK_PARA_DETL)", response = LinkParaDetlDto.LinkParaDetlInfo.class)
     @PostMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<LinkParaDetlDto.LinkParaDetlInfo> updateById(
+    public LinkParaDetlDto.LinkParaDetlInfo updateById(
             @PathVariable final Long id,
             @RequestBody final LinkParaDetlDto.LinkParaDetlUpdateReq req) {
-
         TbLinkParaDetl obj = this.service.mergeById(id, req);
         if (obj != null) {
-            return new ResponseEntity<>(new LinkParaDetlDto.LinkParaDetlInfo(obj), HttpStatus.OK);
+            return new LinkParaDetlDto.LinkParaDetlInfo(obj);
         }
-        return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);//NO_CONTENT);
+        return null;
     }
 
     @ApiOperation(value = "전체정보변경/생성(TB_LINK_PARA_DETL)", response = LinkParaDetlDto.LinkParaDetlUpdateReq.class)
     @PostMapping(value = "", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<LinkParaDetlDto.LinkParaDetlUpdateReq> updateById(@RequestBody final LinkParaDetlDto.LinkParaDetlUpdateReq req) {
+    public LinkParaDetlDto.LinkParaDetlUpdateReq updateById(@RequestBody final LinkParaDetlDto.LinkParaDetlUpdateReq req) {
         LinkParaDetlDto.LinkParaDetlUpdateReq obj = this.service.mergeAll(req);
-        return new ResponseEntity<>(req, HttpStatus.OK);
+        return obj;
     }
 
 }

+ 11 - 14
src/main/java/com/its/api/its/controller/database/LinkParaStupController.java

@@ -1,14 +1,12 @@
 package com.its.api.its.controller.database;
 
-import com.its.api.its.model.entity.link.TbLinkParaStup;
 import com.its.api.its.model.dto.link.LinkParaStupDto;
+import com.its.api.its.model.entity.link.TbLinkParaStup;
 import com.its.api.its.service.link.LinkParaStupService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 @Slf4j
@@ -23,44 +21,43 @@ public class LinkParaStupController {
     /*
     @ApiOperation(value = "전체조회(TB_LINK_PARA_STUP)", response = LinkParaStupDto.LinkParaStupInfo.class)
     @GetMapping(value = "", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<List<LinkParaStupDto.LinkParaStupInfo>> findAll() {
+    public List<LinkParaStupDto.LinkParaStupInfo>> findAll() {
         List<LinkParaStup> data = this.service.findAll();
         List<LinkParaStupDto.LinkParaStupInfo> result = new ArrayList<>();
         for (LinkParaStup obj: data) {
             result.add(new LinkParaStupDto.LinkParaStupInfo(obj));
         }
-        return new ResponseEntity<>(result, HttpStatus.OK);
+        return new >(result, HttpStatus.OK);
     }
 */
 
     @ApiOperation(value = "개별조회(TB_LINK_PARA_STUP)", response = LinkParaStupDto.LinkParaStupInfo.class)
     @GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<LinkParaStupDto.LinkParaStupInfo> findById(@PathVariable final Long id) {
+    public LinkParaStupDto.LinkParaStupInfo findById(@PathVariable final Long id) {
         TbLinkParaStup obj = this.service.findById(id);
         if (obj != null) {
-            return new ResponseEntity<>(new LinkParaStupDto.LinkParaStupInfo(obj), HttpStatus.OK);
+            return new LinkParaStupDto.LinkParaStupInfo(obj);
         }
-        return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);//NO_CONTENT);
+        return null;
     }
 
     @ApiOperation(value = "개별정보변경/생성(TB_LINK_PARA_STUP)", response = LinkParaStupDto.LinkParaStupInfo.class)
     @PostMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<LinkParaStupDto.LinkParaStupInfo> updateById(
+    public LinkParaStupDto.LinkParaStupInfo updateById(
             @PathVariable final Long id,
             @RequestBody final LinkParaStupDto.LinkParaStupUpdateReq req) {
-
         TbLinkParaStup obj = this.service.mergeById(id, req);
         if (obj != null) {
-            return new ResponseEntity<>(new LinkParaStupDto.LinkParaStupInfo(obj), HttpStatus.OK);
+            return new LinkParaStupDto.LinkParaStupInfo(obj);
         }
-        return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);//NO_CONTENT);
+        return null;
     }
 
     @ApiOperation(value = "전체정보변경/생성(TB_LINK_PARA_STUP)", response = LinkParaStupDto.LinkParaStupUpdateReq.class)
     @PostMapping(value = "", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<LinkParaStupDto.LinkParaStupUpdateReq> updateById(@RequestBody final LinkParaStupDto.LinkParaStupUpdateReq req) {
+    public LinkParaStupDto.LinkParaStupUpdateReq updateById(@RequestBody final LinkParaStupDto.LinkParaStupUpdateReq req) {
         LinkParaStupDto.LinkParaStupUpdateReq obj = this.service.mergeAll(req);
-        return new ResponseEntity<>(req, HttpStatus.OK);
+        return obj;
 
     }
 

+ 6 - 11
src/main/java/com/its/api/its/controller/database/LinkPrcsParaController.java

@@ -6,8 +6,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
@@ -24,28 +22,25 @@ public class LinkPrcsParaController {
 
     @ApiOperation(value = "개별정보조회(TB_LINK_PARA_STUP, TB_LINK_PARA_DETL, TB_LINK_PARA_CLCT_SYST)", response = LinkPrcsParaDto.LinkPrcsParaInfo.class)
     @GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<LinkPrcsParaDto.LinkPrcsParaInfo> findById(@PathVariable final Long id) {
+    public LinkPrcsParaDto.LinkPrcsParaInfo findById(@PathVariable final Long id) {
         LinkPrcsParaDto.LinkPrcsParaInfo result = this.service.findListById(id);
-        return new ResponseEntity<>(result, HttpStatus.OK);
+        return result;
     }
 
     @ApiOperation(value = "개별정보변경/생성(TB_LINK_PARA_STUP, TB_LINK_PARA_DETL, TB_LINK_PARA_CLCT_SYST)", response = LinkPrcsParaDto.LinkPrcsParaUpdateReq.class)
     @PostMapping(value = "/{ids}", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<LinkPrcsParaDto.LinkPrcsParaUpdateReq> mergeById(
+    public LinkPrcsParaDto.LinkPrcsParaUpdateReq mergeById(
             @PathVariable final List<Long> ids,
             @RequestBody @Valid final LinkPrcsParaDto.LinkPrcsParaUpdateReq req) {
-
-        log.error("{}, [{}]", ids.size(), ids);
-        log.error("{}", req);
         LinkPrcsParaDto.LinkPrcsParaUpdateReq result = this.service.mergeById(ids, req);
-        return new ResponseEntity<>(result, HttpStatus.OK);
+        return result;
     }
 
     @ApiOperation(value = "전체정보변경/생성(TB_LINK_PARA_STUP, TB_LINK_PARA_DETL, TB_LINK_PARA_CLCT_SYST)", response = LinkPrcsParaDto.LinkPrcsParaUpdateReq.class)
     @PostMapping(value = "", produces = {"application/json; charset=utf8"})
-    public ResponseEntity<LinkPrcsParaDto.LinkPrcsParaUpdateReq> updateById(@RequestBody final LinkPrcsParaDto.LinkPrcsParaUpdateReq req) {
+    public LinkPrcsParaDto.LinkPrcsParaUpdateReq updateById(@RequestBody final LinkPrcsParaDto.LinkPrcsParaUpdateReq req) {
         LinkPrcsParaDto.LinkPrcsParaUpdateReq result = this.service.mergeAll(req);
-        return new ResponseEntity<>(result, HttpStatus.OK);
+        return result;
     }
 
 }

+ 9 - 10
src/main/java/com/its/api/its/model/dto/link/LinkParaDetlDto.java

@@ -26,22 +26,21 @@ public class LinkParaDetlDto implements Serializable {
         private final Double  SMTH_WGHT_AVRG_PRE_2CYCL;   //	N	NUMBER(5,2)	Y	0		평활화 가중치 평균 이전 2주기
 
         public LinkParaDetlInfo(TbLinkParaDetl entity) {
-            this.LINK_ID                  = entity.getLINK_ID();
-            this.FLTR_MIN_TFVL            = entity.getFLTR_MIN_TFVL();
-            this.FLTR_MAX_TFVL            = entity.getFLTR_MAX_TFVL();
-            this.FLTR_LWST_SPED           = entity.getFLTR_LWST_SPED();
-            this.FLTR_HGHS_SPED           = entity.getFLTR_HGHS_SPED();
+            this.LINK_ID = entity.getLINK_ID();
+            this.FLTR_MIN_TFVL = entity.getFLTR_MIN_TFVL();
+            this.FLTR_MAX_TFVL = entity.getFLTR_MAX_TFVL();
+            this.FLTR_LWST_SPED = entity.getFLTR_LWST_SPED();
+            this.FLTR_HGHS_SPED = entity.getFLTR_HGHS_SPED();
             this.ADJS_WGHT_AVRG_PRE_1CYCL = entity.getADJS_WGHT_AVRG_PRE_1CYCL();
             this.ADJS_WGHT_AVRG_PRE_2CYCL = entity.getADJS_WGHT_AVRG_PRE_2CYCL();
             this.ADJS_WGHT_AVRG_PRE_3CYCL = entity.getADJS_WGHT_AVRG_PRE_3CYCL();
-            this.ADJS_15M_PTRN_APLY_YN    = entity.getADJS_15M_PTRN_APLY_YN();
+            this.ADJS_15M_PTRN_APLY_YN = entity.getADJS_15M_PTRN_APLY_YN();
             this.ADJS_SHTR_MISS_DECS_CYCL = entity.getADJS_SHTR_MISS_DECS_CYCL();
-            this.SMTH_LWST_SPED_FCTR      = entity.getSMTH_LWST_SPED_FCTR();
-            this.SMTH_HGHS_SPED_FCTR      = entity.getSMTH_HGHS_SPED_FCTR();
-            this.SMTH_WGHT_AVRG_PRST      = entity.getSMTH_WGHT_AVRG_PRST();
+            this.SMTH_LWST_SPED_FCTR = entity.getSMTH_LWST_SPED_FCTR();
+            this.SMTH_HGHS_SPED_FCTR = entity.getSMTH_HGHS_SPED_FCTR();
+            this.SMTH_WGHT_AVRG_PRST = entity.getSMTH_WGHT_AVRG_PRST();
             this.SMTH_WGHT_AVRG_PRE_1CYCL = entity.getSMTH_WGHT_AVRG_PRE_1CYCL();
             this.SMTH_WGHT_AVRG_PRE_2CYCL = entity.getSMTH_WGHT_AVRG_PRE_2CYCL();
-
         }
     }