삭제 시 response 메시지 삭제
This commit is contained in:
parent
68fd0fa2b2
commit
2c3073274c
@ -84,29 +84,24 @@ public class CanvasBasicSettingService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Canvas Basic Setting 삭제
|
// Canvas Basic Setting 삭제
|
||||||
public void deleteCanvasBasicSetting(String objectNo, Integer planNo) throws QcastException {
|
public void deleteCanvasBasicSetting(String objectNo, Integer planNo) throws QcastException {
|
||||||
|
|
||||||
if ((objectNo == null || objectNo.trim().isEmpty()) && (planNo == null)) {
|
|
||||||
throw new QcastException (ErrorCode.INVALID_INPUT_VALUE ,"올바르지 않은 입력값입니다.");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 먼저 데이터가 존재하는지 확인
|
|
||||||
CanvasBasicSettingInfo cntData = canvasBasicSettingMapper.getCanvasBasicSettingCnt(objectNo, planNo);
|
|
||||||
|
|
||||||
log.debug("cntData ::::: " + cntData);
|
|
||||||
|
|
||||||
// 데이터가 존재하지 않으면 insert
|
|
||||||
if (cntData.getRoofCnt().intValue() > 0) {
|
|
||||||
// Canvas Basic Setting 정보 삭제
|
|
||||||
canvasBasicSettingMapper.deleteCanvasBasicSetting(objectNo, planNo);
|
|
||||||
// 지붕재추가 정보 삭제
|
|
||||||
canvasBasicSettingMapper.deleteRoofMaterialsAdd(objectNo, planNo);
|
|
||||||
} else {
|
|
||||||
throw new QcastException(ErrorCode.NOT_FOUND, "삭제할 배치면이 존재하지 않습니다.");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if ((objectNo == null || objectNo.trim().isEmpty()) && (planNo == null)) {
|
||||||
|
throw new QcastException (ErrorCode.INVALID_INPUT_VALUE ,"올바르지 않은 입력값입니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Canvas Basic Setting 정보 삭제
|
||||||
|
canvasBasicSettingMapper.deleteCanvasBasicSetting(objectNo, planNo);
|
||||||
|
// 지붕재추가 정보 삭제
|
||||||
|
canvasBasicSettingMapper.deleteRoofMaterialsAdd(objectNo, planNo);
|
||||||
|
} catch (Exception e) {
|
||||||
|
if (e instanceof QcastException) throw e;
|
||||||
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 지붕면 할당 Setting 등록
|
// 지붕면 할당 Setting 등록
|
||||||
public Map<String, String> insertRoofAllocSetting(RoofAllocationSettingInfo rasi) throws QcastException {
|
public Map<String, String> insertRoofAllocSetting(RoofAllocationSettingInfo rasi) throws QcastException {
|
||||||
|
|
||||||
@ -146,15 +141,7 @@ public class CanvasBasicSettingService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 먼저 데이터가 존재하는지 확인
|
canvasBasicSettingMapper.deleteRoofMaterialsAdd(objectNo, planNo);
|
||||||
RoofMaterialsAddInfo cntData = canvasBasicSettingMapper.getRoofMaterialsCnt(objectNo, planNo);
|
|
||||||
|
|
||||||
// 데이터가 존재하지 않으면 수정하지 않고 예외를 던짐
|
|
||||||
if (cntData.getRoofCnt().intValue() > 0) {
|
|
||||||
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