shjung 2 年 前
コミット
1d4d7f9299

+ 4 - 32
src/main/java/com/its/op/controller/its/rse/TbRseCtlrSttsController.java

@@ -6,9 +6,11 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
 import java.util.List;
 
 @Api(tags = "14.RSE-1.RSE 관리-RSE 상태 현황")
@@ -32,34 +34,4 @@ public class TbRseCtlrSttsController {
         return this.service.findById(id);
     }
 
-    @ApiOperation(value = "RSE 상태 현황 정보변경(TB_RSE_CTLR_STTS)", response = TbRseCtlrSttsDto.class)
-    @PutMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
-    public TbRseCtlrSttsDto updateById(@PathVariable final String id, @RequestBody @Valid final TbRseCtlrSttsDto.TbRseCtlrSttsUpdReq req) {
-        return this.service.updateById(id, req);
-    }
-
-    @ApiOperation(value = "RSE 상태 현황 정보변경/생성-목록(TB_RSE_CTLR_STTS)", response = TbRseCtlrSttsDto.class, responseContainer = "ArrayList")
-    @PostMapping(value = "", produces = {"application/json; charset=utf8"})
-    public List<TbRseCtlrSttsDto> mergeInfoList(@RequestBody @Valid final List<TbRseCtlrSttsDto.TbRseCtlrSttsUpdReq> listReq) {
-        return this.service.mergeInfoList(listReq);
-    }
-
-    @ApiOperation(value = "RSE 상태 현황 정보변경/생성-개별(TB_RSE_CTLR_STTS)", response = TbRseCtlrSttsDto.class)
-    @PostMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
-    public TbRseCtlrSttsDto mergeInfo(@PathVariable("id") String id, @RequestBody @Valid final TbRseCtlrSttsDto.TbRseCtlrSttsUpdReq req) {
-        return this.service.mergeInfo(req);
-    }
-
-    @ApiOperation(value = "RSE 상태 현황 정보삭제-개별(TB_RSE_CTLR_STTS)", response = TbRseCtlrSttsDto.class)
-    @DeleteMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
-    public TbRseCtlrSttsDto deleteDataById(@PathVariable("id") String id) {
-        return this.service.deleteById(id);
-    }
-
-    @ApiOperation(value = "RSE 상태 현황 정보삭제-목록(TB_RSE_CTLR_STTS)", response = TbRseCtlrSttsDto.class, responseContainer = "ArrayList")
-    @DeleteMapping(value = "", produces = {"application/json; charset=utf8"})
-    public List<TbRseCtlrSttsDto> deleteDataByIds(@RequestBody @Valid final List<String> ids) {
-        return this.service.deleteByIds(ids);
-    }
-
 }

+ 4 - 32
src/main/java/com/its/op/controller/its/scrs/TbScSgnlIxrSttsController.java

@@ -6,9 +6,11 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
 import java.util.List;
 
 @Api(tags = "14.스마트교차로-0.공통-1.신호제어기-상태")
@@ -38,34 +40,4 @@ public class TbScSgnlIxrSttsController {
         return this.service.findById(sgnlIxrNmbr);
     }
 
-    @ApiOperation(value = "신호 교차로 상태 정보변경(TB_SC_SGNL_IXR_STTS)", response = TbScSgnlIxrSttsDto.class)
-    @PutMapping(value = "/{sgnlIxrNmbr}", produces = {"application/json; charset=utf8"})
-    public TbScSgnlIxrSttsDto updateById(@PathVariable("sgnlIxrNmbr") final Integer sgnlIxrNmbr, @RequestBody @Valid final TbScSgnlIxrSttsDto.TbScSgnlIxrSttsUpdReq req) {
-        return this.service.updateById(sgnlIxrNmbr, req);
-    }
-
-    @ApiOperation(value = "신호 교차로 상태 정보변경/생성-목록(TB_SC_SGNL_IXR_STTS)", response = TbScSgnlIxrSttsDto.class, responseContainer = "ArrayList")
-    @PostMapping(value = "", produces = {"application/json; charset=utf8"})
-    public List<TbScSgnlIxrSttsDto> mergeInfoList(@RequestBody @Valid final List<TbScSgnlIxrSttsDto.TbScSgnlIxrSttsUpdReq> listReq) {
-        return this.service.mergeInfoList(listReq);
-    }
-
-    @ApiOperation(value = "신호 교차로 상태 정보변경/생성-개별(TB_SC_SGNL_IXR_STTS)", response = TbScSgnlIxrSttsDto.class)
-    @PostMapping(value = "/{sgnlIxrNmbr}", produces = {"application/json; charset=utf8"})
-    public TbScSgnlIxrSttsDto mergeInfo(@PathVariable("sgnlIxrNmbr") final Integer sgnlIxrNmbr, @RequestBody @Valid final TbScSgnlIxrSttsDto.TbScSgnlIxrSttsUpdReq req) {
-        return this.service.mergeInfo(req);
-    }
-
-    @ApiOperation(value = "신호 교차로 상태 정보삭제-개별(TB_SC_SGNL_IXR_STTS)", response = TbScSgnlIxrSttsDto.class)
-    @DeleteMapping(value = "/{sgnlIxrNmbr}", produces = {"application/json; charset=utf8"})
-    public TbScSgnlIxrSttsDto deleteDataById(@PathVariable("sgnlIxrNmbr") final Integer sgnlIxrNmbr) {
-        return this.service.deleteById(sgnlIxrNmbr);
-    }
-
-    @ApiOperation(value = "신호 교차로 상태 정보삭제-목록(TB_SC_SGNL_IXR_STTS)", response = TbScSgnlIxrSttsDto.class, responseContainer = "ArrayList")
-    @DeleteMapping(value = "", produces = {"application/json; charset=utf8"})
-    public List<TbScSgnlIxrSttsDto> deleteDataByIds(@RequestBody @Valid final List<Integer> ids) {
-        return this.service.deleteByIds(ids);
-    }
-
 }

