Merge branches 'dev' and 'dev' of ssh://git.jetbrains.space/nalpari/q-cast-iii/qcast-api into dev
This commit is contained in:
commit
23272ffdc5
@ -1,8 +1,14 @@
|
|||||||
package com.interplug.qcast.batch.master;
|
package com.interplug.qcast.batch.master;
|
||||||
|
|
||||||
|
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 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;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.batch.core.Job;
|
import org.springframework.batch.core.Job;
|
||||||
import org.springframework.batch.core.JobExecution;
|
import org.springframework.batch.core.JobExecution;
|
||||||
import org.springframework.batch.core.JobExecutionListener;
|
import org.springframework.batch.core.JobExecutionListener;
|
||||||
@ -19,14 +25,6 @@ import org.springframework.context.annotation.Bean;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.http.HttpMethod;
|
import org.springframework.http.HttpMethod;
|
||||||
import org.springframework.transaction.PlatformTransactionManager;
|
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
|
@Configuration
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -35,51 +33,68 @@ public class SpecialNoteDispItemJobConfiguration implements JobExecutionListener
|
|||||||
private final InterfaceQsp interfaceQsp;
|
private final InterfaceQsp interfaceQsp;
|
||||||
|
|
||||||
private final SpecialNoteService specialNoteService;
|
private final SpecialNoteService specialNoteService;
|
||||||
private final DisplayItemService displayItemService;
|
|
||||||
|
|
||||||
@Value("${qsp.master-special-note-disp-item-batch-url}")
|
@Value("${qsp.master-special-note-disp-item-batch-url}")
|
||||||
private String qspMasterSpecialNoteDispItemBatchUrl;
|
private String qspMasterSpecialNoteDispItemBatchUrl;
|
||||||
|
|
||||||
private SpecialNoteSyncResponse SpecialNoteDispItemSyncResponse;
|
private SpecialNoteSyncResponse SpecialNoteDispItemSyncResponse;
|
||||||
|
|
||||||
public SpecialNoteDispItemJobConfiguration(InterfaceQsp interfaceQsp,
|
public SpecialNoteDispItemJobConfiguration(
|
||||||
SpecialNoteService specialNoteService, DisplayItemService displayItemService) {
|
InterfaceQsp interfaceQsp, SpecialNoteService specialNoteService) {
|
||||||
this.interfaceQsp = interfaceQsp;
|
this.interfaceQsp = interfaceQsp;
|
||||||
this.specialNoteService = specialNoteService;
|
this.specialNoteService = specialNoteService;
|
||||||
this.displayItemService = displayItemService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeJob(JobExecution jobExecution) {
|
public void beforeJob(JobExecution jobExecution) {
|
||||||
log.info("Job 시작: 초기화 메서드 호출 중...");
|
log.info("Job 시작: 초기화 메서드 호출 중...");
|
||||||
try {
|
try {
|
||||||
this.SpecialNoteDispItemSyncResponse = interfaceQsp.callApiData(HttpMethod.GET,
|
this.SpecialNoteDispItemSyncResponse =
|
||||||
qspMasterSpecialNoteDispItemBatchUrl, null, SpecialNoteSyncResponse.class);
|
interfaceQsp.callApiData(
|
||||||
log.info("API 호출 완료, 항목 수: {}",
|
HttpMethod.GET,
|
||||||
this.SpecialNoteDispItemSyncResponse.getSdOrderSpnList().size());
|
qspMasterSpecialNoteDispItemBatchUrl,
|
||||||
|
null,
|
||||||
|
SpecialNoteSyncResponse.class);
|
||||||
|
log.info(
|
||||||
|
"API 호출 완료, 항목 수: {}", this.SpecialNoteDispItemSyncResponse.getSdOrderSpnList().size());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("specialNoteDispItemSyncResponse 갱신 중 오류: {}", e.getMessage());
|
log.error("specialNoteDispItemSyncResponse 갱신 중 오류: {}", e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Job specialNoteDispItemAdditionalJob(JobRepository jobRepository, Step specialNoteStep,
|
public Job specialNoteDispItemAdditionalJob(
|
||||||
Step specialNoteItemStep, Step storeDispItemStep) {
|
JobRepository jobRepository, Step specialNoteStep, Step specialNoteItemStep) {
|
||||||
return new JobBuilder("specialNoteDispItemAdditionalJob", jobRepository).start(specialNoteStep)
|
return new JobBuilder("specialNoteDispItemAdditionalJob", jobRepository)
|
||||||
.next(specialNoteItemStep).next(storeDispItemStep).listener(this).build();
|
.start(specialNoteStep)
|
||||||
|
.next(specialNoteItemStep)
|
||||||
|
.listener(this)
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
private <T> Step buildStep(String stepName, JobRepository jobRepository,
|
private <T> Step buildStep(
|
||||||
PlatformTransactionManager transactionManager, ItemReader<T> reader, ItemWriter<T> writer) {
|
String stepName,
|
||||||
return new StepBuilder(stepName, jobRepository).<T, T>chunk(10, transactionManager)
|
JobRepository jobRepository,
|
||||||
.reader(reader).writer(writer).build();
|
PlatformTransactionManager transactionManager,
|
||||||
|
ItemReader<T> reader,
|
||||||
|
ItemWriter<T> writer) {
|
||||||
|
return new StepBuilder(stepName, jobRepository)
|
||||||
|
.<T, T>chunk(10, transactionManager)
|
||||||
|
.reader(reader)
|
||||||
|
.writer(writer)
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Step specialNoteStep(JobRepository jobRepository,
|
public Step specialNoteStep(
|
||||||
PlatformTransactionManager transactionManager) {
|
JobRepository jobRepository, PlatformTransactionManager transactionManager) {
|
||||||
return buildStep("specialNoteStep", jobRepository, transactionManager, specialNoteListReader(),
|
return buildStep(
|
||||||
createWriter((items) -> {
|
"specialNoteStep",
|
||||||
|
jobRepository,
|
||||||
|
transactionManager,
|
||||||
|
specialNoteListReader(),
|
||||||
|
createWriter(
|
||||||
|
(items) -> {
|
||||||
try {
|
try {
|
||||||
log.debug("Special Note batch processing {} items", items.size());
|
log.debug("Special Note batch processing {} items", items.size());
|
||||||
specialNoteService.setSpecialNoteBatch(items);
|
specialNoteService.setSpecialNoteBatch(items);
|
||||||
@ -88,14 +103,20 @@ public class SpecialNoteDispItemJobConfiguration implements JobExecutionListener
|
|||||||
log.error("Error processing Special Note batch: {}", e.getMessage(), e);
|
log.error("Error processing Special Note batch: {}", e.getMessage(), e);
|
||||||
throw new RuntimeException("Failed to process Special Note batch", e);
|
throw new RuntimeException("Failed to process Special Note batch", e);
|
||||||
}
|
}
|
||||||
}, "specialNote"));
|
},
|
||||||
|
"specialNote"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Step specialNoteItemStep(JobRepository jobRepository,
|
public Step specialNoteItemStep(
|
||||||
PlatformTransactionManager transactionManager) {
|
JobRepository jobRepository, PlatformTransactionManager transactionManager) {
|
||||||
return buildStep("specialNoteItemStep", jobRepository, transactionManager,
|
return buildStep(
|
||||||
specialNoteItemListReader(), createWriter((items) -> {
|
"specialNoteItemStep",
|
||||||
|
jobRepository,
|
||||||
|
transactionManager,
|
||||||
|
specialNoteItemListReader(),
|
||||||
|
createWriter(
|
||||||
|
(items) -> {
|
||||||
try {
|
try {
|
||||||
log.debug("Special Note Item batch processing {} items", items.size());
|
log.debug("Special Note Item batch processing {} items", items.size());
|
||||||
specialNoteService.setSpecialNoteItemBatch(items);
|
specialNoteService.setSpecialNoteItemBatch(items);
|
||||||
@ -104,23 +125,8 @@ public class SpecialNoteDispItemJobConfiguration implements JobExecutionListener
|
|||||||
log.error("Error processing Special Note Item batch: {}", e.getMessage(), e);
|
log.error("Error processing Special Note Item batch: {}", e.getMessage(), e);
|
||||||
throw new RuntimeException("Failed to process Special Note Item batch", e);
|
throw new RuntimeException("Failed to process Special Note Item batch", e);
|
||||||
}
|
}
|
||||||
}, "specialNoteItem"));
|
},
|
||||||
}
|
"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 <T> ListItemReader<T> createReader(List<T> items, String readerName) {
|
private <T> ListItemReader<T> createReader(List<T> items, String readerName) {
|
||||||
@ -131,25 +137,21 @@ public class SpecialNoteDispItemJobConfiguration implements JobExecutionListener
|
|||||||
@Bean
|
@Bean
|
||||||
@StepScope
|
@StepScope
|
||||||
public ListItemReader<SpecialNoteRequest> specialNoteListReader() {
|
public ListItemReader<SpecialNoteRequest> specialNoteListReader() {
|
||||||
return createReader(SpecialNoteDispItemSyncResponse != null
|
return createReader(
|
||||||
|
SpecialNoteDispItemSyncResponse != null
|
||||||
? SpecialNoteDispItemSyncResponse.getSdOrderSpnList()
|
? SpecialNoteDispItemSyncResponse.getSdOrderSpnList()
|
||||||
: null, "specialNote");
|
: null,
|
||||||
|
"specialNote");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@StepScope
|
@StepScope
|
||||||
public ListItemReader<SpecialNoteItemRequest> specialNoteItemListReader() {
|
public ListItemReader<SpecialNoteItemRequest> specialNoteItemListReader() {
|
||||||
return createReader(SpecialNoteDispItemSyncResponse != null
|
return createReader(
|
||||||
|
SpecialNoteDispItemSyncResponse != null
|
||||||
? SpecialNoteDispItemSyncResponse.getSdOrderSpnItemList()
|
? SpecialNoteDispItemSyncResponse.getSdOrderSpnItemList()
|
||||||
: null, "specialNoteItem");
|
: null,
|
||||||
}
|
"specialNoteItem");
|
||||||
|
|
||||||
@Bean
|
|
||||||
@StepScope
|
|
||||||
public ListItemReader<DisplayItemRequest> storeDispItemListReader() {
|
|
||||||
return createReader(SpecialNoteDispItemSyncResponse != null
|
|
||||||
? SpecialNoteDispItemSyncResponse.getStoreDispItemList()
|
|
||||||
: null, "storeDispItem");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private <T> ItemWriter<T> createWriter(Consumer<List<T>> processor, String writerName) {
|
private <T> ItemWriter<T> createWriter(Consumer<List<T>> processor, String writerName) {
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package com.interplug.qcast.batch.master;
|
package com.interplug.qcast.batch.master;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.displayItem.DisplayItemService;
|
||||||
|
import com.interplug.qcast.biz.displayItem.dto.DisplayItemRequest;
|
||||||
import com.interplug.qcast.biz.storeFavorite.StoreFavoriteService;
|
import com.interplug.qcast.biz.storeFavorite.StoreFavoriteService;
|
||||||
import com.interplug.qcast.biz.storeFavorite.dto.StoreFavoriteRequest;
|
import com.interplug.qcast.biz.storeFavorite.dto.StoreFavoriteRequest;
|
||||||
import com.interplug.qcast.biz.user.UserService;
|
import com.interplug.qcast.biz.user.UserService;
|
||||||
@ -32,6 +34,7 @@ public class StoreJobConfiguration implements JobExecutionListener {
|
|||||||
private final InterfaceQsp interfaceQsp;
|
private final InterfaceQsp interfaceQsp;
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
private final StoreFavoriteService storeFavService;
|
private final StoreFavoriteService storeFavService;
|
||||||
|
private final DisplayItemService displayItemService;
|
||||||
|
|
||||||
@Value("${qsp.master-store-batch-url}")
|
@Value("${qsp.master-store-batch-url}")
|
||||||
private String qspMasterStoreBatchUrl;
|
private String qspMasterStoreBatchUrl;
|
||||||
@ -39,10 +42,14 @@ public class StoreJobConfiguration implements JobExecutionListener {
|
|||||||
private StoreSyncResponse storeSyncResponse;
|
private StoreSyncResponse storeSyncResponse;
|
||||||
|
|
||||||
public StoreJobConfiguration(
|
public StoreJobConfiguration(
|
||||||
InterfaceQsp interfaceQsp, UserService userService, StoreFavoriteService storeFavService) {
|
InterfaceQsp interfaceQsp,
|
||||||
|
UserService userService,
|
||||||
|
StoreFavoriteService storeFavService,
|
||||||
|
DisplayItemService displayItemService) {
|
||||||
this.interfaceQsp = interfaceQsp;
|
this.interfaceQsp = interfaceQsp;
|
||||||
this.userService = userService;
|
this.userService = userService;
|
||||||
this.storeFavService = storeFavService;
|
this.storeFavService = storeFavService;
|
||||||
|
this.displayItemService = displayItemService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -60,11 +67,16 @@ public class StoreJobConfiguration implements JobExecutionListener {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Job storeAdditionalJob(
|
public Job storeAdditionalJob(
|
||||||
JobRepository jobRepository, Step storeStep, Step userStep, Step favoriteStep) {
|
JobRepository jobRepository,
|
||||||
|
Step storeStep,
|
||||||
|
Step userStep,
|
||||||
|
Step favoriteStep,
|
||||||
|
Step storeDispItemStep) {
|
||||||
return new JobBuilder("storeAdditionalJob", jobRepository)
|
return new JobBuilder("storeAdditionalJob", jobRepository)
|
||||||
.start(storeStep)
|
.start(storeStep)
|
||||||
.next(userStep)
|
.next(userStep)
|
||||||
.next(favoriteStep)
|
.next(favoriteStep)
|
||||||
|
.next(storeDispItemStep)
|
||||||
.listener(this)
|
.listener(this)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
@ -138,6 +150,28 @@ public class StoreJobConfiguration implements JobExecutionListener {
|
|||||||
"favorite"));
|
"favorite"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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 <T> ListItemReader<T> createReader(List<T> items, String readerName) {
|
private <T> ListItemReader<T> createReader(List<T> items, String readerName) {
|
||||||
log.info("{}Reader 호출됨...", readerName);
|
log.info("{}Reader 호출됨...", readerName);
|
||||||
return new ListItemReader<>(items != null ? items : Collections.emptyList());
|
return new ListItemReader<>(items != null ? items : Collections.emptyList());
|
||||||
@ -163,6 +197,14 @@ public class StoreJobConfiguration implements JobExecutionListener {
|
|||||||
storeSyncResponse != null ? storeSyncResponse.getStoreFavList() : null, "storeFav");
|
storeSyncResponse != null ? storeSyncResponse.getStoreFavList() : null, "storeFav");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@StepScope
|
||||||
|
public ListItemReader<DisplayItemRequest> storeDispItemListReader() {
|
||||||
|
return createReader(
|
||||||
|
storeSyncResponse != null ? storeSyncResponse.getStoreDispItemList() : null,
|
||||||
|
"storeDispItem");
|
||||||
|
}
|
||||||
|
|
||||||
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 {
|
||||||
|
|||||||
@ -17,43 +17,44 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
public class CanvasStatusController {
|
public class CanvasStatusController {
|
||||||
private final CanvasStatusService canvasStatusService;
|
private final CanvasStatusService canvasStatusService;
|
||||||
|
|
||||||
@Operation(description = "계정에 해당하는 전체 견적서를 조회 한다.")
|
@Operation(description = "사용자(userId)에 해당하는 전체 캔버스를 조회 한다.")
|
||||||
@GetMapping("/canvas-statuses/{userId}")
|
@GetMapping("/canvas-statuses/{userId}")
|
||||||
public List<CanvasStatusResponse> selectAllCanvasStatus(@PathVariable String userId) throws QcastException {
|
public List<CanvasStatusResponse> selectAllCanvasStatus(@PathVariable String userId)
|
||||||
|
throws QcastException {
|
||||||
return canvasStatusService.selectAllCanvasStatus(userId);
|
return canvasStatusService.selectAllCanvasStatus(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "견적서를 조회 한다.")
|
@Operation(description = "사용자(userId)와 물건번호(objectNo)에 해당하는 캔버스를 조회 한다.")
|
||||||
@GetMapping("/canvas-statuses/by-object/{objectNo}/{userId}")
|
@GetMapping("/canvas-statuses/by-object/{objectNo}/{userId}")
|
||||||
public List<CanvasStatusResponse> selectObjectNoCanvasStatus(@PathVariable String objectNo, @PathVariable String userId) throws QcastException {
|
public List<CanvasStatusResponse> selectObjectNoCanvasStatus(
|
||||||
|
@PathVariable String objectNo, @PathVariable String userId) throws QcastException {
|
||||||
return canvasStatusService.selectObjectNoCanvasStatus(objectNo, userId);
|
return canvasStatusService.selectObjectNoCanvasStatus(objectNo, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "견적서를 등록 한다.")
|
@Operation(description = "캔버스를 등록 한다.")
|
||||||
@PostMapping("/canvas-statuses")
|
@PostMapping("/canvas-statuses")
|
||||||
@ResponseStatus(HttpStatus.CREATED)
|
@ResponseStatus(HttpStatus.CREATED)
|
||||||
public Integer insertCanvasStatus(@RequestBody CanvasStatus cs) throws QcastException {
|
public Integer insertCanvasStatus(@RequestBody CanvasStatus cs) throws QcastException {
|
||||||
return canvasStatusService.insertCanvasStatus(cs);
|
return canvasStatusService.insertCanvasStatus(cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "견적서를 수정 한다.")
|
@Operation(description = "캔버스를 수정 한다.")
|
||||||
@PutMapping("/canvas-statuses")
|
@PutMapping("/canvas-statuses")
|
||||||
public void updateCanvasStatus(@RequestBody CanvasStatus cs) throws QcastException {
|
public void updateCanvasStatus(@RequestBody CanvasStatus cs) throws QcastException {
|
||||||
canvasStatusService.updateCanvasStatus(cs);
|
canvasStatusService.updateCanvasStatus(cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "견적서를 삭제 한다.")
|
@Operation(description = "물건번호(objectNo)에 해당하는캔버스를 삭제 한다.")
|
||||||
@DeleteMapping("/canvas-statuses/by-object/{objectNo}")
|
@DeleteMapping("/canvas-statuses/by-object/{objectNo}")
|
||||||
@ResponseStatus(HttpStatus.NO_CONTENT)
|
@ResponseStatus(HttpStatus.NO_CONTENT)
|
||||||
public void deleteObjectNoCanvasStatus(@PathVariable String objectNo) throws QcastException {
|
public void deleteObjectNoCanvasStatus(@PathVariable String objectNo) throws QcastException {
|
||||||
canvasStatusService.deleteObjectNoCanvasStatus(objectNo);
|
canvasStatusService.deleteObjectNoCanvasStatus(objectNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "견적서의 이미지(템플릿)를 삭제 한다.")
|
@Operation(description = "id에 해당하는 캔버스를 삭제 한다.")
|
||||||
@DeleteMapping("/canvas-statuses/by-id/{id}")
|
@DeleteMapping("/canvas-statuses/by-id/{id}")
|
||||||
@ResponseStatus(HttpStatus.NO_CONTENT)
|
@ResponseStatus(HttpStatus.NO_CONTENT)
|
||||||
public void deleteIdCanvasStatus(@PathVariable Integer id) throws QcastException {
|
public void deleteIdCanvasStatus(@PathVariable Integer id) throws QcastException {
|
||||||
canvasStatusService.deleteIdCanvasStatus(id);
|
canvasStatusService.deleteIdCanvasStatus(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,9 +2,7 @@ package com.interplug.qcast.biz.canvasStatus;
|
|||||||
|
|
||||||
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatus;
|
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatus;
|
||||||
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse;
|
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
@ -16,32 +14,30 @@ public interface CanvasStatusMapper {
|
|||||||
// imageName 생성(미사용)
|
// imageName 생성(미사용)
|
||||||
public CanvasStatus getCanvasStatusImageAdd(String objectNo);
|
public CanvasStatus getCanvasStatusImageAdd(String objectNo);
|
||||||
|
|
||||||
// 전체 견적서 조회
|
// 전체 캔버스 조회 by 사용자(userId)
|
||||||
public List<CanvasStatusResponse> selectAllCanvasStatus(String userId);
|
public List<CanvasStatusResponse> selectAllCanvasStatus(String userId);
|
||||||
|
|
||||||
// 견적서 조회(objectNo/userId)
|
// 캔버스 조회 by 물건번호(objectNo) && 사용자(userId)
|
||||||
public List<CanvasStatusResponse> selectObjectNoCanvasStatus(String objectNo, String userId);
|
public List<CanvasStatusResponse> selectObjectNoCanvasStatus(String objectNo, String userId);
|
||||||
|
|
||||||
// 견적서 조회(Max id)
|
// 캔버스 조회 by Max(id)
|
||||||
public List<CanvasStatusResponse> getMaxIdCanvasStatus(String objectNo, String userId);
|
public List<CanvasStatusResponse> getMaxIdCanvasStatus(String objectNo, String userId);
|
||||||
|
|
||||||
// 견적서 조회(id별)
|
// 캔버스 조회 by id
|
||||||
public List<CanvasStatusResponse> getIdCanvasStatus(Integer id);
|
public List<CanvasStatusResponse> getIdCanvasStatus(Integer id);
|
||||||
|
|
||||||
// 견적서 조회(objectNo)
|
// 캔버스 조회 by 물건번호(objectNo)
|
||||||
public List<CanvasStatusResponse> getObjectNoCanvasStatus(String objectNo);
|
public List<CanvasStatusResponse> getObjectNoCanvasStatus(String objectNo);
|
||||||
|
|
||||||
// 견적서 등록
|
// 캔버스 등록
|
||||||
public void insertCanvasStatus(CanvasStatus cs);
|
public void insertCanvasStatus(CanvasStatus cs);
|
||||||
|
|
||||||
// 견적서 수정
|
// 캔버스 수정
|
||||||
public void updateCanvasStatus(CanvasStatus cs);
|
public void updateCanvasStatus(CanvasStatus cs);
|
||||||
|
|
||||||
// 견적서 삭제
|
// 캔버스 삭제 by 물건번호(objectNo)
|
||||||
public void deleteObjectNoCanvasStatus(String objectNo);
|
public void deleteObjectNoCanvasStatus(String objectNo);
|
||||||
|
|
||||||
// 이미지(템플릿) 삭제
|
// 캔버스 삭제 by id
|
||||||
public void deleteIdCanvasStatus(Integer id);
|
public void deleteIdCanvasStatus(Integer id);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4,10 +4,8 @@ import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatus;
|
|||||||
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse;
|
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse;
|
||||||
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 lombok.RequiredArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -15,7 +13,7 @@ import org.springframework.stereotype.Service;
|
|||||||
public class CanvasStatusService {
|
public class CanvasStatusService {
|
||||||
private final CanvasStatusMapper canvasStatusMapper;
|
private final CanvasStatusMapper canvasStatusMapper;
|
||||||
|
|
||||||
// 전체 견적서 조회
|
// 사용자(userId)에 해당하는 전체 캔버스 조회
|
||||||
public List<CanvasStatusResponse> selectAllCanvasStatus(String userId) throws QcastException {
|
public List<CanvasStatusResponse> selectAllCanvasStatus(String userId) throws QcastException {
|
||||||
List<CanvasStatusResponse> result = null;
|
List<CanvasStatusResponse> result = null;
|
||||||
|
|
||||||
@ -28,11 +26,15 @@ public class CanvasStatusService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 견적서 조회(objectNo)
|
// 사용자(userId)와 물건번호(objectNo)에 해당하는 캔버스 조회
|
||||||
public List<CanvasStatusResponse> selectObjectNoCanvasStatus(String objectNo, String userId) throws QcastException {
|
public List<CanvasStatusResponse> selectObjectNoCanvasStatus(String objectNo, String userId)
|
||||||
|
throws QcastException {
|
||||||
List<CanvasStatusResponse> result = null;
|
List<CanvasStatusResponse> result = null;
|
||||||
|
|
||||||
if (objectNo != null && !objectNo.trim().isEmpty() && userId != null && !userId.trim().isEmpty()) {
|
if (objectNo != null
|
||||||
|
&& !objectNo.trim().isEmpty()
|
||||||
|
&& userId != null
|
||||||
|
&& !userId.trim().isEmpty()) {
|
||||||
result = canvasStatusMapper.selectObjectNoCanvasStatus(objectNo, userId);
|
result = canvasStatusMapper.selectObjectNoCanvasStatus(objectNo, userId);
|
||||||
} else {
|
} else {
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, "올바르지 않은 입력값입니다.");
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, "올바르지 않은 입력값입니다.");
|
||||||
@ -41,7 +43,7 @@ public class CanvasStatusService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 견적서 등록
|
// 캔버스 등록
|
||||||
public Integer insertCanvasStatus(CanvasStatus cs) throws QcastException {
|
public Integer insertCanvasStatus(CanvasStatus cs) throws QcastException {
|
||||||
|
|
||||||
Integer id = 0;
|
Integer id = 0;
|
||||||
@ -51,18 +53,19 @@ public class CanvasStatusService {
|
|||||||
canvasStatusMapper.insertCanvasStatus(cs);
|
canvasStatusMapper.insertCanvasStatus(cs);
|
||||||
|
|
||||||
// 데이터 저장 후 Max id 확인
|
// 데이터 저장 후 Max id 확인
|
||||||
List<CanvasStatusResponse> maxId = canvasStatusMapper.getMaxIdCanvasStatus(cs.getObjectNo(), cs.getUserId());
|
List<CanvasStatusResponse> maxId =
|
||||||
|
canvasStatusMapper.getMaxIdCanvasStatus(cs.getObjectNo(), cs.getUserId());
|
||||||
id = maxId.get(0).getId();
|
id = maxId.get(0).getId();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new QcastException (ErrorCode.INVALID_INPUT_VALUE ,"견적서 등록 중 오류 발생");
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, "캔버스 등록 중 오류 발생");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 생성된 id 반환
|
// 생성된 id 반환
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 견적서 수정
|
// 캔버스 수정
|
||||||
public void updateCanvasStatus(CanvasStatus cs) throws QcastException {
|
public void updateCanvasStatus(CanvasStatus cs) throws QcastException {
|
||||||
|
|
||||||
if (cs.getId() == null) {
|
if (cs.getId() == null) {
|
||||||
@ -76,12 +79,11 @@ public class CanvasStatusService {
|
|||||||
if (existingStatus.size() > 0) {
|
if (existingStatus.size() > 0) {
|
||||||
canvasStatusMapper.updateCanvasStatus(cs);
|
canvasStatusMapper.updateCanvasStatus(cs);
|
||||||
} else {
|
} else {
|
||||||
throw new QcastException (ErrorCode.NOT_FOUND ,"수정할 견적서가 존재하지 않습니다.");
|
throw new QcastException(ErrorCode.NOT_FOUND, "수정할 캔버스가 존재하지 않습니다.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
// 물건번호(objectNo)에 해당하는 캔버스 삭제
|
||||||
|
|
||||||
// 전체 견적서 삭제
|
|
||||||
public void deleteObjectNoCanvasStatus(String objectNo) throws QcastException {
|
public void deleteObjectNoCanvasStatus(String objectNo) throws QcastException {
|
||||||
|
|
||||||
if (objectNo == null || objectNo.trim().isEmpty()) {
|
if (objectNo == null || objectNo.trim().isEmpty()) {
|
||||||
@ -89,18 +91,18 @@ public class CanvasStatusService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 먼저 데이터가 존재하는지 확인
|
// 먼저 데이터가 존재하는지 확인
|
||||||
List<CanvasStatusResponse> existingStatus = canvasStatusMapper.getObjectNoCanvasStatus(objectNo);
|
List<CanvasStatusResponse> existingStatus =
|
||||||
|
canvasStatusMapper.getObjectNoCanvasStatus(objectNo);
|
||||||
|
|
||||||
// 데이터가 존재하지 않으면 수정하지 않고 예외를 던짐
|
// 데이터가 존재하지 않으면 수정하지 않고 예외를 던짐
|
||||||
if (existingStatus.size() > 0) {
|
if (existingStatus.size() > 0) {
|
||||||
canvasStatusMapper.deleteObjectNoCanvasStatus(objectNo);
|
canvasStatusMapper.deleteObjectNoCanvasStatus(objectNo);
|
||||||
} else {
|
} else {
|
||||||
throw new QcastException (ErrorCode.NOT_FOUND ,"삭제할 견적서가 존재하지 않습니다.");
|
throw new QcastException(ErrorCode.NOT_FOUND, "삭제할 캔버스가 존재하지 않습니다.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
// id에 해당하는 캔버스 삭제
|
||||||
|
|
||||||
// 이미지(템플릿) 삭제
|
|
||||||
public void deleteIdCanvasStatus(Integer id) throws QcastException {
|
public void deleteIdCanvasStatus(Integer id) throws QcastException {
|
||||||
|
|
||||||
if (id == null) {
|
if (id == null) {
|
||||||
@ -114,9 +116,7 @@ public class CanvasStatusService {
|
|||||||
if (existingStatus.size() > 0) {
|
if (existingStatus.size() > 0) {
|
||||||
canvasStatusMapper.deleteIdCanvasStatus(id);
|
canvasStatusMapper.deleteIdCanvasStatus(id);
|
||||||
} else {
|
} else {
|
||||||
throw new QcastException (ErrorCode.NOT_FOUND ,"삭제할 견적서가 존재하지 않습니다.");
|
throw new QcastException(ErrorCode.NOT_FOUND, "삭제할 캔버스가 존재하지 않습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ public class CanvasStatus {
|
|||||||
private Integer id; // PK ID
|
private Integer id; // PK ID
|
||||||
private String userId; // 사용자 ID
|
private String userId; // 사용자 ID
|
||||||
private String objectNo; // 견적서 번호
|
private String objectNo; // 견적서 번호
|
||||||
private String imageName; // 이미지명
|
private String planNo; // 플랜 번호
|
||||||
private String canvasStatus; // 캠버스 상태
|
private String canvasStatus; // 캠버스 상태
|
||||||
private String bgImageName; // 배경 이미지명
|
private String bgImageName; // 배경 이미지명
|
||||||
private String mapPositionAddress; // 배경 CAD 파일명
|
private String mapPositionAddress; // 배경 CAD 파일명
|
||||||
|
|||||||
@ -10,7 +10,7 @@ public class CanvasStatusResponse {
|
|||||||
private Integer id; // PK ID
|
private Integer id; // PK ID
|
||||||
private String userId; // 사용자 ID
|
private String userId; // 사용자 ID
|
||||||
private String objectNo; // 견적서 번호
|
private String objectNo; // 견적서 번호
|
||||||
private String imageName; // 이미지명
|
private String planNo; // 플랜 번호
|
||||||
private String canvasStatus; // 캠버스 상태
|
private String canvasStatus; // 캠버스 상태
|
||||||
private Date registDatetime; // 생성일시
|
private Date registDatetime; // 생성일시
|
||||||
private Date lastEditDatetime; // 수정일시
|
private Date lastEditDatetime; // 수정일시
|
||||||
|
|||||||
@ -0,0 +1,80 @@
|
|||||||
|
package com.interplug.qcast.biz.canvaspopupstatus;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus;
|
||||||
|
import com.interplug.qcast.config.Exception.ErrorCode;
|
||||||
|
import com.interplug.qcast.config.Exception.QcastException;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/v1/canvas-popup-status")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Tag(name = "CanvasPopupStatusController", description = "Canvas Popup Status 관련 API")
|
||||||
|
public class CanvasPopupStatusController {
|
||||||
|
|
||||||
|
private final CanvasPopupStatusService canvasPopupStatusService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 캔버스 팝업 상태를 조회한다.
|
||||||
|
*
|
||||||
|
* @param objectNo 물건정보 번호
|
||||||
|
* @param planNo plan 번호
|
||||||
|
* @param popupType 캔버스 팝업 단계
|
||||||
|
* @return 조회된 CanvasPopupStatus 객체
|
||||||
|
* @throws QcastException 조회된 데이터가 없을 경우 예외 발생
|
||||||
|
*/
|
||||||
|
@Operation(description = "캔버스 팝업 상태를 조회한다.")
|
||||||
|
@GetMapping
|
||||||
|
public CanvasPopupStatus getCanvasPopupStatus(
|
||||||
|
@RequestParam @Schema(description = "물건정보 번호") String objectNo,
|
||||||
|
@RequestParam @Schema(description = "plan 번호") Integer planNo,
|
||||||
|
@RequestParam @Schema(description = "캔버스 팝업 단계") String popupType)
|
||||||
|
throws QcastException {
|
||||||
|
if (objectNo == null
|
||||||
|
|| objectNo.trim().isEmpty()
|
||||||
|
|| planNo == null
|
||||||
|
|| popupType == null
|
||||||
|
|| popupType.trim().isEmpty()) {
|
||||||
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE);
|
||||||
|
}
|
||||||
|
return canvasPopupStatusService.selectCanvasPopupStatus(objectNo, planNo, popupType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 캔버스 팝업 상태를 저장 또는 수정한다.
|
||||||
|
*
|
||||||
|
* @param canvasPopupStatus 저장 또는 수정할 CanvasPopupStatus 객체
|
||||||
|
* @throws QcastException 저장 또는 수정 중 예외 발생 시
|
||||||
|
*/
|
||||||
|
@Operation(description = "캔버스 팝업 상태를 저장 또는 수정한다.")
|
||||||
|
@PostMapping
|
||||||
|
public void saveCanvasPopupStatus(@RequestBody CanvasPopupStatus canvasPopupStatus)
|
||||||
|
throws QcastException {
|
||||||
|
canvasPopupStatusService.saveCanvasPopupStatus(canvasPopupStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 캔버스 팝업 상태를 삭제한다. (미사용)
|
||||||
|
*
|
||||||
|
* @param canvasPopupStatus 삭제할 CanvasPopupStatus 객체
|
||||||
|
* @throws QcastException 삭제 중 예외 발생 시
|
||||||
|
*/
|
||||||
|
@Operation(description = "캔버스 팝업 상태를 삭제한다. (미사용)")
|
||||||
|
@DeleteMapping
|
||||||
|
@ResponseStatus(HttpStatus.NO_CONTENT)
|
||||||
|
public void deleteCanvasPopupStatus(@RequestBody CanvasPopupStatus canvasPopupStatus)
|
||||||
|
throws QcastException {
|
||||||
|
canvasPopupStatusService.deleteCanvasPopupStatus(canvasPopupStatus);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package com.interplug.qcast.biz.canvaspopupstatus;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface CanvasPopupStatusMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Canvas Popup Status 조회
|
||||||
|
*
|
||||||
|
* @param canvasPopupStatus 조회할 CanvasPopupStatus 객체
|
||||||
|
* @return 조회된 CanvasPopupStatus 객체
|
||||||
|
*/
|
||||||
|
public CanvasPopupStatus selectCanvasPopupStatus(CanvasPopupStatus canvasPopupStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Canvas Popup Status 생성
|
||||||
|
*
|
||||||
|
* @param canvasPopupStatus 생성할 CanvasPopupStatus 객체
|
||||||
|
*/
|
||||||
|
public void insertCanvasPopupStatus(CanvasPopupStatus canvasPopupStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Canvas Popup Status 수정
|
||||||
|
*
|
||||||
|
* @param canvasPopupStatus 수정할 CanvasPopupStatus 객체
|
||||||
|
*/
|
||||||
|
public void updateCanvasPopupStatus(CanvasPopupStatus canvasPopupStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Canvas Popup Status 삭제
|
||||||
|
*
|
||||||
|
* @param canvasPopupStatus 삭제할 CanvasPopupStatus 객체
|
||||||
|
*/
|
||||||
|
public void deleteCanvasPopupStatus(CanvasPopupStatus canvasPopupStatus);
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package com.interplug.qcast.biz.canvaspopupstatus;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus;
|
||||||
|
import com.interplug.qcast.config.Exception.ErrorCode;
|
||||||
|
import com.interplug.qcast.config.Exception.QcastException;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class CanvasPopupStatusService {
|
||||||
|
|
||||||
|
private final CanvasPopupStatusMapper canvasPopupStatusMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Canvas Popup Status 조회
|
||||||
|
*
|
||||||
|
* @param objectNo 조회할 object 번호
|
||||||
|
* @param planNo 조회할 plan 번호
|
||||||
|
* @param popupType 조회할 popup 타입
|
||||||
|
* @return 조회된 CanvasPopupStatus 객체
|
||||||
|
* @throws QcastException 조회된 데이터가 없을 경우 예외 발생
|
||||||
|
*/
|
||||||
|
public CanvasPopupStatus selectCanvasPopupStatus(
|
||||||
|
String objectNo, Integer planNo, String popupType) throws QcastException {
|
||||||
|
CanvasPopupStatus request =
|
||||||
|
CanvasPopupStatus.builder().objectNo(objectNo).planNo(planNo).popupType(popupType).build();
|
||||||
|
CanvasPopupStatus cps = canvasPopupStatusMapper.selectCanvasPopupStatus(request);
|
||||||
|
if (cps == null) throw new QcastException(ErrorCode.NOT_FOUND);
|
||||||
|
return cps;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Canvas Popup Status 저장 - 이미 존재하는 데이터인 경우 수정, 없는 경우 생성
|
||||||
|
*
|
||||||
|
* @param cps 저장할 CanvasPopupStatus 객체
|
||||||
|
* @throws QcastException 저장 중 예외 발생 시
|
||||||
|
*/
|
||||||
|
public void saveCanvasPopupStatus(CanvasPopupStatus cps) throws QcastException {
|
||||||
|
CanvasPopupStatus chk = canvasPopupStatusMapper.selectCanvasPopupStatus(cps);
|
||||||
|
if (chk == null) {
|
||||||
|
createCanvasPopupStatus(cps);
|
||||||
|
} else {
|
||||||
|
updateCanvasPopupStatus(cps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Canvas Popup Status 생성
|
||||||
|
*
|
||||||
|
* @param cps 생성할 CanvasPopupStatus 객체
|
||||||
|
* @throws QcastException 생성 중 예외 발생 시
|
||||||
|
*/
|
||||||
|
public void createCanvasPopupStatus(CanvasPopupStatus cps) throws QcastException {
|
||||||
|
try {
|
||||||
|
canvasPopupStatusMapper.insertCanvasPopupStatus(cps);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Canvas Popup Status 수정
|
||||||
|
*
|
||||||
|
* @param cps 수정할 CanvasPopupStatus 객체
|
||||||
|
* @throws QcastException 수정 중 예외 발생 시
|
||||||
|
*/
|
||||||
|
public void updateCanvasPopupStatus(CanvasPopupStatus cps) throws QcastException {
|
||||||
|
try {
|
||||||
|
canvasPopupStatusMapper.updateCanvasPopupStatus(cps);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Canvas Popup Status 삭제
|
||||||
|
*
|
||||||
|
* @param cps 삭제할 CanvasPopupStatus 객체
|
||||||
|
* @throws QcastException 삭제 중 예외 발생 시
|
||||||
|
*/
|
||||||
|
public void deleteCanvasPopupStatus(CanvasPopupStatus cps) throws QcastException {
|
||||||
|
// 존재 유무 확인
|
||||||
|
selectCanvasPopupStatus(cps.getObjectNo(), cps.getPlanNo(), cps.getPopupType());
|
||||||
|
try {
|
||||||
|
canvasPopupStatusMapper.deleteCanvasPopupStatus(cps);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.interplug.qcast.biz.canvaspopupstatus.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Builder
|
||||||
|
@Schema(description = "캔버스 팝업 상태")
|
||||||
|
public class CanvasPopupStatus {
|
||||||
|
|
||||||
|
// @Schema(description = "id")
|
||||||
|
// private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "물건정보 번호")
|
||||||
|
private String objectNo;
|
||||||
|
|
||||||
|
@Schema(description = "plan 번호")
|
||||||
|
private Integer planNo;
|
||||||
|
|
||||||
|
@Schema(description = "캔버스 팝업 단계")
|
||||||
|
private String popupType;
|
||||||
|
|
||||||
|
@Schema(description = "캔버스 팝업 상태 데이터")
|
||||||
|
private String popupStatus;
|
||||||
|
}
|
||||||
@ -42,8 +42,8 @@ public class BoardController {
|
|||||||
@GetMapping("/file/download")
|
@GetMapping("/file/download")
|
||||||
@ResponseStatus(HttpStatus.OK)
|
@ResponseStatus(HttpStatus.OK)
|
||||||
public void getFileDownload(HttpServletResponse response,
|
public void getFileDownload(HttpServletResponse response,
|
||||||
@RequestParam(required = true) String encodeFileNo) throws Exception {
|
@RequestParam(required = true) String keyNo, @RequestParam String zipYn) throws Exception {
|
||||||
boardService.getFileDownload(response, encodeFileNo);
|
boardService.getFileDownload(response, keyNo, zipYn);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,9 @@ public class BoardService {
|
|||||||
.queryParam("schNoticeTpCd", boardRequest.getSchNoticeTpCd())
|
.queryParam("schNoticeTpCd", boardRequest.getSchNoticeTpCd())
|
||||||
.queryParam("schNoticeClsCd", boardRequest.getSchNoticeClsCd())
|
.queryParam("schNoticeClsCd", boardRequest.getSchNoticeClsCd())
|
||||||
.queryParam("startRow", boardRequest.getStartRow())
|
.queryParam("startRow", boardRequest.getStartRow())
|
||||||
.queryParam("endRow", boardRequest.getEndRow()).build().toUriString();
|
.queryParam("endRow", boardRequest.getEndRow())
|
||||||
|
.queryParam("schMainYn", boardRequest.getSchMainYn()).build().toUriString();
|
||||||
|
|
||||||
|
|
||||||
/* [2]. QSP API CALL -> Response */
|
/* [2]. QSP API CALL -> Response */
|
||||||
String strResponse = interfaceQsp.callApi(HttpMethod.GET, apiUrl, null);
|
String strResponse = interfaceQsp.callApi(HttpMethod.GET, apiUrl, null);
|
||||||
@ -135,17 +137,24 @@ public class BoardService {
|
|||||||
* @param encodeFileNo
|
* @param encodeFileNo
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void getFileDownload(HttpServletResponse response, String encodeFileNo) throws Exception {
|
public void getFileDownload(HttpServletResponse response, String keyNo, String zipYn)
|
||||||
|
throws Exception {
|
||||||
|
|
||||||
/* [0]. Validation Check */
|
/* [0]. Validation Check */
|
||||||
if ("".equals(encodeFileNo)) {
|
if ("".equals(keyNo)) {
|
||||||
// [msg] {0} is required input value.
|
// [msg] {0} is required input value.
|
||||||
|
String arg = "Y".equals(zipYn) ? "Notice No" : "File No";
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE,
|
||||||
message.getMessage("common.message.required.data", "File No"));
|
message.getMessage("common.message.required.data", arg));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* [1]. QSP API (url + fileNo) Setting */
|
/* [1]. QSP API (url + fileNo) Setting */
|
||||||
String url = QSP_API_URL + "/api/file/downloadFile" + "?encodeFileNo=" + encodeFileNo;
|
String url = QSP_API_URL + "/api/file/downloadFile";
|
||||||
|
if ("Y".equals(zipYn)) {
|
||||||
|
url += "?noticeNo=" + keyNo;
|
||||||
|
} else {
|
||||||
|
url += "?fileNo=" + keyNo;
|
||||||
|
}
|
||||||
|
|
||||||
/* [2]. QSP API CALL -> Response */
|
/* [2]. QSP API CALL -> Response */
|
||||||
Map<String, String> result = new HashMap<String, String>();
|
Map<String, String> result = new HashMap<String, String>();
|
||||||
@ -154,6 +163,7 @@ public class BoardService {
|
|||||||
if (byteResponse != null && byteResponse.length > 0) {
|
if (byteResponse != null && byteResponse.length > 0) {
|
||||||
try {
|
try {
|
||||||
/* [3]. API 응답 파일 처리 */
|
/* [3]. API 응답 파일 처리 */
|
||||||
|
response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||||
response.setContentType(
|
response.setContentType(
|
||||||
!"".equals(result.get("type")) && result.get("type") != null ? result.get("type")
|
!"".equals(result.get("type")) && result.get("type") != null ? result.get("type")
|
||||||
: "application/octet-stream");
|
: "application/octet-stream");
|
||||||
|
|||||||
@ -25,4 +25,7 @@ public class BoardRequest {
|
|||||||
/** 종료 행 */
|
/** 종료 행 */
|
||||||
private int endRow;
|
private int endRow;
|
||||||
|
|
||||||
|
/** 메인여부 */
|
||||||
|
private String schMainYn;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,13 +72,13 @@ public interface EstimateMapper {
|
|||||||
// 견적서 API 정보 수정
|
// 견적서 API 정보 수정
|
||||||
public int updateEstimateApi(EstimateRequest estimateRequest);
|
public int updateEstimateApi(EstimateRequest estimateRequest);
|
||||||
|
|
||||||
// 견적서 지붕재 등록
|
// 견적서 지붕면 등록
|
||||||
public int insertEstimateRoof(RoofRequest roofRequest);
|
public int insertEstimateRoof(RoofRequest roofRequest);
|
||||||
|
|
||||||
// 견적서 지붕재 아이템 등록
|
// 견적서 지붕면 아이템 등록
|
||||||
public int insertEstimateRoofItem(ItemRequest itemRequest);
|
public int insertEstimateRoofItem(ItemRequest itemRequest);
|
||||||
|
|
||||||
// 견적서 지붕재 회로구성 아이템 등록
|
// 견적서 지붕면 회로구성 아이템 등록
|
||||||
public int insertEstimateCircuitItem(ItemRequest itemRequest);
|
public int insertEstimateCircuitItem(ItemRequest itemRequest);
|
||||||
|
|
||||||
// 견적서 도면 아이템 등록
|
// 견적서 도면 아이템 등록
|
||||||
@ -108,6 +108,15 @@ public interface EstimateMapper {
|
|||||||
// 견적서 복사
|
// 견적서 복사
|
||||||
public int insertEstimateCopy(EstimateCopyRequest estimateCopyRequest);
|
public int insertEstimateCopy(EstimateCopyRequest estimateCopyRequest);
|
||||||
|
|
||||||
|
// 견적서 지붕면 복사
|
||||||
|
public int insertEstimateRoofCopy(EstimateCopyRequest estimateCopyRequest);
|
||||||
|
|
||||||
|
// 견적서 지붕면 아이템 복사
|
||||||
|
public int insertEstimateRoofItemCopy(EstimateCopyRequest estimateCopyRequest);
|
||||||
|
|
||||||
|
// 견적서 지붕면 회로구성 아이템 복사
|
||||||
|
public int insertEstimateCircuitItemCopy(EstimateCopyRequest estimateCopyRequest);
|
||||||
|
|
||||||
// 견적서 도면 아이템 복사
|
// 견적서 도면 아이템 복사
|
||||||
public int insertEstimateDrawingItemCopy(EstimateCopyRequest estimateCopyRequest);
|
public int insertEstimateDrawingItemCopy(EstimateCopyRequest estimateCopyRequest);
|
||||||
|
|
||||||
|
|||||||
@ -300,7 +300,7 @@ public class EstimateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// [2]. 지붕재 관련 데이터 셋팅
|
// [2]. 지붕재 관련 데이터 셋팅
|
||||||
roofList = estimateRequest.getRoofList();
|
roofList = estimateRequest.getRoofSurfaceList();
|
||||||
|
|
||||||
// 지붕재 시공사양 ID
|
// 지붕재 시공사양 ID
|
||||||
String constructSpecifications = "";
|
String constructSpecifications = "";
|
||||||
@ -576,7 +576,7 @@ public class EstimateService {
|
|||||||
: "UNIT_PRICE");
|
: "UNIT_PRICE");
|
||||||
estimateMapper.updateEstimate(estimateRequest);
|
estimateMapper.updateEstimate(estimateRequest);
|
||||||
|
|
||||||
// 도면 작성일 경우에만 지붕재, 도면 아이템 데이터 초기화 후 저장
|
// 도면 작성일 경우에만 지붕면, 도면 아이템 데이터 초기화 후 저장
|
||||||
if ("1".equals(estimateRequest.getDrawingFlg())) {
|
if ("1".equals(estimateRequest.getDrawingFlg())) {
|
||||||
// 견적서 지붕면/아이템 및 PC 회로구성도 제거
|
// 견적서 지붕면/아이템 및 PC 회로구성도 제거
|
||||||
estimateMapper.deleteEstimateRoofList(estimateRequest);
|
estimateMapper.deleteEstimateRoofList(estimateRequest);
|
||||||
@ -591,11 +591,32 @@ public class EstimateService {
|
|||||||
|
|
||||||
estimateMapper.insertEstimateRoof(roofRequest);
|
estimateMapper.insertEstimateRoof(roofRequest);
|
||||||
|
|
||||||
List<ItemRequest> roofItemList = roofRequest.getRoofItemList();
|
List<ItemRequest> moduleList = roofRequest.getModuleList();
|
||||||
|
List<ItemRequest> roofItemList = new ArrayList<ItemRequest>();
|
||||||
|
|
||||||
|
// 동일 모듈, PCS 아이템 묶기
|
||||||
|
for (ItemRequest itemRequest : moduleList) {
|
||||||
|
boolean overLap = false;
|
||||||
|
for (ItemRequest data : roofItemList) {
|
||||||
|
if (itemRequest.getItemId().equals(data.getItemId())
|
||||||
|
&& itemRequest.getPcItemId().equals(data.getPcItemId())) {
|
||||||
|
data.setAmount(
|
||||||
|
String.valueOf(Integer.parseInt(data.getAmount()) + 1)); // 데이터 존재하면 카운팅 + 1
|
||||||
|
overLap = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!overLap) {
|
||||||
|
itemRequest.setAmount("1");
|
||||||
|
roofItemList.add(itemRequest);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (ItemRequest itemRequest : roofItemList) {
|
for (ItemRequest itemRequest : roofItemList) {
|
||||||
|
itemRequest.setRoofSurfaceId(roofRequest.getRoofSurfaceId());
|
||||||
itemRequest.setObjectNo(estimateRequest.getObjectNo());
|
itemRequest.setObjectNo(estimateRequest.getObjectNo());
|
||||||
itemRequest.setPlanNo(estimateRequest.getPlanNo());
|
itemRequest.setPlanNo(estimateRequest.getPlanNo());
|
||||||
itemRequest.setRoofNo(roofRequest.getRoofNo());
|
|
||||||
|
|
||||||
estimateMapper.insertEstimateRoofItem(itemRequest);
|
estimateMapper.insertEstimateRoofItem(itemRequest);
|
||||||
}
|
}
|
||||||
@ -692,6 +713,7 @@ public class EstimateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -811,64 +833,13 @@ public class EstimateService {
|
|||||||
estimateMapper.insertEstimateItem(itemRequest);
|
estimateMapper.insertEstimateItem(itemRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
// [6]. 견적서 지붕재 및 도면 초기 데이터 복사
|
// [6]. 견적서 지붕면 및 도면 초기 데이터 복사
|
||||||
List<RoofResponse> roofList = estimateMapper.selectEstimateRoofList(estimateRequest);
|
// 견적서 지붕면 복사
|
||||||
List<RoofResponse> roofItemList = estimateMapper.selectEstimateRoofItemList(estimateRequest);
|
estimateMapper.insertEstimateRoofCopy(estimateCopyRequest);
|
||||||
List<ItemResponse> circuitItemList =
|
// 견적서 지붕면 아이템 복사
|
||||||
estimateMapper.selectEstimateCircuitItemList(estimateRequest);
|
estimateMapper.insertEstimateRoofItemCopy(estimateCopyRequest);
|
||||||
|
// 견적서 지붕면 회로구성 아이템 복사
|
||||||
for (RoofResponse roofResponse : roofList) {
|
estimateMapper.insertEstimateCircuitItemCopy(estimateCopyRequest);
|
||||||
List<RoofResponse> roofItemList2 = new ArrayList<RoofResponse>();
|
|
||||||
|
|
||||||
// 현재 매칭되는 지붕재 아이템 축출
|
|
||||||
for (RoofResponse roofItemResponse : roofItemList) {
|
|
||||||
if (roofResponse.getRoofNo().equals(roofItemResponse.getRoofNo())) {
|
|
||||||
roofItemList2.add(roofItemResponse);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RoofRequest roofRequest = new RoofRequest();
|
|
||||||
roofRequest.setObjectNo(estimateCopyRequest.getCopyObjectNo());
|
|
||||||
roofRequest.setPlanNo(estimateCopyRequest.getCopyPlanNo());
|
|
||||||
roofRequest.setRoofSurface(roofResponse.getRoofSurface());
|
|
||||||
roofRequest.setRoofMaterialId(roofResponse.getRoofMaterialId());
|
|
||||||
roofRequest.setSupportMethodId(roofResponse.getSupportMethodId());
|
|
||||||
roofRequest.setConstructSpecification(roofResponse.getConstructSpecification());
|
|
||||||
roofRequest.setSlope(roofResponse.getSlope());
|
|
||||||
roofRequest.setAngle(roofResponse.getAngle());
|
|
||||||
roofRequest.setClassType(roofResponse.getClassType());
|
|
||||||
roofRequest.setAzimuth(roofResponse.getAzimuth());
|
|
||||||
roofRequest.setUserId(estimateCopyRequest.getUserId());
|
|
||||||
|
|
||||||
estimateMapper.insertEstimateRoof(roofRequest);
|
|
||||||
|
|
||||||
for (RoofResponse roofItemResponse : roofItemList2) {
|
|
||||||
ItemRequest itemRequest = new ItemRequest();
|
|
||||||
itemRequest.setRoofNo(roofRequest.getRoofNo());
|
|
||||||
itemRequest.setObjectNo(estimateCopyRequest.getCopyObjectNo());
|
|
||||||
itemRequest.setPlanNo(estimateCopyRequest.getCopyPlanNo());
|
|
||||||
itemRequest.setItemId(roofItemResponse.getItemId());
|
|
||||||
itemRequest.setItemNo(roofItemResponse.getItemNo());
|
|
||||||
itemRequest.setItemName(roofItemResponse.getItemName());
|
|
||||||
itemRequest.setSpecification(roofItemResponse.getSpecification());
|
|
||||||
itemRequest.setAmount(roofItemResponse.getAmount());
|
|
||||||
itemRequest.setPcItemId(roofItemResponse.getPcItemId());
|
|
||||||
|
|
||||||
estimateMapper.insertEstimateRoofItem(itemRequest);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ItemResponse itemResponse : circuitItemList) {
|
|
||||||
ItemRequest circuitItemRequest = new ItemRequest();
|
|
||||||
|
|
||||||
circuitItemRequest.setObjectNo(estimateCopyRequest.getCopyObjectNo());
|
|
||||||
circuitItemRequest.setPlanNo(estimateCopyRequest.getCopyPlanNo());
|
|
||||||
circuitItemRequest.setItemId(itemResponse.getItemId());
|
|
||||||
circuitItemRequest.setCircuitCfg(itemResponse.getCircuitCfg());
|
|
||||||
|
|
||||||
estimateMapper.insertEstimateCircuitItem(circuitItemRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 도면 초기 데이타 복사(초기화 위해 필요)
|
// 도면 초기 데이타 복사(초기화 위해 필요)
|
||||||
estimateMapper.insertEstimateDrawingItemCopy(estimateCopyRequest);
|
estimateMapper.insertEstimateDrawingItemCopy(estimateCopyRequest);
|
||||||
|
|
||||||
@ -966,7 +937,6 @@ public class EstimateService {
|
|||||||
String[] arrItemId = new String[itemList.size()];
|
String[] arrItemId = new String[itemList.size()];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (ItemRequest itemRequest : itemList) {
|
for (ItemRequest itemRequest : itemList) {
|
||||||
System.out.println(">>>>>>>>>>>>>>>>" + itemRequest.getItemId());
|
|
||||||
arrItemId[i++] = itemRequest.getItemId();
|
arrItemId[i++] = itemRequest.getItemId();
|
||||||
}
|
}
|
||||||
estimateRequest.setArrItemId(arrItemId);
|
estimateRequest.setArrItemId(arrItemId);
|
||||||
@ -1256,12 +1226,6 @@ public class EstimateService {
|
|||||||
HttpServletRequest request, HttpServletResponse response, EstimateRequest estimateRequest)
|
HttpServletRequest request, HttpServletResponse response, EstimateRequest estimateRequest)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
// file Name 명이 없는경우
|
|
||||||
if (estimateRequest.getFileName() == null || "".equals(estimateRequest.getFileName())) {
|
|
||||||
estimateRequest.setFileName(
|
|
||||||
"Quation_Detail_" + new SimpleDateFormat("yyyyMMdd").format(new Date()));
|
|
||||||
}
|
|
||||||
|
|
||||||
EstimateResponse estimateResponse = new EstimateResponse();
|
EstimateResponse estimateResponse = new EstimateResponse();
|
||||||
String splitStr = "、";
|
String splitStr = "、";
|
||||||
|
|
||||||
@ -1269,6 +1233,16 @@ public class EstimateService {
|
|||||||
// 견적서 상세 조회
|
// 견적서 상세 조회
|
||||||
estimateResponse = estimateMapper.selectEstimatePdfDetail(estimateRequest);
|
estimateResponse = estimateMapper.selectEstimatePdfDetail(estimateRequest);
|
||||||
|
|
||||||
|
// file Name 명이 없는경우
|
||||||
|
if (estimateRequest.getFileName() == null || "".equals(estimateRequest.getFileName())) {
|
||||||
|
estimateRequest.setFileName(
|
||||||
|
estimateResponse.getObjectNo()
|
||||||
|
+ "_"
|
||||||
|
+ estimateResponse.getObjectName()
|
||||||
|
+ "_"
|
||||||
|
+ new SimpleDateFormat("yyyyMMdd").format(new Date()));
|
||||||
|
}
|
||||||
|
|
||||||
if ("1".equals(estimateRequest.getSchDisplayFlg())) {
|
if ("1".equals(estimateRequest.getSchDisplayFlg())) {
|
||||||
estimateResponse.setCustSaleStoreName(estimateResponse.getObjectName());
|
estimateResponse.setCustSaleStoreName(estimateResponse.getObjectName());
|
||||||
estimateResponse.setCustOmit(estimateResponse.getObjectNameOmit());
|
estimateResponse.setCustOmit(estimateResponse.getObjectNameOmit());
|
||||||
@ -1297,7 +1271,7 @@ public class EstimateService {
|
|||||||
estimateResponse.setNoteList(noteList);
|
estimateResponse.setNoteList(noteList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 지붕재 목록 조회
|
// 지붕면 목록 조회
|
||||||
RoofInfoResponse roofInfoResponse = new RoofInfoResponse();
|
RoofInfoResponse roofInfoResponse = new RoofInfoResponse();
|
||||||
List<RoofResponse> roofList = estimateMapper.selectEstimateRoofList(estimateRequest);
|
List<RoofResponse> roofList = estimateMapper.selectEstimateRoofList(estimateRequest);
|
||||||
List<ItemResponse> circuitItemList =
|
List<ItemResponse> circuitItemList =
|
||||||
@ -1741,6 +1715,9 @@ public class EstimateService {
|
|||||||
elm = doc.getElementById("objectName1");
|
elm = doc.getElementById("objectName1");
|
||||||
elm.text(StringUtils.defaultString(data.getObjectName()));
|
elm.text(StringUtils.defaultString(data.getObjectName()));
|
||||||
|
|
||||||
|
elm = doc.getElementById("objectNameOmit1");
|
||||||
|
elm.text(StringUtils.defaultString(data.getObjectNameOmit()));
|
||||||
|
|
||||||
elm = doc.getElementById("objectNo1");
|
elm = doc.getElementById("objectNo1");
|
||||||
elm.text(
|
elm.text(
|
||||||
StringUtils.defaultString(data.getObjectNo())
|
StringUtils.defaultString(data.getObjectNo())
|
||||||
|
|||||||
@ -193,9 +193,9 @@ public class EstimateRequest {
|
|||||||
|
|
||||||
// 데이터 목록 관련 정보
|
// 데이터 목록 관련 정보
|
||||||
@Schema(description = "지붕재 목록")
|
@Schema(description = "지붕재 목록")
|
||||||
List<RoofRequest> roofList;
|
List<RoofRequest> roofSurfaceList;
|
||||||
|
|
||||||
@Schema(description = "지붕재 목록")
|
@Schema(description = "PC 회로구성도 목록")
|
||||||
List<ItemRequest> circuitItemList;
|
List<ItemRequest> circuitItemList;
|
||||||
|
|
||||||
@Schema(description = "아이템 목록")
|
@Schema(description = "아이템 목록")
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public class ItemRequest {
|
|||||||
private String roofItemNo;
|
private String roofItemNo;
|
||||||
|
|
||||||
@Schema(description = "지붕재 번호")
|
@Schema(description = "지붕재 번호")
|
||||||
private String roofNo;
|
private String roofSurfaceId;
|
||||||
|
|
||||||
@Schema(description = "아이템 ID")
|
@Schema(description = "아이템 ID")
|
||||||
private String itemId;
|
private String itemId;
|
||||||
@ -80,6 +80,9 @@ public class ItemRequest {
|
|||||||
@Schema(description = "회로번호")
|
@Schema(description = "회로번호")
|
||||||
private String circuitNo;
|
private String circuitNo;
|
||||||
|
|
||||||
|
@Schema(description = "회로구성번호")
|
||||||
|
private String circuit;
|
||||||
|
|
||||||
@Schema(description = "회로구성도")
|
@Schema(description = "회로구성도")
|
||||||
private String circuitCfg;
|
private String circuitCfg;
|
||||||
|
|
||||||
|
|||||||
@ -15,8 +15,8 @@ public class RoofRequest {
|
|||||||
@Schema(description = "플랜번호")
|
@Schema(description = "플랜번호")
|
||||||
private String planNo;
|
private String planNo;
|
||||||
|
|
||||||
@Schema(description = "지붕재 번호")
|
@Schema(description = "지붕재 ID")
|
||||||
private String roofNo;
|
private String roofSurfaceId;
|
||||||
|
|
||||||
@Schema(description = "지붕면")
|
@Schema(description = "지붕면")
|
||||||
private String roofSurface;
|
private String roofSurface;
|
||||||
@ -58,5 +58,5 @@ public class RoofRequest {
|
|||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
@Schema(description = "아이템 목록")
|
@Schema(description = "아이템 목록")
|
||||||
List<ItemRequest> roofItemList;
|
List<ItemRequest> moduleList;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,8 +14,8 @@ public class RoofResponse {
|
|||||||
@Schema(description = "플랜번호")
|
@Schema(description = "플랜번호")
|
||||||
private String planNo;
|
private String planNo;
|
||||||
|
|
||||||
@Schema(description = "지붕재 번호")
|
@Schema(description = "지붕면 ID")
|
||||||
private String roofNo;
|
private String roofSurfaceId;
|
||||||
|
|
||||||
@Schema(description = "지붕면")
|
@Schema(description = "지붕면")
|
||||||
private String roofSurface;
|
private String roofSurface;
|
||||||
|
|||||||
@ -3,11 +3,12 @@ package com.interplug.qcast.biz.master;
|
|||||||
import com.interplug.qcast.biz.master.dto.*;
|
import com.interplug.qcast.biz.master.dto.*;
|
||||||
import com.interplug.qcast.biz.master.dto.construction.ApiConstructionResponse;
|
import com.interplug.qcast.biz.master.dto.construction.ApiConstructionResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.moduletype.ApiModuleTpResponse;
|
import com.interplug.qcast.biz.master.dto.moduletype.ApiModuleTpResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.autorecommend.ApiPcsAutoRecommendRequest;
|
import com.interplug.qcast.biz.master.dto.pcs.ApiPcsInfoRequest;
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.autorecommend.ApiPcsAutoRecommendResponse;
|
import com.interplug.qcast.biz.master.dto.pcs.autorecommend.ApiPcsAutoRecommendResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.maker.ApiPcsMakerResponse;
|
import com.interplug.qcast.biz.master.dto.pcs.maker.ApiPcsMakerResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.series.ApiPcsSeriesItemRequest;
|
import com.interplug.qcast.biz.master.dto.pcs.series.ApiPcsSeriesItemRequest;
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.series.ApiPcsSeriesItemResponse;
|
import com.interplug.qcast.biz.master.dto.pcs.series.ApiPcsSeriesItemResponse;
|
||||||
|
import com.interplug.qcast.biz.master.dto.pcs.voltagestepup.ApiPcsVoltageStepUpResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.quotation.ApiQuotationItemRequest;
|
import com.interplug.qcast.biz.master.dto.quotation.ApiQuotationItemRequest;
|
||||||
import com.interplug.qcast.biz.master.dto.quotation.ApiQuotationItemResponse;
|
import com.interplug.qcast.biz.master.dto.quotation.ApiQuotationItemResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.roofmaterial.ApiRoofMaterialResponse;
|
import com.interplug.qcast.biz.master.dto.roofmaterial.ApiRoofMaterialResponse;
|
||||||
@ -195,7 +196,8 @@ public class MasterController {
|
|||||||
req.getInclCd(),
|
req.getInclCd(),
|
||||||
req.getConstTp(),
|
req.getConstTp(),
|
||||||
req.getMixMatlNo(),
|
req.getMixMatlNo(),
|
||||||
req.getRoofPitch());
|
req.getRoofPitch(),
|
||||||
|
req.getWorkingWidth());
|
||||||
|
|
||||||
ApiTrestleDetailResponse data = response.getData();
|
ApiTrestleDetailResponse data = response.getData();
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
@ -225,13 +227,26 @@ public class MasterController {
|
|||||||
return masterService.getPcsSeriesItemList(pcsSeriesItemListRequest);
|
return masterService.getPcsSeriesItemList(pcsSeriesItemListRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "시리즈 중 자동으로 추천 PCS 정보 조회한다.")
|
@Operation(description = "시리즈 중 자동으로 추천 PCS 정보를 조회한다.")
|
||||||
@PostMapping("/getPcsAutoRecommendList")
|
@PostMapping("/getPcsAutoRecommendList")
|
||||||
public ApiResponse<ApiPcsAutoRecommendResponse> getPcsAutoRecommendList(
|
public ApiResponse<ApiPcsAutoRecommendResponse> getPcsAutoRecommendList(
|
||||||
@RequestBody ApiPcsAutoRecommendRequest autoRecommendRequest) {
|
@RequestBody ApiPcsInfoRequest autoRecommendRequest) {
|
||||||
return masterService.getPcsAutoRecommendList(autoRecommendRequest);
|
return masterService.getPcsAutoRecommendList(autoRecommendRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(description = "배치된 모듈을 선택한 PCS로 회로 구성 가능 여부 체크한다.")
|
||||||
|
@PostMapping("/getPcsVoltageChk")
|
||||||
|
public ApiResultResponse getPcsVoltageChk(@RequestBody ApiPcsInfoRequest pcsVoltageChkRequest) {
|
||||||
|
return masterService.getPcsVoltageChk(pcsVoltageChkRequest).getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "PCS 승압설정 정보를 조회한다.")
|
||||||
|
@PostMapping("/getPcsVoltageStepUpList")
|
||||||
|
public ApiResponse<ApiPcsVoltageStepUpResponse> getPcsVoltageStepUpList(
|
||||||
|
@RequestBody ApiPcsInfoRequest pcsVoltageStepUpRequest) {
|
||||||
|
return masterService.getPcsVoltageStepUpList(pcsVoltageStepUpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
/** remote api group : quotation */
|
/** remote api group : quotation */
|
||||||
@Operation(description = "견적서 아이템을 조회한다.")
|
@Operation(description = "견적서 아이템을 조회한다.")
|
||||||
@PostMapping("/getQuotationItem")
|
@PostMapping("/getQuotationItem")
|
||||||
|
|||||||
@ -1,13 +1,15 @@
|
|||||||
package com.interplug.qcast.biz.master;
|
package com.interplug.qcast.biz.master;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.interplug.qcast.biz.master.dto.*;
|
import com.interplug.qcast.biz.master.dto.*;
|
||||||
import com.interplug.qcast.biz.master.dto.construction.ApiConstructionResponse;
|
import com.interplug.qcast.biz.master.dto.construction.ApiConstructionResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.moduletype.ApiModuleTpResponse;
|
import com.interplug.qcast.biz.master.dto.moduletype.ApiModuleTpResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.autorecommend.ApiPcsAutoRecommendRequest;
|
import com.interplug.qcast.biz.master.dto.pcs.ApiPcsInfoRequest;
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.autorecommend.ApiPcsAutoRecommendResponse;
|
import com.interplug.qcast.biz.master.dto.pcs.autorecommend.ApiPcsAutoRecommendResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.maker.ApiPcsMakerResponse;
|
import com.interplug.qcast.biz.master.dto.pcs.maker.ApiPcsMakerResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.series.ApiPcsSeriesItemRequest;
|
import com.interplug.qcast.biz.master.dto.pcs.series.ApiPcsSeriesItemRequest;
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.series.ApiPcsSeriesItemResponse;
|
import com.interplug.qcast.biz.master.dto.pcs.series.ApiPcsSeriesItemResponse;
|
||||||
|
import com.interplug.qcast.biz.master.dto.pcs.voltagestepup.ApiPcsVoltageStepUpResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.roofmaterial.ApiRoofMaterialResponse;
|
import com.interplug.qcast.biz.master.dto.roofmaterial.ApiRoofMaterialResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.trestle.ApiTrestleResponse;
|
import com.interplug.qcast.biz.master.dto.trestle.ApiTrestleResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.trestle.detail.ApiTrestleDetailResponse;
|
import com.interplug.qcast.biz.master.dto.trestle.detail.ApiTrestleDetailResponse;
|
||||||
@ -72,7 +74,8 @@ public interface MasterService {
|
|||||||
@RequestParam String inclCd,
|
@RequestParam String inclCd,
|
||||||
@RequestParam String constTp,
|
@RequestParam String constTp,
|
||||||
@RequestParam(required = false) Integer mixMatlNo,
|
@RequestParam(required = false) Integer mixMatlNo,
|
||||||
@RequestParam(required = false) Integer roofPitch);
|
@RequestParam(required = false) Integer roofPitch,
|
||||||
|
@RequestParam(required = false) String workingWidth);
|
||||||
|
|
||||||
// PCS Maker, 시리즈 목록 조회
|
// PCS Maker, 시리즈 목록 조회
|
||||||
@GetMapping("/pcsMakerList")
|
@GetMapping("/pcsMakerList")
|
||||||
@ -88,5 +91,14 @@ public interface MasterService {
|
|||||||
// 시리즈 중 자동으로 추천 PCS 정보 조회
|
// 시리즈 중 자동으로 추천 PCS 정보 조회
|
||||||
@PostMapping("/pcsAutoRecommendList")
|
@PostMapping("/pcsAutoRecommendList")
|
||||||
public ApiResponse<ApiPcsAutoRecommendResponse> getPcsAutoRecommendList(
|
public ApiResponse<ApiPcsAutoRecommendResponse> getPcsAutoRecommendList(
|
||||||
@RequestBody ApiPcsAutoRecommendRequest req);
|
@RequestBody ApiPcsInfoRequest req);
|
||||||
|
|
||||||
|
// 배치된 모듈을 선택한 PCS로 회로 구성 가능 여부 체크
|
||||||
|
@PostMapping("/pcsVoltageChk")
|
||||||
|
public ApiResponse<JsonNode> getPcsVoltageChk(@RequestBody ApiPcsInfoRequest req);
|
||||||
|
|
||||||
|
// PCS 승압설정 정보 조회
|
||||||
|
@PostMapping("/pcsVoltageStepUpList")
|
||||||
|
public ApiResponse<ApiPcsVoltageStepUpResponse> getPcsVoltageStepUpList(
|
||||||
|
@RequestBody ApiPcsInfoRequest req);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.interplug.qcast.biz.master.dto.pcs.autorecommend;
|
package com.interplug.qcast.biz.master.dto.pcs;
|
||||||
|
|
||||||
import com.interplug.qcast.biz.master.dto.pcs.ApiPcsModuleItemRequest;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -9,8 +8,8 @@ import lombok.Setter;
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Schema(description = "시리즈 중 자동으로 추천 PCS 정보 조회 요청 객체")
|
@Schema(description = "PCS 정보 조회 요청 객체")
|
||||||
public class ApiPcsAutoRecommendRequest {
|
public class ApiPcsInfoRequest {
|
||||||
@Schema(description = "Max접속(과적)여부")
|
@Schema(description = "Max접속(과적)여부")
|
||||||
@NotNull
|
@NotNull
|
||||||
public String maxConnYn;
|
public String maxConnYn;
|
||||||
@ -29,9 +28,9 @@ public class ApiPcsAutoRecommendRequest {
|
|||||||
|
|
||||||
@Schema(description = "지붕면별 목록")
|
@Schema(description = "지붕면별 목록")
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<ApiPcsAutoRecommendRoofSurfaceRequest> roofSurfaceList;
|
public List<ApiPcsRoofSurfaceRequest> roofSurfaceList;
|
||||||
|
|
||||||
@Schema(description = "PCS아이템ID")
|
@Schema(description = "PCS아이템ID")
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<ApiPcsAutoRecommendPcsItemRequest> pcsItemList;
|
public List<ApiPcsItemRequest> pcsItemList;
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.interplug.qcast.biz.master.dto.pcs.autorecommend;
|
package com.interplug.qcast.biz.master.dto.pcs;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
@ -7,8 +7,8 @@ import lombok.Setter;
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Schema(description = "시리즈 중 자동으로 추천 PCS 정보 조회 PCS 아이템 요청 객체")
|
@Schema(description = "PCS 아이템 요청 객체")
|
||||||
public class ApiPcsAutoRecommendPcsItemRequest {
|
public class ApiPcsItemRequest {
|
||||||
@Schema(description = "PCS제품ID", maxLength = 20)
|
@Schema(description = "PCS제품ID", maxLength = 20)
|
||||||
@NotNull
|
@NotNull
|
||||||
private String itemId;
|
private String itemId;
|
||||||
@ -20,4 +20,7 @@ public class ApiPcsAutoRecommendPcsItemRequest {
|
|||||||
@Schema(description = "PCS시리즈코드", maxLength = 10)
|
@Schema(description = "PCS시리즈코드", maxLength = 10)
|
||||||
@NotNull
|
@NotNull
|
||||||
private String pcsSerCd;
|
private String pcsSerCd;
|
||||||
|
|
||||||
|
@Schema(description = "선택한직렬매수(적용직렬매수)", maxLength = 10)
|
||||||
|
private Integer applySerQty;
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.interplug.qcast.biz.master.dto.pcs.autorecommend;
|
package com.interplug.qcast.biz.master.dto.pcs;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
@ -8,7 +8,7 @@ import lombok.Setter;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Schema(description = "PCS 모듈아이템 ID 요청 객체")
|
@Schema(description = "PCS 모듈아이템 ID 요청 객체")
|
||||||
public class ApiPcsAutoRecommendModuleItemIdRequest {
|
public class ApiPcsModuleItemIdRequest {
|
||||||
@Schema(description = "제품ID", maxLength = 20)
|
@Schema(description = "제품ID", maxLength = 20)
|
||||||
@NotNull
|
@NotNull
|
||||||
private String itemId;
|
private String itemId;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.interplug.qcast.biz.master.dto.pcs.autorecommend;
|
package com.interplug.qcast.biz.master.dto.pcs;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
@ -8,8 +8,8 @@ import lombok.Setter;
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Schema(description = "시리즈 중 자동으로 추천 PCS 정보 조회 지붕면 요청 객체")
|
@Schema(description = "PCS 아이템 지붕면 요청 객체")
|
||||||
public class ApiPcsAutoRecommendRoofSurfaceRequest {
|
public class ApiPcsRoofSurfaceRequest {
|
||||||
@Schema(description = "지붕면ID")
|
@Schema(description = "지붕면ID")
|
||||||
@NotNull
|
@NotNull
|
||||||
private String roofSurfaceId;
|
private String roofSurfaceId;
|
||||||
@ -24,5 +24,5 @@ public class ApiPcsAutoRecommendRoofSurfaceRequest {
|
|||||||
|
|
||||||
@Schema(description = "모듈아이템 List(도면에 설치된 모듈)")
|
@Schema(description = "모듈아이템 List(도면에 설치된 모듈)")
|
||||||
@NotNull
|
@NotNull
|
||||||
private List<ApiPcsAutoRecommendModuleItemIdRequest> moduleList;
|
private List<ApiPcsModuleItemIdRequest> moduleList;
|
||||||
}
|
}
|
||||||
@ -47,6 +47,24 @@ public class ApiPcsSeriesItemResponse {
|
|||||||
@Schema(description = "회로수(최대병렬수)")
|
@Schema(description = "회로수(최대병렬수)")
|
||||||
public Integer paralMax;
|
public Integer paralMax;
|
||||||
|
|
||||||
|
@Schema(description = "최소직렬수")
|
||||||
|
public Integer serMinQty;
|
||||||
|
|
||||||
|
@Schema(description = "표준직렬수")
|
||||||
|
public Integer serMaxQty;
|
||||||
|
|
||||||
|
@Schema(description = "과적직렬수(표준이상)")
|
||||||
|
public Integer serStdMaxQty;
|
||||||
|
|
||||||
|
@Schema(description = "표준직렬수(표준-한랭지)")
|
||||||
|
public Integer serColdZoneMaxQty;
|
||||||
|
|
||||||
|
@Schema(description = "과적직렬수(표준이상-한랭지)")
|
||||||
|
public Integer serStdColdZoneMaxQty;
|
||||||
|
|
||||||
|
@Schema(description = "최소매수(모듈최소매수)")
|
||||||
|
public Integer moduleMinQty;
|
||||||
|
|
||||||
@Schema(description = "표준매수(모듈표준매수)")
|
@Schema(description = "표준매수(모듈표준매수)")
|
||||||
public String moduleStdQty;
|
public String moduleStdQty;
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,29 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto.pcs.voltagestepup;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Schema(description = "PCS 승압설정 정보 조회 연결함목록 응답 객체")
|
||||||
|
public class ApiPcsVoltageStepUpConnResponse {
|
||||||
|
|
||||||
|
@Schema(description = "제품ID", maxLength = 20)
|
||||||
|
private String itemId;
|
||||||
|
|
||||||
|
@Schema(description = "제품명", maxLength = 100)
|
||||||
|
private String itemNm;
|
||||||
|
|
||||||
|
@Schema(description = "제품명(Basic Material)", maxLength = 40)
|
||||||
|
private String goodsNo;
|
||||||
|
|
||||||
|
@Schema(description = "병렬수(회로수)", maxLength = 10)
|
||||||
|
private Integer connMaxParalCnt;
|
||||||
|
|
||||||
|
@Schema(description = "최대전력", maxLength = 10)
|
||||||
|
private Integer connAllowCur;
|
||||||
|
|
||||||
|
@Schema(description = "승압병렬수", maxLength = 10)
|
||||||
|
private Integer vStuParalCnt;
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto.pcs.voltagestepup;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Schema(description = "PCS 승압설정 정보 조회 옵션목록(모니터선택) 응답 객체")
|
||||||
|
public class ApiPcsVoltageStepUpOptionResponse {
|
||||||
|
|
||||||
|
@Schema(description = "PCS옵션코드", maxLength = 10)
|
||||||
|
private String pcsOptCd;
|
||||||
|
|
||||||
|
@Schema(description = "PCS옵션코드명", maxLength = 100)
|
||||||
|
private String pcsOptNm;
|
||||||
|
|
||||||
|
@Schema(description = "PCS옵션코드명(일본)", maxLength = 100)
|
||||||
|
private String pcsOptNmJp;
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto.pcs.voltagestepup;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Schema(description = "PCS 승압설정 정보 조회 PCS 아이템 응답 객체")
|
||||||
|
public class ApiPcsVoltageStepUpPcsItemResponse {
|
||||||
|
|
||||||
|
@Schema(description = "PCS메이커코드", maxLength = 10)
|
||||||
|
private String pcsMkrCd;
|
||||||
|
|
||||||
|
@Schema(description = "PCS시리즈코드", maxLength = 10)
|
||||||
|
private String pcsSerCd;
|
||||||
|
|
||||||
|
@Schema(description = "PCS 아이템 ID", maxLength = 20)
|
||||||
|
private String itemId;
|
||||||
|
|
||||||
|
@Schema(description = "PCS 제품명", maxLength = 100)
|
||||||
|
private String itemNm;
|
||||||
|
|
||||||
|
@Schema(description = "PCS 제품명(Basic Material)", maxLength = 40)
|
||||||
|
private String goodsNo;
|
||||||
|
|
||||||
|
@Schema(description = "PCS 회로구성정보(모듈수) - 발전시물레이션에서 사용", maxLength = 50)
|
||||||
|
private String circuitCfg;
|
||||||
|
|
||||||
|
@Schema(description = "직렬매수 목록")
|
||||||
|
private List<ApiPcsVoltageStepUpSerQtyResponse> serQtyList;
|
||||||
|
|
||||||
|
@Schema(description = "연결함목록")
|
||||||
|
private List<ApiPcsVoltageStepUpConnResponse> connList;
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto.pcs.voltagestepup;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Schema(description = "PCS 승압설정 정보 조회 응답 객체")
|
||||||
|
public class ApiPcsVoltageStepUpResponse {
|
||||||
|
|
||||||
|
@Schema(description = "PCS 아이템 목록")
|
||||||
|
private List<ApiPcsVoltageStepUpPcsItemResponse> pcsItemList;
|
||||||
|
|
||||||
|
@Schema(description = "옵션목록(모니터선택)")
|
||||||
|
private List<ApiPcsVoltageStepUpOptionResponse> optionList;
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto.pcs.voltagestepup;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Schema(description = "PCS 승압설정 정보 조회 모듈아이템 List(도면에 설치된 모듈) 응답 객체")
|
||||||
|
public class ApiPcsVoltageStepUpRoofSurfaceModuleResponse {
|
||||||
|
|
||||||
|
@Schema(description = "제품ID", maxLength = 20)
|
||||||
|
private String itemId;
|
||||||
|
|
||||||
|
@Schema(description = "회로구성번호((1-1,1-1,1-2,1-2,2-1,2-2.....))", maxLength = 10)
|
||||||
|
private String circuit;
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto.pcs.voltagestepup;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Schema(description = "PCS 승압설정 정보 조회 지붕면 응답 객체")
|
||||||
|
public class ApiPcsVoltageStepUpRoofSurfaceResponse {
|
||||||
|
|
||||||
|
@Schema(description = "지붕면ID", maxLength = 50)
|
||||||
|
private String roofSurfaceId;
|
||||||
|
|
||||||
|
@Schema(description = "지붕면방위(동,서,남,북,동남,서북 등등)", maxLength = 10)
|
||||||
|
private String roofSurface;
|
||||||
|
|
||||||
|
@Schema(description = "촌수(경사도)", maxLength = 10)
|
||||||
|
private Double roofSurfaceIncl;
|
||||||
|
|
||||||
|
@Schema(description = "모듈아이템 List(도면에 설치된 모듈)")
|
||||||
|
private List<ApiPcsVoltageStepUpRoofSurfaceModuleResponse> moduleList;
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto.pcs.voltagestepup;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Schema(description = "PCS 승압설정 정보 조회 직렬매수 응답 객체")
|
||||||
|
public class ApiPcsVoltageStepUpSerQtyResponse {
|
||||||
|
|
||||||
|
@Schema(description = "직렬매수", maxLength = 10)
|
||||||
|
private Integer serQty;
|
||||||
|
|
||||||
|
@Schema(description = "병렬수(회로수)", maxLength = 10)
|
||||||
|
private Integer paralQty;
|
||||||
|
|
||||||
|
@Schema(description = "추천여부", maxLength = 1)
|
||||||
|
private String rmdYn;
|
||||||
|
|
||||||
|
@Schema(description = "사용가능여부", maxLength = 1)
|
||||||
|
private String usePossYn;
|
||||||
|
|
||||||
|
@Schema(description = "지붕면 목록")
|
||||||
|
private List<ApiPcsVoltageStepUpRoofSurfaceResponse> roofSurfaceList;
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto.quotation;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Schema(description = "Api 견적서 아이템 조회 PCS 요청 객체")
|
||||||
|
public class ApiQuotationItemPcsRequest {
|
||||||
|
|
||||||
|
@Schema(description = "PCS메이커코드", maxLength = 10)
|
||||||
|
@NotNull
|
||||||
|
public String pcsMkrCd;
|
||||||
|
|
||||||
|
@Schema(description = "PCS시리즈코드", maxLength = 10)
|
||||||
|
@NotNull
|
||||||
|
public String pcsSerCd;
|
||||||
|
|
||||||
|
@Schema(description = "PCS 아이템ID", maxLength = 20)
|
||||||
|
@NotNull
|
||||||
|
public String pcsItemId;
|
||||||
|
|
||||||
|
@Schema(description = "PCS옵션코드", maxLength = 20)
|
||||||
|
@NotNull
|
||||||
|
public String pscOptCd;
|
||||||
|
|
||||||
|
@Schema(description = "병렬수(회로수)")
|
||||||
|
@NotNull
|
||||||
|
public Integer paralQty;
|
||||||
|
}
|
||||||
@ -143,4 +143,8 @@ public class ApiQuotationItemRequest {
|
|||||||
@Schema(description = "랙")
|
@Schema(description = "랙")
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<ApiQuotationItemRackRequest> racks;
|
public List<ApiQuotationItemRackRequest> racks;
|
||||||
|
|
||||||
|
@Schema(description = "PCS")
|
||||||
|
@NotNull
|
||||||
|
public List<ApiQuotationItemPcsRequest> pcses;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,4 +62,7 @@ public class ApiTrestleDetailRequest {
|
|||||||
|
|
||||||
@Schema(description = "지붕index 번호")
|
@Schema(description = "지붕index 번호")
|
||||||
private String roofIndex;
|
private String roofIndex;
|
||||||
|
|
||||||
|
@Schema(description = "작업폭")
|
||||||
|
private String workingWidth;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,6 +93,13 @@ public class ObjectController {
|
|||||||
return objectService.updateObject(objectRequest);
|
return objectService.updateObject(objectRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(description = "물건정보 갱신일을 수정한다.")
|
||||||
|
@PutMapping("/update-object-date")
|
||||||
|
@ResponseStatus(HttpStatus.CREATED)
|
||||||
|
public void updateObjectLastEditDate(@RequestBody ObjectRequest objectRequest) throws Exception {
|
||||||
|
objectService.updateObjectLastEditDate(objectRequest);
|
||||||
|
}
|
||||||
|
|
||||||
@Operation(description = "물건정보을 삭제한다.")
|
@Operation(description = "물건정보을 삭제한다.")
|
||||||
@DeleteMapping("/{objectNo}")
|
@DeleteMapping("/{objectNo}")
|
||||||
@ResponseStatus(HttpStatus.NO_CONTENT)
|
@ResponseStatus(HttpStatus.NO_CONTENT)
|
||||||
|
|||||||
@ -49,6 +49,9 @@ public interface ObjectMapper {
|
|||||||
// 물건정보 수정
|
// 물건정보 수정
|
||||||
public int updateObject(ObjectRequest objectRequest);
|
public int updateObject(ObjectRequest objectRequest);
|
||||||
|
|
||||||
|
// 물건정보 갱신일 수정
|
||||||
|
public int updateObjectLastEditDate(ObjectRequest objectRequest);
|
||||||
|
|
||||||
// 물건정보 삭제
|
// 물건정보 삭제
|
||||||
public int deleteObject(ObjectRequest objectRequest);
|
public int deleteObject(ObjectRequest objectRequest);
|
||||||
|
|
||||||
|
|||||||
@ -261,6 +261,7 @@ public class ObjectService {
|
|||||||
result += objectMapper.updateObjectDelivery(objectRequest);
|
result += objectMapper.updateObjectDelivery(objectRequest);
|
||||||
|
|
||||||
// 디폴트 Plan 등록
|
// 디폴트 Plan 등록
|
||||||
|
/*
|
||||||
PlanRequest planRequest = new PlanRequest();
|
PlanRequest planRequest = new PlanRequest();
|
||||||
planRequest.setObjectNo(objectNo);
|
planRequest.setObjectNo(objectNo);
|
||||||
planRequest.setRoofKindId("0");
|
planRequest.setRoofKindId("0");
|
||||||
@ -273,6 +274,7 @@ public class ObjectService {
|
|||||||
planRequest.setTempFlg("1");
|
planRequest.setTempFlg("1");
|
||||||
planRequest.setUserId(objectRequest.getUserId());
|
planRequest.setUserId(objectRequest.getUserId());
|
||||||
result += objectMapper.insertPlan(planRequest);
|
result += objectMapper.insertPlan(planRequest);
|
||||||
|
*/
|
||||||
|
|
||||||
// 플랜번호 존재 시 물건번호 업데이트
|
// 플랜번호 존재 시 물건번호 업데이트
|
||||||
if ("0".equals(objectRequest.getTempFlg())
|
if ("0".equals(objectRequest.getTempFlg())
|
||||||
@ -305,7 +307,6 @@ public class ObjectService {
|
|||||||
// 결과 데이터 리턴
|
// 결과 데이터 리턴
|
||||||
ObjectResponse objectResponse = new ObjectResponse();
|
ObjectResponse objectResponse = new ObjectResponse();
|
||||||
objectResponse.setObjectNo(objectNo);
|
objectResponse.setObjectNo(objectNo);
|
||||||
objectResponse.setPlanNo(planRequest.getPlanNo());
|
|
||||||
|
|
||||||
return objectResponse;
|
return objectResponse;
|
||||||
}
|
}
|
||||||
@ -398,6 +399,28 @@ public class ObjectService {
|
|||||||
return objectResponse;
|
return objectResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 물건정보 갱신일 수정
|
||||||
|
*
|
||||||
|
* @param objectRequest
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void updateObjectLastEditDate(ObjectRequest objectRequest) throws Exception {
|
||||||
|
// Validation
|
||||||
|
if (StringUtils.isEmpty(objectRequest.getObjectNo())) {
|
||||||
|
throw new QcastException(
|
||||||
|
ErrorCode.INVALID_INPUT_VALUE,
|
||||||
|
message.getMessage("common.message.required.data", "Object No"));
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// object 갱신일 수정
|
||||||
|
objectMapper.updateObjectLastEditDate(objectRequest);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 물건정보 삭제
|
* 물건정보 삭제
|
||||||
*
|
*
|
||||||
|
|||||||
@ -115,7 +115,7 @@ public class PwrGnrSimService {
|
|||||||
|
|
||||||
// 견적서의 지붕재 목록 조회
|
// 견적서의 지붕재 목록 조회
|
||||||
List<PwrGnrSimRoofResponse> roofList = pwrGnrSimMapper.selectRoofList(pwrGnrSimRequest);
|
List<PwrGnrSimRoofResponse> roofList = pwrGnrSimMapper.selectRoofList(pwrGnrSimRequest);
|
||||||
int roofLength = roofList.size(); // Set의 크기 = 고유 roofNo 개수
|
int roofLength = roofList.size(); // Set의 크기 = 고유 roofSurfaceId 개수
|
||||||
|
|
||||||
// 지붕재 정보가 없음.
|
// 지붕재 정보가 없음.
|
||||||
if (roofList == null || roofList.isEmpty()) {
|
if (roofList == null || roofList.isEmpty()) {
|
||||||
@ -123,44 +123,46 @@ public class PwrGnrSimService {
|
|||||||
return exceptionRes;
|
return exceptionRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 지붕재의 모든 모듈 Item 조회
|
// 지붕재의 모든 Group 모듈 Item 조회
|
||||||
pwrGnrSimRequest.setItemGroup("MODULE_");
|
pwrGnrSimRequest.setItemGroup("MODULE_");
|
||||||
List<PwrGnrSimRoofResponse> roofModuleList =
|
List<PwrGnrSimRoofResponse> roofGroupModuleList =
|
||||||
pwrGnrSimMapper.selectRoofItemList(pwrGnrSimRequest);
|
pwrGnrSimMapper.selectRoofItemList(pwrGnrSimRequest);
|
||||||
|
|
||||||
// 전체 모듈에서 모듈 그룹형태로 변경
|
// 전체 모듈에서 SORT 변경 (총용량 DESC)
|
||||||
List<PwrGnrSimRoofResponse> moduleGroupList =
|
List<PwrGnrSimRoofResponse> moduleGroupList =
|
||||||
roofModuleList.stream()
|
roofGroupModuleList.stream()
|
||||||
.collect(
|
|
||||||
Collectors.groupingBy(
|
|
||||||
PwrGnrSimRoofResponse::getItemId, // 첫 번째 그룹화 기준
|
|
||||||
Collectors.collectingAndThen(
|
|
||||||
Collectors.toList(),
|
|
||||||
list -> {
|
|
||||||
// 그룹화된 첫 번째 요소를 기반으로 새 객체 생성
|
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
|
||||||
PwrGnrSimRoofResponse setDto =
|
|
||||||
mapper.convertValue(list.get(0), PwrGnrSimRoofResponse.class);
|
|
||||||
|
|
||||||
// specification 합산
|
|
||||||
double totSpecification =
|
|
||||||
list.stream()
|
|
||||||
.mapToDouble(response -> response.getTotSpecification())
|
|
||||||
.sum();
|
|
||||||
|
|
||||||
totSpecification = totSpecification / 1000;
|
|
||||||
|
|
||||||
// 합산 결과 설정
|
|
||||||
setDto.setTotSpecification(totSpecification);
|
|
||||||
|
|
||||||
return setDto;
|
|
||||||
})))
|
|
||||||
.values()
|
|
||||||
.stream()
|
|
||||||
.sorted(
|
.sorted(
|
||||||
Comparator.comparingDouble(PwrGnrSimRoofResponse::getTotSpecification)
|
Comparator.comparingDouble(PwrGnrSimRoofResponse::getTotSpecification)
|
||||||
.reversed()) // 내림차순 정렬
|
.reversed()) // 내림차순 정렬
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
// .collect(
|
||||||
|
// Collectors.groupingBy(
|
||||||
|
// PwrGnrSimRoofResponse::getItemId, // 첫 번째 그룹화 기준
|
||||||
|
// Collectors.collectingAndThen(
|
||||||
|
// Collectors.toList(),
|
||||||
|
// list -> {
|
||||||
|
// // 그룹화된 첫 번째 요소를 기반으로 새 객체 생성
|
||||||
|
// ObjectMapper mapper = new ObjectMapper();
|
||||||
|
// PwrGnrSimRoofResponse setDto =
|
||||||
|
// mapper.convertValue(list.get(0),
|
||||||
|
// PwrGnrSimRoofResponse.class);
|
||||||
|
//
|
||||||
|
// // specification 합산
|
||||||
|
// double totSpecification =
|
||||||
|
// list.stream()
|
||||||
|
// .mapToDouble(response ->
|
||||||
|
// response.getTotSpecification())
|
||||||
|
// .sum();
|
||||||
|
//
|
||||||
|
// totSpecification = totSpecification / 1000;
|
||||||
|
//
|
||||||
|
// // 합산 결과 설정
|
||||||
|
// setDto.setTotSpecification(totSpecification);
|
||||||
|
//
|
||||||
|
// return setDto;
|
||||||
|
// })))
|
||||||
|
// .values()
|
||||||
|
// .stream()
|
||||||
|
|
||||||
// 모듈 아이템이 없음.
|
// 모듈 아이템이 없음.
|
||||||
if (moduleGroupList.isEmpty()) {
|
if (moduleGroupList.isEmpty()) {
|
||||||
@ -168,12 +170,7 @@ public class PwrGnrSimService {
|
|||||||
return exceptionRes;
|
return exceptionRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 지붕재의 모든 PCS Item 조회
|
// 모든GROUP PCS Group Item 조회
|
||||||
// pwrGnrSimRequest.setItemGroup("PC_");
|
|
||||||
// List<PwrGnrSimRoofResponse> roofPcsList =
|
|
||||||
// pwrGnrSimMapper.selectRoofItemList(pwrGnrSimRequest);
|
|
||||||
|
|
||||||
// GROUP PCS Group Item 조회
|
|
||||||
List<PwrGnrSimRoofResponse> pcsGroupList =
|
List<PwrGnrSimRoofResponse> pcsGroupList =
|
||||||
pwrGnrSimMapper.selectRoofPcsGroupList(pwrGnrSimRequest);
|
pwrGnrSimMapper.selectRoofPcsGroupList(pwrGnrSimRequest);
|
||||||
|
|
||||||
@ -261,8 +258,8 @@ public class PwrGnrSimService {
|
|||||||
|
|
||||||
// 지붕별 모듈정보 셋팅
|
// 지붕별 모듈정보 셋팅
|
||||||
int j = 0;
|
int j = 0;
|
||||||
for (PwrGnrSimRoofResponse m : roofModuleList) {
|
for (PwrGnrSimRoofResponse m : moduleGroupList) {
|
||||||
if (data.getRoofNo().equals(m.getRoofNo())) {
|
if (data.getRoofSurfaceId().equals(m.getRoofSurfaceId())) {
|
||||||
dSpecification += m.getTotSpecification();
|
dSpecification += m.getTotSpecification();
|
||||||
if (j == 0) {
|
if (j == 0) {
|
||||||
dModuleInput1[i] = Integer.parseInt(m.getAmount());
|
dModuleInput1[i] = Integer.parseInt(m.getAmount());
|
||||||
@ -271,7 +268,6 @@ public class PwrGnrSimService {
|
|||||||
} else {
|
} else {
|
||||||
dModuleInput3[i] = Integer.parseInt(m.getAmount());
|
dModuleInput3[i] = Integer.parseInt(m.getAmount());
|
||||||
}
|
}
|
||||||
|
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -306,7 +302,7 @@ public class PwrGnrSimService {
|
|||||||
pwrGnrSimRes.setAreaName(planInfo.getAreaName());
|
pwrGnrSimRes.setAreaName(planInfo.getAreaName());
|
||||||
pwrGnrSimRes.setSnowfall(planInfo.getSnowfall());
|
pwrGnrSimRes.setSnowfall(planInfo.getSnowfall());
|
||||||
pwrGnrSimRes.setStandardWindSpeedId(planInfo.getStandardWindSpeedId());
|
pwrGnrSimRes.setStandardWindSpeedId(planInfo.getStandardWindSpeedId());
|
||||||
pwrGnrSimRes.setRoofModuleList(roofModuleList);
|
pwrGnrSimRes.setRoofModuleList(roofGroupModuleList);
|
||||||
pwrGnrSimRes.setPcsList(pcsGroupList);
|
pwrGnrSimRes.setPcsList(pcsGroupList);
|
||||||
|
|
||||||
return pwrGnrSimRes;
|
return pwrGnrSimRes;
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import lombok.Data;
|
|||||||
public class PwrGnrSimRoofResponse {
|
public class PwrGnrSimRoofResponse {
|
||||||
|
|
||||||
@Schema(description = "지붕재")
|
@Schema(description = "지붕재")
|
||||||
private String roofNo;
|
private String roofSurfaceId;
|
||||||
|
|
||||||
@Schema(description = "지붕명")
|
@Schema(description = "지붕명")
|
||||||
private String roofSurface;
|
private String roofSurface;
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
package com.interplug.qcast.biz.specialNote.dto;
|
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.util.List;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@ -15,8 +14,4 @@ public class SpecialNoteSyncResponse {
|
|||||||
|
|
||||||
@Schema(description = "견적 특이사항 아이템 목록")
|
@Schema(description = "견적 특이사항 아이템 목록")
|
||||||
private List<SpecialNoteItemRequest> sdOrderSpnItemList;
|
private List<SpecialNoteItemRequest> sdOrderSpnItemList;
|
||||||
|
|
||||||
@Schema(description = "노출 아이템 목록")
|
|
||||||
private List<DisplayItemRequest> storeDispItemList;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.interplug.qcast.biz.user.dto;
|
package com.interplug.qcast.biz.user.dto;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.displayItem.dto.DisplayItemRequest;
|
||||||
import com.interplug.qcast.biz.storeFavorite.dto.StoreFavoriteRequest;
|
import com.interplug.qcast.biz.storeFavorite.dto.StoreFavoriteRequest;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -18,4 +19,7 @@ public class StoreSyncResponse {
|
|||||||
|
|
||||||
@Schema(description = "즐겨찾기 목록")
|
@Schema(description = "즐겨찾기 목록")
|
||||||
private List<StoreFavoriteRequest> storeFavList;
|
private List<StoreFavoriteRequest> storeFavList;
|
||||||
|
|
||||||
|
@Schema(description = "노출 아이템 목록")
|
||||||
|
private List<DisplayItemRequest> storeDispItemList;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.interplug.qcast.biz.canvasStatus.CanvasStatusMapper">
|
<mapper namespace="com.interplug.qcast.biz.canvasStatus.CanvasStatusMapper">
|
||||||
|
|
||||||
@ -21,11 +22,11 @@
|
|||||||
|
|
||||||
<select id="selectAllCanvasStatus" parameterType="string"
|
<select id="selectAllCanvasStatus" parameterType="string"
|
||||||
resultType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse">
|
resultType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse">
|
||||||
/* sqlid : com.interplug.qcast.canvasStatus.selectAllCanvasStatus 전체 견적서 조회 */
|
/* sqlid : com.interplug.qcast.canvasStatus.selectAllCanvasStatus 전체 캔버스 조회 by 사용자(userId) */
|
||||||
SELECT id
|
SELECT id
|
||||||
, user_id
|
, user_id
|
||||||
, object_no
|
, object_no
|
||||||
, image_name
|
, plan_no
|
||||||
, canvas_status
|
, canvas_status
|
||||||
, regist_datetime
|
, regist_datetime
|
||||||
, last_edit_datetime
|
, last_edit_datetime
|
||||||
@ -37,11 +38,12 @@
|
|||||||
|
|
||||||
<select id="selectObjectNoCanvasStatus" parameterType="string"
|
<select id="selectObjectNoCanvasStatus" parameterType="string"
|
||||||
resultType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse">
|
resultType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse">
|
||||||
/* sqlid : com.interplug.qcast.canvasStatus.selectObjectNoCanvasStatus 견적서 조회 */
|
/* sqlid : com.interplug.qcast.canvasStatus.selectObjectNoCanvasStatus 캔버스 조회 by (물건번호(objectNo)
|
||||||
|
and 사용자(userId)) */
|
||||||
SELECT id
|
SELECT id
|
||||||
, user_id
|
, user_id
|
||||||
, object_no
|
, object_no
|
||||||
, image_name
|
, plan_no
|
||||||
, canvas_status
|
, canvas_status
|
||||||
, regist_datetime
|
, regist_datetime
|
||||||
, last_edit_datetime
|
, last_edit_datetime
|
||||||
@ -56,7 +58,7 @@
|
|||||||
|
|
||||||
<select id="getMaxIdCanvasStatus" parameterType="string"
|
<select id="getMaxIdCanvasStatus" parameterType="string"
|
||||||
resultType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse">
|
resultType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse">
|
||||||
/* sqlid : com.interplug.qcast.canvasStatus.getMaxIdCanvasStatus 견적서 조회(Max id) */
|
/* sqlid : com.interplug.qcast.canvasStatus.getMaxIdCanvasStatus 캔버스 조회 by Max(id) */
|
||||||
SELECT MAX(id) AS id
|
SELECT MAX(id) AS id
|
||||||
FROM TB_CANVAS_STATUS
|
FROM TB_CANVAS_STATUS
|
||||||
WHERE object_no = #{objectNo}
|
WHERE object_no = #{objectNo}
|
||||||
@ -65,7 +67,7 @@
|
|||||||
|
|
||||||
<select id="getIdCanvasStatus" parameterType="integer"
|
<select id="getIdCanvasStatus" parameterType="integer"
|
||||||
resultType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse">
|
resultType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse">
|
||||||
/* sqlid : com.interplug.qcast.canvasStatus.getIdCanvasStatus 견적서 조회(id별) */
|
/* sqlid : com.interplug.qcast.canvasStatus.getIdCanvasStatus 캔버스 조회 by id */
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM TB_CANVAS_STATUS
|
FROM TB_CANVAS_STATUS
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
@ -73,33 +75,35 @@
|
|||||||
|
|
||||||
<select id="getObjectNoCanvasStatus" parameterType="string"
|
<select id="getObjectNoCanvasStatus" parameterType="string"
|
||||||
resultType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse">
|
resultType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse">
|
||||||
/* sqlid : com.interplug.qcast.canvasStatus.getObjectNoCanvasStatus 견적서 조회 */
|
/* sqlid : com.interplug.qcast.canvasStatus.getObjectNoCanvasStatus 캔버스 조회 by 물건번호(objectNo) */
|
||||||
SELECT object_no
|
SELECT object_no
|
||||||
FROM TB_CANVAS_STATUS
|
FROM TB_CANVAS_STATUS
|
||||||
WHERE object_no = #{objectNo}
|
WHERE object_no = #{objectNo}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertCanvasStatus" parameterType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatus">
|
<insert id="insertCanvasStatus"
|
||||||
/* sqlid : com.interplug.qcast.canvasStatus.insertCanvasStatus 견적서 등록 */
|
parameterType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatus">
|
||||||
|
/* sqlid : com.interplug.qcast.canvasStatus.insertCanvasStatus 캔버스 등록 */
|
||||||
INSERT INTO TB_CANVAS_STATUS
|
INSERT INTO TB_CANVAS_STATUS
|
||||||
( user_id
|
( user_id
|
||||||
, object_no
|
, object_no
|
||||||
, image_name
|
, plan_no
|
||||||
, canvas_status
|
, canvas_status
|
||||||
, regist_datetime
|
, regist_datetime
|
||||||
, bg_image_name
|
, bg_image_name
|
||||||
, map_position_address)
|
, map_position_address)
|
||||||
VALUES ( #{userId}
|
VALUES ( #{userId}
|
||||||
, #{objectNo}
|
, #{objectNo}
|
||||||
, #{imageName}
|
, #{planNo}
|
||||||
, #{canvasStatus}
|
, #{canvasStatus}
|
||||||
, GETDATE()
|
, GETDATE()
|
||||||
, #{bgImageName}
|
, #{bgImageName}
|
||||||
, #{mapPositionAddress})
|
, #{mapPositionAddress})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateCanvasStatus" parameterType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatus">
|
<update id="updateCanvasStatus"
|
||||||
/* sqlid : com.interplug.qcast.canvasStatus.updateCanvasStatus 견적서 수정 */
|
parameterType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatus">
|
||||||
|
/* sqlid : com.interplug.qcast.canvasStatus.updateCanvasStatus 캔버스 수정 */
|
||||||
UPDATE TB_CANVAS_STATUS
|
UPDATE TB_CANVAS_STATUS
|
||||||
SET canvas_status = #{canvasStatus}
|
SET canvas_status = #{canvasStatus}
|
||||||
, bg_image_name = #{bgImageName}
|
, bg_image_name = #{bgImageName}
|
||||||
@ -109,14 +113,14 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteObjectNoCanvasStatus" parameterType="string">
|
<delete id="deleteObjectNoCanvasStatus" parameterType="string">
|
||||||
/* sqlid : com.interplug.qcast.canvasStatus.deleteObjectNoCanvasStatus 견적서 삭제 */
|
/* sqlid : com.interplug.qcast.canvasStatus.deleteObjectNoCanvasStatus 캔버스 삭제 by 물건번호(objectNo) */
|
||||||
DELETE
|
DELETE
|
||||||
FROM TB_CANVAS_STATUS
|
FROM TB_CANVAS_STATUS
|
||||||
WHERE object_no = #{objectNo}
|
WHERE object_no = #{objectNo}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteIdCanvasStatus" parameterType="integer">
|
<delete id="deleteIdCanvasStatus" parameterType="integer">
|
||||||
/* sqlid : com.interplug.qcast.canvasStatus.deleteIdCanvasStatus 이미지(템플릿) 삭제 */
|
/* sqlid : com.interplug.qcast.canvasStatus.deleteIdCanvasStatus 캔버스 삭제 by id */
|
||||||
DELETE
|
DELETE
|
||||||
FROM TB_CANVAS_STATUS
|
FROM TB_CANVAS_STATUS
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
|
|||||||
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.interplug.qcast.biz.canvaspopupstatus.CanvasPopupStatusMapper">
|
||||||
|
|
||||||
|
<select id="selectCanvasPopupStatus"
|
||||||
|
parameterType="com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus"
|
||||||
|
resultType="com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus">
|
||||||
|
SELECT object_no,
|
||||||
|
plan_no,
|
||||||
|
popup_type,
|
||||||
|
popup_status
|
||||||
|
FROM T_CANVAS_POPUP_STATUS
|
||||||
|
WHERE object_no = #{objectNo}
|
||||||
|
AND plan_no = #{planNo}
|
||||||
|
AND popup_type = #{popupType}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertCanvasPopupStatus"
|
||||||
|
parameterType="com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus">
|
||||||
|
INSERT INTO T_CANVAS_POPUP_STATUS
|
||||||
|
(object_no,
|
||||||
|
plan_no,
|
||||||
|
popup_type,
|
||||||
|
popup_status)
|
||||||
|
VALUES (#{objectNo},
|
||||||
|
#{planNo},
|
||||||
|
#{popupType},
|
||||||
|
#{popupStatus})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateCanvasPopupStatus"
|
||||||
|
parameterType="com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus">
|
||||||
|
UPDATE T_CANVAS_POPUP_STATUS
|
||||||
|
SET popup_status = #{popupStatus}
|
||||||
|
WHERE object_no = #{objectNo}
|
||||||
|
AND plan_no = #{planNo}
|
||||||
|
AND popup_type = #{popupType}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteCanvasPopupStatus"
|
||||||
|
parameterType="com.interplug.qcast.biz.canvaspopupstatus.dto.CanvasPopupStatus">
|
||||||
|
DELETE
|
||||||
|
FROM T_CANVAS_POPUP_STATUS
|
||||||
|
WHERE object_no = #{objectNo}
|
||||||
|
AND plan_no = #{planNo}
|
||||||
|
AND popup_type = #{popupType}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -351,7 +351,7 @@
|
|||||||
, P.PLAN_NO
|
, P.PLAN_NO
|
||||||
, ROUND(CAST(P.SETUP_HEIGHT AS FLOAT), 2) AS SETUP_HEIGHT
|
, ROUND(CAST(P.SETUP_HEIGHT AS FLOAT), 2) AS SETUP_HEIGHT
|
||||||
, P.SURFACE_TYPE
|
, P.SURFACE_TYPE
|
||||||
, RE.ROOF_NO
|
, RE.ROOF_SURFACE_ID
|
||||||
, RE.ROOF_SURFACE
|
, RE.ROOF_SURFACE
|
||||||
, RE.ROOF_MATERIAL_ID
|
, RE.ROOF_MATERIAL_ID
|
||||||
, RE.SUPPORT_METHOD_ID
|
, RE.SUPPORT_METHOD_ID
|
||||||
@ -383,7 +383,7 @@
|
|||||||
<select id="selectEstimateRoofItemList" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="com.interplug.qcast.biz.estimate.dto.RoofResponse">
|
<select id="selectEstimateRoofItemList" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="com.interplug.qcast.biz.estimate.dto.RoofResponse">
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.selectEstimateRoofList */
|
/* sqlid : com.interplug.qcast.biz.estimate.selectEstimateRoofList */
|
||||||
SELECT
|
SELECT
|
||||||
PIE.ROOF_NO
|
PIE.ROOF_SURFACE_ID
|
||||||
, PIE.OBJECT_NO
|
, PIE.OBJECT_NO
|
||||||
, PIE.PLAN_NO
|
, PIE.PLAN_NO
|
||||||
, PIE.ITEM_ID
|
, PIE.ITEM_ID
|
||||||
@ -395,7 +395,7 @@
|
|||||||
FROM T_PART_ROOF_ITEM_ESTIMATE PIE WITH (NOLOCK)
|
FROM T_PART_ROOF_ITEM_ESTIMATE PIE WITH (NOLOCK)
|
||||||
WHERE PIE.OBJECT_NO = #{objectNo}
|
WHERE PIE.OBJECT_NO = #{objectNo}
|
||||||
AND PIE.PLAN_NO = #{planNo}
|
AND PIE.PLAN_NO = #{planNo}
|
||||||
ORDER BY PIE.ROOF_NO
|
ORDER BY PIE.ROOF_SURFACE_ID
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEstimateCircuitItemList" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="com.interplug.qcast.biz.estimate.dto.ItemResponse">
|
<select id="selectEstimateCircuitItemList" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="com.interplug.qcast.biz.estimate.dto.ItemResponse">
|
||||||
@ -419,11 +419,12 @@
|
|||||||
SELECT
|
SELECT
|
||||||
T.OBJECT_NO
|
T.OBJECT_NO
|
||||||
, T.PLAN_NO
|
, T.PLAN_NO
|
||||||
, T.ROOF_NO
|
, T.ROOF_SURFACE_ID
|
||||||
, T.ROOF_SURFACE
|
, T.ROOF_SURFACE
|
||||||
, T.SLOPE
|
, T.SLOPE
|
||||||
, T.ANGLE
|
, T.ANGLE
|
||||||
, T.CLASS_TYPE
|
, T.CLASS_TYPE
|
||||||
|
, T.ITEM_ID
|
||||||
, SUM(T.AMOUNT) AS AMOUNT
|
, SUM(T.AMOUNT) AS AMOUNT
|
||||||
, ROUND(SUM(T.AMOUNT * T.SPECIFICATION / 1000), 4) AS VOL_KW
|
, ROUND(SUM(T.AMOUNT * T.SPECIFICATION / 1000), 4) AS VOL_KW
|
||||||
FROM
|
FROM
|
||||||
@ -431,7 +432,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
P.OBJECT_NO
|
P.OBJECT_NO
|
||||||
, P.PLAN_NO
|
, P.PLAN_NO
|
||||||
, RE.ROOF_NO
|
, RE.ROOF_SURFACE_ID
|
||||||
, RE.ROOF_SURFACE
|
, RE.ROOF_SURFACE
|
||||||
, ROUND(CAST(RE.SLOPE AS FLOAT), 2) AS SLOPE
|
, ROUND(CAST(RE.SLOPE AS FLOAT), 2) AS SLOPE
|
||||||
, ROUND(CAST(RE.ANGLE AS FLOAT), 2) AS ANGLE
|
, ROUND(CAST(RE.ANGLE AS FLOAT), 2) AS ANGLE
|
||||||
@ -445,9 +446,9 @@
|
|||||||
ON P.OBJECT_NO = RE.OBJECT_NO
|
ON P.OBJECT_NO = RE.OBJECT_NO
|
||||||
AND P.PLAN_NO = RE.PLAN_NO
|
AND P.PLAN_NO = RE.PLAN_NO
|
||||||
INNER JOIN T_PART_ROOF_ITEM_ESTIMATE RIE WITH (NOLOCK)
|
INNER JOIN T_PART_ROOF_ITEM_ESTIMATE RIE WITH (NOLOCK)
|
||||||
ON RE.ROOF_NO = RIE.ROOF_NO
|
ON RE.ROOF_SURFACE_ID = RIE.ROOF_SURFACE_ID
|
||||||
AND RE.OBJECT_NO = RE.OBJECT_NO
|
AND RE.OBJECT_NO = RIE.OBJECT_NO
|
||||||
AND RE.PLAN_NO = RE.PLAN_NO
|
AND RE.PLAN_NO = RIE.PLAN_NO
|
||||||
INNER JOIN M_ITEM I WITH (NOLOCK)
|
INNER JOIN M_ITEM I WITH (NOLOCK)
|
||||||
ON RIE.ITEM_ID = I.ITEM_ID
|
ON RIE.ITEM_ID = I.ITEM_ID
|
||||||
WHERE P.OBJECT_NO = #{objectNo}
|
WHERE P.OBJECT_NO = #{objectNo}
|
||||||
@ -456,7 +457,8 @@
|
|||||||
AND I.ITEM_GROUP = #{schItemGroup}
|
AND I.ITEM_GROUP = #{schItemGroup}
|
||||||
</if>
|
</if>
|
||||||
) T
|
) T
|
||||||
GROUP BY T.OBJECT_NO, T.PLAN_NO, T.ROOF_NO, T.ROOF_SURFACE, T.SLOPE, T.ANGLE, T.CLASS_TYPE
|
GROUP BY T.OBJECT_NO, T.PLAN_NO, T.ROOF_SURFACE_ID, T.ROOF_SURFACE, T.SLOPE, T.ANGLE, T.CLASS_TYPE, T.ITEM_ID
|
||||||
|
ORDER BY T.ROOF_SURFACE_ID, T.ITEM_ID
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEstimateNoteTitleList" parameterType="com.interplug.qcast.biz.estimate.dto.NoteRequest" resultType="com.interplug.qcast.biz.estimate.dto.NoteResponse">
|
<select id="selectEstimateNoteTitleList" parameterType="com.interplug.qcast.biz.estimate.dto.NoteRequest" resultType="com.interplug.qcast.biz.estimate.dto.NoteResponse">
|
||||||
@ -559,6 +561,9 @@
|
|||||||
, ADDRESSEE_COMPANY_NAME = #{objectName} + ' ' + #{objectNameOmit}
|
, ADDRESSEE_COMPANY_NAME = #{objectName} + ' ' + #{objectNameOmit}
|
||||||
, ADDRESSEE_COMPANY_NAME_OMIT = #{objectNameOmit}
|
, ADDRESSEE_COMPANY_NAME_OMIT = #{objectNameOmit}
|
||||||
</if>
|
</if>
|
||||||
|
<if test='charger != null and charger != ""'>
|
||||||
|
, RECEIVE_USER = #{charger}
|
||||||
|
</if>
|
||||||
<if test='standardWindSpeedId != null and standardWindSpeedId != ""'>
|
<if test='standardWindSpeedId != null and standardWindSpeedId != ""'>
|
||||||
, STANDARD_WIND_SPEED_ID = #{standardWindSpeedId}
|
, STANDARD_WIND_SPEED_ID = #{standardWindSpeedId}
|
||||||
</if>
|
</if>
|
||||||
@ -820,13 +825,10 @@
|
|||||||
|
|
||||||
<insert id="insertEstimateRoof" parameterType="com.interplug.qcast.biz.estimate.dto.RoofRequest">
|
<insert id="insertEstimateRoof" parameterType="com.interplug.qcast.biz.estimate.dto.RoofRequest">
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateRoof */
|
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateRoof */
|
||||||
<selectKey keyProperty="roofNo" keyColumn="roofNo" resultType="String" order="AFTER">
|
|
||||||
SELECT @@IDENTITY
|
|
||||||
</selectKey>
|
|
||||||
|
|
||||||
INSERT INTO T_PART_ROOF_ESTIMATE
|
INSERT INTO T_PART_ROOF_ESTIMATE
|
||||||
(
|
(
|
||||||
OBJECT_NO
|
ROOF_SURFACE_ID
|
||||||
|
, OBJECT_NO
|
||||||
, PLAN_NO
|
, PLAN_NO
|
||||||
, ROOF_SURFACE
|
, ROOF_SURFACE
|
||||||
, ROOF_MATERIAL_ID
|
, ROOF_MATERIAL_ID
|
||||||
@ -847,7 +849,8 @@
|
|||||||
, CREATE_DATETIME
|
, CREATE_DATETIME
|
||||||
, CREATE_USER
|
, CREATE_USER
|
||||||
) VALUES (
|
) VALUES (
|
||||||
#{objectNo}
|
#{roofSurfaceId}
|
||||||
|
, #{objectNo}
|
||||||
, #{planNo}
|
, #{planNo}
|
||||||
, #{roofSurface}
|
, #{roofSurface}
|
||||||
, #{roofMaterialId}
|
, #{roofMaterialId}
|
||||||
@ -879,7 +882,7 @@
|
|||||||
INSERT INTO T_PART_ROOF_ITEM_ESTIMATE
|
INSERT INTO T_PART_ROOF_ITEM_ESTIMATE
|
||||||
(
|
(
|
||||||
ROOF_ITEM_NO
|
ROOF_ITEM_NO
|
||||||
, ROOF_NO
|
, ROOF_SURFACE_ID
|
||||||
, OBJECT_NO
|
, OBJECT_NO
|
||||||
, PLAN_NO
|
, PLAN_NO
|
||||||
, ITEM_ID
|
, ITEM_ID
|
||||||
@ -891,7 +894,7 @@
|
|||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
#{roofItemNo} AS ROOF_ITEM_NO
|
#{roofItemNo} AS ROOF_ITEM_NO
|
||||||
, #{roofNo} AS ROOF_NO
|
, #{roofSurfaceId} AS ROOF_SURFACE_ID
|
||||||
, #{objectNo} AS OBJECT_NO
|
, #{objectNo} AS OBJECT_NO
|
||||||
, #{planNo} AS PLAN_NO
|
, #{planNo} AS PLAN_NO
|
||||||
, I.ITEM_ID
|
, I.ITEM_ID
|
||||||
@ -1075,6 +1078,95 @@
|
|||||||
AND P.DEL_FLG = '0'
|
AND P.DEL_FLG = '0'
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertEstimateRoofCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateRoofCopy */
|
||||||
|
INSERT INTO T_PART_ROOF_ESTIMATE
|
||||||
|
(
|
||||||
|
ROOF_SURFACE_ID
|
||||||
|
, OBJECT_NO
|
||||||
|
, PLAN_NO
|
||||||
|
, ROOF_SURFACE
|
||||||
|
, ROOF_MATERIAL_ID
|
||||||
|
, SUPPORT_METHOD_ID
|
||||||
|
, CONSTRUCT_SPECIFICATION
|
||||||
|
, SLOPE
|
||||||
|
, ANGLE
|
||||||
|
, CLASS_TYPE
|
||||||
|
, AZIMUTH
|
||||||
|
, CREATE_DATETIME
|
||||||
|
, CREATE_USER
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
PRE.ROOF_SURFACE_ID
|
||||||
|
, #{copyObjectNo} AS OBJECT_NO
|
||||||
|
, #{copyPlanNo} AS PLAN_NO
|
||||||
|
, PRE.ROOF_SURFACE
|
||||||
|
, PRE.ROOF_MATERIAL_ID
|
||||||
|
, PRE.SUPPORT_METHOD_ID
|
||||||
|
, PRE.CONSTRUCT_SPECIFICATION
|
||||||
|
, PRE.SLOPE
|
||||||
|
, PRE.ANGLE
|
||||||
|
, PRE.CLASS_TYPE
|
||||||
|
, PRE.AZIMUTH
|
||||||
|
, GETDATE()
|
||||||
|
, #{userId} AS CREATE_USER
|
||||||
|
FROM T_PART_ROOF_ESTIMATE PRE WITH (NOLOCK)
|
||||||
|
WHERE PRE.OBJECT_NO = #{objectNo}
|
||||||
|
AND PRE.PLAN_NO = #{planNo}
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertEstimateRoofItemCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateRoofItemCopy */
|
||||||
|
INSERT INTO T_PART_ROOF_ITEM_ESTIMATE
|
||||||
|
(
|
||||||
|
ROOF_ITEM_NO
|
||||||
|
, ROOF_SURFACE_ID
|
||||||
|
, OBJECT_NO
|
||||||
|
, PLAN_NO
|
||||||
|
, ITEM_ID
|
||||||
|
, ITEM_NO
|
||||||
|
, ITEM_NAME
|
||||||
|
, SPECIFICATION
|
||||||
|
, AMOUNT
|
||||||
|
, PC_ITEM_ID
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
PRIE.ROOF_ITEM_NO
|
||||||
|
, PRIE.ROOF_SURFACE_ID
|
||||||
|
, #{copyObjectNo} AS OBJECT_NO
|
||||||
|
, #{copyPlanNo} AS PLAN_NO
|
||||||
|
, PRIE.ITEM_ID
|
||||||
|
, PRIE.ITEM_NO
|
||||||
|
, PRIE.ITEM_NAME
|
||||||
|
, PRIE.SPECIFICATION
|
||||||
|
, PRIE.AMOUNT
|
||||||
|
, PRIE.PC_ITEM_ID
|
||||||
|
FROM T_PART_ROOF_ITEM_ESTIMATE PRIE WITH (NOLOCK)
|
||||||
|
WHERE PRIE.OBJECT_NO = #{objectNo}
|
||||||
|
AND PRIE.PLAN_NO = #{planNo}
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertEstimateCircuitItemCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateCircuitItemCopy */
|
||||||
|
INSERT INTO T_PART_CIRCUIT_ITEM_ESTIMATE
|
||||||
|
(
|
||||||
|
CIRCUIT_NO
|
||||||
|
, OBJECT_NO
|
||||||
|
, PLAN_NO
|
||||||
|
, ITEM_ID
|
||||||
|
, CIRCUIT_CFG
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
PCIE.CIRCUIT_NO
|
||||||
|
, #{copyObjectNo} AS OBJECT_NO
|
||||||
|
, #{copyPlanNo} AS PLAN_NO
|
||||||
|
, PCIE.ITEM_ID
|
||||||
|
, PCIE.CIRCUIT_CFG
|
||||||
|
FROM T_PART_CIRCUIT_ITEM_ESTIMATE PCIE WITH (NOLOCK)
|
||||||
|
WHERE PCIE.OBJECT_NO = #{objectNo}
|
||||||
|
AND PCIE.PLAN_NO = #{planNo}
|
||||||
|
</insert>
|
||||||
|
|
||||||
<insert id="insertEstimateDrawingItemCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
|
<insert id="insertEstimateDrawingItemCopy" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest">
|
||||||
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateDrawingItemCopy */
|
/* sqlid : com.interplug.qcast.biz.estimate.insertEstimateDrawingItemCopy */
|
||||||
INSERT INTO T_PART_DRAWING_ESTIMATE
|
INSERT INTO T_PART_DRAWING_ESTIMATE
|
||||||
|
|||||||
@ -632,6 +632,28 @@
|
|||||||
WHERE OBJECT_NO = #{objectNo}
|
WHERE OBJECT_NO = #{objectNo}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateObjectLastEditDate" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.updateObjectLastEditDate */
|
||||||
|
UPDATE T_OBJECT
|
||||||
|
SET
|
||||||
|
OBJECT_NO = #{objectNo}
|
||||||
|
<if test='standardWindSpeedId != null and standardWindSpeedId != ""'>
|
||||||
|
, STANDARD_WIND_SPEED_ID = #{standardWindSpeedId}
|
||||||
|
</if>
|
||||||
|
<if test='verticalSnowCover != null and verticalSnowCover != ""'>
|
||||||
|
, VERTICAL_SNOW_COVER = #{verticalSnowCover}
|
||||||
|
</if>
|
||||||
|
<if test='surfaceType != null and surfaceType != ""'>
|
||||||
|
, SURFACE_TYPE = #{surfaceType}
|
||||||
|
</if>
|
||||||
|
<if test='installHeight != null and installHeight != ""'>
|
||||||
|
, INSTALL_HEIGHT = #{installHeight}
|
||||||
|
</if>
|
||||||
|
, LAST_EDIT_DATETIME = GETDATE()
|
||||||
|
, LAST_EDIT_USER = #{userId}
|
||||||
|
WHERE OBJECT_NO = #{objectNo}
|
||||||
|
</update>
|
||||||
|
|
||||||
<update id="updateObjectDelivery" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest">
|
<update id="updateObjectDelivery" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest">
|
||||||
/* sqlid : com.interplug.qcast.biz.object.updateObjectDelivery */
|
/* sqlid : com.interplug.qcast.biz.object.updateObjectDelivery */
|
||||||
UPDATE A SET
|
UPDATE A SET
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
A.OBJECT_NO /* 물건번호 */
|
A.OBJECT_NO /* 물건번호 */
|
||||||
, A.PLAN_NO /* 물건번호 */
|
, A.PLAN_NO /* 물건번호 */
|
||||||
, CONVERT(VARCHAR(10), A.DRAWING_ESTIMATE_CREATE_DATE, 121) AS DRAWING_ESTIMATE_CREATE_DATE/* 작성일 */
|
, CONVERT(VARCHAR(10), A.LAST_EDIT_DATETIME, 121) AS DRAWING_ESTIMATE_CREATE_DATE/* 작성일 */
|
||||||
, A.CAPACITY /* 시스템 용량 */
|
, A.CAPACITY /* 시스템 용량 */
|
||||||
, A.SNOWFALL/* 적설조건 */
|
, A.SNOWFALL/* 적설조건 */
|
||||||
, ISNULL(C1.CODE_NM, '') AS STANDARD_WIND_SPEED_ID/* 풍속조건명 */
|
, ISNULL(C1.CODE_NM, '') AS STANDARD_WIND_SPEED_ID/* 풍속조건명 */
|
||||||
@ -33,7 +33,7 @@
|
|||||||
resultType="com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse">
|
resultType="com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse">
|
||||||
/* sqlid : com.interplug.qcast.api.pwrGnrSimulation.selectRoofList (견적서 지붕재 정보 조회) */
|
/* sqlid : com.interplug.qcast.api.pwrGnrSimulation.selectRoofList (견적서 지붕재 정보 조회) */
|
||||||
SELECT
|
SELECT
|
||||||
A.ROOF_NO
|
A.ROOF_SURFACE_ID
|
||||||
, A.ROOF_SURFACE
|
, A.ROOF_SURFACE
|
||||||
, A.CLASS_TYPE
|
, A.CLASS_TYPE
|
||||||
, A.AZIMUTH
|
, A.AZIMUTH
|
||||||
@ -68,34 +68,41 @@
|
|||||||
<select id="selectRoofItemList" parameterType="com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRequest"
|
<select id="selectRoofItemList" parameterType="com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRequest"
|
||||||
resultType="com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse">
|
resultType="com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRoofResponse">
|
||||||
/* sqlid : com.interplug.qcast.api.pwrGnrSimulation.selectRoofItemList (견적서 지붕재 아이템 정보 조회) */
|
/* sqlid : com.interplug.qcast.api.pwrGnrSimulation.selectRoofItemList (견적서 지붕재 아이템 정보 조회) */
|
||||||
|
SELECT T.*
|
||||||
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
A.ROOF_NO
|
A.ROOF_SURFACE_ID
|
||||||
, B.ITEM_ID
|
, B.ITEM_ID
|
||||||
, B.AMOUNT
|
, SUM(B.AMOUNT) AS AMOUNT
|
||||||
, B.ITEM_NO
|
, B.ITEM_NO
|
||||||
, ISNULL((B.AMOUNT * TRY_CAST(B.SPECIFICATION AS FLOAT)), 0) AS TOT_SPECIFICATION /* 용량 */
|
, ISNULL((SUM(B.AMOUNT) * TRY_CAST(MAX(B.SPECIFICATION) AS FLOAT)),0) AS TOT_SPECIFICATION /* 용량 */
|
||||||
, C.ITEM_GROUP
|
, MAX(C.ITEM_GROUP) AS ITEM_GROUP /* 추후 지붕재테이블로 봐야함. */
|
||||||
/* 추후 지붕재테이블로 봐야함. */
|
, MAX(C.TEMP_LOSS) AS TEMP_LOSS
|
||||||
, C.TEMP_LOSS
|
, MAX(C.TEMP_COEFF ) AS TEMP_COEFF
|
||||||
, C.TEMP_COEFF
|
, MAX(C.CNV_EFF) AS CNV_EFF
|
||||||
, C.CNV_EFF
|
, MAX(C.AMP) AS AMP
|
||||||
, C.AMP
|
, MAX(B.SPECIFICATION) AS SPECIFICATION
|
||||||
, B.SPECIFICATION
|
, A.ROOF_SURFACE AS ROOF_SURFACE
|
||||||
, A.ROOF_SURFACE
|
, A.CLASS_TYPE AS CLASS_TYPE
|
||||||
, A.CLASS_TYPE
|
, A.AZIMUTH AS AZIMUTH
|
||||||
, A.AZIMUTH
|
, (CASE
|
||||||
, (CASE WHEN A.CLASS_TYPE = 0 THEN A.SLOPE ELSE A.ANGLE END) AS SLOPE_ANGLE
|
WHEN A.CLASS_TYPE = 0 THEN A.SLOPE
|
||||||
, (CASE WHEN A.CLASS_TYPE = 0 THEN CAST(CAST(A.SLOPE AS INT)AS VARCHAR) + '寸' ELSE CAST(CAST(A.ANGLE AS INT)AS VARCHAR) + N'º' END) AS SLOPE_ANGLE_TXT
|
ELSE A.ANGLE END) AS SLOPE_ANGLE
|
||||||
|
, (CASE
|
||||||
|
WHEN A.CLASS_TYPE = 0 THEN CAST(CAST(A.SLOPE AS INT)AS VARCHAR) + '寸'
|
||||||
|
ELSE CAST(CAST(A.ANGLE AS INT)AS VARCHAR) + N'º' END) AS SLOPE_ANGLE_TXT
|
||||||
FROM T_PART_ROOF_ESTIMATE A WITH (NOLOCK)
|
FROM T_PART_ROOF_ESTIMATE A WITH (NOLOCK)
|
||||||
INNER JOIN T_PART_ROOF_ITEM_ESTIMATE B WITH (NOLOCK)
|
INNER JOIN T_PART_ROOF_ITEM_ESTIMATE B WITH (NOLOCK)
|
||||||
ON A.OBJECT_NO = B.OBJECT_NO
|
ON A.OBJECT_NO = B.OBJECT_NO
|
||||||
AND A.PLAN_NO = B.PLAN_NO
|
AND A.PLAN_NO = B.PLAN_NO
|
||||||
AND A.ROOF_NO = B.ROOF_NO
|
AND A.ROOF_SURFACE_ID = B.ROOF_SURFACE_ID
|
||||||
INNER JOIN M_ITEM C WITH (NOLOCK)
|
INNER JOIN M_ITEM C WITH (NOLOCK)
|
||||||
ON B.ITEM_ID = C.ITEM_ID
|
ON B.ITEM_ID = C.ITEM_ID
|
||||||
WHERE A.OBJECT_NO = #{objectNo}
|
WHERE A.OBJECT_NO = #{objectNo}
|
||||||
AND A.PLAN_NO = #{planNo}
|
AND A.PLAN_NO = #{planNo}
|
||||||
AND C.ITEM_GROUP = #{itemGroup}
|
AND C.ITEM_GROUP = #{itemGroup}
|
||||||
ORDER BY B.SPECIFICATION DESC
|
GROUP BY A.ROOF_SURFACE_ID, A.ROOF_SURFACE, A.CLASS_TYPE, A.AZIMUTH, A.ANGLE, A.SLOPE, B.ITEM_ID, B.ITEM_NO
|
||||||
|
) T
|
||||||
|
ORDER BY T.ROOF_SURFACE_ID ASC, T.ITEM_ID ASC
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Binary file not shown.
@ -367,6 +367,7 @@
|
|||||||
<div class="estimate-tit-form">
|
<div class="estimate-tit-form">
|
||||||
<span class="estimate-tit">件名 :</span>
|
<span class="estimate-tit">件名 :</span>
|
||||||
<span id="objectName1"></span>
|
<span id="objectName1"></span>
|
||||||
|
<span id="objectNameOmit1"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user