dev #456

Merged
ysCha merged 5 commits from dev into prd-deploy 2026-04-01 15:15:59 +09:00
18 changed files with 79 additions and 27 deletions

View File

@ -4,6 +4,7 @@ import com.interplug.qcast.biz.estimate.EstimateService;
import com.interplug.qcast.biz.estimate.dto.EstimateSyncResponse; import com.interplug.qcast.biz.estimate.dto.EstimateSyncResponse;
import com.interplug.qcast.biz.estimate.dto.PlanSyncResponse; import com.interplug.qcast.biz.estimate.dto.PlanSyncResponse;
import com.interplug.qcast.util.InterfaceQsp; import com.interplug.qcast.util.InterfaceQsp;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.springframework.batch.core.Job; import org.springframework.batch.core.Job;
@ -77,7 +78,8 @@ public class EstimateSyncConfiguration implements JobExecutionListener {
@Bean @Bean
public ItemWriter<PlanSyncResponse> estimateSyncWriter() { public ItemWriter<PlanSyncResponse> estimateSyncWriter() {
return items -> { return items -> {
estimateService.setEstimateSyncSave((List<PlanSyncResponse>) items.getItems()); List<PlanSyncResponse> planList = new ArrayList<>(items.getItems());
estimateService.setEstimateSyncSave(planList);
}; };
} }
} }

View File

@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.interplug.qcast.biz.estimate.EstimateService; import com.interplug.qcast.biz.estimate.EstimateService;
import com.interplug.qcast.biz.estimate.dto.PlanSyncResponse; import com.interplug.qcast.biz.estimate.dto.PlanSyncResponse;
import com.interplug.qcast.util.InterfaceQsp; import com.interplug.qcast.util.InterfaceQsp;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.springframework.batch.core.Job; import org.springframework.batch.core.Job;
@ -74,7 +75,7 @@ public class PlanConfrimConfiguration implements JobExecutionListener {
@Bean @Bean
public ItemWriter<PlanSyncResponse> planConfirmWriter() { public ItemWriter<PlanSyncResponse> planConfirmWriter() {
return items -> { return items -> {
estimateService.setPlanConfirmSyncSave((List<PlanSyncResponse>) items.getItems()); estimateService.setPlanConfirmSyncSave(new ArrayList<>(items.getItems()));
}; };
} }
} }

View File

@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.interplug.qcast.biz.displayItem.DisplayItemService; import com.interplug.qcast.biz.displayItem.DisplayItemService;
import com.interplug.qcast.biz.displayItem.dto.BomSyncResponse; import com.interplug.qcast.biz.displayItem.dto.BomSyncResponse;
import com.interplug.qcast.util.InterfaceQsp; import com.interplug.qcast.util.InterfaceQsp;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.springframework.batch.core.Job; import org.springframework.batch.core.Job;
@ -74,7 +75,7 @@ public class BomConfiguration implements JobExecutionListener {
@Bean @Bean
public ItemWriter<BomSyncResponse> bomWriter() { public ItemWriter<BomSyncResponse> bomWriter() {
return items -> { return items -> {
displayItemService.setBomSyncSave((List<BomSyncResponse>) items.getItems()); displayItemService.setBomSyncSave(new ArrayList<>(items.getItems()));
}; };
} }
} }

View File

@ -103,7 +103,7 @@ public class MaterialConfiguration implements JobExecutionListener {
@Bean @Bean
public ItemWriter<ItemSyncResponse> materialWriter() { public ItemWriter<ItemSyncResponse> materialWriter() {
return items -> { return items -> {
displayItemService.setItemSyncSave((List<ItemSyncResponse>) items.getItems()); displayItemService.setItemSyncSave(new ArrayList<>(items.getItems()));
}; };
} }
} }

View File