+ 0 - 28
src/main/java/com/its/op/entity/its/scrs/TbScSgnlIxrStts.java

@@ -167,32 +167,4 @@ public class TbScSgnlIxrStts implements Serializable {
         this.sgnlIxrNmbr = sgnlIxrNmbr;
     }
 
-    public void updateInfo(TbScSgnlIxrSttsDto.TbScSgnlIxrSttsUpdReq req) {
-        this.lcCnt = req.getLcCnt();
-        this.cntlMode = req.getCntlMode();
-        this.cntlStts = req.getCntlStts();
-        this.spclCntl = req.getSpclCntl();
-        this.cycl = req.getCycl();
-        this.ofst = req.getOfst();
-        this.aring1phas = req.getAring1phas();
-        this.aring2phas = req.getAring2phas();
-        this.aring3phas = req.getAring3phas();
-        this.aring4phas = req.getAring4phas();
-        this.aring5phas = req.getAring5phas();
-        this.aring6phas = req.getAring6phas();
-        this.aring7phas = req.getAring7phas();
-        this.aring8phas = req.getAring8phas();
-        this.bring1phas = req.getBring1phas();
-        this.bring2phas = req.getBring2phas();
-        this.bring3phas = req.getBring3phas();
-        this.bring4phas = req.getBring4phas();
-        this.bring5phas = req.getBring5phas();
-        this.bring6phas = req.getBring6phas();
-        this.bring7phas = req.getBring7phas();
-        this.bring8phas = req.getBring8phas();
-        this.prstAringPhas = req.getPrstAringPhas();
-        this.prstBringPhas = req.getPrstBringPhas();
-        this.cboxStts = req.getCboxStts();
-    }
-
 }

+ 0 - 51
src/main/java/com/its/op/service/its/rse/TbRseCtlrSttsService.java

@@ -51,55 +51,4 @@ public class TbRseCtlrSttsService {
         return entity.toDto();
     }
 
-    // 데이터 변경
-    @Transactional
-    public TbRseCtlrSttsDto updateById(String id, TbRseCtlrSttsDto.TbRseCtlrSttsUpdReq req) {
-        TbRseCtlrStts entity = requireOne(id);
-        entity.updateInfo(req);
-        this.repo.save(entity);
-        return entity.toDto();
-    }
-
-    // 데이터 변경 또는 생성-목록(데이터가 존재하면 업데이트 없으면 신규로 생성)
-    @Transactional
-    public List<TbRseCtlrSttsDto> mergeInfoList(List<TbRseCtlrSttsDto.TbRseCtlrSttsUpdReq> reqList) {
-        List<TbRseCtlrSttsDto> result = new ArrayList<>();
-        for (TbRseCtlrSttsDto.TbRseCtlrSttsUpdReq req : reqList) {
-            TbRseCtlrStts obj = req.toEntity();
-            this.repo.save(obj);
-            result.add(obj.toDto());
-        }
-        return result;
-    }
-
-    // 데이터 변경 또는 생성-개별(데이터가 존재하면 업데이트 없으면 신규로 생성)
-    @Transactional
-    public TbRseCtlrSttsDto mergeInfo(TbRseCtlrSttsDto.TbRseCtlrSttsUpdReq req) {
-        TbRseCtlrStts obj = req.toEntity();
-        this.repo.save(obj);
-        return obj.toDto();
-    }
-
-    // 정보 삭제-개별, 데이터 존재하지 않으면 Exception
-    @Transactional
-    public TbRseCtlrSttsDto deleteById(String id) {
-        TbRseCtlrStts entity = requireOne(id);
-        this.repo.deleteById(id);
-        return entity.toDto();
-    }
-
-    // 정보 삭제-목록, 존재하는 데이터 만 삭제
-    @Transactional
-    public List<TbRseCtlrSttsDto> deleteByIds(List<String> ids) {
-        List<TbRseCtlrSttsDto> result = new ArrayList<>();
-        for (String id : ids) {
-            Optional<TbRseCtlrStts> obj = this.repo.findById(id);
-            if (obj.isPresent()) {
-                this.repo.deleteById(id);
-                result.add(obj.get().toDto());
-            }
-        }
-        return result;
-    }
-
 }

