|
|
@@ -12,6 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.gagaframework.excel.env.GagaExcelConstants;
|
|
|
import com.gagaframework.excel.xssf.GagaExcelResultHandler;
|
|
|
+import com.gagaframework.web.parameter.GagaMap;
|
|
|
import com.style24.core.biz.dao.TscOrderDao;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.persistence.domain.Order;
|
|
|
@@ -700,36 +701,65 @@ public class TscOrderService {
|
|
|
* @author card007
|
|
|
* @since 2021. 02. 04
|
|
|
*/
|
|
|
- public Collection<Order> getOrderListForMypage(Order order) {
|
|
|
+ public Collection<GagaMap> getOrderListForMypage(Order order) {
|
|
|
+ Collection<GagaMap> mapList = new ArrayList<>();
|
|
|
Collection<Order> orderList = new ArrayList<>();
|
|
|
int ordNo = 0;
|
|
|
+ String ordDt = "";
|
|
|
String delvFeeCd = "";
|
|
|
String ordDtlStat = "";
|
|
|
- int itemCnt = 0;
|
|
|
- int ordDtlStatCnt = 0;
|
|
|
-
|
|
|
+ String shotDelvYn = "";
|
|
|
+ String selfGoodsYn = "";
|
|
|
+ String shipCompNm = "";
|
|
|
+ String invoiceNo = "";
|
|
|
+ int reviewSq = 0;
|
|
|
+ int index = 0;
|
|
|
+
|
|
|
for (Order tmpOrder : orderDao.getOrderListForMypage(order)) {
|
|
|
- if (ordNo != tmpOrder.getOrdNo() || !delvFeeCd.equals(tmpOrder.getDelvFeeCd())) {
|
|
|
- itemCnt = 0;
|
|
|
+
|
|
|
+ if (ordNo != tmpOrder.getOrdNo() || !delvFeeCd.equals(tmpOrder.getDelvFeeCd()) || !ordDtlStat.equals(tmpOrder.getOrdDtlStat()) || !shotDelvYn.equals(tmpOrder.getShotDelvYn())) {
|
|
|
+ if (index > 0) {
|
|
|
+ GagaMap map = new GagaMap();
|
|
|
+ map.set("ordDt", ordDt);
|
|
|
+ map.set("shotDelvYn", shotDelvYn);
|
|
|
+ map.set("selfGoodsYn", selfGoodsYn);
|
|
|
+ map.set("ordDtlStat", ordDtlStat);
|
|
|
+ map.set("shipCompNm", shipCompNm);
|
|
|
+ map.set("invoiceNo", invoiceNo);
|
|
|
+ map.set("reviewSq", reviewSq);
|
|
|
+ map.set("orderList", orderList);
|
|
|
+ mapList.add(map);
|
|
|
+ }
|
|
|
+
|
|
|
ordNo = tmpOrder.getOrdNo();
|
|
|
+ ordDt = tmpOrder.getOrdDt();
|
|
|
delvFeeCd = tmpOrder.getDelvFeeCd();
|
|
|
- }
|
|
|
-
|
|
|
- if (!ordDtlStat.equals(tmpOrder.getOrdDtlStat())) {
|
|
|
- ordDtlStatCnt = 0;
|
|
|
ordDtlStat = tmpOrder.getOrdDtlStat();
|
|
|
+ shotDelvYn = tmpOrder.getShotDelvYn();
|
|
|
+ selfGoodsYn = tmpOrder.getSelfGoodsYn();
|
|
|
+ shipCompNm = tmpOrder.getShipCompNm();
|
|
|
+ invoiceNo = tmpOrder.getInvoiceNo();
|
|
|
+ reviewSq = tmpOrder.getReviewSq();
|
|
|
+ orderList = new ArrayList<>();
|
|
|
}
|
|
|
-
|
|
|
- tmpOrder.setItemCnt(itemCnt);
|
|
|
- tmpOrder.setOrdDtlStatCnt(ordDtlStatCnt);
|
|
|
|
|
|
orderList.add(tmpOrder);
|
|
|
|
|
|
- itemCnt++;
|
|
|
- ordDtlStatCnt++;
|
|
|
+ index++;
|
|
|
}
|
|
|
|
|
|
- return orderList;
|
|
|
+ GagaMap map = new GagaMap();
|
|
|
+ map.set("ordDt", ordDt);
|
|
|
+ map.set("shotDelvYn", shotDelvYn);
|
|
|
+ map.set("selfGoodsYn", selfGoodsYn);
|
|
|
+ map.set("ordDtlStat", ordDtlStat);
|
|
|
+ map.set("shipCompNm", shipCompNm);
|
|
|
+ map.set("invoiceNo", invoiceNo);
|
|
|
+ map.set("reviewSq", reviewSq);
|
|
|
+ map.set("orderList", orderList);
|
|
|
+ mapList.add(map);
|
|
|
+
|
|
|
+ return mapList;
|
|
|
}
|
|
|
|
|
|
/**
|