|
@@ -54,7 +54,9 @@ public class TbVmsCtlrService {
|
|
|
List<TbVmsCtlrDto> result = new ArrayList<>();
|
|
|
List<TbVmsCtlr> data = this.repo.findAll();
|
|
|
for (TbVmsCtlr entity : data) {
|
|
|
- result.add(entity.toDto());
|
|
|
+ if (entity.getDelYn() != null && entity.getDelYn().equals("N")) {
|
|
|
+ result.add(entity.toDto());
|
|
|
+ }
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
@@ -174,23 +176,12 @@ public class TbVmsCtlrService {
|
|
|
// 정보 삭제-개별, 데이터 존재하지 않으면 Exception
|
|
|
public TbVmsCtlrDto deleteById(Long id) {
|
|
|
TbVmsCtlr entity = requireOne(id);
|
|
|
- this.repo.deleteById(id);
|
|
|
+ entity.setDelete();
|
|
|
+ //this.repo.deleteById(id);
|
|
|
+ this.repo.save(entity);
|
|
|
return entity.toDto();
|
|
|
}
|
|
|
|
|
|
- // 정보 삭제-목록, 존재하는 데이터 만 삭제
|
|
|
- public List<TbVmsCtlrDto> deleteByIds(List<Long> ids) {
|
|
|
- List<TbVmsCtlrDto> result = new ArrayList<>();
|
|
|
- for (Long id : ids) {
|
|
|
- Optional<TbVmsCtlr> obj = this.repo.findById(id);
|
|
|
- if (obj.isPresent()) {
|
|
|
- this.repo.deleteById(id);
|
|
|
- result.add(obj.get().toDto());
|
|
|
- }
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* VMS 용도 유형 코드 조회
|
|
|
* @return
|