삭제 시 response 메시지 삭제
This commit is contained in:
parent
68fd0fa2b2
commit
2c3073274c
@ -90,19 +90,14 @@ public class CanvasBasicSettingService {
|
|||||||
throw new QcastException (ErrorCode.INVALID_INPUT_VALUE ,"올바르지 않은 입력값입니다.");
|
throw new QcastException (ErrorCode.INVALID_INPUT_VALUE ,"올바르지 않은 입력값입니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 먼저 데이터가 존재하는지 확인
|
try {
|
||||||
CanvasBasicSettingInfo cntData = canvasBasicSettingMapper.getCanvasBasicSettingCnt(objectNo, planNo);
|
|
||||||
|
|
||||||
log.debug("cntData ::::: " + cntData);
|
|
||||||
|
|
||||||
// 데이터가 존재하지 않으면 insert
|
|
||||||
if (cntData.getRoofCnt().intValue() > 0) {
|
|
||||||
// Canvas Basic Setting 정보 삭제
|
// Canvas Basic Setting 정보 삭제
|
||||||
canvasBasicSettingMapper.deleteCanvasBasicSetting(objectNo, planNo);
|
canvasBasicSettingMapper.deleteCanvasBasicSetting(objectNo, planNo);
|
||||||
// 지붕재추가 정보 삭제
|
// 지붕재추가 정보 삭제
|
||||||
canvasBasicSettingMapper.deleteRoofMaterialsAdd(objectNo, planNo);
|
canvasBasicSettingMapper.deleteRoofMaterialsAdd(objectNo, planNo);
|
||||||
} else {
|
} catch (Exception e) {
|
||||||
throw new QcastException(ErrorCode.NOT_FOUND, "삭제할 배치면이 존재하지 않습니다.");
|
if (e instanceof QcastException) throw e;
|
||||||
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -146,15 +141,7 @@ public class CanvasBasicSettingService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 먼저 데이터가 존재하는지 확인
|
|
||||||
RoofMaterialsAddInfo cntData = canvasBasicSettingMapper.getRoofMaterialsCnt(objectNo, planNo);
|
|
||||||
|
|
||||||
// 데이터가 존재하지 않으면 수정하지 않고 예외를 던짐
|
|
||||||
if (cntData.getRoofCnt().intValue() > 0) {
|
|
||||||
canvasBasicSettingMapper.deleteRoofMaterialsAdd(objectNo, planNo);
|
canvasBasicSettingMapper.deleteRoofMaterialsAdd(objectNo, planNo);
|
||||||
} else {
|
|
||||||
throw new QcastException(ErrorCode.NOT_FOUND, "삭제할 지붕재가 존재하지 않습니다.");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof QcastException) throw e;
|
if (e instanceof QcastException) throw e;
|
||||||
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, e.getMessage());
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, e.getMessage());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user