Merge branch 'dev' of https://git.hanasys.jp/qcast3/qcast-api into dev
This commit is contained in:
commit
91a3c872f5
@ -96,4 +96,11 @@ public class EstimateController {
|
||||
throws Exception {
|
||||
estimateService.excelDownload(request, response, estimateRequest);
|
||||
}
|
||||
|
||||
@Operation(description = "2차점 특가 있는 2nd Agency 목록을 조회한다.")
|
||||
@GetMapping("/agency-cust-list")
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public EstimateApiResponse selectAgencyCustList(PriceRequest priceRequest) throws Exception {
|
||||
return estimateService.selectAgencyCustList(priceRequest);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1409,6 +1409,12 @@ public class EstimateService {
|
||||
itemResponse.setSalePrice("");
|
||||
itemResponse.setSaleTotPrice("");
|
||||
}
|
||||
|
||||
// 886 Excel, PDF에 OPEN_FLG = 1은 단가필드에 OPEN 텍스트로 보여주도록
|
||||
if ("1".equals(itemResponse.getOpenFlg())) {
|
||||
itemResponse.setSalePrice("OPEN");
|
||||
itemResponse.setSaleTotPrice("OPEN");
|
||||
}
|
||||
}
|
||||
|
||||
// 합산 문자열 통화로 변환 처리
|
||||
@ -1724,6 +1730,8 @@ public class EstimateService {
|
||||
|
||||
quoteList.add(estimateSendResponse);
|
||||
estimateSendRequest.setQuoteList(quoteList);
|
||||
// 2차점명
|
||||
estimateSendResponse.setSecSapSalesStoreCd(estimateRequest.getSecSapSalesStoreCd());
|
||||
}
|
||||
|
||||
EstimateApiResponse response = null;
|
||||
@ -2246,4 +2254,35 @@ public class EstimateService {
|
||||
|
||||
return circuitCfg;
|
||||
}
|
||||
|
||||
public EstimateApiResponse selectAgencyCustList(PriceRequest priceRequest) throws Exception {
|
||||
// Validation
|
||||
|
||||
if (StringUtils.isEmpty(priceRequest.getSapSalesStoreCd())) {
|
||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
||||
message.getMessage("common.message.required.data", "Sap Sale Store Code"));
|
||||
}
|
||||
|
||||
|
||||
EstimateApiResponse response = null;
|
||||
/* [1]. QSP API (url + param) Setting */
|
||||
String url = QSP_API_URL + "/api/master/agencyCustList";
|
||||
String apiUrl = UriComponentsBuilder.fromHttpUrl(url)
|
||||
.queryParam("sapSalesStoreCd", priceRequest.getSapSalesStoreCd()).build().toUriString();
|
||||
|
||||
/* [2]. QSP API CALL -> Response */
|
||||
String strResponse = interfaceQsp.callApi(HttpMethod.GET, apiUrl, null);
|
||||
|
||||
if (!"".equals(strResponse)) {
|
||||
com.fasterxml.jackson.databind.ObjectMapper om =
|
||||
new com.fasterxml.jackson.databind.ObjectMapper()
|
||||
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
response = om.readValue(strResponse, EstimateApiResponse.class);
|
||||
} else {
|
||||
// [msg] No data
|
||||
throw new QcastException(ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data"));
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,4 +212,8 @@ public class EstimateRequest {
|
||||
|
||||
@Schema(description = "발전시뮬레이션 타입")
|
||||
private String pwrGnrSimType;
|
||||
|
||||
@Schema(description = "2차 SAP 판매점코드")
|
||||
private String secSapSalesStoreCd;
|
||||
|
||||
}
|
||||
|
||||
@ -279,4 +279,7 @@ public class EstimateResponse {
|
||||
|
||||
@Schema(description = "SAP STORE CD")
|
||||
private String sapSalesStoreCd;
|
||||
|
||||
@Schema(description = "2차 SAP 판매점코드")
|
||||
private String secSapSalesStoreCd;
|
||||
}
|
||||
|
||||
@ -115,4 +115,7 @@ public class EstimateSendResponse {
|
||||
|
||||
@Schema(description = "첨부파일 목록")
|
||||
List<FileResponse> fileList;
|
||||
|
||||
@Schema(description = "2차 SAP 판매점코드")
|
||||
private String secSapSalesStoreCd;
|
||||
}
|
||||
|
||||
@ -106,4 +106,7 @@ public class ItemRequest {
|
||||
|
||||
@Schema(description = "사용자아이디")
|
||||
private String userId;
|
||||
|
||||
@Schema(description = "아이템 타입 코드")
|
||||
public String itemTpCd;
|
||||
}
|
||||
|
||||
@ -85,4 +85,7 @@ public class ItemResponse {
|
||||
|
||||
@Schema(description = "회로구성도")
|
||||
private String circuitCfg;
|
||||
|
||||
@Schema(description = "아이템 타입 코드")
|
||||
public String itemTpCd;
|
||||
}
|
||||
|
||||
@ -23,4 +23,7 @@ public class PriceRequest {
|
||||
|
||||
@Schema(description = "아이템번호 목록")
|
||||
private List<PriceItemRequest> itemIdList;
|
||||
|
||||
@Schema(description = "2차 SAP 판매점코드")
|
||||
private String secSapSalesStoreCd;
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package com.interplug.qcast.biz.master.dto.quotation;
|
||||
|
||||
import java.util.List;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@ -22,4 +22,7 @@ public class ApiQuotationItemRequest {
|
||||
@Schema(description = "PCS 목록")
|
||||
@NotNull
|
||||
public List<ApiQuotationItemPcsRequest> pcses;
|
||||
|
||||
@Schema(description = "양단 케이블 갯수")
|
||||
public Integer dblCblTotCnt = 0;
|
||||
}
|
||||
|
||||
@ -14,4 +14,7 @@ public class ApiQuotationItemResponse {
|
||||
|
||||
@Schema(description = "수량")
|
||||
public Integer amount;
|
||||
|
||||
@Schema(description = "아이템 타입 코드")
|
||||
public String itemTpCd;
|
||||
}
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
, PI.SYNC_FLG
|
||||
, PI.CREATE_DATETIME
|
||||
, PI.CREATE_USER
|
||||
, PI.SEC_SAP_SALES_STORE_CD
|
||||
, O.OBJECT_NAME
|
||||
, O.OBJECT_NAME_OMIT
|
||||
, O.REMARKS AS OBJECT_REMARKS
|
||||
@ -175,7 +176,7 @@
|
||||
, P.CONSTRUCT_SPECIFICATION
|
||||
, P.NORTH_ARRANGEMENT
|
||||
, PI.ESTIMATE_TYPE
|
||||
, P.PKG_ASP
|
||||
, PI.PKG_ASP
|
||||
, P.DEL_FLG
|
||||
, CONVERT(NVARCHAR(10), PI.CREATE_DATETIME, 121) AS ESTIMATE_DETAIL_CREATE_DATE
|
||||
, P.LAST_EDIT_DATETIME
|
||||
@ -191,7 +192,7 @@
|
||||
ON O.OBJECT_NO = OI.OBJECT_NO
|
||||
INNER JOIN M_SALES_STORE SS WITH(NOLOCK)
|
||||
ON O.SALE_STORE_ID = SS.SALE_STORE_ID
|
||||
WHERE P.SYNC_FLG = '0'
|
||||
WHERE PI.SYNC_FLG = '0'
|
||||
AND OI.SOURCE_ORIGIN = 'QCAST_III'
|
||||
AND OI.ORG_DEL_FLG = '0'
|
||||
</select>
|
||||
@ -282,6 +283,7 @@
|
||||
, PEI.OPEN_FLG
|
||||
, PEI.ITEM_CHANGE_FLG
|
||||
, PEI.DISP_CABLE_FLG
|
||||
, PEI.ITEM_TP_CD
|
||||
, I.PNOW_W
|
||||
, CASE WHEN I.POWER_COM_FLG = '1' THEN 'PC_'
|
||||
WHEN I.ITEM_GROUP = 'PC_' AND I.POWER_COM_FLG = '0' THEN 'STORAGE_BATTERY'
|
||||
@ -679,6 +681,7 @@
|
||||
UPDATE T_PLAN_INFO
|
||||
SET
|
||||
ESTIMATE_TYPE = #{estimateType}
|
||||
, SEC_SAP_SALES_STORE_CD = #{secSapSalesStoreCd}
|
||||
<choose>
|
||||
<when test='drawingFlg != null and drawingFlg == "1"'>
|
||||
, CONSTRUCT_SPECIFICATION_MULTI = #{constructSpecificationMulti}
|
||||
@ -731,6 +734,7 @@
|
||||
, PKG_ASP = NULL
|
||||
, PRICE_CD = #{priceCd}
|
||||
, TEMP_FLG = CASE WHEN TEMP_FLG = '0' THEN '0' ELSE #{tempFlg} END
|
||||
, SEC_SAP_SALES_STORE_CD = #{secSapSalesStoreCd}
|
||||
WHERE OBJECT_NO = #{objectNo}
|
||||
AND PLAN_NO = #{planNo}
|
||||
</update>
|
||||
@ -835,6 +839,7 @@
|
||||
, OPEN_FLG
|
||||
, ITEM_CHANGE_FLG
|
||||
, DISP_CABLE_FLG
|
||||
, ITEM_TP_CD
|
||||
) VALUES (
|
||||
#{objectNo}
|
||||
, #{planNo}
|
||||
@ -853,6 +858,7 @@
|
||||
, #{openFlg}
|
||||
, #{itemChangeFlg}
|
||||
, #{dispCableFlg}
|
||||
, #{itemTpCd}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -1167,6 +1173,7 @@
|
||||
, SYNC_FLG
|
||||
, CREATE_DATETIME
|
||||
, CREATE_USER
|
||||
, SEC_SAP_SALES_STORE_CD
|
||||
)
|
||||
SELECT
|
||||
#{copyObjectNo} AS OBJECT_NO
|
||||
@ -1187,6 +1194,7 @@
|
||||
, '0' AS SYNC_FLG
|
||||
, GETDATE() AS CREATE_DATETIME
|
||||
, #{userId} AS CREATE_USER
|
||||
, PI.SEC_SAP_SALES_STORE_CD
|
||||
FROM T_PLAN_INFO PI WITH (NOLOCK)
|
||||
WHERE PI.OBJECT_NO = #{objectNo}
|
||||
AND PI.PLAN_NO = #{planNo}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user