dev #201
@ -34,9 +34,9 @@ public class CanvasSettingInfo {
|
||||
private boolean dotGridDisplay;
|
||||
private boolean lineGridDisplay;
|
||||
private Integer gridType;
|
||||
private Integer gridHorizon;
|
||||
private Integer gridVertical;
|
||||
private Integer gridRatio;
|
||||
private float gridHorizon;
|
||||
private float gridVertical;
|
||||
private float gridRatio;
|
||||
private String gridDimen;
|
||||
private String gridColor;
|
||||
private String wordFont;
|
||||
|
||||
@ -1545,6 +1545,60 @@ public class EstimateService {
|
||||
// estimateResponse.setDrawingImg2(drawingImg2);
|
||||
// }
|
||||
|
||||
//userId 에 따른 영업점 주소, 전화, fax 정보 조회
|
||||
if(estimateRequest.getSaleStoreId() != null && "T01".equals(estimateRequest.getSaleStoreId())){
|
||||
|
||||
String strResponse = interfaceQsp.callApi(HttpMethod.GET,
|
||||
QSP_API_URL + "/api/admin/userDetail?loginId="+estimateRequest.getUserId(), null);
|
||||
|
||||
if (!"".equals(strResponse)) {
|
||||
com.fasterxml.jackson.databind.ObjectMapper om =
|
||||
new com.fasterxml.jackson.databind.ObjectMapper()
|
||||
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
EstimateApiResponse estimateApiResponse = om.readValue(strResponse, EstimateApiResponse.class);
|
||||
|
||||
// API 응답 데이터 존재 여부 확인 및 안전한 데이터 추출
|
||||
if (estimateApiResponse != null && estimateApiResponse.getData() != null) {
|
||||
try {
|
||||
// API 응답 데이터를 Map으로 변환하여 필요한 정보 추출
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> userData = (Map<String, Object>) estimateApiResponse.getData();
|
||||
|
||||
if (!userData.isEmpty()) {
|
||||
//영업점 주소 확인 및 설정
|
||||
Object salesOfficeAddr = userData.get("salesOfficeAddr");
|
||||
if (salesOfficeAddr != null &&
|
||||
!StringUtils.isEmpty(salesOfficeAddr.toString().trim())) {
|
||||
estimateResponse.setZipNo("");
|
||||
estimateResponse.setAddress(salesOfficeAddr.toString().replaceAll("\n", "<br>"));
|
||||
}
|
||||
|
||||
//영업점 전화 확인 및 설정
|
||||
Object salesOfficeTel = userData.get("salesOfficeTel");
|
||||
if (salesOfficeTel != null &&
|
||||
!StringUtils.isEmpty(salesOfficeTel.toString().trim())) {
|
||||
estimateResponse.setTel(salesOfficeTel.toString());
|
||||
}
|
||||
|
||||
//영업점 팩스 확인 및 설정
|
||||
Object salesOfficeFax = userData.get("salesOfficeFax");
|
||||
if (salesOfficeFax != null &&
|
||||
!StringUtils.isEmpty(salesOfficeFax.toString().trim())) {
|
||||
estimateResponse.setFax(salesOfficeFax.toString());
|
||||
}
|
||||
}
|
||||
} catch (ClassCastException e) {
|
||||
log.warn("API 응답 데이터 형변환 실패: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
log.warn("common.message.required.data", "User Detail");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ("PDF".equals(estimateRequest.getSchDownload())) { // PDF 다운로드
|
||||
String[] arrSection = new String[6];
|
||||
int iSection = 0;
|
||||
|
||||
@ -299,4 +299,13 @@ public class EstimateResponse {
|
||||
@Schema(description = "PCS 목록 3개")
|
||||
List<PwrGnrSimRoofResponse> pcsList3;
|
||||
|
||||
@Schema(description = "영업점 주소")
|
||||
private String salesOfficeAddr;
|
||||
|
||||
@Schema(description = "영업점 전화번호")
|
||||
private String salesOfficeTel;
|
||||
|
||||
@Schema(description = "영업점 Fax번호")
|
||||
private String salesOfficeFax;
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user