|
|
@@ -66,26 +66,20 @@ public class TsfOrderService {
|
|
|
List<Order> ordDtlList = new ArrayList<>();
|
|
|
int ordNo = 0;
|
|
|
String ordDt = "";
|
|
|
- String delvFeeCd = "";
|
|
|
- String ordDtlStat = "";
|
|
|
- String shotDelvYn = "";
|
|
|
String selfGoodsYn = "";
|
|
|
+ String supplyCompCd = "";
|
|
|
String shipCompNm = "";
|
|
|
String shipCompCd = "";
|
|
|
String invoiceNo = "";
|
|
|
String giftPackYn = "";
|
|
|
- String reviewYn = "";
|
|
|
- int reviewSq = 0;
|
|
|
int index = 0;
|
|
|
-
|
|
|
+ Boolean shotDelv = false;
|
|
|
+ Boolean selfMall = false;
|
|
|
+ Boolean supplyMall = false;
|
|
|
+ Boolean review = true;
|
|
|
+
|
|
|
for (Order tmpOrder : orderDao.getOrderListForMypage(order)) {
|
|
|
- if (ordNo != tmpOrder.getOrdNo() // 주문번호 변경
|
|
|
- || !selfGoodsYn.equals(tmpOrder.getSelfGoodsYn()) // 자사여부 변경
|
|
|
- || ("N".equals(tmpOrder.getSelfGoodsYn())
|
|
|
- && !delvFeeCd.equals(tmpOrder.getDelvFeeCd())) // 입점업체 배송정책코드 변경
|
|
|
- || !shotDelvYn.equals(tmpOrder.getShotDelvYn())) { // 총알배송여부 변경
|
|
|
-
|
|
|
- // 데이터 설정
|
|
|
+ if (ordNo != tmpOrder.getOrdNo()) {
|
|
|
if (index > 0) {
|
|
|
// 주문상세내역 목록 설정
|
|
|
GagaMap ordDtlMap = new GagaMap();
|
|
|
@@ -94,21 +88,21 @@ public class TsfOrderService {
|
|
|
ordDtlMap.set("shipCompCd", shipCompCd);
|
|
|
ordDtlMap.set("shipCompNm", shipCompNm);
|
|
|
ordDtlMap.set("invoiceNo", invoiceNo);
|
|
|
- ordDtlMap.set("reviewSq", reviewSq);
|
|
|
ordDtlMap.set("recipBaseAddr", ordDtlList.iterator().next().getRecipBaseAddr());
|
|
|
ordDtlMap.set("giftLimitDay", ordDtlList.iterator().next().getGiftLimitDay());
|
|
|
ordDtlMap.set("recipNm", ordDtlList.iterator().next().getRecipNm());
|
|
|
ordDtlMap.set("giftLimitDt", ordDtlList.iterator().next().getGiftLimitDt());
|
|
|
ordDtlMap.set("purchaseConfirmDay", ordDtlList.iterator().next().getPurchaseConfirmDay());
|
|
|
- ordDtlMap.set("ordDtlStatBanner", "Y");
|
|
|
+ ordDtlMap.set("review", review);
|
|
|
orderList.add(ordDtlMap);
|
|
|
-
|
|
|
+
|
|
|
// 주문내역 목록 설정
|
|
|
GagaMap map = new GagaMap();
|
|
|
map.set("ordNo", ordNo); // 주문번호
|
|
|
map.set("ordDt", ordDt); // 주문일시
|
|
|
- map.set("shotDelvYn", shotDelvYn); // 총알배송여부
|
|
|
- map.set("selfGoodsYn", selfGoodsYn); // 자사여부
|
|
|
+ map.set("shotDelv", shotDelv); // 총알배송 아이콘
|
|
|
+ map.set("selfMall", selfMall); // STYLE24 일반배송 아이콘
|
|
|
+ map.set("supplyMall", supplyMall); // 업체직배송 아이콘
|
|
|
map.set("giftPackYn", giftPackYn); // 선물하기여부
|
|
|
map.set("orderList", orderList); // 주문내역
|
|
|
mapList.add(map);
|
|
|
@@ -117,21 +111,16 @@ public class TsfOrderService {
|
|
|
// 데이터 설정 후 초기화 진행
|
|
|
ordNo = tmpOrder.getOrdNo();
|
|
|
ordDt = tmpOrder.getOrdDt();
|
|
|
- delvFeeCd = tmpOrder.getDelvFeeCd();
|
|
|
- ordDtlStat = tmpOrder.getOrdDtlStat();
|
|
|
- shotDelvYn = tmpOrder.getShotDelvYn();
|
|
|
selfGoodsYn = tmpOrder.getSelfGoodsYn();
|
|
|
- shipCompCd = tmpOrder.getShipCompCd();
|
|
|
- shipCompNm = tmpOrder.getShipCompNm();
|
|
|
+ supplyCompCd = tmpOrder.getSupplyCompCd();
|
|
|
giftPackYn = tmpOrder.getGiftPackYn();
|
|
|
+ shotDelv = false;
|
|
|
+ selfMall = false;
|
|
|
+ supplyMall = false;
|
|
|
ordDtlList = new ArrayList<>();
|
|
|
orderList = new ArrayList<>();
|
|
|
- } else if (index > 0
|
|
|
- && (!ordDtlStat.equals(tmpOrder.getOrdDtlStat()) // 주문상세상태값 변경
|
|
|
- || ("G013_70".equals(tmpOrder.getOrdDtlStat())
|
|
|
- && !reviewYn.equals(tmpOrder.getReviewSq() > 0 ? "Y" : "N")) // 리뷰작성 변경
|
|
|
- || (!invoiceNo.equals(tmpOrder.getInvoiceNo())))) { // 송장번호 변경
|
|
|
-
|
|
|
+ } else if (!selfGoodsYn.equals(tmpOrder.getSelfGoodsYn())
|
|
|
+ || ("N".equals(tmpOrder.getSelfGoodsYn()) && !supplyCompCd.equals(tmpOrder.getSupplyCompCd()))) {
|
|
|
// 주문내역 목록 설정
|
|
|
GagaMap ordDtlMap = new GagaMap();
|
|
|
ordDtlMap.set("ordDtlList", ordDtlList);
|
|
|
@@ -139,30 +128,50 @@ public class TsfOrderService {
|
|
|
ordDtlMap.set("shipCompCd", shipCompCd);
|
|
|
ordDtlMap.set("shipCompNm", shipCompNm);
|
|
|
ordDtlMap.set("invoiceNo", invoiceNo);
|
|
|
- ordDtlMap.set("reviewSq", reviewSq);
|
|
|
ordDtlMap.set("purchaseConfirmDay", ordDtlList.iterator().next().getPurchaseConfirmDay());
|
|
|
ordDtlMap.set("recipBaseAddr", ordDtlList.iterator().next().getRecipBaseAddr());
|
|
|
ordDtlMap.set("giftLimitDay", ordDtlList.iterator().next().getGiftLimitDay());
|
|
|
ordDtlMap.set("recipNm", ordDtlList.iterator().next().getRecipNm());
|
|
|
ordDtlMap.set("giftLimitDt", ordDtlList.iterator().next().getGiftLimitDt());
|
|
|
- ordDtlMap.set("ordDtlStatBanner", "Y");
|
|
|
+ ordDtlMap.set("review", review);
|
|
|
orderList.add(ordDtlMap);
|
|
|
|
|
|
// 상태 별 배너 설정 후 초기화 진행
|
|
|
ordDtlList = new ArrayList<>();
|
|
|
- ordDtlStat = tmpOrder.getOrdDtlStat();
|
|
|
+ selfGoodsYn = tmpOrder.getSelfGoodsYn();
|
|
|
+ supplyCompCd = tmpOrder.getSupplyCompCd();
|
|
|
}
|
|
|
|
|
|
// 주문내역 설정
|
|
|
ordDtlList.add(tmpOrder);
|
|
|
+
|
|
|
+ // 총알배송 아이콘 설정
|
|
|
+ if (!shotDelv && "Y".equals(tmpOrder.getShotDelvYn())) {
|
|
|
+ shotDelv = true;
|
|
|
+ }
|
|
|
|
|
|
- // 인덱스 처리
|
|
|
- index++;
|
|
|
+ // STYLE24 일반배송 아이콘 설정
|
|
|
+ if (!selfMall && "Y".equals(tmpOrder.getSelfGoodsYn())) {
|
|
|
+ selfMall = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 업체직배송 아이콘 설정
|
|
|
+ if (!supplyMall && "N".equals(tmpOrder.getSelfGoodsYn())) {
|
|
|
+ supplyMall = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 리뷰 작성 여부 설정
|
|
|
+ if (review && tmpOrder.getReviewSq() == 0) {
|
|
|
+ review = false;
|
|
|
+ }
|
|
|
|
|
|
- // 초기화 진행
|
|
|
+ // 배송정보 설정
|
|
|
+ shipCompCd = tmpOrder.getShipCompCd();
|
|
|
+ shipCompNm = tmpOrder.getShipCompNm();
|
|
|
invoiceNo = tmpOrder.getInvoiceNo();
|
|
|
- reviewSq = tmpOrder.getReviewSq();
|
|
|
- reviewYn = tmpOrder.getReviewSq() > 0 ? "Y" : "N";
|
|
|
+
|
|
|
+ // 인덱스 처리
|
|
|
+ index++;
|
|
|
}
|
|
|
|
|
|
// 마지막 데이터 설정
|
|
|
@@ -174,26 +183,26 @@ public class TsfOrderService {
|
|
|
ordDtlMap.set("shipCompCd", shipCompCd);
|
|
|
ordDtlMap.set("shipCompNm", shipCompNm);
|
|
|
ordDtlMap.set("invoiceNo", invoiceNo);
|
|
|
- ordDtlMap.set("reviewSq", reviewSq);
|
|
|
ordDtlMap.set("purchaseConfirmDay", ordDtlList.iterator().next().getPurchaseConfirmDay());
|
|
|
ordDtlMap.set("recipBaseAddr", ordDtlList.iterator().next().getRecipBaseAddr());
|
|
|
ordDtlMap.set("giftLimitDay", ordDtlList.iterator().next().getGiftLimitDay());
|
|
|
ordDtlMap.set("recipNm", ordDtlList.iterator().next().getRecipNm());
|
|
|
ordDtlMap.set("giftLimitDt", ordDtlList.iterator().next().getGiftLimitDt());
|
|
|
- ordDtlMap.set("ordDtlStatBanner", "Y");
|
|
|
+ ordDtlMap.set("review", review);
|
|
|
orderList.add(ordDtlMap);
|
|
|
|
|
|
// 주문내역 목록 설정
|
|
|
GagaMap map = new GagaMap();
|
|
|
map.set("ordNo", ordNo);
|
|
|
map.set("ordDt", ordDt);
|
|
|
- map.set("shotDelvYn", shotDelvYn);
|
|
|
- map.set("selfGoodsYn", selfGoodsYn);
|
|
|
+ map.set("shotDelv", shotDelv);
|
|
|
+ map.set("selfMall", selfMall);
|
|
|
+ map.set("supplyMall", supplyMall);
|
|
|
map.set("giftPackYn", giftPackYn);
|
|
|
map.set("orderList", orderList);
|
|
|
mapList.add(map);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return mapList;
|
|
|
}
|
|
|
|