견적서 EXCEL 다운로드 회사명 표기 수정
This commit is contained in:
parent
1a98b4c18a
commit
d1fc048dbf
@ -285,12 +285,17 @@ public class EstimateService {
|
|||||||
List<RoofRequest> roofList = new ArrayList<RoofRequest>();
|
List<RoofRequest> roofList = new ArrayList<RoofRequest>();
|
||||||
List<ItemRequest> itemList = estimateRequest.getItemList();
|
List<ItemRequest> itemList = estimateRequest.getItemList();
|
||||||
|
|
||||||
|
estimateRequest.setTempFlg("0");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 도면 작성일 경우에만 지붕재 데이터를 셋팅
|
// 도면 작성일 경우에만 지붕재 데이터를 셋팅
|
||||||
if ("1".equals(estimateRequest.getDrawingFlg())) {
|
if ("1".equals(estimateRequest.getDrawingFlg())) {
|
||||||
// [1]. 견적서 기본셋팅
|
// [1]. 견적서 기본셋팅
|
||||||
|
// 플랜정보 조회 (임시저장여부 가져오기)
|
||||||
|
EstimateResponse estimateResponse = estimateMapper.selectEstimateDetail(estimateRequest);
|
||||||
estimateRequest.setEstimateType("YJOD");
|
estimateRequest.setEstimateType("YJOD");
|
||||||
estimateRequest.setPriceCd("UNIT_PRICE");
|
estimateRequest.setPriceCd("UNIT_PRICE");
|
||||||
|
estimateRequest.setTempFlg("0".equals(estimateResponse.getTempFlg()) ? "0" : "1");
|
||||||
|
|
||||||
// 물건정보 조회 후 데이터 축출
|
// 물건정보 조회 후 데이터 축출
|
||||||
ObjectResponse objectResponse =
|
ObjectResponse objectResponse =
|
||||||
@ -651,20 +656,23 @@ public class EstimateService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QSP Q.CAST SEND API
|
// 임시저장 상태에서는 인터페이스 막도록 처리
|
||||||
List<EstimateSendResponse> resultList = new ArrayList<EstimateSendResponse>();
|
if ("0".equals(estimateRequest.getTempFlg())) {
|
||||||
resultList = this.sendEstimateApi(estimateRequest);
|
// QSP Q.CAST SEND API
|
||||||
// API에서 받은 문서번호 업데이트
|
List<EstimateSendResponse> resultList = new ArrayList<EstimateSendResponse>();
|
||||||
for (EstimateSendResponse result : resultList) {
|
resultList = this.sendEstimateApi(estimateRequest);
|
||||||
estimateRequest.setObjectNo(result.getObjectNo());
|
// API에서 받은 문서번호 업데이트
|
||||||
estimateRequest.setPlanNo(result.getPlanNo());
|
for (EstimateSendResponse result : resultList) {
|
||||||
estimateRequest.setDocNo(result.getDocNo());
|
estimateRequest.setObjectNo(result.getObjectNo());
|
||||||
estimateRequest.setSyncFlg(result.getSyncFlg());
|
estimateRequest.setPlanNo(result.getPlanNo());
|
||||||
|
estimateRequest.setDocNo(result.getDocNo());
|
||||||
|
estimateRequest.setSyncFlg(result.getSyncFlg());
|
||||||
|
|
||||||
estimateMapper.updateEstimateApi(estimateRequest);
|
estimateMapper.updateEstimateApi(estimateRequest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
|
||||||
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1354,11 +1362,14 @@ public class EstimateService {
|
|||||||
elm = doc.getElementById("estimateDate");
|
elm = doc.getElementById("estimateDate");
|
||||||
elm.text(StringUtils.defaultString(data.getEstimateDate()));
|
elm.text(StringUtils.defaultString(data.getEstimateDate()));
|
||||||
|
|
||||||
|
elm = doc.getElementById("saleStoreName");
|
||||||
|
elm.text(StringUtils.defaultString(data.getSaleStoreName()));
|
||||||
|
|
||||||
elm = doc.getElementById("bizNo");
|
elm = doc.getElementById("bizNo");
|
||||||
elm.text(StringUtils.defaultString(data.getBizNo()));
|
elm.text(StringUtils.defaultString(data.getBizNo()));
|
||||||
|
|
||||||
elm = doc.getElementById("zipNo");
|
elm = doc.getElementById("zipNo");
|
||||||
elm.text(StringUtils.defaultString(data.getZipNo()));
|
elm.text("(" + StringUtils.defaultString(data.getZipNo()) + ")");
|
||||||
|
|
||||||
elm = doc.getElementById("address");
|
elm = doc.getElementById("address");
|
||||||
elm.text(StringUtils.defaultString(data.getAddress()));
|
elm.text(StringUtils.defaultString(data.getAddress()));
|
||||||
|
|||||||
@ -157,6 +157,9 @@ public class EstimateRequest {
|
|||||||
@Schema(description = "QSP 동기화 여부")
|
@Schema(description = "QSP 동기화 여부")
|
||||||
private String syncFlg;
|
private String syncFlg;
|
||||||
|
|
||||||
|
@Schema(description = "임시저장 여부")
|
||||||
|
private String tempFlg;
|
||||||
|
|
||||||
@Schema(description = "비고")
|
@Schema(description = "비고")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
|
|||||||
@ -146,6 +146,9 @@ public class EstimateResponse {
|
|||||||
@Schema(description = "비고")
|
@Schema(description = "비고")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
|
@Schema(description = "임시저장 여부")
|
||||||
|
private String tempFlg;
|
||||||
|
|
||||||
@Schema(description = "갱신일")
|
@Schema(description = "갱신일")
|
||||||
private String lastEditDatetime;
|
private String lastEditDatetime;
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,6 @@
|
|||||||
package com.interplug.qcast.biz.object;
|
package com.interplug.qcast.biz.object;
|
||||||
|
|
||||||
import com.interplug.qcast.biz.object.dto.ObjectRequest;
|
import com.interplug.qcast.biz.object.dto.*;
|
||||||
import com.interplug.qcast.biz.object.dto.ObjectResponse;
|
|
||||||
import com.interplug.qcast.biz.object.dto.PlanReqRequest;
|
|
||||||
import com.interplug.qcast.biz.object.dto.PlanReqResponse;
|
|
||||||
import com.interplug.qcast.biz.object.dto.PlanRequest;
|
|
||||||
import com.interplug.qcast.biz.object.dto.PrefResponse;
|
|
||||||
import com.interplug.qcast.biz.object.dto.SaleStoreResponse;
|
|
||||||
import com.interplug.qcast.biz.object.dto.UploadRequest;
|
|
||||||
import com.interplug.qcast.biz.object.dto.WindSpeedResponse;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
@ -113,8 +105,8 @@ public class ObjectController {
|
|||||||
@Operation(description = "물건정보의 플랜정보를 추가한다.")
|
@Operation(description = "물건정보의 플랜정보를 추가한다.")
|
||||||
@PostMapping("/add-plan")
|
@PostMapping("/add-plan")
|
||||||
@ResponseStatus(HttpStatus.CREATED)
|
@ResponseStatus(HttpStatus.CREATED)
|
||||||
public void insertPlan(@RequestBody PlanRequest planRequest) throws Exception {
|
public PlanResponse insertPlan(@RequestBody PlanRequest planRequest) throws Exception {
|
||||||
objectService.insertPlan(planRequest);
|
return objectService.insertPlan(planRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "물건정보의 플랜정보를 삭제한다.")
|
@Operation(description = "물건정보의 플랜정보를 삭제한다.")
|
||||||
|
|||||||
@ -270,6 +270,7 @@ public class ObjectService {
|
|||||||
planRequest.setNorthArrangement("0");
|
planRequest.setNorthArrangement("0");
|
||||||
planRequest.setDiffRoofEnabled("0");
|
planRequest.setDiffRoofEnabled("0");
|
||||||
planRequest.setOrderFlg("0");
|
planRequest.setOrderFlg("0");
|
||||||
|
planRequest.setTempFlg("1");
|
||||||
planRequest.setUserId(objectRequest.getUserId());
|
planRequest.setUserId(objectRequest.getUserId());
|
||||||
result += objectMapper.insertPlan(planRequest);
|
result += objectMapper.insertPlan(planRequest);
|
||||||
|
|
||||||
@ -460,7 +461,10 @@ public class ObjectService {
|
|||||||
* @return String 추가 플랜번호
|
* @return String 추가 플랜번호
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public String insertPlan(PlanRequest planRequest) throws Exception {
|
public PlanResponse insertPlan(PlanRequest planRequest) throws Exception {
|
||||||
|
|
||||||
|
PlanResponse planResponse = new PlanResponse();
|
||||||
|
|
||||||
// Validation
|
// Validation
|
||||||
if (StringUtils.isEmpty(planRequest.getObjectNo())) {
|
if (StringUtils.isEmpty(planRequest.getObjectNo())) {
|
||||||
throw new QcastException(
|
throw new QcastException(
|
||||||
@ -482,10 +486,14 @@ public class ObjectService {
|
|||||||
planRequest.setNorthArrangement("0");
|
planRequest.setNorthArrangement("0");
|
||||||
planRequest.setDiffRoofEnabled("0");
|
planRequest.setDiffRoofEnabled("0");
|
||||||
planRequest.setOrderFlg("0");
|
planRequest.setOrderFlg("0");
|
||||||
|
planRequest.setTempFlg("1");
|
||||||
|
|
||||||
objectMapper.insertPlan(planRequest);
|
objectMapper.insertPlan(planRequest);
|
||||||
|
|
||||||
return planRequest.getPlanNo();
|
planResponse.setObjectNo(planRequest.getObjectNo());
|
||||||
|
planResponse.setPlanNo(planRequest.getPlanNo());
|
||||||
|
|
||||||
|
return planResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -106,4 +106,7 @@ public class PlanRequest {
|
|||||||
|
|
||||||
@Schema(description = "발주여부")
|
@Schema(description = "발주여부")
|
||||||
private String orderFlg;
|
private String orderFlg;
|
||||||
|
|
||||||
|
@Schema(description = "임시저장여부")
|
||||||
|
private String tempFlg;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,6 +49,7 @@
|
|||||||
, P.PKG_ASP
|
, P.PKG_ASP
|
||||||
, P.PRICE_CD
|
, P.PRICE_CD
|
||||||
, P.REMARKS
|
, P.REMARKS
|
||||||
|
, P.TEMP_FLG
|
||||||
, P.LAST_EDIT_DATETIME
|
, P.LAST_EDIT_DATETIME
|
||||||
, P.CREATE_DATETIME
|
, P.CREATE_DATETIME
|
||||||
, P.CREATE_USER
|
, P.CREATE_USER
|
||||||
@ -75,11 +76,11 @@
|
|||||||
SELECT
|
SELECT
|
||||||
T.*
|
T.*
|
||||||
, SS1.SALE_STORE_NAME AS CUST_SALE_STORE_NAME
|
, SS1.SALE_STORE_NAME AS CUST_SALE_STORE_NAME
|
||||||
, SS2.SALE_STORE_NAME
|
, CASE WHEN SS2.DISP_COMPANY_NAME IS NOT NULL THEN SS2.DISP_COMPANY_NAME ELSE SS2.SALE_STORE_NAME END AS SALE_STORE_NAME
|
||||||
, SS2.ZIP_NO
|
, CASE WHEN SS2.DISP_ZIP_NO IS NOT NULL THEN SS2.DISP_ZIP_NO ELSE SS2.ZIP_NO END AS ZIP_NO
|
||||||
, SS2.ADDRESS
|
, CASE WHEN SS2.DISP_ADDRESS IS NOT NULL THEN SS2.DISP_ADDRESS ELSE SS2.ADDRESS END AS ADDRESS
|
||||||
, SS2.TEL
|
, CASE WHEN SS2.DISP_TEL IS NOT NULL THEN SS2.DISP_TEL ELSE SS2.TEL END AS TEL
|
||||||
, SS2.FAX
|
, CASE WHEN SS2.DISP_FAX IS NOT NULL THEN SS2.DISP_FAX ELSE SS2.FAX END AS FAX
|
||||||
, SS2.BIZ_NO
|
, SS2.BIZ_NO
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
@ -606,6 +607,7 @@
|
|||||||
, PKG_ASP = NULL
|
, PKG_ASP = NULL
|
||||||
, PRICE_CD = #{priceCd}
|
, PRICE_CD = #{priceCd}
|
||||||
, SURFACE_TYPE = #{surfaceType}
|
, SURFACE_TYPE = #{surfaceType}
|
||||||
|
, TEMP_FLG = CASE WHEN TEMP_FLG = '0' THEN '0' ELSE #{tempFlg} END
|
||||||
, CREATE_DATETIME = GETDATE()
|
, CREATE_DATETIME = GETDATE()
|
||||||
, CREATE_USER = #{userId}
|
, CREATE_USER = #{userId}
|
||||||
</when>
|
</when>
|
||||||
@ -617,6 +619,7 @@
|
|||||||
, REMARKS = #{remarks}
|
, REMARKS = #{remarks}
|
||||||
, PKG_ASP = #{pkgAsp}
|
, PKG_ASP = #{pkgAsp}
|
||||||
, PRICE_CD = #{priceCd}
|
, PRICE_CD = #{priceCd}
|
||||||
|
, TEMP_FLG = '0'
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
, CAPACITY = #{capacity}
|
, CAPACITY = #{capacity}
|
||||||
|
|||||||
@ -699,6 +699,7 @@
|
|||||||
, SUPPORT_MEAKER_MULTI
|
, SUPPORT_MEAKER_MULTI
|
||||||
, DIFF_ROOF_ENABLED
|
, DIFF_ROOF_ENABLED
|
||||||
, ORDER_FLG
|
, ORDER_FLG
|
||||||
|
, TEMP_FLG
|
||||||
) VALUES (
|
) VALUES (
|
||||||
#{objectNo}
|
#{objectNo}
|
||||||
, #{planNo}
|
, #{planNo}
|
||||||
@ -735,6 +736,7 @@
|
|||||||
, #{supportMeakerMulti}
|
, #{supportMeakerMulti}
|
||||||
, #{diffRoofEnabled}
|
, #{diffRoofEnabled}
|
||||||
, #{orderFlg}
|
, #{orderFlg}
|
||||||
|
, #{tempFlg}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user