임시저장 상태 변경 수정

This commit is contained in:
LAPTOP-L3VE7KK2\USER 2025-01-14 09:23:53 +09:00
parent 20340fca62
commit 560b96044a
3 changed files with 40 additions and 1 deletions

View File

@ -108,6 +108,9 @@ public interface EstimateMapper {
// 견적서 복사
public int insertEstimateCopy(EstimateCopyRequest estimateCopyRequest);
// 견적서 도면 아이템 복사
public int insertEstimateDrawingItemCopy(EstimateCopyRequest estimateCopyRequest);
// Plan 확정 동기화
public int updatePlanConfirmSync(PlanSyncResponse planSyncData);
}

View File

@ -784,6 +784,7 @@ public class EstimateService {
itemRequest.setPkgMaterialFlg(itemResponse.getPkgMaterialFlg());
itemRequest.setFileUploadFlg(itemResponse.getFileUploadFlg());
itemRequest.setItemGroup(itemResponse.getItemGroup());
itemRequest.setOpenFlg(itemResponse.getOpenFlg());
break;
}
@ -810,7 +811,7 @@ public class EstimateService {
estimateMapper.insertEstimateItem(itemRequest);
}
// [6]. 견적서 지붕재 복사
// [6]. 견적서 지붕재 도면 초기 데이터 복사
List<RoofResponse> roofList = estimateMapper.selectEstimateRoofList(estimateRequest);
List<RoofResponse> roofItemList = estimateMapper.selectEstimateRoofItemList(estimateRequest);
List<ItemResponse> circuitItemList =
@ -868,9 +869,13 @@ public class EstimateService {
estimateMapper.insertEstimateCircuitItem(circuitItemRequest);
}
// 도면 초기 데이타 복사(초기화 위해 필요)
estimateMapper.insertEstimateDrawingItemCopy(estimateCopyRequest);
// [7]. 견적서 도면 복사 (추후 개발 필요)
// [8]. QSP Q.CAST SEND API
/*
List<EstimateSendResponse> resultList = new ArrayList<EstimateSendResponse>();
estimateRequest.setObjectNo(estimateCopyRequest.getCopyObjectNo());
estimateRequest.setPlanNo(estimateCopyRequest.getCopyPlanNo());
@ -885,6 +890,7 @@ public class EstimateService {
estimateMapper.updateEstimateApi(estimateRequest);
}
*/
} catch (Exception e) {
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
@ -960,6 +966,7 @@ public class EstimateService {
String[] arrItemId = new String[itemList.size()];
int i = 0;
for (ItemRequest itemRequest : itemList) {
System.out.println(">>>>>>>>>>>>>>>>" + itemRequest.getItemId());
arrItemId[i++] = itemRequest.getItemId();
}
estimateRequest.setArrItemId(arrItemId);

View File

@ -1011,6 +1011,8 @@
, CONSTRUCT_SPECIFICATION_MULTI
, SURFACE_TYPE
, ANGLE
, TEMP_FLG
, LOCK_FLG
, SYNC_FLG
, CREATE_DATETIME
, CREATE_USER
@ -1062,6 +1064,8 @@
, P.CONSTRUCT_SPECIFICATION_MULTI
, P.SURFACE_TYPE
, P.ANGLE
, '1' AS TEMP_FLG
, '0' AS LOCK_FLG
, '0' AS SYNC_FLG
, GETDATE() AS CREATE_DATETIME
, #{userId} AS CREATE_USER
@ -1071,6 +1075,31 @@
AND P.DEL_FLG = '0'
</insert>
<insert id="insertEstimateDrawingItemCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateDrawingItemCopy */
INSERT INTO T_PART_DRAWING_ESTIMATE
(
OBJECT_NO
, PLAN_NO
, DISP_ORDER
, ITEM_ID
, AMOUNT
, LAST_EDIT_DATETIME
, LAST_EDIT_USER
)
SELECT
#{copyObjectNo} AS OBJECT_NO
, #{copyPlanNo} AS PLAN_NO
, PDE.DISP_ORDER
, PDE.ITEM_ID
, PDE.AMOUNT
, GETDATE() AS LAST_EDIT_DATETIME
, #{userId} AS LAST_EDIT_USER
FROM T_PART_DRAWING_ESTIMATE PDE WITH (NOLOCK)
WHERE PDE.OBJECT_NO = #{objectNo}
AND PDE.PLAN_NO = #{planNo}
</insert>
<update id="updatePlanConfirmSync" parameterType="com.interplug.qcast.biz.estimate.dto.PlanSyncResponse">
/* sqlid : com.interplug.qcast.biz.estimate.updatePlanConfirmSync */
UPDATE T_PLAN