견적서 저장 API 변경
This commit is contained in:
parent
f97ab43107
commit
2930910b52
@ -72,13 +72,13 @@ public interface EstimateMapper {
|
|||||||
// 견적서 API 정보 수정
|
// 견적서 API 정보 수정
|
||||||
public int updateEstimateApi(EstimateRequest estimateRequest);
|
public int updateEstimateApi(EstimateRequest estimateRequest);
|
||||||
|
|
||||||
// 견적서 지붕재 등록
|
// 견적서 지붕면 등록
|
||||||
public int insertEstimateRoof(RoofRequest roofRequest);
|
public int insertEstimateRoof(RoofRequest roofRequest);
|
||||||
|
|
||||||
// 견적서 지붕재 아이템 등록
|
// 견적서 지붕면 아이템 등록
|
||||||
public int insertEstimateRoofItem(ItemRequest itemRequest);
|
public int insertEstimateRoofItem(ItemRequest itemRequest);
|
||||||
|
|
||||||
// 견적서 지붕재 회로구성 아이템 등록
|
// 견적서 지붕면 회로구성 아이템 등록
|
||||||
public int insertEstimateCircuitItem(ItemRequest itemRequest);
|
public int insertEstimateCircuitItem(ItemRequest itemRequest);
|
||||||
|
|
||||||
// 견적서 도면 아이템 등록
|
// 견적서 도면 아이템 등록
|
||||||
@ -108,6 +108,15 @@ public interface EstimateMapper {
|
|||||||
// 견적서 복사
|
// 견적서 복사
|
||||||
public int insertEstimateCopy(EstimateCopyRequest estimateCopyRequest);
|
public int insertEstimateCopy(EstimateCopyRequest estimateCopyRequest);
|
||||||
|
|
||||||
|
// 견적서 지붕면 복사
|
||||||
|
public int insertEstimateRoofCopy(EstimateCopyRequest estimateCopyRequest);
|
||||||
|
|
||||||
|
// 견적서 지붕면 아이템 복사
|
||||||
|
public int insertEstimateRoofItemCopy(EstimateCopyRequest estimateCopyRequest);
|
||||||
|
|
||||||
|
// 견적서 지붕면 회로구성 아이템 복사
|
||||||
|
public int insertEstimateCircuitItemCopy(EstimateCopyRequest estimateCopyRequest);
|
||||||
|
|
||||||
// 견적서 도면 아이템 복사
|
// 견적서 도면 아이템 복사
|
||||||
public int insertEstimateDrawingItemCopy(EstimateCopyRequest estimateCopyRequest);
|
public int insertEstimateDrawingItemCopy(EstimateCopyRequest estimateCopyRequest);
|
||||||
|
|
||||||
|
|||||||
@ -300,7 +300,7 @@ public class EstimateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// [2]. 지붕재 관련 데이터 셋팅
|
// [2]. 지붕재 관련 데이터 셋팅
|
||||||
roofList = estimateRequest.getRoofList();
|
roofList = estimateRequest.getRoofSurfaceList();
|
||||||
|
|
||||||
// 지붕재 시공사양 ID
|
// 지붕재 시공사양 ID
|
||||||
String constructSpecifications = "";
|
String constructSpecifications = "";
|
||||||
@ -576,7 +576,7 @@ public class EstimateService {
|
|||||||
: "UNIT_PRICE");
|
: "UNIT_PRICE");
|
||||||
estimateMapper.updateEstimate(estimateRequest);
|
estimateMapper.updateEstimate(estimateRequest);
|
||||||
|
|
||||||
// 도면 작성일 경우에만 지붕재, 도면 아이템 데이터 초기화 후 저장
|
// 도면 작성일 경우에만 지붕면, 도면 아이템 데이터 초기화 후 저장
|
||||||
if ("1".equals(estimateRequest.getDrawingFlg())) {
|
if ("1".equals(estimateRequest.getDrawingFlg())) {
|
||||||
// 견적서 지붕면/아이템 및 PC 회로구성도 제거
|
// 견적서 지붕면/아이템 및 PC 회로구성도 제거
|
||||||
estimateMapper.deleteEstimateRoofList(estimateRequest);
|
estimateMapper.deleteEstimateRoofList(estimateRequest);
|
||||||
@ -591,11 +591,32 @@ public class EstimateService {
|
|||||||
|
|
||||||
estimateMapper.insertEstimateRoof(roofRequest);
|
estimateMapper.insertEstimateRoof(roofRequest);
|
||||||
|
|
||||||
List<ItemRequest> roofItemList = roofRequest.getRoofItemList();
|
List<ItemRequest> moduleList = roofRequest.getModuleList();
|
||||||
|
List<ItemRequest> roofItemList = new ArrayList<ItemRequest>();
|
||||||
|
|
||||||
|
// 동일 모듈, PCS 아이템 묶기
|
||||||
|
for (ItemRequest itemRequest : moduleList) {
|
||||||
|
boolean overLap = false;
|
||||||
|
for (ItemRequest data : roofItemList) {
|
||||||
|
if (itemRequest.getItemId().equals(data.getItemId())
|
||||||
|
&& itemRequest.getPcItemId().equals(data.getPcItemId())) {
|
||||||
|
data.setAmount(
|
||||||
|
String.valueOf(Integer.parseInt(data.getAmount()) + 1)); // 데이터 존재하면 카운팅 + 1
|
||||||
|
overLap = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!overLap) {
|
||||||
|
itemRequest.setAmount("1");
|
||||||
|
roofItemList.add(itemRequest);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (ItemRequest itemRequest : roofItemList) {
|
for (ItemRequest itemRequest : roofItemList) {
|
||||||
|
itemRequest.setRoofSurfaceId(roofRequest.getRoofSurfaceId());
|
||||||
itemRequest.setObjectNo(estimateRequest.getObjectNo());
|
itemRequest.setObjectNo(estimateRequest.getObjectNo());
|
||||||
itemRequest.setPlanNo(estimateRequest.getPlanNo());
|
itemRequest.setPlanNo(estimateRequest.getPlanNo());
|
||||||
itemRequest.setRoofNo(roofRequest.getRoofNo());
|
|
||||||
|
|
||||||
estimateMapper.insertEstimateRoofItem(itemRequest);
|
estimateMapper.insertEstimateRoofItem(itemRequest);
|
||||||
}
|
}
|
||||||
@ -692,6 +713,7 @@ public class EstimateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -811,71 +833,19 @@ public class EstimateService {
|
|||||||
estimateMapper.insertEstimateItem(itemRequest);
|
estimateMapper.insertEstimateItem(itemRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
// [6]. 견적서 지붕재 및 도면 초기 데이터 복사
|
// [6]. 견적서 지붕면 및 도면 초기 데이터 복사
|
||||||
List<RoofResponse> roofList = estimateMapper.selectEstimateRoofList(estimateRequest);
|
// 견적서 지붕면 복사
|
||||||
List<RoofResponse> roofItemList = estimateMapper.selectEstimateRoofItemList(estimateRequest);
|
estimateMapper.insertEstimateRoofCopy(estimateCopyRequest);
|
||||||
List<ItemResponse> circuitItemList =
|
// 견적서 지붕면 아이템 복사
|
||||||
estimateMapper.selectEstimateCircuitItemList(estimateRequest);
|
estimateMapper.insertEstimateRoofItemCopy(estimateCopyRequest);
|
||||||
|
// 견적서 지붕면 회로구성 아이템 복사
|
||||||
for (RoofResponse roofResponse : roofList) {
|
estimateMapper.insertEstimateCircuitItemCopy(estimateCopyRequest);
|
||||||
List<RoofResponse> roofItemList2 = new ArrayList<RoofResponse>();
|
|
||||||
|
|
||||||
// 현재 매칭되는 지붕재 아이템 축출
|
|
||||||
for (RoofResponse roofItemResponse : roofItemList) {
|
|
||||||
if (roofResponse.getRoofNo().equals(roofItemResponse.getRoofNo())) {
|
|
||||||
roofItemList2.add(roofItemResponse);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RoofRequest roofRequest = new RoofRequest();
|
|
||||||
roofRequest.setObjectNo(estimateCopyRequest.getCopyObjectNo());
|
|
||||||
roofRequest.setPlanNo(estimateCopyRequest.getCopyPlanNo());
|
|
||||||
roofRequest.setRoofSurface(roofResponse.getRoofSurface());
|
|
||||||
roofRequest.setRoofMaterialId(roofResponse.getRoofMaterialId());
|
|
||||||
roofRequest.setSupportMethodId(roofResponse.getSupportMethodId());
|
|
||||||
roofRequest.setConstructSpecification(roofResponse.getConstructSpecification());
|
|
||||||
roofRequest.setSlope(roofResponse.getSlope());
|
|
||||||
roofRequest.setAngle(roofResponse.getAngle());
|
|
||||||
roofRequest.setClassType(roofResponse.getClassType());
|
|
||||||
roofRequest.setAzimuth(roofResponse.getAzimuth());
|
|
||||||
roofRequest.setUserId(estimateCopyRequest.getUserId());
|
|
||||||
|
|
||||||
estimateMapper.insertEstimateRoof(roofRequest);
|
|
||||||
|
|
||||||
for (RoofResponse roofItemResponse : roofItemList2) {
|
|
||||||
ItemRequest itemRequest = new ItemRequest();
|
|
||||||
itemRequest.setRoofNo(roofRequest.getRoofNo());
|
|
||||||
itemRequest.setObjectNo(estimateCopyRequest.getCopyObjectNo());
|
|
||||||
itemRequest.setPlanNo(estimateCopyRequest.getCopyPlanNo());
|
|
||||||
itemRequest.setItemId(roofItemResponse.getItemId());
|
|
||||||
itemRequest.setItemNo(roofItemResponse.getItemNo());
|
|
||||||
itemRequest.setItemName(roofItemResponse.getItemName());
|
|
||||||
itemRequest.setSpecification(roofItemResponse.getSpecification());
|
|
||||||
itemRequest.setAmount(roofItemResponse.getAmount());
|
|
||||||
itemRequest.setPcItemId(roofItemResponse.getPcItemId());
|
|
||||||
|
|
||||||
estimateMapper.insertEstimateRoofItem(itemRequest);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ItemResponse itemResponse : circuitItemList) {
|
|
||||||
ItemRequest circuitItemRequest = new ItemRequest();
|
|
||||||
|
|
||||||
circuitItemRequest.setObjectNo(estimateCopyRequest.getCopyObjectNo());
|
|
||||||
circuitItemRequest.setPlanNo(estimateCopyRequest.getCopyPlanNo());
|
|
||||||
circuitItemRequest.setItemId(itemResponse.getItemId());
|
|
||||||
circuitItemRequest.setCircuitCfg(itemResponse.getCircuitCfg());
|
|
||||||
|
|
||||||
estimateMapper.insertEstimateCircuitItem(circuitItemRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 도면 초기 데이타 복사(초기화 위해 필요)
|
// 도면 초기 데이타 복사(초기화 위해 필요)
|
||||||
estimateMapper.insertEstimateDrawingItemCopy(estimateCopyRequest);
|
estimateMapper.insertEstimateDrawingItemCopy(estimateCopyRequest);
|
||||||
|
|
||||||
// [7]. 견적서 도면 복사 (추후 개발 필요)
|
// [7]. 견적서 도면 복사 (추후 개발 필요)
|
||||||
|
|
||||||
// [8]. QSP Q.CAST SEND API
|
// [8]. QSP Q.CAST SEND API
|
||||||
/*
|
|
||||||
List<EstimateSendResponse> resultList = new ArrayList<EstimateSendResponse>();
|
List<EstimateSendResponse> resultList = new ArrayList<EstimateSendResponse>();
|
||||||
estimateRequest.setObjectNo(estimateCopyRequest.getCopyObjectNo());
|
estimateRequest.setObjectNo(estimateCopyRequest.getCopyObjectNo());
|
||||||
estimateRequest.setPlanNo(estimateCopyRequest.getCopyPlanNo());
|
estimateRequest.setPlanNo(estimateCopyRequest.getCopyPlanNo());
|
||||||
@ -890,7 +860,6 @@ public class EstimateService {
|
|||||||
|
|
||||||
estimateMapper.updateEstimateApi(estimateRequest);
|
estimateMapper.updateEstimateApi(estimateRequest);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
|
|||||||
@ -193,9 +193,9 @@ public class EstimateRequest {
|
|||||||
|
|
||||||
// 데이터 목록 관련 정보
|
// 데이터 목록 관련 정보
|
||||||
@Schema(description = "지붕재 목록")
|
@Schema(description = "지붕재 목록")
|
||||||
List<RoofRequest> roofList;
|
List<RoofRequest> roofSurfaceList;
|
||||||
|
|
||||||
@Schema(description = "지붕재 목록")
|
@Schema(description = "PC 회로구성도 목록")
|
||||||
List<ItemRequest> circuitItemList;
|
List<ItemRequest> circuitItemList;
|
||||||
|
|
||||||
@Schema(description = "아이템 목록")
|
@Schema(description = "아이템 목록")
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public class ItemRequest {
|
|||||||
private String roofItemNo;
|
private String roofItemNo;
|
||||||
|
|
||||||
@Schema(description = "지붕재 번호")
|
@Schema(description = "지붕재 번호")
|
||||||
private String roofNo;
|
private String roofSurfaceId;
|
||||||
|
|
||||||
@Schema(description = "아이템 ID")
|
@Schema(description = "아이템 ID")
|
||||||
private String itemId;
|
private String itemId;
|
||||||
@ -80,6 +80,9 @@ public class ItemRequest {
|
|||||||
@Schema(description = "회로번호")
|
@Schema(description = "회로번호")
|
||||||
private String circuitNo;
|
private String circuitNo;
|
||||||
|
|
||||||
|
@Schema(description = "회로구성번호")
|
||||||
|
private String circuit;
|
||||||
|
|
||||||
@Schema(description = "회로구성도")
|
@Schema(description = "회로구성도")
|
||||||
private String circuitCfg;
|
private String circuitCfg;
|
||||||
|
|
||||||
|
|||||||
@ -15,8 +15,8 @@ public class RoofRequest {
|
|||||||
@Schema(description = "플랜번호")
|
@Schema(description = "플랜번호")
|
||||||
private String planNo;
|
private String planNo;
|
||||||
|
|
||||||
@Schema(description = "지붕재 번호")
|
@Schema(description = "지붕재 ID")
|
||||||
private String roofNo;
|
private String roofSurfaceId;
|
||||||
|
|
||||||
@Schema(description = "지붕면")
|
@Schema(description = "지붕면")
|
||||||
private String roofSurface;
|
private String roofSurface;
|
||||||
@ -58,5 +58,5 @@ public class RoofRequest {
|
|||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
@Schema(description = "아이템 목록")
|
@Schema(description = "아이템 목록")
|
||||||
List<ItemRequest> roofItemList;
|
List<ItemRequest> moduleList;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,8 +14,8 @@ public class RoofResponse {
|
|||||||
@Schema(description = "플랜번호")
|
@Schema(description = "플랜번호")
|
||||||
private String planNo;
|
private String planNo;
|
||||||
|
|
||||||
@Schema(description = "지붕재 번호")
|
@Schema(description = "지붕면 ID")
|
||||||
private String roofNo;
|
private String roofSurfaceId;
|
||||||
|
|
||||||
@Schema(description = "지붕면")
|
@Schema(description = "지붕면")
|
||||||
private String roofSurface;
|
private String roofSurface;
|
||||||
|
|||||||
@ -115,7 +115,7 @@ public class PwrGnrSimService {
|
|||||||
|
|
||||||
// 견적서의 지붕재 목록 조회
|
// 견적서의 지붕재 목록 조회
|
||||||
List<PwrGnrSimRoofResponse> roofList = pwrGnrSimMapper.selectRoofList(pwrGnrSimRequest);
|
List<PwrGnrSimRoofResponse> roofList = pwrGnrSimMapper.selectRoofList(pwrGnrSimRequest);
|
||||||
int roofLength = roofList.size(); // Set의 크기 = 고유 roofNo 개수
|
int roofLength = roofList.size(); // Set의 크기 = 고유 roofSurfaceId 개수
|
||||||
|
|
||||||
// 지붕재 정보가 없음.
|
// 지붕재 정보가 없음.
|
||||||
if (roofList == null || roofList.isEmpty()) {
|
if (roofList == null || roofList.isEmpty()) {
|
||||||
@ -262,7 +262,7 @@ public class PwrGnrSimService {
|
|||||||
// 지붕별 모듈정보 셋팅
|
// 지붕별 모듈정보 셋팅
|
||||||
int j = 0;
|
int j = 0;
|
||||||
for (PwrGnrSimRoofResponse m : roofModuleList) {
|
for (PwrGnrSimRoofResponse m : roofModuleList) {
|
||||||
if (data.getRoofNo().equals(m.getRoofNo())) {
|
if (data.getRoofSurfaceId().equals(m.getRoofSurfaceId())) {
|
||||||
dSpecification += m.getTotSpecification();
|
dSpecification += m.getTotSpecification();
|
||||||
if (j == 0) {
|
if (j == 0) {
|
||||||
dModuleInput1[i] = Integer.parseInt(m.getAmount());
|
dModuleInput1[i] = Integer.parseInt(m.getAmount());
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import lombok.Data;
|
|||||||
public class PwrGnrSimRoofResponse {
|
public class PwrGnrSimRoofResponse {
|
||||||
|
|
||||||
@Schema(description = "지붕재")
|
@Schema(description = "지붕재")
|
||||||
private String roofNo;
|
private String roofSurfaceId;
|
||||||
|
|
||||||
@Schema(description = "지붕명")
|
@Schema(description = "지붕명")
|
||||||
private String roofSurface;
|
private String roofSurface;
|
||||||
|
|||||||
@ -351,7 +351,7 @@
|
|||||||
, P.PLAN_NO
|
, P.PLAN_NO
|
||||||
, ROUND(CAST(P.SETUP_HEIGHT AS FLOAT), 2) AS SETUP_HEIGHT
|
, ROUND(CAST(P.SETUP_HEIGHT AS FLOAT), 2) AS SETUP_HEIGHT
|
||||||
, P.SURFACE_TYPE
|
, P.SURFACE_TYPE
|
||||||
, RE.ROOF_NO
|
, RE.ROOF_SURFACE_ID
|
||||||
, RE.ROOF_SURFACE
|
, RE.ROOF_SURFACE
|
||||||
, RE.ROOF_MATERIAL_ID
|
, RE.ROOF_MATERIAL_ID
|
||||||
, RE.SUPPORT_METHOD_ID
|
, RE.SUPPORT_METHOD_ID
|
||||||
@ -383,7 +383,7 @@
|
|||||||
<select id="selectEstimateRoofItemList" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="com.interplug.qcast.biz.estimate.dto.RoofResponse">
|
<select id="selectEstimateRoofItemList" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="com.interplug.qcast.biz.estimate.dto.RoofResponse">
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.selectEstimateRoofList */
|
/* sqlid : com.interplug.qcast.biz.estimate.selectEstimateRoofList */
|
||||||
SELECT
|
SELECT
|
||||||
PIE.ROOF_NO
|
PIE.ROOF_SURFACE_ID
|
||||||
, PIE.OBJECT_NO
|
, PIE.OBJECT_NO
|
||||||
, PIE.PLAN_NO
|
, PIE.PLAN_NO
|
||||||
, PIE.ITEM_ID
|
, PIE.ITEM_ID
|
||||||
@ -395,7 +395,7 @@
|
|||||||
FROM T_PART_ROOF_ITEM_ESTIMATE PIE WITH (NOLOCK)
|
FROM T_PART_ROOF_ITEM_ESTIMATE PIE WITH (NOLOCK)
|
||||||
WHERE PIE.OBJECT_NO = #{objectNo}
|
WHERE PIE.OBJECT_NO = #{objectNo}
|
||||||
AND PIE.PLAN_NO = #{planNo}
|
AND PIE.PLAN_NO = #{planNo}
|
||||||
ORDER BY PIE.ROOF_NO
|
ORDER BY PIE.ROOF_SURFACE_ID
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEstimateCircuitItemList" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="com.interplug.qcast.biz.estimate.dto.ItemResponse">
|
<select id="selectEstimateCircuitItemList" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="com.interplug.qcast.biz.estimate.dto.ItemResponse">
|
||||||
@ -419,7 +419,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
T.OBJECT_NO
|
T.OBJECT_NO
|
||||||
, T.PLAN_NO
|
, T.PLAN_NO
|
||||||
, T.ROOF_NO
|
, T.ROOF_SURFACE_ID
|
||||||
, T.ROOF_SURFACE
|
, T.ROOF_SURFACE
|
||||||
, T.SLOPE
|
, T.SLOPE
|
||||||
, T.ANGLE
|
, T.ANGLE
|
||||||
@ -431,7 +431,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
P.OBJECT_NO
|
P.OBJECT_NO
|
||||||
, P.PLAN_NO
|
, P.PLAN_NO
|
||||||
, RE.ROOF_NO
|
, RE.ROOF_SURFACE_ID
|
||||||
, RE.ROOF_SURFACE
|
, RE.ROOF_SURFACE
|
||||||
, ROUND(CAST(RE.SLOPE AS FLOAT), 2) AS SLOPE
|
, ROUND(CAST(RE.SLOPE AS FLOAT), 2) AS SLOPE
|
||||||
, ROUND(CAST(RE.ANGLE AS FLOAT), 2) AS ANGLE
|
, ROUND(CAST(RE.ANGLE AS FLOAT), 2) AS ANGLE
|
||||||
@ -445,7 +445,7 @@
|
|||||||
ON P.OBJECT_NO = RE.OBJECT_NO
|
ON P.OBJECT_NO = RE.OBJECT_NO
|
||||||
AND P.PLAN_NO = RE.PLAN_NO
|
AND P.PLAN_NO = RE.PLAN_NO
|
||||||
INNER JOIN T_PART_ROOF_ITEM_ESTIMATE RIE WITH (NOLOCK)
|
INNER JOIN T_PART_ROOF_ITEM_ESTIMATE RIE WITH (NOLOCK)
|
||||||
ON RE.ROOF_NO = RIE.ROOF_NO
|
ON RE.ROOF_SURFACE_ID = RIE.ROOF_SURFACE_ID
|
||||||
AND RE.OBJECT_NO = RE.OBJECT_NO
|
AND RE.OBJECT_NO = RE.OBJECT_NO
|
||||||
AND RE.PLAN_NO = RE.PLAN_NO
|
AND RE.PLAN_NO = RE.PLAN_NO
|
||||||
INNER JOIN M_ITEM I WITH (NOLOCK)
|
INNER JOIN M_ITEM I WITH (NOLOCK)
|
||||||
@ -456,7 +456,7 @@
|
|||||||
AND I.ITEM_GROUP = #{schItemGroup}
|
AND I.ITEM_GROUP = #{schItemGroup}
|
||||||
</if>
|
</if>
|
||||||
) T
|
) T
|
||||||
GROUP BY T.OBJECT_NO, T.PLAN_NO, T.ROOF_NO, T.ROOF_SURFACE, T.SLOPE, T.ANGLE, T.CLASS_TYPE
|
GROUP BY T.OBJECT_NO, T.PLAN_NO, T.ROOF_SURFACE_ID, T.ROOF_SURFACE, T.SLOPE, T.ANGLE, T.CLASS_TYPE
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEstimateNoteTitleList" parameterType="com.interplug.qcast.biz.estimate.dto.NoteRequest" resultType="com.interplug.qcast.biz.estimate.dto.NoteResponse">
|
<select id="selectEstimateNoteTitleList" parameterType="com.interplug.qcast.biz.estimate.dto.NoteRequest" resultType="com.interplug.qcast.biz.estimate.dto.NoteResponse">
|
||||||
@ -820,13 +820,10 @@
|
|||||||
|
|
||||||
<insert id="insertEstimateRoof" parameterType="com.interplug.qcast.biz.estimate.dto.RoofRequest">
|
<insert id="insertEstimateRoof" parameterType="com.interplug.qcast.biz.estimate.dto.RoofRequest">
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateRoof */
|
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateRoof */
|
||||||
<selectKey keyProperty="roofNo" keyColumn="roofNo" resultType="String" order="AFTER">
|
|
||||||
SELECT @@IDENTITY
|
|
||||||
</selectKey>
|
|
||||||
|
|
||||||
INSERT INTO T_PART_ROOF_ESTIMATE
|
INSERT INTO T_PART_ROOF_ESTIMATE
|
||||||
(
|
(
|
||||||
OBJECT_NO
|
ROOF_SURFACE_ID
|
||||||
|
, OBJECT_NO
|
||||||
, PLAN_NO
|
, PLAN_NO
|
||||||
, ROOF_SURFACE
|
, ROOF_SURFACE
|
||||||
, ROOF_MATERIAL_ID
|
, ROOF_MATERIAL_ID
|
||||||
@ -847,7 +844,8 @@
|
|||||||
, CREATE_DATETIME
|
, CREATE_DATETIME
|
||||||
, CREATE_USER
|
, CREATE_USER
|
||||||
) VALUES (
|
) VALUES (
|
||||||
#{objectNo}
|
#{roofSurfaceId}
|
||||||
|
, #{objectNo}
|
||||||
, #{planNo}
|
, #{planNo}
|
||||||
, #{roofSurface}
|
, #{roofSurface}
|
||||||
, #{roofMaterialId}
|
, #{roofMaterialId}
|
||||||
@ -879,7 +877,7 @@
|
|||||||
INSERT INTO T_PART_ROOF_ITEM_ESTIMATE
|
INSERT INTO T_PART_ROOF_ITEM_ESTIMATE
|
||||||
(
|
(
|
||||||
ROOF_ITEM_NO
|
ROOF_ITEM_NO
|
||||||
, ROOF_NO
|
, ROOF_SURFACE_ID
|
||||||
, OBJECT_NO
|
, OBJECT_NO
|
||||||
, PLAN_NO
|
, PLAN_NO
|
||||||
, ITEM_ID
|
, ITEM_ID
|
||||||
@ -891,7 +889,7 @@
|
|||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
#{roofItemNo} AS ROOF_ITEM_NO
|
#{roofItemNo} AS ROOF_ITEM_NO
|
||||||
, #{roofNo} AS ROOF_NO
|
, #{roofSurfaceId} AS ROOF_SURFACE_ID
|
||||||
, #{objectNo} AS OBJECT_NO
|
, #{objectNo} AS OBJECT_NO
|
||||||
, #{planNo} AS PLAN_NO
|
, #{planNo} AS PLAN_NO
|
||||||
, I.ITEM_ID
|
, I.ITEM_ID
|
||||||
@ -1075,6 +1073,95 @@
|
|||||||
AND P.DEL_FLG = '0'
|
AND P.DEL_FLG = '0'
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertEstimateRoofCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateRoofCopy */
|
||||||
|
INSERT INTO T_PART_ROOF_ESTIMATE
|
||||||
|
(
|
||||||
|
ROOF_SURFACE_ID
|
||||||
|
, OBJECT_NO
|
||||||
|
, PLAN_NO
|
||||||
|
, ROOF_SURFACE
|
||||||
|
, ROOF_MATERIAL_ID
|
||||||
|
, SUPPORT_METHOD_ID
|
||||||
|
, CONSTRUCT_SPECIFICATION
|
||||||
|
, SLOPE
|
||||||
|
, ANGLE
|
||||||
|
, CLASS_TYPE
|
||||||
|
, AZIMUTH
|
||||||
|
, CREATE_DATETIME
|
||||||
|
, CREATE_USER
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
PRE.ROOF_SURFACE_ID
|
||||||
|
, #{copyObjectNo} AS OBJECT_NO
|
||||||
|
, #{copyPlanNo} AS PLAN_NO
|
||||||
|
, PRE.ROOF_SURFACE
|
||||||
|
, PRE.ROOF_MATERIAL_ID
|
||||||
|
, PRE.SUPPORT_METHOD_ID
|
||||||
|
, PRE.CONSTRUCT_SPECIFICATION
|
||||||
|
, PRE.SLOPE
|
||||||
|
, PRE.ANGLE
|
||||||
|
, PRE.CLASS_TYPE
|
||||||
|
, PRE.AZIMUTH
|
||||||
|
, GETDATE()
|
||||||
|
, #{userId} AS CREATE_USER
|
||||||
|
FROM T_PART_ROOF_ESTIMATE PRE WITH (NOLOCK)
|
||||||
|
WHERE PRE.OBJECT_NO = #{objectNo}
|
||||||
|
AND PRE.PLAN_NO = #{planNo}
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertEstimateRoofItemCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateRoofItemCopy */
|
||||||
|
INSERT INTO T_PART_ROOF_ITEM_ESTIMATE
|
||||||
|
(
|
||||||
|
ROOF_ITEM_NO
|
||||||
|
, ROOF_SURFACE_ID
|
||||||
|
, OBJECT_NO
|
||||||
|
, PLAN_NO
|
||||||
|
, ITEM_ID
|
||||||
|
, ITEM_NO
|
||||||
|
, ITEM_NAME
|
||||||
|
, SPECIFICATION
|
||||||
|
, AMOUNT
|
||||||
|
, PC_ITEM_ID
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
PRIE.ROOF_ITEM_NO
|
||||||
|
, PRIE.ROOF_SURFACE_ID
|
||||||
|
, #{copyObjectNo} AS OBJECT_NO
|
||||||
|
, #{copyPlanNo} AS PLAN_NO
|
||||||
|
, PRIE.ITEM_ID
|
||||||
|
, PRIE.ITEM_NO
|
||||||
|
, PRIE.ITEM_NAME
|
||||||
|
, PRIE.SPECIFICATION
|
||||||
|
, PRIE.AMOUNT
|
||||||
|
, PRIE.PC_ITEM_ID
|
||||||
|
FROM T_PART_ROOF_ITEM_ESTIMATE PRIE WITH (NOLOCK)
|
||||||
|
WHERE PRIE.OBJECT_NO = #{objectNo}
|
||||||
|
AND PRIE.PLAN_NO = #{planNo}
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertEstimateCircuitItemCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateCircuitItemCopy */
|
||||||
|
INSERT INTO T_PART_CIRCUIT_ITEM_ESTIMATE
|
||||||
|
(
|
||||||
|
CIRCUIT_NO
|
||||||
|
, OBJECT_NO
|
||||||
|
, PLAN_NO
|
||||||
|
, ITEM_ID
|
||||||
|
, CIRCUIT_CFG
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
PCIE.CIRCUIT_NO
|
||||||
|
, #{copyObjectNo} AS OBJECT_NO
|
||||||
|
, #{copyPlanNo} AS PLAN_NO
|
||||||
|
, PCIE.ITEM_ID
|
||||||
|
, PCIE.CIRCUIT_CFG
|
||||||
|
FROM T_PART_CIRCUIT_ITEM_ESTIMATE PCIE WITH (NOLOCK)
|
||||||
|
WHERE PCIE.OBJECT_NO = #{objectNo}
|
||||||
|
AND PCIE.PLAN_NO = #{planNo}
|
||||||
|
</insert>
|
||||||
|
|
||||||
<insert id="insertEstimateDrawingItemCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
|
<insert id="insertEstimateDrawingItemCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateDrawingItemCopy */
|
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateDrawingItemCopy */
|
||||||
INSERT INTO T_PART_DRAWING_ESTIMATE
|
INSERT INTO T_PART_DRAWING_ESTIMATE
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
resultType="com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse">
|
resultType="com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse">
|
||||||
/* sqlid : com.interplug.qcast.api.pwrGnrSimulation.selectRoofList (견적서 지붕재 정보 조회) */
|
/* sqlid : com.interplug.qcast.api.pwrGnrSimulation.selectRoofList (견적서 지붕재 정보 조회) */
|
||||||
SELECT
|
SELECT
|
||||||
A.ROOF_NO
|
A.ROOF_SURFACE_ID
|
||||||
, A.ROOF_SURFACE
|
, A.ROOF_SURFACE
|
||||||
, A.CLASS_TYPE
|
, A.CLASS_TYPE
|
||||||
, A.AZIMUTH
|
, A.AZIMUTH
|
||||||
@ -69,7 +69,7 @@
|
|||||||
resultType="com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse">
|
resultType="com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse">
|
||||||
/* sqlid : com.interplug.qcast.api.pwrGnrSimulation.selectRoofItemList (견적서 지붕재 아이템 정보 조회) */
|
/* sqlid : com.interplug.qcast.api.pwrGnrSimulation.selectRoofItemList (견적서 지붕재 아이템 정보 조회) */
|
||||||
SELECT
|
SELECT
|
||||||
A.ROOF_NO
|
A.ROOF_SURFACE_ID
|
||||||
, B.ITEM_ID
|
, B.ITEM_ID
|
||||||
, B.AMOUNT
|
, B.AMOUNT
|
||||||
, B.ITEM_NO
|
, B.ITEM_NO
|
||||||
@ -90,7 +90,7 @@
|
|||||||
INNER JOIN T_PART_ROOF_ITEM_ESTIMATE B WITH (NOLOCK)
|
INNER JOIN T_PART_ROOF_ITEM_ESTIMATE B WITH (NOLOCK)
|
||||||
ON A.OBJECT_NO = B.OBJECT_NO
|
ON A.OBJECT_NO = B.OBJECT_NO
|
||||||
AND A.PLAN_NO = B.PLAN_NO
|
AND A.PLAN_NO = B.PLAN_NO
|
||||||
AND A.ROOF_NO = B.ROOF_NO
|
AND A.ROOF_SURFACE_ID = B.ROOF_SURFACE_ID
|
||||||
INNER JOIN M_ITEM C WITH (NOLOCK)
|
INNER JOIN M_ITEM C WITH (NOLOCK)
|
||||||
ON B.ITEM_ID = C.ITEM_ID
|
ON B.ITEM_ID = C.ITEM_ID
|
||||||
WHERE A.OBJECT_NO = #{objectNo}
|
WHERE A.OBJECT_NO = #{objectNo}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user