Merge pull request 'dev' (#436) from dev into prd-deploy
Reviewed-on: #436
This commit is contained in:
commit
e9e2f45665
@ -71,7 +71,12 @@ public class AdminUserConfiguration implements JobExecutionListener {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public ItemProcessor<AdminUserSyncResponse, AdminUserSyncResponse> adminUserProcessor() {
|
public ItemProcessor<AdminUserSyncResponse, AdminUserSyncResponse> adminUserProcessor() {
|
||||||
return item -> item;
|
return item -> {
|
||||||
|
if (item.getCategory() != null && item.getCategory().length() > 20) {
|
||||||
|
item.setCategory(item.getCategory().substring(0, 20));
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.interplug.qcast.config.Exception;
|
package com.interplug.qcast.config.Exception;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.HttpRequestMethodNotSupportedException;
|
import org.springframework.web.HttpRequestMethodNotSupportedException;
|
||||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
@ -12,6 +13,7 @@ public class GlobalExceptionHandler {
|
|||||||
@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
|
@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
|
||||||
protected ResponseEntity<ErrorResponse> handle(HttpRequestMethodNotSupportedException e) {
|
protected ResponseEntity<ErrorResponse> handle(HttpRequestMethodNotSupportedException e) {
|
||||||
return ResponseEntity.badRequest()
|
return ResponseEntity.badRequest()
|
||||||
|
.contentType(MediaType.APPLICATION_JSON)
|
||||||
.body(ErrorResponse.of(ErrorCode.METHOD_NOT_ALLOWED.getMessage()));
|
.body(ErrorResponse.of(ErrorCode.METHOD_NOT_ALLOWED.getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,6 +21,7 @@ public class GlobalExceptionHandler {
|
|||||||
protected ResponseEntity<ErrorResponse> handle(BaseException e) {
|
protected ResponseEntity<ErrorResponse> handle(BaseException e) {
|
||||||
final ErrorCode errorCode = e.getErrorCode();
|
final ErrorCode errorCode = e.getErrorCode();
|
||||||
return ResponseEntity.status(errorCode.getStatus())
|
return ResponseEntity.status(errorCode.getStatus())
|
||||||
|
.contentType(MediaType.APPLICATION_JSON)
|
||||||
.body(ErrorResponse.of(errorCode.getMessage()));
|
.body(ErrorResponse.of(errorCode.getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,14 +30,18 @@ public class GlobalExceptionHandler {
|
|||||||
final ErrorCode errorCode = e.getErrorCode();
|
final ErrorCode errorCode = e.getErrorCode();
|
||||||
if (e.getMessage() == null) {
|
if (e.getMessage() == null) {
|
||||||
return ResponseEntity.status(errorCode.getStatus())
|
return ResponseEntity.status(errorCode.getStatus())
|
||||||
|
.contentType(MediaType.APPLICATION_JSON)
|
||||||
.body(ErrorResponse.of(errorCode.getMessage()));
|
.body(ErrorResponse.of(errorCode.getMessage()));
|
||||||
}
|
}
|
||||||
return ResponseEntity.status(errorCode.getStatus()).body(ErrorResponse.of(e.getMessage()));
|
return ResponseEntity.status(errorCode.getStatus())
|
||||||
|
.contentType(MediaType.APPLICATION_JSON)
|
||||||
|
.body(ErrorResponse.of(e.getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler(Exception.class)
|
@ExceptionHandler(Exception.class)
|
||||||
protected ResponseEntity<ErrorResponse> handle(Exception e) {
|
protected ResponseEntity<ErrorResponse> handle(Exception e) {
|
||||||
return ResponseEntity.internalServerError()
|
return ResponseEntity.internalServerError()
|
||||||
|
.contentType(MediaType.APPLICATION_JSON)
|
||||||
.body(ErrorResponse.of(ErrorCode.INTERNAL_SERVER_ERROR.getMessage()));
|
.body(ErrorResponse.of(ErrorCode.INTERNAL_SERVER_ERROR.getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,6 +93,7 @@ public class InterfaceQsp {
|
|||||||
sb = new StringBuilder();
|
sb = new StringBuilder();
|
||||||
int status = con.getResponseCode();
|
int status = con.getResponseCode();
|
||||||
if (status == HttpURLConnection.HTTP_OK) {
|
if (status == HttpURLConnection.HTTP_OK) {
|
||||||
|
log.info("[DEBUG] QSP Content-Type: {}", con.getContentType());
|
||||||
br = new BufferedReader(new InputStreamReader(con.getInputStream(), "utf-8"));
|
br = new BufferedReader(new InputStreamReader(con.getInputStream(), "utf-8"));
|
||||||
|
|
||||||
String line;
|
String line;
|
||||||
|
|||||||
@ -91,40 +91,40 @@
|
|||||||
|
|
||||||
<select id="selectEstimatePdfDetail" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="com.interplug.qcast.biz.estimate.dto.EstimateResponse">
|
<select id="selectEstimatePdfDetail" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="com.interplug.qcast.biz.estimate.dto.EstimateResponse">
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.selectPdfEstimateDetail */
|
/* sqlid : com.interplug.qcast.biz.estimate.selectPdfEstimateDetail */
|
||||||
SELECT Z.*
|
|
||||||
, SS3.ZIP_NO AS ZIP_NO3
|
|
||||||
, SS3.ADDRESS AS ADDRESS3
|
|
||||||
, SS3.TEL AS TEL3
|
|
||||||
, SS3.FAX AS FAX3
|
|
||||||
, CASE WHEN Z.CREATE_USER = 'T01' AND ISNULL(Z.FIRST_AGENT_ID,'') = '' THEN Z.ZIP_NO2
|
|
||||||
WHEN Z.CREATE_USER = 'T01' AND ISNULL(Z.FIRST_AGENT_ID,'') != '' THEN SS3.ZIP_NO
|
|
||||||
ELSE Z.ZIP_NO1 END AS ZIP_NO
|
|
||||||
, CASE WHEN Z.CREATE_USER = 'T01' AND ISNULL(Z.FIRST_AGENT_ID,'') = '' THEN Z.ADDRESS2
|
|
||||||
WHEN Z.CREATE_USER = 'T01' AND ISNULL(Z.FIRST_AGENT_ID,'') != '' THEN SS3.ADDRESS
|
|
||||||
ELSE Z.ADDRESS1 END AS ADDRESS
|
|
||||||
, CASE WHEN Z.CREATE_USER = 'T01' AND ISNULL(Z.FIRST_AGENT_ID,'') = '' THEN Z.TEL2
|
|
||||||
WHEN Z.CREATE_USER = 'T01' AND ISNULL(Z.FIRST_AGENT_ID,'') != '' THEN SS3.TEL
|
|
||||||
ELSE Z.TEL1 END AS TEL
|
|
||||||
, CASE WHEN Z.CREATE_USER = 'T01' AND ISNULL(Z.FIRST_AGENT_ID,'') = '' THEN Z.FAX2
|
|
||||||
WHEN Z.CREATE_USER = 'T01' AND ISNULL(Z.FIRST_AGENT_ID,'') != '' THEN SS3.FAX
|
|
||||||
ELSE Z.FAX1 END AS FAX
|
|
||||||
FROM (
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
T.*
|
T.*
|
||||||
, SS1.SALE_STORE_NAME AS CUST_SALE_STORE_NAME
|
, SS1.SALE_STORE_NAME AS CUST_SALE_STORE_NAME
|
||||||
, COALESCE(NULLIF(SS2.DISP_COMPANY_NAME, ''), SS2.SALE_STORE_NAME) AS SALE_STORE_NAME
|
, COALESCE(NULLIF(SS2.DISP_COMPANY_NAME, ''), SS2.SALE_STORE_NAME) AS SALE_STORE_NAME
|
||||||
, COALESCE(NULLIF(SS2.DISP_ZIP_NO, ''), SS2.ZIP_NO) AS ZIP_NO1
|
<if test='saleStoreId != null and saleStoreId != "T01"'>
|
||||||
, COALESCE(NULLIF(SS2.DISP_ADDRESS, ''), SS2.ADDRESS) AS ADDRESS1
|
, COALESCE(NULLIF(SS2.DISP_ZIP_NO, ''), SS2.ZIP_NO) AS ZIP_NO
|
||||||
, COALESCE(NULLIF(SS2.DISP_TEL, ''), SS2.TEL) AS TEL1
|
, COALESCE(NULLIF(SS2.DISP_ADDRESS, ''), SS2.ADDRESS) AS ADDRESS
|
||||||
, COALESCE(NULLIF(SS2.DISP_FAX, ''), SS2.FAX) AS FAX1
|
, COALESCE(NULLIF(SS2.DISP_TEL, ''), SS2.TEL) AS TEL
|
||||||
|
, COALESCE(NULLIF(SS2.DISP_FAX, ''), SS2.FAX) AS FAX
|
||||||
|
</if>
|
||||||
|
<if test='saleStoreId != null and saleStoreId == "T01"'>
|
||||||
|
, ISNULL((SELECT
|
||||||
|
SUBSTRING(MCL.REF_CHR3, CHARINDEX('〒', MCL.REF_CHR3) + 1,
|
||||||
|
CHARINDEX(')', MCL.REF_CHR3, CHARINDEX('〒', MCL.REF_CHR3)) - CHARINDEX('〒', MCL.REF_CHR3) - 1)
|
||||||
|
FROM M_COMM_L MCL
|
||||||
|
WHERE MCL.HEAD_CD = '103200'
|
||||||
|
AND MCL.CODE = T.BUSINESS_TEAM_CD), '') AS ZIP_NO
|
||||||
|
, ISNULL((SELECT
|
||||||
|
LTRIM(SUBSTRING(MCL.REF_CHR3,
|
||||||
|
CHARINDEX(')', MCL.REF_CHR3, CHARINDEX('〒', MCL.REF_CHR3)) + 1,
|
||||||
|
LEN(MCL.REF_CHR3)))
|
||||||
|
FROM M_COMM_L MCL
|
||||||
|
WHERE MCL.HEAD_CD = '103200'
|
||||||
|
AND MCL.CODE = T.BUSINESS_TEAM_CD), '') AS ADDRESS
|
||||||
|
, ISNULL((SELECT MCL.REF_CHR4
|
||||||
|
FROM M_COMM_L MCL
|
||||||
|
WHERE MCL.HEAD_CD = '103200'
|
||||||
|
AND MCL.CODE = T.BUSINESS_TEAM_CD), '') AS TEL
|
||||||
|
, ISNULL((SELECT MCL.REF_CHR5
|
||||||
|
FROM M_COMM_L MCL
|
||||||
|
WHERE MCL.HEAD_CD = '103200'
|
||||||
|
AND MCL.CODE = T.BUSINESS_TEAM_CD), '') AS FAX
|
||||||
|
</if>
|
||||||
, SSI2.BIZ_NO
|
, SSI2.BIZ_NO
|
||||||
, SS1.ZIP_NO AS ZIP_NO2
|
|
||||||
, SS1.ADDRESS AS ADDRESS2
|
|
||||||
, SS1.TEL AS TEL2
|
|
||||||
, SS1.FAX AS FAX2
|
|
||||||
, SS1.FIRST_AGENT_ID
|
|
||||||
, (SELECT BC.BUSINESS_TEAM_CD FROM M_BUSINESS_CHARGER BC WHERE BC.BUSINESS_CHARGER_CD = T.BUSINESS_CHARGER_CD) AS BUSINESS_TEAM_CD
|
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
@ -138,12 +138,18 @@
|
|||||||
, PI.ESTIMATE_OPTION
|
, PI.ESTIMATE_OPTION
|
||||||
, PI.PKG_ASP
|
, PI.PKG_ASP
|
||||||
, PI.REMARKS
|
, PI.REMARKS
|
||||||
, PI.CREATE_USER
|
|
||||||
, O.SALE_STORE_ID
|
, O.SALE_STORE_ID
|
||||||
, (SELECT SS.BUSINESS_CHARGER_CD FROM M_SALES_STORE SS WHERE SS.SALE_STORE_ID = O.SALE_STORE_ID ) AS BUSINESS_CHARGER_CD
|
|
||||||
, O.OBJECT_NAME
|
, O.OBJECT_NAME
|
||||||
, O.OBJECT_NAME_OMIT
|
, O.OBJECT_NAME_OMIT
|
||||||
, (SELECT SALE_STORE_ID FROM M_USER WHERE USER_ID = OI.CREATE_USER) AS CREATE_SALE_STORE_ID
|
, (SELECT SALE_STORE_ID FROM M_USER WHERE USER_ID = OI.CREATE_USER) AS CREATE_SALE_STORE_ID
|
||||||
|
<if test='saleStoreId != null and saleStoreId == "T01"'>
|
||||||
|
, (SELECT BC.BUSINESS_TEAM_CD
|
||||||
|
FROM M_SALES_STORE SS WITH (NOLOCK)
|
||||||
|
INNER JOIN M_BUSINESS_CHARGER BC WITH (NOLOCK)
|
||||||
|
ON SS.BUSINESS_CHARGER_CD = BC.BUSINESS_CHARGER_CD
|
||||||
|
WHERE SS.SALE_STORE_ID = O.SALE_STORE_ID
|
||||||
|
) AS BUSINESS_TEAM_CD
|
||||||
|
</if>
|
||||||
, ISNULL(MP.PREF_NAME, '') AS PREF_NAME
|
, ISNULL(MP.PREF_NAME, '') AS PREF_NAME
|
||||||
, ISNULL(MPA.AREA_NAME, '') AS AREA_NAME
|
, ISNULL(MPA.AREA_NAME, '') AS AREA_NAME
|
||||||
, ISNULL(C1.CODE_NM, '') AS STANDARD_WIND_SPEED_NAME
|
, ISNULL(C1.CODE_NM, '') AS STANDARD_WIND_SPEED_NAME
|
||||||
@ -173,9 +179,6 @@
|
|||||||
ON T.CREATE_SALE_STORE_ID = SS2.SALE_STORE_ID
|
ON T.CREATE_SALE_STORE_ID = SS2.SALE_STORE_ID
|
||||||
LEFT OUTER JOIN M_SALES_STORE_INFO SSI2 WITH (NOLOCK)
|
LEFT OUTER JOIN M_SALES_STORE_INFO SSI2 WITH (NOLOCK)
|
||||||
ON T.CREATE_SALE_STORE_ID = SSI2.SALE_STORE_ID
|
ON T.CREATE_SALE_STORE_ID = SSI2.SALE_STORE_ID
|
||||||
)Z
|
|
||||||
LEFT OUTER JOIN M_SALES_STORE SS3 WITH (NOLOCK)
|
|
||||||
ON Z.FIRST_AGENT_ID = SS3.SALE_STORE_ID
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEstimateApiFailList" resultType="com.interplug.qcast.biz.estimate.dto.EstimateSendResponse">
|
<select id="selectEstimateApiFailList" resultType="com.interplug.qcast.biz.estimate.dto.EstimateSendResponse">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user