diff --git a/src/main/java/com/interplug/qcast/batch/JobLauncherController.java b/src/main/java/com/interplug/qcast/batch/JobLauncherController.java index ff1046cf..6783f14e 100644 --- a/src/main/java/com/interplug/qcast/batch/JobLauncherController.java +++ b/src/main/java/com/interplug/qcast/batch/JobLauncherController.java @@ -2,7 +2,6 @@ package com.interplug.qcast.batch; import java.util.Date; import java.util.Map; -import lombok.RequiredArgsConstructor; import org.springframework.batch.core.Job; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.JobParametersBuilder; @@ -16,6 +15,7 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; +import lombok.RequiredArgsConstructor; @RestController @RequiredArgsConstructor @@ -38,22 +38,16 @@ public class JobLauncherController { * @throws JobRestartException */ @GetMapping("/batch/job/{jobName}") // Path Variable로 jobName을 받음 - public String launchJob(@PathVariable String jobName) - throws JobInstanceAlreadyCompleteException, - JobExecutionAlreadyRunningException, - JobParametersInvalidException, - JobRestartException { + public String launchJob(@PathVariable String jobName) throws JobInstanceAlreadyCompleteException, + JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { Job job = jobs.get(jobName); if (job == null) { return "Job " + jobName + " not found"; } - JobParameters jobParameters = - new JobParametersBuilder() - .addString("jobName", jobName) - .addDate("time", new Date()) - .toJobParameters(); + JobParameters jobParameters = new JobParametersBuilder().addString("jobName", jobName) + .addDate("time", new Date()).toJobParameters(); jobLauncher.run(job, jobParameters); @@ -71,11 +65,8 @@ public class JobLauncherController { */ // @Scheduled(cron = "*/5 * * * * *") @Scheduled(cron = "0 55 23 * * *") - public String storeAdditionalInfoJob() - throws JobInstanceAlreadyCompleteException, - JobExecutionAlreadyRunningException, - JobParametersInvalidException, - JobRestartException { + public String storeAdditionalInfoJob() throws JobInstanceAlreadyCompleteException, + JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { String jobName = "storeAdditionalJob"; Job job = jobs.get(jobName); @@ -101,11 +92,8 @@ public class JobLauncherController { * @throws JobRestartException */ @Scheduled(cron = "0 30 02 * * *") - public String materialJob() - throws JobInstanceAlreadyCompleteException, - JobExecutionAlreadyRunningException, - JobParametersInvalidException, - JobRestartException { + public String materialJob() throws JobInstanceAlreadyCompleteException, + JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { String jobName = "materialJob"; Job job = jobs.get(jobName); @@ -132,11 +120,8 @@ public class JobLauncherController { * @throws JobRestartException */ @Scheduled(cron = "0 40 02 * * *") - public String bomJob() - throws JobInstanceAlreadyCompleteException, - JobExecutionAlreadyRunningException, - JobParametersInvalidException, - JobRestartException { + public String bomJob() throws JobInstanceAlreadyCompleteException, + JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { String jobName = "bomJob"; Job job = jobs.get(jobName); @@ -164,11 +149,8 @@ public class JobLauncherController { * @throws JobRestartException */ @Scheduled(cron = "0 40 03 * * *") - public String businessChargerJob() - throws JobInstanceAlreadyCompleteException, - JobExecutionAlreadyRunningException, - JobParametersInvalidException, - JobRestartException { + public String businessChargerJob() throws JobInstanceAlreadyCompleteException, + JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { String jobName = "businessChargerJob"; Job job = jobs.get(jobName); @@ -196,11 +178,8 @@ public class JobLauncherController { * @throws JobRestartException */ @Scheduled(cron = "0 0 01 * * *") - public String adminUserJob() - throws JobInstanceAlreadyCompleteException, - JobExecutionAlreadyRunningException, - JobParametersInvalidException, - JobRestartException { + public String adminUserJob() throws JobInstanceAlreadyCompleteException, + JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { String jobName = "adminUserJob"; Job job = jobs.get(jobName); @@ -228,11 +207,8 @@ public class JobLauncherController { * @throws JobRestartException */ @Scheduled(cron = "0 0 0 * * *") - public String priceJob() - throws JobInstanceAlreadyCompleteException, - JobExecutionAlreadyRunningException, - JobParametersInvalidException, - JobRestartException { + public String priceJob() throws JobInstanceAlreadyCompleteException, + JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { String jobName = "priceJob"; Job job = jobs.get(jobName); @@ -260,11 +236,8 @@ public class JobLauncherController { * @throws JobRestartException */ @Scheduled(cron = "0 10 03 * * *") - public String commonCodeJob() - throws JobInstanceAlreadyCompleteException, - JobExecutionAlreadyRunningException, - JobParametersInvalidException, - JobRestartException { + public String commonCodeJob() throws JobInstanceAlreadyCompleteException, + JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { String jobName = "commonCodeJob"; Job job = jobs.get(jobName); @@ -280,4 +253,33 @@ public class JobLauncherController { } return "OK"; } + + /** + * Q.CAST 견적특이사항 / 아이템 표시, 미표시 동기화 배치 + * + * @return + * @throws JobInstanceAlreadyCompleteException + * @throws JobExecutionAlreadyRunningException + * @throws JobParametersInvalidException + * @throws JobRestartException + */ + @Scheduled(cron = "0 30 23 * * *") + public String specialNoteDispItemAdditionalInfoJob() throws JobInstanceAlreadyCompleteException, + JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { + String jobName = "specialNoteDispItemAdditionalJob"; + Job job = jobs.get(jobName); + if (job == null) { + return "Job " + jobName + " not found"; + } + + if ("Y".equals(System.getProperty("spring.profiles.scheduler"))) { + JobParameters jobParameters = + new JobParametersBuilder().addDate("time", new Date()).toJobParameters(); + + jobLauncher.run(job, jobParameters); + } + + return "OK"; + } + } diff --git a/src/main/java/com/interplug/qcast/batch/master/SpecialNoteDispItemJobConfiguration.java b/src/main/java/com/interplug/qcast/batch/master/SpecialNoteDispItemJobConfiguration.java new file mode 100644 index 00000000..195004b0 --- /dev/null +++ b/src/main/java/com/interplug/qcast/batch/master/SpecialNoteDispItemJobConfiguration.java @@ -0,0 +1,167 @@ +package com.interplug.qcast.batch.master; + +import java.util.Collections; +import java.util.List; +import java.util.function.Consumer; +import org.springframework.batch.core.Job; +import org.springframework.batch.core.JobExecution; +import org.springframework.batch.core.JobExecutionListener; +import org.springframework.batch.core.Step; +import org.springframework.batch.core.configuration.annotation.StepScope; +import org.springframework.batch.core.job.builder.JobBuilder; +import org.springframework.batch.core.repository.JobRepository; +import org.springframework.batch.core.step.builder.StepBuilder; +import org.springframework.batch.item.ItemReader; +import org.springframework.batch.item.ItemWriter; +import org.springframework.batch.item.support.ListItemReader; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.HttpMethod; +import org.springframework.transaction.PlatformTransactionManager; +import com.interplug.qcast.biz.displayItem.DisplayItemService; +import com.interplug.qcast.biz.displayItem.dto.DisplayItemRequest; +import com.interplug.qcast.biz.specialNote.SpecialNoteService; +import com.interplug.qcast.biz.specialNote.dto.SpecialNoteItemRequest; +import com.interplug.qcast.biz.specialNote.dto.SpecialNoteRequest; +import com.interplug.qcast.biz.specialNote.dto.SpecialNoteSyncResponse; +import com.interplug.qcast.util.InterfaceQsp; +import lombok.extern.slf4j.Slf4j; + +@Configuration +@Slf4j +public class SpecialNoteDispItemJobConfiguration implements JobExecutionListener { + + private final InterfaceQsp interfaceQsp; + + private final SpecialNoteService specialNoteService; + private final DisplayItemService displayItemService; + + @Value("${qsp.master-special-note-disp-item-batch-url}") + private String qspMasterSpecialNoteDispItemBatchUrl; + + private SpecialNoteSyncResponse SpecialNoteDispItemSyncResponse; + + public SpecialNoteDispItemJobConfiguration(InterfaceQsp interfaceQsp, + SpecialNoteService specialNoteService, DisplayItemService displayItemService) { + this.interfaceQsp = interfaceQsp; + this.specialNoteService = specialNoteService; + this.displayItemService = displayItemService; + } + + @Override + public void beforeJob(JobExecution jobExecution) { + log.info("Job 시작: 초기화 메서드 호출 중..."); + try { + this.SpecialNoteDispItemSyncResponse = interfaceQsp.callApiData(HttpMethod.GET, + qspMasterSpecialNoteDispItemBatchUrl, null, SpecialNoteSyncResponse.class); + log.info("API 호출 완료, 항목 수: {}", + this.SpecialNoteDispItemSyncResponse.getSdOrderSpnList().size()); + } catch (Exception e) { + log.error("specialNoteDispItemSyncResponse 갱신 중 오류: {}", e.getMessage()); + } + } + + @Bean + public Job specialNoteDispItemAdditionalJob(JobRepository jobRepository, Step specialNoteStep, + Step specialNoteItemStep, Step storeDispItemStep) { + return new JobBuilder("specialNoteDispItemAdditionalJob", jobRepository).start(specialNoteStep) + .next(specialNoteItemStep).next(storeDispItemStep).listener(this).build(); + } + + private Step buildStep(String stepName, JobRepository jobRepository, + PlatformTransactionManager transactionManager, ItemReader reader, ItemWriter writer) { + return new StepBuilder(stepName, jobRepository).chunk(10, transactionManager) + .reader(reader).writer(writer).build(); + } + + @Bean + public Step specialNoteStep(JobRepository jobRepository, + PlatformTransactionManager transactionManager) { + return buildStep("specialNoteStep", jobRepository, transactionManager, specialNoteListReader(), + createWriter((items) -> { + try { + log.debug("Special Note batch processing {} items", items.size()); + specialNoteService.setSpecialNoteBatch(items); + log.debug("Successfully processed Special Note batch"); + } catch (Exception e) { + log.error("Error processing Special Note batch: {}", e.getMessage(), e); + throw new RuntimeException("Failed to process Special Note batch", e); + } + }, "specialNote")); + } + + @Bean + public Step specialNoteItemStep(JobRepository jobRepository, + PlatformTransactionManager transactionManager) { + return buildStep("specialNoteItemStep", jobRepository, transactionManager, + specialNoteItemListReader(), createWriter((items) -> { + try { + log.debug("Special Note Item batch processing {} items", items.size()); + specialNoteService.setSpecialNoteItemBatch(items); + log.debug("Successfully processed Special Note Item batch"); + } catch (Exception e) { + log.error("Error processing Special Note Item batch: {}", e.getMessage(), e); + throw new RuntimeException("Failed to process Special Note Item batch", e); + } + }, "specialNoteItem")); + } + + @Bean + public Step storeDispItemStep(JobRepository jobRepository, + PlatformTransactionManager transactionManager) { + return buildStep("storeDispItemStep", jobRepository, transactionManager, + storeDispItemListReader(), createWriter((items) -> { + try { + log.debug("Store Disp Item batch processing {} items", items.size()); + displayItemService.setStoreDispItemBatch(items); + log.debug("Successfully processed Store Disp Item batch"); + } catch (Exception e) { + log.error("Error processing Store Disp Item batch: {}", e.getMessage(), e); + throw new RuntimeException("Failed to process Store Disp Item batch", e); + } + }, "storeDispItem")); + } + + private ListItemReader createReader(List items, String readerName) { + log.info("{}Reader 호출됨...", readerName); + return new ListItemReader<>(items != null ? items : Collections.emptyList()); + } + + @Bean + @StepScope + public ListItemReader specialNoteListReader() { + return createReader(SpecialNoteDispItemSyncResponse != null + ? SpecialNoteDispItemSyncResponse.getSdOrderSpnList() + : null, "specialNote"); + } + + @Bean + @StepScope + public ListItemReader specialNoteItemListReader() { + return createReader(SpecialNoteDispItemSyncResponse != null + ? SpecialNoteDispItemSyncResponse.getSdOrderSpnItemList() + : null, "specialNoteItem"); + } + + @Bean + @StepScope + public ListItemReader storeDispItemListReader() { + return createReader(SpecialNoteDispItemSyncResponse != null + ? SpecialNoteDispItemSyncResponse.getStoreDispItemList() + : null, "storeDispItem"); + } + + private ItemWriter createWriter(Consumer> processor, String writerName) { + return items -> { + try { + List itemList = (List) items.getItems(); + processor.accept(itemList); + log.info("{}Writer: {} items 처리 완료", writerName, items.size()); + } catch (Exception e) { + log.error("{}Writer 오류: {}", writerName, e.getMessage()); + throw e; + } + }; + } +} diff --git a/src/main/java/com/interplug/qcast/biz/displayItem/DisplayItemController.java b/src/main/java/com/interplug/qcast/biz/displayItem/DisplayItemController.java index 443e192d..850c4fa6 100644 --- a/src/main/java/com/interplug/qcast/biz/displayItem/DisplayItemController.java +++ b/src/main/java/com/interplug/qcast/biz/displayItem/DisplayItemController.java @@ -1,15 +1,21 @@ package com.interplug.qcast.biz.displayItem; +import java.util.List; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; import com.interplug.qcast.biz.displayItem.dto.DisplayItemRequest; import com.interplug.qcast.biz.displayItem.dto.ItemDetailResponse; import com.interplug.qcast.biz.displayItem.dto.ItemResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; @Slf4j @RestController @@ -19,6 +25,12 @@ import org.springframework.web.bind.annotation.*; public class DisplayItemController { private final DisplayItemService displayItemService; + /** + * 전시제품 정보 등록/수정 + * + * @param displayItemRequest + * @throws Exception + */ @Operation(description = "전시제품 정보를 등록/수정한다. (동기화)") @PostMapping("/display-item-save") @ResponseStatus(HttpStatus.OK) @@ -27,6 +39,13 @@ public class DisplayItemController { displayItemService.setStoreDisplayItemSave(displayItemRequest); } + /** + * 제품 목록 조회 + * + * @param saleStoreId + * @return + * @throws Exception + */ @Operation(description = "제품 목록을 조회한다.") @GetMapping("/item-list") @ResponseStatus(HttpStatus.OK) @@ -35,6 +54,13 @@ public class DisplayItemController { return displayItemService.getItemList(saleStoreId); } + /** + * 제품 상세 정보 조회 + * + * @param itemId + * @return + * @throws Exception + */ @Operation(description = "제품 상세 정보를 조회한다.") @GetMapping("/item-detail") @ResponseStatus(HttpStatus.OK) diff --git a/src/main/java/com/interplug/qcast/biz/displayItem/DisplayItemService.java b/src/main/java/com/interplug/qcast/biz/displayItem/DisplayItemService.java index e4149b17..2e6dd1ef 100644 --- a/src/main/java/com/interplug/qcast/biz/displayItem/DisplayItemService.java +++ b/src/main/java/com/interplug/qcast/biz/displayItem/DisplayItemService.java @@ -1,14 +1,19 @@ package com.interplug.qcast.biz.displayItem; -import com.interplug.qcast.biz.displayItem.dto.*; +import java.util.List; +import org.springframework.stereotype.Service; +import com.interplug.qcast.biz.displayItem.dto.BomSyncResponse; +import com.interplug.qcast.biz.displayItem.dto.DisplayItemRequest; +import com.interplug.qcast.biz.displayItem.dto.ItemDetailResponse; +import com.interplug.qcast.biz.displayItem.dto.ItemResponse; +import com.interplug.qcast.biz.displayItem.dto.ItemSyncResponse; +import com.interplug.qcast.biz.displayItem.dto.PriceItemSyncResponse; import com.interplug.qcast.biz.estimate.EstimateMapper; import com.interplug.qcast.biz.estimate.dto.NoteRequest; import com.interplug.qcast.biz.estimate.dto.NoteResponse; import io.micrometer.common.util.StringUtils; -import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; @Slf4j @Service @@ -127,4 +132,22 @@ public class DisplayItemService { } return cnt; } + + /** + * 노출 아이템 동기화 - Batch + * + * @param displayItemList + * @throws Exception + */ + public void setStoreDispItemBatch(List displayItemList) throws Exception { + // 노출 아이템 동기화 + for (DisplayItemRequest displayItemRequest : displayItemList) { + try { + displayItemMapper.setStoreDisplayItemSave(displayItemRequest); + } catch (Exception e) { + log.error(e.getMessage()); + } + } + } + } diff --git a/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoController.java b/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoController.java index 8b6b937d..d8ddcb4d 100644 --- a/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoController.java +++ b/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoController.java @@ -22,6 +22,12 @@ public class MyInfoController { private final MyInfoService myInfoService; + /** + * 사용자 ID의 정보 조회 + * + * @param myInfoRequest + * @return + */ @Operation(description = "사용자 ID의 정보를 조회한다.") @GetMapping("/my-profile") @ResponseStatus(HttpStatus.OK) diff --git a/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoMapper.java b/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoMapper.java index 102eca99..02066f68 100644 --- a/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoMapper.java +++ b/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoMapper.java @@ -8,7 +8,7 @@ import com.interplug.qcast.biz.myInfo.dto.MyInfoResponse; public interface MyInfoMapper { /** - * ※ 사용자 정보 조회 + * 사용자 ID의 정보 조회 * * @param myInfoRequest * @return diff --git a/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoService.java b/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoService.java index 35f2d93e..af5c14b4 100644 --- a/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoService.java +++ b/src/main/java/com/interplug/qcast/biz/myInfo/MyInfoService.java @@ -14,7 +14,7 @@ public class MyInfoService { private final MyInfoMapper myInfoMapper; /** - * ※ 사용자 정보 조회 + * 사용자 ID의 정보 조회 * * @param userId * @return MyInfoResponse diff --git a/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteController.java b/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteController.java index 087e38d5..11ed6245 100644 --- a/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteController.java +++ b/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteController.java @@ -22,6 +22,12 @@ public class SpecialNoteController { private final SpecialNoteService specialNoteService; + /** + * 견적 특이사항 정보 등록/수정 + * + * @param specialNoteRequest + * @throws Exception + */ @Operation(description = "견적 특이사항 정보를 등록/수정한다. (동기화)") @PostMapping("/special-note-save") @ResponseStatus(HttpStatus.OK) @@ -30,6 +36,12 @@ public class SpecialNoteController { specialNoteService.setSpecialNoteSave(specialNoteRequest); } + /** + * 견적 특이사항 ITEM 정보 등록/수정 + * + * @param specialNoteItemRequest + * @throws Exception + */ @Operation(description = "견적 특이사항 ITEM 정보를 등록/수정한다. (동기화)") @PostMapping("/special-note-item-save") @ResponseStatus(HttpStatus.OK) diff --git a/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteMapper.java b/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteMapper.java index 0874f10b..3d639892 100644 --- a/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteMapper.java +++ b/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteMapper.java @@ -7,8 +7,20 @@ import com.interplug.qcast.biz.specialNote.dto.SpecialNoteRequest; @Mapper public interface SpecialNoteMapper { + /** + * 견적 특이사항 저장 + * + * @param specialNoteRequest + * @throws Exception + */ void setSpecialNoteSave(SpecialNoteRequest specialNoteRequest) throws Exception; + /** + * 견적 특이사항 아이템 저장 + * + * @param specialNoteItemRequest + * @throws Exception + */ void setSpecialNoteItemSave(SpecialNoteItemRequest specialNoteItemRequest) throws Exception; } diff --git a/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteService.java b/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteService.java index f628295d..cdbfdfe2 100644 --- a/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteService.java +++ b/src/main/java/com/interplug/qcast/biz/specialNote/SpecialNoteService.java @@ -1,5 +1,6 @@ package com.interplug.qcast.biz.specialNote; +import java.util.List; import org.springframework.stereotype.Service; import com.interplug.qcast.biz.specialNote.dto.SpecialNoteItemRequest; import com.interplug.qcast.biz.specialNote.dto.SpecialNoteRequest; @@ -13,13 +14,60 @@ public class SpecialNoteService { private final SpecialNoteMapper specialNoteMapper; + /** + * 견적 특이사항 저장 + * + * @param specialNoteRequest + * @throws Exception + */ public void setSpecialNoteSave(SpecialNoteRequest specialNoteRequest) throws Exception { specialNoteMapper.setSpecialNoteSave(specialNoteRequest); } + /** + * 견적 특이사항 아이템 저장 + * + * @param specialNoteItemRequest + * @throws Exception + */ public void setSpecialNoteItemSave(SpecialNoteItemRequest specialNoteItemRequest) throws Exception { specialNoteMapper.setSpecialNoteItemSave(specialNoteItemRequest); } + /** + * 견적 특이사항 동기화 - Batch + * + * @param specialNoteList + * @throws Exception + */ + public void setSpecialNoteBatch(List specialNoteList) throws Exception { + // 견적 특이사항 동기화 + for (SpecialNoteRequest specialNoteRequest : specialNoteList) { + try { + specialNoteMapper.setSpecialNoteSave(specialNoteRequest); + } catch (Exception e) { + log.error(e.getMessage()); + } + } + } + + /** + * 견적 특이사항 아이템 동기화 - Batch + * + * @param specialNoteItemList + * @throws Exception + */ + public void setSpecialNoteItemBatch(List specialNoteItemList) + throws Exception { + // 견적 특이사항 아이템 동기화 + for (SpecialNoteItemRequest specialNoteItemRequest : specialNoteItemList) { + try { + specialNoteMapper.setSpecialNoteItemSave(specialNoteItemRequest); + } catch (Exception e) { + log.error(e.getMessage()); + } + } + } + } diff --git a/src/main/java/com/interplug/qcast/biz/specialNote/dto/SpecialNoteSyncResponse.java b/src/main/java/com/interplug/qcast/biz/specialNote/dto/SpecialNoteSyncResponse.java new file mode 100644 index 00000000..01ee06ad --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/specialNote/dto/SpecialNoteSyncResponse.java @@ -0,0 +1,22 @@ +package com.interplug.qcast.biz.specialNote.dto; + +import java.util.List; +import com.interplug.qcast.biz.displayItem.dto.DisplayItemRequest; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class SpecialNoteSyncResponse { + + @Schema(description = "견적 특이사항 목록") + private List sdOrderSpnList; + + @Schema(description = "견적 특이사항 아이템 목록") + private List sdOrderSpnItemList; + + @Schema(description = "노출 아이템 목록") + private List storeDispItemList; + +} diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index b1240a80..8542fa29 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -50,6 +50,7 @@ qsp: aes256.key: jpqcellQ123456!! auto.login.aes256.key: _autoL!! system-commonCode-batch-url: /api/system/commonCodeListData + master-special-note-disp-item-batch-url: /api/master/quotationDispItemInfo #File file: root.path: C:\\ diff --git a/src/main/resources/config/application-local.yml b/src/main/resources/config/application-local.yml index d4f4f6d1..7ed6345e 100644 --- a/src/main/resources/config/application-local.yml +++ b/src/main/resources/config/application-local.yml @@ -50,7 +50,7 @@ qsp: aes256.key: jpqcellQ123456!! auto.login.aes256.key: _autoL!! system-commonCode-batch-url: /api/system/commonCodeListData - + master-special-note-disp-item-batch-url: /api/master/quotationDispItemInfo #File file: root.path: C:\\ diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index 5e3b7ddc..c620bc40 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -50,7 +50,7 @@ qsp: aes256.key: jpqcellQ123456!! auto.login.aes256.key: _autoL!! system-commonCode-batch-url: /api/system/commonCodeListData - + master-special-note-disp-item-batch-url: /api/master/quotationDispItemInfo #File file: root.path: C:\\