Compare commits
193 Commits
7211101ac5
...
b230529537
| Author | SHA1 | Date | |
|---|---|---|---|
| b230529537 | |||
| cd4a913a9f | |||
| 1bf777f8a0 | |||
| 60b84191c1 | |||
| 709b1f1f15 | |||
| f407079fb2 | |||
| 3e64d8a2fc | |||
| 0b9eeb996e | |||
| 2b43fad252 | |||
| 037e320137 | |||
| d68b127001 | |||
| 9b7620637e | |||
| 73da60a017 | |||
| 2d34526a8a | |||
| a662c49064 | |||
| ed8a8203e8 | |||
| b9815dcec1 | |||
| fdf6dc3f93 | |||
| 61306ddaba | |||
| 7395c0178f | |||
| 8f55d80133 | |||
| 303a81d7fa | |||
| 297abd9e37 | |||
| 0aea25af53 | |||
| 5fa758771b | |||
| 7bb5211f04 | |||
| f45e23e442 | |||
| 7c5d4077d5 | |||
| 7d03bb1cf0 | |||
| 7b0451c166 | |||
| 953b044e4c | |||
| 604a7561f0 | |||
| 0b2c2d12ac | |||
| 975d42a0b5 | |||
| cc6744d158 | |||
| a6fc8bed90 | |||
| 45d8e58fe7 | |||
| caffde39ee | |||
| 2397be70ff | |||
| 3777da8540 | |||
| c5527b6347 | |||
| 48f11da0bb | |||
| 5dd6de7173 | |||
| 6973b3e545 | |||
| de3bee2e39 | |||
| 7d5b646f9a | |||
| 042bbfd7c3 | |||
| 15deda383a | |||
| 709425a484 | |||
| ef5116a926 | |||
| 7a1fce57e8 | |||
| 8810377af0 | |||
| c147d13719 | |||
| 3e3131c9a9 | |||
| 61c8db15b5 | |||
| f42a084d33 | |||
| 17e5dd1c2d | |||
| 41b1fce8f3 | |||
| bb6a2968cf | |||
| 0bedaa32f0 | |||
| d11578d472 | |||
| f9bbe04a9c | |||
| ead7dc32ab | |||
| 35cae5901c | |||
| f76fcdd488 | |||
| d75a870f86 | |||
| 6315c9cfc0 | |||
| 9098ce8c84 | |||
| 143eb44612 | |||
| 547330163b | |||
| 2050c0027a | |||
| 419c6af7ce | |||
| 3974ea39fe | |||
| b9626f4ae3 | |||
| 78861015db | |||
| 4ec934438b | |||
| 6aa189e337 | |||
| 51aaaf2ae4 | |||
| 8a8ea7cb27 | |||
| 6bbbded4da | |||
| d206d1bc2d | |||
| d99e6786fb | |||
| a1192d4656 | |||
| 9641f7560d | |||
| f4f493b7c2 | |||
| 4788938c70 | |||
| 3392d342b0 | |||
| acec646754 | |||
| aeefbdd7cc | |||
| 0b13ab7c58 | |||
| 109430e1d2 | |||
| 8152e029ce | |||
| de9219cf56 | |||
| fefde969db | |||
| fcd47662cb | |||
| dca4a83062 | |||
| 9c5feef68d | |||
| c4eb97a02a | |||
| cb18e2196a | |||
| 14125fc2cc | |||
| 6f0d043603 | |||
| cd91cc9006 | |||
| 901ba11c59 | |||
| 92c96eec96 | |||
| 0f0da4f9be | |||
| 65c7a1bae4 | |||
| 4563be8c2c | |||
| a1b44cac5c | |||
| f612c8dba6 | |||
| cd52a44376 | |||
| 01be6a5a09 | |||
| ac63eccb77 | |||
| e453f9d219 | |||
| 9b535c2016 | |||
| 4b848bc104 | |||
| e148b36e5e | |||
| 4a15fc5ef4 | |||
| eb7bf3a5a5 | |||
| 814e79615f | |||
| 3cc7050d41 | |||
| 8c46d865b1 | |||
| 897607bf80 | |||
| 9f2a4980a3 | |||
| cd06784b09 | |||
| 829ed2e29e | |||
| b579a4412b | |||
| db39044bcd | |||
| 486d231798 | |||
| 32fe1fb7bc | |||
| 27166f8b47 | |||
| 045cb3e5d6 | |||
| 31ec55e2f0 | |||
| ebd490bc21 | |||
| 33831af7c1 | |||
| 10a7df0755 | |||
| 8f321656ad | |||
| 0eba7150f3 | |||
| d47950828a | |||
| 8623b29252 | |||
| c450de9770 | |||
| 20c7c6bb5d | |||
| 9a37eb79b4 | |||
| a846322449 | |||
| 7e91131a46 | |||
| 9062ad99d3 | |||
| 48875e3348 | |||
| 86b7129f24 | |||
| fbb68bbb5f | |||
| ef89cef862 | |||
| 00e46f204e | |||
| 15a827d54c | |||
| 2fc9a85c7d | |||
| 30dc11b37a | |||
| 48dff518b3 | |||
| 8c73455cb1 | |||
| 01a6139b57 | |||
| 1756d74afc | |||
| 2f17256e1b | |||
| 0a20f718b3 | |||
| 96f950e46d | |||
| 97874c34e6 | |||
| c43a7e1f94 | |||
| 1679859acb | |||
| 8c4b1cb930 | |||
| d22eaac274 | |||
| 94fb14e732 | |||
| b4142e112d | |||
| 7dbc8b367d | |||
| ede94ab769 | |||
| 41d448249e | |||
| 08914f1516 | |||
| 63cf9a8ee8 | |||
| bd6ecfde80 | |||
| 7b81e5b6a2 | |||
| 249cf65fc6 | |||
| 6cffd578b5 | |||
| 99e904bc15 | |||
| deebd687d9 | |||
| b322e21cb1 | |||
| 4c568052d7 | |||
| f1fd136061 | |||
| f29c3034a4 | |||
| a6974776e9 | |||
| 28e318283b | |||
| fe266cbfa2 | |||
| 7ce3cd56d7 | |||
| de5728dbeb | |||
| e10b9b7cd8 | |||
| b44adf5bb4 | |||
| b422d5b0f3 | |||
| 92047f04fd | |||
| a903a71e9c | |||
| fc7842aca1 |
@ -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);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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()));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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()));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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()));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
@ -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()));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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()));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
@ -19,8 +19,8 @@ import java.util.stream.Collectors;
|
|||||||
import com.interplug.qcast.biz.canvaspopupstatus.CanvasPopupStatusService;
|
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 +32,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;
|
||||||
@ -326,6 +325,16 @@ public class EstimateService {
|
|||||||
List<ItemRequest> itemList = estimateRequest.getItemList();
|
List<ItemRequest> itemList = estimateRequest.getItemList();
|
||||||
|
|
||||||
if (itemList == null || itemList.isEmpty()) {
|
if (itemList == null || itemList.isEmpty()) {
|
||||||
|
try {
|
||||||
|
Map<String, String> errReq = new HashMap<>();
|
||||||
|
errReq.put("objectNo", estimateRequest.getObjectNo());
|
||||||
|
errReq.put("planNo", estimateRequest.getPlanNo());
|
||||||
|
errReq.put("rejectRsn", "itemList is empty");
|
||||||
|
errReq.put("regId", estimateRequest.getUserId());
|
||||||
|
interfaceQsp.callApi(HttpMethod.POST, QSP_API_URL + "/api/master/quotationErrSave", errReq);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("quotationErrSave failed: {}", e.getMessage());
|
||||||
|
}
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
||||||
message.getMessage("common.message.required.data", "itemList"));
|
message.getMessage("common.message.required.data", "itemList"));
|
||||||
}
|
}
|
||||||
@ -1403,9 +1412,9 @@ public class EstimateService {
|
|||||||
|
|
||||||
String classTypeName = "";
|
String classTypeName = "";
|
||||||
if ("0".equals(roofVol.getClassType())) {
|
if ("0".equals(roofVol.getClassType())) {
|
||||||
classTypeName = roofVol.getSlope() + "寸";
|
classTypeName = new BigDecimal(StringUtils.defaultString(roofVol.getSlope(), "0")).stripTrailingZeros().toPlainString() + "寸";
|
||||||
} else {
|
} else {
|
||||||
classTypeName = roofVol.getAngle() + "º";
|
classTypeName = new BigDecimal(StringUtils.defaultString(roofVol.getAngle(), "0")).stripTrailingZeros().toPlainString() + "º";
|
||||||
}
|
}
|
||||||
roofVol.setClassTypeName(classTypeName);
|
roofVol.setClassTypeName(classTypeName);
|
||||||
|
|
||||||
@ -1415,6 +1424,15 @@ public class EstimateService {
|
|||||||
roofInfoResponse.setModuleTotAmount(String.valueOf(moduleTotAmount));
|
roofInfoResponse.setModuleTotAmount(String.valueOf(moduleTotAmount));
|
||||||
roofInfoResponse.setModuleTotVolKw(String.valueOf(moduleTotVolKw));
|
roofInfoResponse.setModuleTotVolKw(String.valueOf(moduleTotVolKw));
|
||||||
|
|
||||||
|
for (RoofResponse roof : roofList) {
|
||||||
|
String roofClassTypeName = "";
|
||||||
|
if ("0".equals(roof.getClassType())) {
|
||||||
|
roofClassTypeName = new BigDecimal(StringUtils.defaultString(roof.getSlope(), "0")).stripTrailingZeros().toPlainString() + "寸";
|
||||||
|
} else {
|
||||||
|
roofClassTypeName = new BigDecimal(StringUtils.defaultString(roof.getAngle(), "0")).stripTrailingZeros().toPlainString() + "º";
|
||||||
|
}
|
||||||
|
roof.setClassTypeName(roofClassTypeName);
|
||||||
|
}
|
||||||
roofInfoResponse.setRoofList(roofList);
|
roofInfoResponse.setRoofList(roofList);
|
||||||
roofInfoResponse.setCircuitItemList(circuitItemList);
|
roofInfoResponse.setCircuitItemList(circuitItemList);
|
||||||
roofInfoResponse.setRoofVolList(roofVolList);
|
roofInfoResponse.setRoofVolList(roofVolList);
|
||||||
@ -1445,7 +1463,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 +2006,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 +2016,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 +2333,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) {
|
||||||
@ -2586,7 +2606,7 @@ public class EstimateService {
|
|||||||
sb.append("<td>" + StringUtils.defaultString(roofResponse.getRoofSurface()) + "</td>");
|
sb.append("<td>" + StringUtils.defaultString(roofResponse.getRoofSurface()) + "</td>");
|
||||||
sb.append("<td style='text-align:left;'>"
|
sb.append("<td style='text-align:left;'>"
|
||||||
+ StringUtils.defaultString(roofResponse.getRoofMaterialName()) + "</td>");
|
+ StringUtils.defaultString(roofResponse.getRoofMaterialName()) + "</td>");
|
||||||
sb.append("<td>" + StringUtils.defaultString(roofResponse.getSlope()) + "寸</td>");
|
sb.append("<td>" + StringUtils.defaultString(roofResponse.getClassTypeName()) + "</td>");
|
||||||
sb.append("<td>" + StringUtils.defaultString(roofResponse.getConstructSpecificationName())
|
sb.append("<td>" + StringUtils.defaultString(roofResponse.getConstructSpecificationName())
|
||||||
+ "</td>");
|
+ "</td>");
|
||||||
sb.append("<td style='text-align:left;'>"
|
sb.append("<td style='text-align:left;'>"
|
||||||
@ -2666,7 +2686,7 @@ public class EstimateService {
|
|||||||
sb.append("<td>" + StringUtils.defaultString(roofResponse.getRoofSurface()) + "</td>");
|
sb.append("<td>" + StringUtils.defaultString(roofResponse.getRoofSurface()) + "</td>");
|
||||||
sb.append("<td style='text-align:left;'>"
|
sb.append("<td style='text-align:left;'>"
|
||||||
+ StringUtils.defaultString(roofResponse.getRoofMaterialName()) + "</td>");
|
+ StringUtils.defaultString(roofResponse.getRoofMaterialName()) + "</td>");
|
||||||
sb.append("<td>" + StringUtils.defaultString(roofResponse.getSlope()) + "寸</td>");
|
sb.append("<td>" + StringUtils.defaultString(roofResponse.getClassTypeName()) + "</td>");
|
||||||
sb.append("<td>" + StringUtils.defaultString(roofResponse.getConstructSpecificationName())
|
sb.append("<td>" + StringUtils.defaultString(roofResponse.getConstructSpecificationName())
|
||||||
+ "</td>");
|
+ "</td>");
|
||||||
sb.append("<td style='text-align:left;'>"
|
sb.append("<td style='text-align:left;'>"
|
||||||
@ -2992,7 +3012,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);
|
||||||
|
|||||||
@ -59,6 +59,34 @@ public class LoginController {
|
|||||||
return loginService.getLogin(loginUser);
|
return loginService.getLogin(loginUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Q.CAST III에 자동 로그인하여 사용자 정보를 획득한다.
|
||||||
|
*
|
||||||
|
* @param loginUser LoginUser
|
||||||
|
* @return UserLoginResponse
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Operation(description = "Q.CAST III에 자동 로그인하여 사용자 정보를 획득한다.")
|
||||||
|
@PostMapping("/v1.0/autoLogin")
|
||||||
|
@ResponseStatus(HttpStatus.CREATED)
|
||||||
|
public UserLoginResponse autoLogin(@RequestBody LoginUser loginUser) throws Exception {
|
||||||
|
return loginService.getAutoLogin(loginUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Q.CAST III에서 로그아웃한다.
|
||||||
|
*
|
||||||
|
* @param loginUser LoginUser
|
||||||
|
* @return DefaultResponse
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Operation(description = "Q.CAST III에서 로그아웃한다.")
|
||||||
|
@PostMapping("/v1.0/logout")
|
||||||
|
@ResponseStatus(HttpStatus.CREATED)
|
||||||
|
public DefaultResponse logout(@RequestBody LoginUser loginUser) throws Exception {
|
||||||
|
return loginService.getLogout(loginUser);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/v1.0/user")
|
@PostMapping("/v1.0/user")
|
||||||
@ResponseStatus(HttpStatus.CREATED)
|
@ResponseStatus(HttpStatus.CREATED)
|
||||||
public UserResponse getUser(@RequestBody LoginUser loginUser) {
|
public UserResponse getUser(@RequestBody LoginUser loginUser) {
|
||||||
|
|||||||
@ -1,24 +1,24 @@
|
|||||||
package com.interplug.qcast.biz.login;
|
package com.interplug.qcast.biz.login;
|
||||||
|
|
||||||
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;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.interplug.qcast.biz.login.dto.JoinUser;
|
import com.interplug.qcast.biz.login.dto.JoinUser;
|
||||||
import com.interplug.qcast.biz.login.dto.LoginUser;
|
import com.interplug.qcast.biz.login.dto.LoginUser;
|
||||||
import com.interplug.qcast.biz.login.dto.UserLoginResponse;
|
import com.interplug.qcast.biz.login.dto.UserLoginResponse;
|
||||||
import com.interplug.qcast.biz.login.dto.UserPassword;
|
import com.interplug.qcast.biz.login.dto.UserPassword;
|
||||||
import com.interplug.qcast.biz.login.dto.UserResponse;
|
import com.interplug.qcast.biz.login.dto.UserResponse;
|
||||||
import com.interplug.qcast.config.Exception.ErrorCode;
|
import com.interplug.qcast.config.Exception.ErrorCode;
|
||||||
import com.interplug.qcast.config.Exception.QcastException;
|
import com.interplug.qcast.config.Exception.QcastException;
|
||||||
import com.interplug.qcast.config.message.Messages;
|
import com.interplug.qcast.config.message.Messages;
|
||||||
import com.interplug.qcast.util.DefaultResponse;
|
import com.interplug.qcast.util.DefaultResponse;
|
||||||
import com.interplug.qcast.util.InterfaceQsp;
|
import com.interplug.qcast.util.InterfaceQsp;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@ -50,6 +50,31 @@ public class LoginService {
|
|||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
||||||
message.getMessage("common.message.required.data", "Password"));
|
message.getMessage("common.message.required.data", "Password"));
|
||||||
|
|
||||||
|
return callLoginApi(loginUser, "LOGIN");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 자동 로그인 처리
|
||||||
|
*
|
||||||
|
* @param loginUser LoginUser
|
||||||
|
* @return UserLoginResponse
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public UserLoginResponse getAutoLogin(LoginUser loginUser) throws Exception {
|
||||||
|
if (loginUser.getLoginId() == null || "".equals(loginUser.getLoginId()))
|
||||||
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
||||||
|
message.getMessage("common.message.required.data", "Login Id"));
|
||||||
|
|
||||||
|
return callLoginApi(loginUser, "AUTO_LOGIN");
|
||||||
|
}
|
||||||
|
|
||||||
|
private UserLoginResponse callLoginApi(LoginUser loginUser, String actLog) throws Exception {
|
||||||
|
loginUser.setAccsSiteCd("DESIGN");
|
||||||
|
loginUser.setActLog(actLog);
|
||||||
|
|
||||||
|
String sessionId = UUID.randomUUID().toString();
|
||||||
|
loginUser.setRequestId(sessionId);
|
||||||
|
|
||||||
UserLoginResponse userLoginResponse = null;
|
UserLoginResponse userLoginResponse = null;
|
||||||
|
|
||||||
// QSP API Call..
|
// QSP API Call..
|
||||||
@ -58,20 +83,51 @@ public class LoginService {
|
|||||||
// /api/user/login
|
// /api/user/login
|
||||||
String strResponse =
|
String strResponse =
|
||||||
interfaceQsp.callApi(HttpMethod.POST, qspUrl + "/api/user/login", loginUser);
|
interfaceQsp.callApi(HttpMethod.POST, qspUrl + "/api/user/login", loginUser);
|
||||||
if (!"".equals(strResponse)) {
|
if (!"".equals(strResponse)) {
|
||||||
ObjectMapper om =
|
ObjectMapper om =
|
||||||
new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
userLoginResponse = om.readValue(strResponse, UserLoginResponse.class);
|
userLoginResponse = om.readValue(strResponse, UserLoginResponse.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userLoginResponse != null
|
if (userLoginResponse != null
|
||||||
&& userLoginResponse.getResult() != null
|
&& userLoginResponse.getResult() != null
|
||||||
&& "S".equalsIgnoreCase(userLoginResponse.getResult().getResultCode())) {
|
&& "S".equalsIgnoreCase(userLoginResponse.getResult().getResultCode())) {
|
||||||
userLoginResponse.setSessionId(UUID.randomUUID().toString());
|
userLoginResponse.setSessionId(sessionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return userLoginResponse;
|
return userLoginResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 로그아웃 처리
|
||||||
|
*
|
||||||
|
* @param loginUser LoginUser
|
||||||
|
* @return DefaultResponse
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public DefaultResponse getLogout(LoginUser loginUser) throws Exception {
|
||||||
|
if (loginUser.getLoginId() == null || "".equals(loginUser.getLoginId()))
|
||||||
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
||||||
|
message.getMessage("common.message.required.data", "Login Id"));
|
||||||
|
|
||||||
|
loginUser.setAccsSiteCd("DESIGN");
|
||||||
|
loginUser.setActLog("LOGOUT");
|
||||||
|
|
||||||
|
// QSP API Call..
|
||||||
|
// Q.CAST 로그아웃
|
||||||
|
// post
|
||||||
|
// /api/user/logout
|
||||||
|
DefaultResponse defaultResponse = null;
|
||||||
|
String strResponse =
|
||||||
|
interfaceQsp.callApi(HttpMethod.POST, qspUrl + "/api/user/logout", loginUser);
|
||||||
|
if (!"".equals(strResponse)) {
|
||||||
|
ObjectMapper om =
|
||||||
|
new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
defaultResponse = om.readValue(strResponse, DefaultResponse.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
return defaultResponse;
|
||||||
|
}
|
||||||
|
|
||||||
public UserResponse getUser(LoginUser loginUser) {
|
public UserResponse getUser(LoginUser loginUser) {
|
||||||
return loginMapper.getUser(loginUser);
|
return loginMapper.getUser(loginUser);
|
||||||
|
|||||||
@ -6,4 +6,7 @@ import lombok.Data;
|
|||||||
public class LoginUser {
|
public class LoginUser {
|
||||||
private String loginId; // Login Id
|
private String loginId; // Login Id
|
||||||
private String pwd; // Password
|
private String pwd; // Password
|
||||||
|
private String accsSiteCd; // Access Site Code (QSP, QORDER, QMUSUBI_DESIGN, QREAD, QWARRANTY, QPARTNERS)
|
||||||
|
private String actLog; // Action Log (LOGIN, AUTO_LOGIN, LOGOUT)
|
||||||
|
private String requestId; // Request ID <= Unique ID
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,4 +28,6 @@ public class UserResponse {
|
|||||||
private String custNm;
|
private String custNm;
|
||||||
//시공사 번호
|
//시공사 번호
|
||||||
private String builderNo;
|
private String builderNo;
|
||||||
|
private String builderNm; // Builder Name
|
||||||
|
private String builderId; // Builder Id
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
@ -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);
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 물건정보 메인 목록 조회
|
* 물건정보 메인 목록 조회
|
||||||
*
|
*
|
||||||
@ -341,8 +349,11 @@ public class ObjectService {
|
|||||||
// 물건정보 등록
|
// 물건정보 등록
|
||||||
objectRequest.setAddress(
|
objectRequest.setAddress(
|
||||||
((!StringUtils.isEmpty(objectRequest.getAddress())) ? objectRequest.getAddress() : ""));
|
((!StringUtils.isEmpty(objectRequest.getAddress())) ? objectRequest.getAddress() : ""));
|
||||||
objectRequest.setAddresseeCompanyName(
|
String addresseeCompanyName = objectRequest.getObjectName() + ' ' + objectRequest.getObjectNameOmit();
|
||||||
objectRequest.getObjectName() + ' ' + objectRequest.getObjectNameOmit());
|
if (addresseeCompanyName.length() > 50) {
|
||||||
|
addresseeCompanyName = addresseeCompanyName.substring(0, 50);
|
||||||
|
}
|
||||||
|
objectRequest.setAddresseeCompanyName(addresseeCompanyName);
|
||||||
objectRequest.setAddresseeCompanyNameOmit(objectRequest.getObjectNameOmit());
|
objectRequest.setAddresseeCompanyNameOmit(objectRequest.getObjectNameOmit());
|
||||||
objectRequest.setContentsPath(baseDirPath + "\\\\" + objectRequest.getObjectNo());
|
objectRequest.setContentsPath(baseDirPath + "\\\\" + objectRequest.getObjectNo());
|
||||||
result += objectMapper.insertObject(objectRequest);
|
result += objectMapper.insertObject(objectRequest);
|
||||||
@ -378,6 +389,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,
|
||||||
@ -432,8 +444,11 @@ public class ObjectService {
|
|||||||
// 물건정보 수정
|
// 물건정보 수정
|
||||||
objectRequest.setAddress(
|
objectRequest.setAddress(
|
||||||
((!StringUtils.isEmpty(objectRequest.getAddress())) ? objectRequest.getAddress() : ""));
|
((!StringUtils.isEmpty(objectRequest.getAddress())) ? objectRequest.getAddress() : ""));
|
||||||
objectRequest.setAddresseeCompanyName(
|
String addresseeCompanyName2 = objectRequest.getObjectName() + ' ' + objectRequest.getObjectNameOmit();
|
||||||
objectRequest.getObjectName() + ' ' + objectRequest.getObjectNameOmit());
|
if (addresseeCompanyName2.length() > 50) {
|
||||||
|
addresseeCompanyName2 = addresseeCompanyName2.substring(0, 50);
|
||||||
|
}
|
||||||
|
objectRequest.setAddresseeCompanyName(addresseeCompanyName2);
|
||||||
objectRequest.setAddresseeCompanyNameOmit(objectRequest.getObjectNameOmit());
|
objectRequest.setAddresseeCompanyNameOmit(objectRequest.getObjectNameOmit());
|
||||||
objectRequest.setContentsPath(baseDirPath + "\\\\"
|
objectRequest.setContentsPath(baseDirPath + "\\\\"
|
||||||
+ (tempChgFlg ? objectRequest.getNewObjectNo() : objectRequest.getObjectNo()));
|
+ (tempChgFlg ? objectRequest.getNewObjectNo() : objectRequest.getObjectNo()));
|
||||||
@ -464,7 +479,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 +561,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")));
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 */
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user