@ -4,6 +4,7 @@ import com.interplug.qcast.biz.displayItem.DisplayItemService;
import com.interplug.qcast.biz.displayItem.dto.PriceItemSyncResponse; import com.interplug.qcast.biz.displayItem.dto.PriceItemSyncResponse;
import com.interplug.qcast.biz.displayItem.dto.PriceSyncResponse; import com.interplug.qcast.biz.displayItem.dto.PriceSyncResponse;
import com.interplug.qcast.util.InterfaceQsp; import com.interplug.qcast.util.InterfaceQsp;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
@ -141,7 +142,7 @@ public class PriceJobConfiguration implements JobExecutionListener {
private <T> ItemWriter<T> createWriter(Consumer<List<T>> processor, String writerName) { private <T> ItemWriter<T> createWriter(Consumer<List<T>> processor, String writerName) {
return items -> { return items -> {
try { try {
List<T> itemList = (List<T>) items.getItems(); List<T> itemList = new ArrayList<>(items.getItems());
processor.accept(itemList); processor.accept(itemList);
log.info("{}Writer: {} items 처리 완료", writerName, items.size()); log.info("{}Writer: {} items 처리 완료", writerName, items.size());
} catch (Exception e) { } catch (Exception e) {

View File

@ -5,6 +5,7 @@ import com.interplug.qcast.biz.specialNote.dto.SpecialNoteItemRequest;
import com.interplug.qcast.biz.specialNote.dto.SpecialNoteRequest; import com.interplug.qcast.biz.specialNote.dto.SpecialNoteRequest;
import com.interplug.qcast.biz.specialNote.dto.SpecialNoteSyncResponse; import com.interplug.qcast.biz.specialNote.dto.SpecialNoteSyncResponse;
import com.interplug.qcast.util.InterfaceQsp; import com.interplug.qcast.util.InterfaceQsp;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
@ -157,7 +158,7 @@ public class SpecialNoteDispItemJobConfiguration implements JobExecutionListener
private <T> ItemWriter<T> createWriter(Consumer<List<T>> processor, String writerName) { private <T> ItemWriter<T> createWriter(Consumer<List<T>> processor, String writerName) {
return items -> { return items -> {
try { try {
List<T> itemList = (List<T>) items.getItems(); List<T> itemList = new ArrayList<>(items.getItems());
processor.accept(itemList); processor.accept(itemList);
log.info("{}Writer: {} items 처리 완료", writerName, items.size()); log.info("{}Writer: {} items 처리 완료", writerName, items.size());
} catch (Exception e) { } catch (Exception e) {

View File

@ -10,6 +10,7 @@ import com.interplug.qcast.biz.user.dto.StoreSyncResponse;
import com.interplug.qcast.biz.user.dto.StoreSyncResquest; import com.interplug.qcast.biz.user.dto.StoreSyncResquest;
import com.interplug.qcast.biz.user.dto.UserRequest; import com.interplug.qcast.biz.user.dto.UserRequest;
import com.interplug.qcast.util.InterfaceQsp; import com.interplug.qcast.util.InterfaceQsp;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
@ -212,7 +213,7 @@ public class StoreJobConfiguration implements JobExecutionListener {
private <T> ItemWriter<T> createWriter(Consumer<List<T>> processor, String writerName) { private <T> ItemWriter<T> createWriter(Consumer<List<T>> processor, String writerName) {
return items -> { return items -> {
try { try {
List<T> itemList = (List<T>) items.getItems(); List<T> itemList = new ArrayList<>(items.getItems());
processor.accept(itemList); processor.accept(itemList);
log.info("{}Writer: {} items 처리 완료", writerName, items.size()); log.info("{}Writer: {} items 처리 완료", writerName, items.size());
} catch (Exception e) { } catch (Exception e) {

View File

@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.interplug.qcast.biz.user.UserService; import com.interplug.qcast.biz.user.UserService;
import com.interplug.qcast.biz.user.dto.AdminUserSyncResponse; import com.interplug.qcast.biz.user.dto.AdminUserSyncResponse;
import com.interplug.qcast.util.InterfaceQsp; import com.interplug.qcast.util.InterfaceQsp;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.springframework.batch.core.Job; import org.springframework.batch.core.Job;
@ -82,7 +83,7 @@ public class AdminUserConfiguration implements JobExecutionListener {
@Bean @Bean
public ItemWriter<AdminUserSyncResponse> adminUserWriter() { public ItemWriter<AdminUserSyncResponse> adminUserWriter() {
return items -> { return items -> {
userService.setAdminUserSyncSave((List<AdminUserSyncResponse>) items.getItems()); userService.setAdminUserSyncSave(new ArrayList<>(items.getItems()));
}; };
} }
} }

View File

@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.interplug.qcast.biz.user.UserService; import com.interplug.qcast.biz.user.UserService;
import com.interplug.qcast.biz.user.dto.BusinessChargerSyncResponse; import com.interplug.qcast.biz.user.dto.BusinessChargerSyncResponse;
import com.interplug.qcast.util.InterfaceQsp; import com.interplug.qcast.util.InterfaceQsp;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.springframework.batch.core.Job; import org.springframework.batch.core.Job;
@ -78,7 +79,7 @@ public class BusinessChargerConfiguration implements JobExecutionListener {
@Bean @Bean
public ItemWriter<BusinessChargerSyncResponse> businessChargerWriter() { public ItemWriter<BusinessChargerSyncResponse> businessChargerWriter() {
return items -> { return items -> {
userService.setBusinessChargerSyncSave((List<BusinessChargerSyncResponse>) items.getItems()); userService.setBusinessChargerSyncSave(new ArrayList<>(items.getItems()));
}; };
} }
} }

View File

@ -1,5 +1,6 @@
package com.interplug.qcast.batch.system; package com.interplug.qcast.batch.system;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
@ -126,7 +127,7 @@ public class CommonCodeConfiguration implements JobExecutionListener {
private <T> ItemWriter<T> createWriter(Consumer<List<T>> processor, String writerName) { private <T> ItemWriter<T> createWriter(Consumer<List<T>> processor, String writerName) {
return items -> { return items -> {
try { try {
List<T> itemList = (List<T>) items.getItems(); List<T> itemList = new ArrayList<>(items.getItems());
processor.accept(itemList); processor.accept(itemList);
log.info("{}Writer: {} items 처리 완료", writerName, items.size()); log.info("{}Writer: {} items 처리 완료", writerName, items.size());
} catch (Exception e) { } catch (Exception e) {

View File

@ -20,7 +20,6 @@ import com.interplug.qcast.biz.canvaspopupstatus.CanvasPopupStatusService;
import com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus; import com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus;
import com.interplug.qcast.biz.estimate.dto.*; import com.interplug.qcast.biz.estimate.dto.*;
import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse; import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.CellStyle;
@ -32,7 +31,6 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory; import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import org.jxls.util.Util;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
@ -1445,7 +1443,7 @@ public class EstimateService {
InputStream imageInputStream = getClass().getResourceAsStream(imagePath); InputStream imageInputStream = getClass().getResourceAsStream(imagePath);
if (imageInputStream != null) { if (imageInputStream != null) {
byte[] degImg = Util.toByteArray(imageInputStream); byte[] degImg = imageInputStream.readAllBytes();
roofInfoResponse.setCompasDegImg(degImg); roofInfoResponse.setCompasDegImg(degImg);
imageInputStream.close(); imageInputStream.close();
} else { } else {
@ -1988,7 +1986,7 @@ public class EstimateService {
if ("YJSS".equals(estimateType)) { if ("YJSS".equals(estimateType)) {
pkgTotPrice = pkgAsp.multiply(totVol); pkgTotPrice = pkgAsp.multiply(totVol);
pkgTotPrice = pkgTotPrice.setScale(0, BigDecimal.ROUND_HALF_UP); pkgTotPrice = pkgTotPrice.setScale(0, RoundingMode.HALF_UP);
supplyPrice = supplyPrice.add(pkgTotPrice); supplyPrice = supplyPrice.add(pkgTotPrice);
} }
@ -1998,14 +1996,14 @@ public class EstimateService {
totPrice = totPrice.add(supplyPrice.add(vatPrice)); totPrice = totPrice.add(supplyPrice.add(vatPrice));
estimateResponse.setPkgTotPrice(String.valueOf(pkgTotPrice)); estimateResponse.setPkgTotPrice(String.valueOf(pkgTotPrice));
estimateResponse.setTotAmount(String.valueOf(totAmount.setScale(0, BigDecimal.ROUND_HALF_UP))); estimateResponse.setTotAmount(String.valueOf(totAmount.setScale(0, RoundingMode.HALF_UP)));
estimateResponse.setTotVol(String.valueOf(totVol)); estimateResponse.setTotVol(String.valueOf(totVol));
estimateResponse.setTotVolKw(String estimateResponse.setTotVolKw(String
.valueOf(totVol.multiply(new BigDecimal("0.001")).setScale(3, BigDecimal.ROUND_FLOOR))); .valueOf(totVol.multiply(new BigDecimal("0.001")).setScale(3, RoundingMode.FLOOR)));
estimateResponse estimateResponse
.setSupplyPrice(String.valueOf(supplyPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); .setSupplyPrice(String.valueOf(supplyPrice.setScale(0, RoundingMode.HALF_UP)));
estimateResponse.setVatPrice(String.valueOf(vatPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); estimateResponse.setVatPrice(String.valueOf(vatPrice.setScale(0, RoundingMode.HALF_UP)));
estimateResponse.setTotPrice(String.valueOf(totPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); estimateResponse.setTotPrice(String.valueOf(totPrice.setScale(0, RoundingMode.HALF_UP)));
} }
private static final Set<String> EXCEL_ITEM_NUMBER_FIELDS = new HashSet<>( private static final Set<String> EXCEL_ITEM_NUMBER_FIELDS = new HashSet<>(
@ -2315,9 +2313,11 @@ public class EstimateService {
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
response = om.readValue(strResponse, EstimateApiResponse.class); response = om.readValue(strResponse, EstimateApiResponse.class);
@SuppressWarnings("unchecked")
Map<String, Object> result = (Map<String, Object>) response.getData(); Map<String, Object> result = (Map<String, Object>) response.getData();
if (result != null) { if (result != null) {
@SuppressWarnings("unchecked")
List<Map<String, Object>> succList = List<Map<String, Object>> succList =
(List<Map<String, Object>>) result.get("successList"); (List<Map<String, Object>>) result.get("successList");
for (Map<String, Object> succ : succList) { for (Map<String, Object> succ : succList) {
@ -2992,7 +2992,7 @@ public class EstimateService {
} }
} }
try (InputStream imageInputStream = connection.getInputStream()) { try (InputStream imageInputStream = connection.getInputStream()) {
return Util.toByteArray(imageInputStream); return imageInputStream.readAllBytes();
} }
} catch (Exception e) { } catch (Exception e) {
log.warn("Failed to load drawing image. url={}", url, e); log.warn("Failed to load drawing image. url={}", url, e);

View File

@ -63,6 +63,13 @@ public class ObjectController {
return objectService.selectSaleStoreList(saleStoreId, firstFlg, userId); return objectService.selectSaleStoreList(saleStoreId, firstFlg, userId);
} }
@Operation(description = "1차점 ID 및 판매점명을 조회한다. (saleStoreLevel=2 인 경우)")
@GetMapping("/saleStore/{saleStoreId}/firstAgent")
@ResponseStatus(HttpStatus.OK)
public SaleStoreResponse selectFirstAgentInfo(@PathVariable String saleStoreId) throws Exception {
return objectService.selectFirstAgentInfo(saleStoreId);
}
@Operation(description = "물건정보 목록을 조회한다.") @Operation(description = "물건정보 목록을 조회한다.")
@GetMapping("/list") @GetMapping("/list")
@ResponseStatus(HttpStatus.OK) @ResponseStatus(HttpStatus.OK)

View File

@ -25,6 +25,9 @@ public interface ObjectMapper {
// 판매점 정보 조회 // 판매점 정보 조회
public SaleStoreResponse selectSaleStoreInfo(String saleStoreId); public SaleStoreResponse selectSaleStoreInfo(String saleStoreId);
// 1차점 ID/ 조회 (saleStoreLevel = '2' 경우)
public SaleStoreResponse selectFirstAgentInfo(String saleStoreId);
// 물건정보 메인 목록 조회 // 물건정보 메인 목록 조회
public List<ObjectResponse> selectObjectMainList(ObjectRequest objectRequest); public List<ObjectResponse> selectObjectMainList(ObjectRequest objectRequest);

View File

@ -166,6 +166,14 @@ public class ObjectService {
return objectMapper.selectSaleStoreInfo(saleStoreId); return objectMapper.selectSaleStoreInfo(saleStoreId);
} }
public SaleStoreResponse selectFirstAgentInfo(String saleStoreId) throws Exception {
SaleStoreResponse result = objectMapper.selectFirstAgentInfo(saleStoreId);
if (result == null) {
throw new QcastException(ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data"));
}
return result;
}
/** /**
* 물건정보 메인 목록 조회 * 물건정보 메인 목록 조회
* *
@ -378,6 +386,7 @@ public class ObjectService {
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
response = om.readValue(strResponse, PlanReqResponse.class); response = om.readValue(strResponse, PlanReqResponse.class);
@SuppressWarnings("unchecked")
Map<String, Object> map = (Map<String, Object>) response.getResult(); Map<String, Object> map = (Map<String, Object>) response.getResult();
if ("E".equals(String.valueOf(map.get("resultCode")))) { if ("E".equals(String.valueOf(map.get("resultCode")))) {
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR,
@ -464,7 +473,8 @@ public class ObjectService {
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
response = om.readValue(strResponse, PlanReqResponse.class); response = om.readValue(strResponse, PlanReqResponse.class);
Map<String, Object> map = (Map<String, Object>) response.getResult(); @SuppressWarnings("unchecked")
Map<String, Object> map = (Map<String, Object>) response.getResult();
if ("E".equals(String.valueOf(map.get("resultCode")))) { if ("E".equals(String.valueOf(map.get("resultCode")))) {
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR,
String.valueOf(map.get("resultMsg"))); String.valueOf(map.get("resultMsg")));
@ -545,7 +555,8 @@ public class ObjectService {
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
response = om.readValue(strResponse, PlanReqResponse.class); response = om.readValue(strResponse, PlanReqResponse.class);
Map<String, Object> map = (Map<String, Object>) response.getResult(); @SuppressWarnings("unchecked")
Map<String, Object> map = (Map<String, Object>) response.getResult();
if ("E".equals(String.valueOf(map.get("resultCode")))) { if ("E".equals(String.valueOf(map.get("resultCode")))) {
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR,
String.valueOf(map.get("resultMsg"))); String.valueOf(map.get("resultMsg")));

View File

@ -24,6 +24,9 @@ public class SaleStoreResponse {
@Schema(description = "1차점판매점ID") @Schema(description = "1차점판매점ID")
private String firstAgentId; private String firstAgentId;
@Schema(description = "1차점판매점명")
private String firstAgentName;
@Schema(description = "영업사원명") @Schema(description = "영업사원명")
private String businessCharger; private String businessCharger;

View File

@ -3,7 +3,7 @@ package com.interplug.qcast.config.json;
import com.fasterxml.jackson.core.SerializableString; import com.fasterxml.jackson.core.SerializableString;
import com.fasterxml.jackson.core.io.CharacterEscapes; import com.fasterxml.jackson.core.io.CharacterEscapes;
import com.fasterxml.jackson.core.io.SerializedString; import com.fasterxml.jackson.core.io.SerializedString;
import org.apache.commons.lang3.StringEscapeUtils; import org.springframework.web.util.HtmlUtils;
/** /**
* <pre> * <pre>
@ -50,7 +50,7 @@ public class HtmlCharacterEscapes extends CharacterEscapes {
sb.append(String.format("%04x", ch)); sb.append(String.format("%04x", ch));
serializedString = new SerializedString(sb.toString()); serializedString = new SerializedString(sb.toString());
} else { } else {
serializedString = new SerializedString(StringEscapeUtils.escapeHtml4(Character.toString(charAt))); serializedString = new SerializedString(HtmlUtils.htmlEscape(Character.toString(charAt)));
} }
return serializedString; return serializedString;

View File

@ -53,6 +53,7 @@ public class InterfaceQsp {
// GET 요청 requestObject를 쿼리 스트링으로 변환 // GET 요청 requestObject를 쿼리 스트링으로 변환
if (HttpMethod.GET.equals(httpMethod) && requestObject != null) { if (HttpMethod.GET.equals(httpMethod) && requestObject != null) {
ObjectMapper om = new ObjectMapper(); ObjectMapper om = new ObjectMapper();
@SuppressWarnings("unchecked")
Map<String, Object> params = om.convertValue(requestObject, Map.class); // Object -> Map 변환 Map<String, Object> params = om.convertValue(requestObject, Map.class); // Object -> Map 변환
String queryString = String queryString =
params.entrySet().stream() params.entrySet().stream()
@ -159,11 +160,17 @@ public class InterfaceQsp {
} }
} }
if (responseObject == null) { if (responseObject == null) {
return (T) dataJson; @SuppressWarnings("unchecked")
T result = (T) dataJson;
return result;
} else if (responseObject instanceof Class<?>) { } else if (responseObject instanceof Class<?>) {
return om.readValue(dataJson, (Class<T>) responseObject); @SuppressWarnings("unchecked")
Class<T> responseClass = (Class<T>) responseObject;
return om.readValue(dataJson, responseClass);
} else if (responseObject instanceof TypeReference<?>) { } else if (responseObject instanceof TypeReference<?>) {
return om.readValue(dataJson, (TypeReference<T>) responseObject); @SuppressWarnings("unchecked")
TypeReference<T> responseType = (TypeReference<T>) responseObject;
return om.readValue(dataJson, responseType);
} else { } else {
throw new IllegalArgumentException("Unsupported responseType"); throw new IllegalArgumentException("Unsupported responseType");
} }

View File

@ -140,6 +140,17 @@
WHERE A.SALE_STORE_ID = #{saleStoreId} WHERE A.SALE_STORE_ID = #{saleStoreId}
</select> </select>
<select id="selectFirstAgentInfo" parameterType="String" resultType="com.interplug.qcast.biz.object.dto.SaleStoreResponse">
/* sqlid : com.interplug.qcast.biz.object.selectFirstAgentInfo */
SELECT
A.FIRST_AGENT_ID
, (SELECT SALE_STORE_NAME FROM M_SALES_STORE WITH(NOLOCK) WHERE SALE_STORE_ID = A.FIRST_AGENT_ID AND APPROVE_FLG = '2' AND DEL_FLG = '0') AS FIRST_AGENT_NAME
FROM M_SALES_STORE A WITH(NOLOCK)
WHERE A.SALE_STORE_ID = #{saleStoreId}
AND A.SALE_STORE_LEVEL = '2'
AND A.DEL_FLG = '0'
</select>
<select id="selectObjectMainList" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="com.interplug.qcast.biz.object.dto.ObjectResponse"> <select id="selectObjectMainList" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="com.interplug.qcast.biz.object.dto.ObjectResponse">
/* sqlid : com.interplug.qcast.biz.object.selectObjectMainList */ /* sqlid : com.interplug.qcast.biz.object.selectObjectMainList */