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