+ 3 - 3
src/main/java/com/its/op/service/its/scrs/TbScSgnlCtlrService.java

@@ -4,9 +4,9 @@ import com.its.op.dao.repository.its.scrs.TbScSgnlCtlrRepository;
 import com.its.op.dto.its.common.FcltSttsDto;
 import com.its.op.dto.its.common.FcltSttsListDto;
 import com.its.op.dto.its.common.FcltSttsSummaryDto;
-import com.its.op.dto.its.rse.TbRseCtlrSttsDto;
 import com.its.op.dto.its.scrs.TbScSgnlCtlrDto;
 import com.its.op.dto.its.scrs.TbScSgnlCtlrPhaseDto;
+import com.its.op.dto.its.scrs.TbScSgnlIxrSttsDto;
 import com.its.op.entity.its.scrs.TbScSgnlCtlr;
 import com.its.op.global.CodeManager;
 import lombok.RequiredArgsConstructor;
@@ -150,7 +150,7 @@ public class TbScSgnlCtlrService {
     @Transactional(readOnly = true)
     public FcltSttsListDto findAllSttsListTotal(boolean total) {
 
-        String fcltType = "신호제어기";
+        String fcltType = "SIG";
         FcltSttsListDto result = new FcltSttsListDto();
 
         AtomicInteger error = new AtomicInteger(0);
@@ -159,7 +159,7 @@ public class TbScSgnlCtlrService {
         List<FcltSttsDto> sttsDtoList = new ArrayList<>();
         List<TbScSgnlCtlr> ctlrList = this.repo.findAllList();
         ctlrList.forEach(obj -> {
-            TbRseCtlrSttsDto dto = obj.toSttsDto();
+            TbScSgnlIxrSttsDto dto = obj.toSttsDto();
             if (total) {
                 FcltSttsDto stts = FcltSttsDto.builder()
                         .fcltType(fcltType)

+ 0 - 29
src/main/java/com/its/op/service/its/scrs/TbScSgnlIxrSttsService.java

@@ -60,35 +60,6 @@ public class TbScSgnlIxrSttsService {
         return entity.toDto();
     }
 
-    // 데이터 변경
-    @Transactional
-    public TbScSgnlIxrSttsDto updateById(Integer sgnlIxrNmbr, TbScSgnlIxrSttsDto.TbScSgnlIxrSttsUpdReq req) {
-        TbScSgnlIxrStts entity = requireOne(sgnlIxrNmbr);
-        entity.updateInfo(req);
-        this.repo.save(entity);
-        return entity.toDto();
-    }
-
-    // 데이터 변경 또는 생성-목록(데이터가 존재하면 업데이트 없으면 신규로 생성)
-    @Transactional
-    public List<TbScSgnlIxrSttsDto> mergeInfoList(List<TbScSgnlIxrSttsDto.TbScSgnlIxrSttsUpdReq> reqList) {
-        List<TbScSgnlIxrSttsDto> result = new ArrayList<>();
-        for (TbScSgnlIxrSttsDto.TbScSgnlIxrSttsUpdReq req : reqList) {
-            TbScSgnlIxrStts obj = req.toEntity();
-            this.repo.save(obj);
-            result.add(obj.toDto());
-        }
-        return result;
-    }
-
-    // 데이터 변경 또는 생성-개별(데이터가 존재하면 업데이트 없으면 신규로 생성)
-    @Transactional
-    public TbScSgnlIxrSttsDto mergeInfo(TbScSgnlIxrSttsDto.TbScSgnlIxrSttsUpdReq req) {
-        TbScSgnlIxrStts obj = req.toEntity();
-        this.repo.save(obj);
-        return obj.toDto();
-    }
-
     // 정보 삭제-개별, 데이터 존재하지 않으면 Exception
     @Transactional
     public TbScSgnlIxrSttsDto deleteById(Integer sgnlIxrNmbr) {