Compare commits
No commits in common. "1734a9ac4316b7dc7eb9036a413f5e2224d7bb13" and "a93c52bc8b3f4bcab46ea426901082414fcc4d68" have entirely different histories.
1734a9ac43
...
a93c52bc8b
@ -103,11 +103,4 @@ public class EstimateController {
|
|||||||
public EstimateApiResponse selectAgencyCustList(PriceRequest priceRequest) throws Exception {
|
public EstimateApiResponse selectAgencyCustList(PriceRequest priceRequest) throws Exception {
|
||||||
return estimateService.selectAgencyCustList(priceRequest);
|
return estimateService.selectAgencyCustList(priceRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "견적서를 삭제한다.")
|
|
||||||
@PostMapping("/delete-estimate")
|
|
||||||
@ResponseStatus(HttpStatus.CREATED)
|
|
||||||
public void deleteEstimate(@RequestBody EstimateRequest estimateRequest) throws Exception {
|
|
||||||
estimateService.deleteEstimate(estimateRequest);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -146,8 +146,4 @@ public interface EstimateMapper {
|
|||||||
|
|
||||||
// 견적서 수정일 변경
|
// 견적서 수정일 변경
|
||||||
public int updateEstimateLastEditDate(EstimateRequest estimateRequest);
|
public int updateEstimateLastEditDate(EstimateRequest estimateRequest);
|
||||||
|
|
||||||
public int updateEstimateInit(EstimateRequest estimateRequest);
|
|
||||||
|
|
||||||
public int updateEstimateInfoInit(EstimateRequest estimateRequest);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1628,7 +1628,7 @@ public class EstimateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Failed to excelDownload estimate. Request: {}", request, e);
|
e.printStackTrace();
|
||||||
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2327,47 +2327,4 @@ public class EstimateService {
|
|||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 견적서 삭제 (복사이후 배치면 저장)
|
|
||||||
* @param estimateRequest
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void deleteEstimate(EstimateRequest estimateRequest) throws Exception{
|
|
||||||
|
|
||||||
if (StringUtils.isEmpty(estimateRequest.getObjectNo())) {
|
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
|
||||||
message.getMessage("common.message.required.data", "Object No"));
|
|
||||||
}
|
|
||||||
if (StringUtils.isEmpty(estimateRequest.getPlanNo())) {
|
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
|
||||||
message.getMessage("common.message.required.data", "Plan No"));
|
|
||||||
}
|
|
||||||
if (StringUtils.isEmpty(estimateRequest.getSaleStoreId())) {
|
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
|
||||||
message.getMessage("common.message.required.data", "Sale Store ID"));
|
|
||||||
}
|
|
||||||
if (StringUtils.isEmpty(estimateRequest.getUserId())) {
|
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
|
||||||
message.getMessage("common.message.required.data", "User ID"));
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
// T_PLAN
|
|
||||||
int cnt = estimateMapper.updateEstimateInit(estimateRequest);
|
|
||||||
// T_PLAN_INFO
|
|
||||||
int cnt2 = estimateMapper.updateEstimateInfoInit(estimateRequest);
|
|
||||||
|
|
||||||
// 견적서 모든 아이템 제거
|
|
||||||
int cnt3 = estimateMapper.deleteEstimateItemList(estimateRequest);
|
|
||||||
int cnt4 = estimateMapper.deleteEstimateInfoItemList(estimateRequest);
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("Failed to delete estimate. Request: {}", estimateRequest, e);
|
|
||||||
throw e; // 예외를 재던지기하여 상위 계층에서도 예외를 처리할 수 있도록 함
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -729,32 +729,6 @@
|
|||||||
AND PLAN_NO = #{planNo}
|
AND PLAN_NO = #{planNo}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateEstimateInit" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest">
|
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.updateEstimate */
|
|
||||||
UPDATE T_PLAN
|
|
||||||
SET
|
|
||||||
CONSTRUCT_SPECIFICATION = NULL
|
|
||||||
,SETUP_HEIGHT = NULL
|
|
||||||
,WEATHER_POINT = NULL
|
|
||||||
,SLOPE = NULL
|
|
||||||
,ROOF_MATERIAL_ID = NULL
|
|
||||||
,SUPPORT_METHOD_ID = NULL
|
|
||||||
,MODULE_MODEL = NULL
|
|
||||||
,DRAWING_ESTIMATE_CREATE_DATE = NULL
|
|
||||||
,ESTIMATE_VALIDITY_TERM = NULL
|
|
||||||
,CAPACITY = NULL
|
|
||||||
,SNOWFALL = NULL
|
|
||||||
,STANDARD_WIND_SPEED_ID = NULL
|
|
||||||
,PC_TYPE_NO = NULL
|
|
||||||
,ROOF_MATERIAL_ID_MULTI = NULL
|
|
||||||
,SUPPORT_MEAKER_MULTI = NULL
|
|
||||||
,SUPPORT_METHOD_ID_MULTI = NULL
|
|
||||||
,LAST_EDIT_DATETIME = GETDATE()
|
|
||||||
,LAST_EDIT_USER = #{userId}
|
|
||||||
WHERE OBJECT_NO = #{objectNo}
|
|
||||||
AND PLAN_NO = #{planNo}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="updateEstimateInfoReset" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest">
|
<update id="updateEstimateInfoReset" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest">
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.updateEstimateInfoReset */
|
/* sqlid : com.interplug.qcast.biz.estimate.updateEstimateInfoReset */
|
||||||
UPDATE T_PLAN_INFO
|
UPDATE T_PLAN_INFO
|
||||||
@ -771,29 +745,6 @@
|
|||||||
AND PLAN_NO = #{planNo}
|
AND PLAN_NO = #{planNo}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateEstimateInfoInit" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest">
|
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.updateEstimateInfoReset */
|
|
||||||
UPDATE T_PLAN_INFO
|
|
||||||
SET
|
|
||||||
CONSTRUCT_SPECIFICATION_MULTI = NULL
|
|
||||||
, SURFACE_TYPE = NULL
|
|
||||||
, ANGLE = NULL
|
|
||||||
, ESTIMATE_DATE = NULL
|
|
||||||
, ESTIMATE_TYPE = NULL
|
|
||||||
, FILE_FLG = 0
|
|
||||||
, ESTIMATE_OPTION = NULL
|
|
||||||
, PKG_ASP = NULL
|
|
||||||
, DOC_NO = NULL
|
|
||||||
, PRICE_CD = NULL
|
|
||||||
, REMARKS = NULL
|
|
||||||
, TEMP_FLG = 1
|
|
||||||
, LOCK_FLG = 0
|
|
||||||
, SYNC_FLG = NULL
|
|
||||||
, SEC_SAP_SALES_STORE_CD = NULL
|
|
||||||
WHERE OBJECT_NO = #{objectNo}
|
|
||||||
AND PLAN_NO = #{planNo}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="updateEstimateLock" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest">
|
<update id="updateEstimateLock" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest">
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.updateEstimateLock */
|
/* sqlid : com.interplug.qcast.biz.estimate.updateEstimateLock */
|
||||||
UPDATE T_PLAN_INFO
|
UPDATE T_PLAN_INFO
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user