fix : 관리자 구독서비스 상품준비 관리
This commit is contained in:
@@ -0,0 +1,46 @@
|
|||||||
|
package com.wb.domainserver.domain.gcone.ordr.subsvc.mapper;
|
||||||
|
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 구독서비스 주문 BO mapper
|
||||||
|
* @author jazz
|
||||||
|
* @since 2026-02-04
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* == (Modification Information) == 개정이력
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2026-02-04 jazz 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface BOSubsvcOrdrMapper {
|
||||||
|
|
||||||
|
/** 구독서비스 상품준비 관리 목록*/
|
||||||
|
List<DataMap> selectBOSubsvcOrderList(BOSubsvcOrderVO vo);
|
||||||
|
/** 구독서비스 상품준비 관리 목록 배송내역 팝업 배송내역목록*/
|
||||||
|
List<DataMap> selectBOSubsvcOrderDlvyList(BOSubsvcOrderVO vo);
|
||||||
|
/** 구독서비스 상품준비 관리 상품매칭 - 1. GC_ORDER update*/
|
||||||
|
int updateBOSubsvcGoodsMappgOrdr(BOSubsvcOrderVO vo);
|
||||||
|
/** 구독서비스 상품준비 관리 상품매칭 - 2. GC_ORDER_ITEM update*/
|
||||||
|
int updateBOSubsvcGoodsMappgOrdrItem(BOSubsvcOrderVO vo);
|
||||||
|
/** 구독서비스 상품준비 관리 상품매칭 - 3. GC_ORDER_ITEM_OPTION update*/
|
||||||
|
int updateBOSubsvcGoodsMappgOrdrItemOptn(BOSubsvcOrderVO vo);
|
||||||
|
/** 구독서비스 상품준비 관리 상품매칭 - 4. GC_ORDER_SHIPPING update*/
|
||||||
|
int updateBOSubsvcGoodsMappgShipping(BOSubsvcOrderVO vo);
|
||||||
|
/** 구독서비스 상품준비 관리 상품매칭 - 5. GC_SUBSVC update*/
|
||||||
|
int updateBOSubsvcGoodsMappgSubsvc(BOSubsvcOrderVO vo);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
package com.wb.domainserver.domain.gcone.ordr.subsvc.service;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.nimbusds.jose.shaded.gson.Gson;
|
||||||
|
import com.wb.domainserver.common.prop.PropertyService;
|
||||||
|
import com.wb.domainserver.domain.admin.instcSle.mtng.mapper.BOMaMtngMapper;
|
||||||
|
import com.wb.domainserver.domain.admin.store.sopmal.mapper.BOMaSopmalMapper;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.goods.service.BOGoodsService;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.purchs.mapper.BOPurchsMapper;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.purchs.service.BOOrderNoService;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.purchs.service.BOOrderService;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.purchs.service.BOPurchsService;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.purchs.vo.*;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.mapper.BOMbrMapper;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.service.BOMbrService;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrAppnVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mlg.service.BOMlgService;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mlg.vo.BOCashVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mlg.vo.BOMlgVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ntcn.mssage.service.BOMssageService;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.ordr.mapper.BOOrdrMapper;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrderCommonService;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrLogService;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.*;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.pay.service.BOPayService;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.pay.vo.BOPayVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.mapper.BORtngudrefndMapper;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.service.BORtngudrefndService;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BORtngudrefndVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.selngpruf.service.BOSelngprufService;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.selngpruf.vo.BOSelngprufVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.subsvc.mapper.BOSubsvcOrdrMapper;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.promtn.coupon.service.BOCouponService;
|
||||||
|
import com.wb.domainserver.domain.gcone.promtn.coupon.vo.BODwldCouponVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.setup.site.service.BOSiteService;
|
||||||
|
import com.wb.domainserver.domain.gcone.setup.site.vo.BOGoodsgrpVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.setup.site.vo.BOSiteVO;
|
||||||
|
import com.wb.domainserver.exception.WnbtException;
|
||||||
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
import com.wb.domainserver.util.string.StringUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import java.time.ZoneOffset;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.time.format.DateTimeParseException;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 구독서비스주문 BO service
|
||||||
|
* @author jazz
|
||||||
|
* @since 2026-02-05
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* == (Modification Information) == 개정이력
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2026-02-05 jazz 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class BOSubsvcOrdrService {
|
||||||
|
@Autowired
|
||||||
|
private BOSubsvcOrdrMapper mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 구독서비스 상품준비 관리 목록
|
||||||
|
* @param
|
||||||
|
* @return List<DataMap>
|
||||||
|
*/
|
||||||
|
public List<DataMap> selectBOSubsvcOrderList(BOSubsvcOrderVO vo) {
|
||||||
|
List<DataMap> dataList = new ArrayList<>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
dataList = mapper.selectBOSubsvcOrderList(vo);
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
if(dataList == null || dataList.isEmpty()){
|
||||||
|
vo.getPaginationInfo().setTotalRecordCount(0);
|
||||||
|
}else{
|
||||||
|
vo.getPaginationInfo().setTotalRecordCount(((Long)dataList.get(0).get("totCnt")).intValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
return dataList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 구독서비스 상품준비 관리 목록 배송내역 팝업 배송내역목록
|
||||||
|
* @param
|
||||||
|
* @return List<DataMap>
|
||||||
|
*/
|
||||||
|
public List<DataMap> selectBOSubsvcOrderDlvyList(BOSubsvcOrderVO vo) {
|
||||||
|
List<DataMap> dataList = new ArrayList<>();
|
||||||
|
dataList = mapper.selectBOSubsvcOrderDlvyList(vo);
|
||||||
|
return dataList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 선택대상 상품준비 일괄처리
|
||||||
|
* 구독서비스 상품준비 일괄처리
|
||||||
|
* 1. GC_ORDER 주문상태를 결제확인(25)만 상품준비중(35)로 변경(25가 아니면 UPDT_DT만 변경)
|
||||||
|
* 2. GC_ORDER_ITEM의 상품고유번호(GOODS_INNB), 상품이지지경로(GOODS_IMG_COURS), 상품명(GOODS_NM)를 변경
|
||||||
|
* 3. GC_ORDER_ITEM_OPTION의 상품옵셥 고유번호(GOODS_OPTN_INNB), 주문상태(GOODS_STTUS_CD)를 결제확인(25)=>상품준비중(35), 옵션명1(OPTN_NM_1) 부터 GC_GOODS_OPTION과 동일한 컬럼 매칭
|
||||||
|
* 4. GC_ORDER_SHIPPING의 주문배송고유번호(ORDR_DLVY_INNB)가 같은 대상의 주문상태(GOODS_STTUS_CD)를 결제확인(25)=>상품준비중(35)
|
||||||
|
* 5. GC_SUBSVC의 최종처리차수(LAST_PROCS_DGR)를 수정 (주문상품옵션에 주문별 처리차수중 가능 큰처리차수(35~75까지 COUNT해서 가장 큰수)를 등록)
|
||||||
|
* */
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public String updateSubsvcOrdrReady(BOSubsvcOrderVO vo) {
|
||||||
|
String message = "success";
|
||||||
|
/*1. GC_ORDER*/
|
||||||
|
int result = mapper.updateBOSubsvcGoodsMappgOrdr(vo);
|
||||||
|
if (!(result > 0)) {
|
||||||
|
log.error("GC_ORDER UPDATE 오류");
|
||||||
|
throw new WnbtException("500","GC_ORDER UPDATE 오류");
|
||||||
|
}
|
||||||
|
result = mapper.updateBOSubsvcGoodsMappgOrdrItem(vo);
|
||||||
|
if (!(result > 0)) {
|
||||||
|
log.error("GC_ORDER_ITEM UPDATE 오류");
|
||||||
|
throw new WnbtException("500","GC_ORDER_ITEM UPDATE 오류");
|
||||||
|
}
|
||||||
|
result = mapper.updateBOSubsvcGoodsMappgOrdrItemOptn(vo);
|
||||||
|
if (!(result > 0)) {
|
||||||
|
log.error("GC_ORDER_ITEM_OPTION UPDATE 오류");
|
||||||
|
throw new WnbtException("500","GC_ORDER_ITEM_OPTION UPDATE 오류");
|
||||||
|
}
|
||||||
|
result = mapper.updateBOSubsvcGoodsMappgShipping(vo);
|
||||||
|
if (!(result > 0)) {
|
||||||
|
log.error("GC_ORDER_SHIPPING UPDATE 오류");
|
||||||
|
throw new WnbtException("500","GC_ORDER_SHIPPING UPDATE 오류");
|
||||||
|
}
|
||||||
|
result = mapper.updateBOSubsvcGoodsMappgSubsvc(vo);
|
||||||
|
if (!(result > 0)) {
|
||||||
|
log.error("GC_SUBSVC 처리중 오류");
|
||||||
|
throw new WnbtException("500","GC_SUBSVC 처리중 오류");
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.wb.domainserver.domain.gcone.ordr.subsvc.vo;
|
||||||
|
|
||||||
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
public class BOSubsvcOrderVO extends AbstractVO {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 구독서비스고유번호 */
|
||||||
|
private String subsvcInnb;
|
||||||
|
/** 쇼핑몰코드 */
|
||||||
|
private String sopmalCd;
|
||||||
|
/** 구독서비스명 */
|
||||||
|
private String subsvcNm;
|
||||||
|
/** 구독기간 */
|
||||||
|
private String subPd;
|
||||||
|
/** 구독서비스기수 */
|
||||||
|
private String subsvcGnr;
|
||||||
|
/** 구독서비스명 다음기수 */
|
||||||
|
private String subsvcNextGnr;
|
||||||
|
/** 구독서비스기수명 */
|
||||||
|
private String subsvcGnrNm;
|
||||||
|
/** 주문고유번호 */
|
||||||
|
private String ordrInnb;
|
||||||
|
/** 주문상품고유번호 */
|
||||||
|
private String ordrGoodsInnb;
|
||||||
|
/** 주문상품옵션고유번호 */
|
||||||
|
private String ordrGoodsOptnInnb;
|
||||||
|
|
||||||
|
|
||||||
|
/** 출고상품고유번호*/
|
||||||
|
private String goodsInnb;
|
||||||
|
/** 출고상품옵션고유번호*/
|
||||||
|
private String goodsOptnInnb;
|
||||||
|
/** 출고상품옵션구분*/
|
||||||
|
private String optnTy;
|
||||||
|
|
||||||
|
/** 상품준비대상*/
|
||||||
|
private List<String> arrCheck;
|
||||||
|
/** 상품준비대상 주문고유번호*/
|
||||||
|
private List<String> arrOrdrInnb;
|
||||||
|
/** 상품준비대상 주문상품고유번호*/
|
||||||
|
private List<String> arrOrdrGoodsInnb;
|
||||||
|
/** 상품준비대상 주문상품옵션고유번호*/
|
||||||
|
private List<String> arrOrdrGoodsOptnInnb;
|
||||||
|
/** 상품준비대상 주문고유번호*/
|
||||||
|
private List<String> arrOrdrDlvyInnb;
|
||||||
|
|
||||||
|
/** 검색조건 */
|
||||||
|
/** 구독서비스명 selectbox*/
|
||||||
|
private String srchSelSubsvcNm;
|
||||||
|
/** 구독서비스명 */
|
||||||
|
private String srchSubsvcNm;
|
||||||
|
/** 구독서비스기수 select */
|
||||||
|
private String srchSelSubsvcGnr;
|
||||||
|
/** 구독서비스기수명 */
|
||||||
|
private String srchSubsvcGnrNm;
|
||||||
|
/** 정렬구분 */
|
||||||
|
private String sortDv;
|
||||||
|
/** 배열 구독서비스고유번호 */
|
||||||
|
private List<String> arrSubsvcInnb;
|
||||||
|
/**당월제외*/
|
||||||
|
private String srchCurMonExclude;
|
||||||
|
}
|
||||||
@@ -86,7 +86,7 @@ public class SubsvcController {
|
|||||||
@Value("${mngrfo.common.subsvc.dft-goods-optn-innb}")
|
@Value("${mngrfo.common.subsvc.dft-goods-optn-innb}")
|
||||||
private String dftGoodsOptnInnb;
|
private String dftGoodsOptnInnb;
|
||||||
@Autowired
|
@Autowired
|
||||||
private BOSubsvcService service;
|
private BOSubsvcService boSubsvcService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private BOCommonService commonService;
|
private BOCommonService commonService;
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -112,7 +112,7 @@ public class SubsvcController {
|
|||||||
content.put("paramVO", vo);
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
// 조회조건 구독서비스
|
// 조회조건 구독서비스
|
||||||
List<?> SrchSubsvcList = service.selectBOMngrSrchSubsvcList(vo);
|
List<?> SrchSubsvcList = boSubsvcService.selectBOMngrSrchSubsvcList(vo);
|
||||||
content.put("srchSubsvcList", SrchSubsvcList);
|
content.put("srchSubsvcList", SrchSubsvcList);
|
||||||
|
|
||||||
//조회조건 판매상태
|
//조회조건 판매상태
|
||||||
@@ -148,7 +148,7 @@ public class SubsvcController {
|
|||||||
content.put("paramVO", vo);
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
// 구독서비스 상세조회
|
// 구독서비스 상세조회
|
||||||
DataMap subsvcDtl = service.selectBOSubsvcDetail(vo);
|
DataMap subsvcDtl = boSubsvcService.selectBOSubsvcDetail(vo);
|
||||||
content.put("subsvcDtl", subsvcDtl);
|
content.put("subsvcDtl", subsvcDtl);
|
||||||
|
|
||||||
//판매상태
|
//판매상태
|
||||||
@@ -210,7 +210,7 @@ public class SubsvcController {
|
|||||||
//파일 업로드 관련 END
|
//파일 업로드 관련 END
|
||||||
|
|
||||||
Map<String, Object> message = new HashMap<>();
|
Map<String, Object> message = new HashMap<>();
|
||||||
String result = service.updateBOMngrSubsvc(vo);
|
String result = boSubsvcService.updateBOMngrSubsvc(vo);
|
||||||
message.put("message",result);
|
message.put("message",result);
|
||||||
|
|
||||||
return ResponseEntity.ok(
|
return ResponseEntity.ok(
|
||||||
@@ -238,7 +238,7 @@ public class SubsvcController {
|
|||||||
content.put("paramVO", vo);
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
// 구독서비스 상세조회
|
// 구독서비스 상세조회
|
||||||
DataMap subsvcDtl = service.selectBOSubsvcDetail(vo);
|
DataMap subsvcDtl = boSubsvcService.selectBOSubsvcDetail(vo);
|
||||||
content.put("subsvcDtl", subsvcDtl);
|
content.put("subsvcDtl", subsvcDtl);
|
||||||
|
|
||||||
//판매상태
|
//판매상태
|
||||||
@@ -303,7 +303,7 @@ public class SubsvcController {
|
|||||||
vo.setDftGoodsOptnInnb(dftGoodsOptnInnb);
|
vo.setDftGoodsOptnInnb(dftGoodsOptnInnb);
|
||||||
|
|
||||||
Map<String, Object> message = new HashMap<>();
|
Map<String, Object> message = new HashMap<>();
|
||||||
String result = service.insertBOMngrSubsvc(vo);
|
String result = boSubsvcService.insertBOMngrSubsvc(vo);
|
||||||
message.put("message",result);
|
message.put("message",result);
|
||||||
|
|
||||||
return ResponseEntity.ok(
|
return ResponseEntity.ok(
|
||||||
@@ -345,7 +345,7 @@ public class SubsvcController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 목록 조회
|
// 목록 조회
|
||||||
List<DataMap> list = service.selectBOMngrSubsvcList(vo);
|
List<DataMap> list = boSubsvcService.selectBOMngrSubsvcList(vo);
|
||||||
|
|
||||||
Map<String, Object> content = new HashMap<>();
|
Map<String, Object> content = new HashMap<>();
|
||||||
content.put("paramVO", vo);
|
content.put("paramVO", vo);
|
||||||
@@ -373,7 +373,7 @@ public class SubsvcController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DataMap message = new DataMap();
|
DataMap message = new DataMap();
|
||||||
String result = service.selectBOMngrSubsvcNmDupCheck(vo);
|
String result = boSubsvcService.selectBOMngrSubsvcNmDupCheck(vo);
|
||||||
message.put("message", result);
|
message.put("message", result);
|
||||||
|
|
||||||
return ResponseEntity.ok(
|
return ResponseEntity.ok(
|
||||||
@@ -401,7 +401,7 @@ public class SubsvcController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DataMap message = new DataMap();
|
DataMap message = new DataMap();
|
||||||
String result = service.deleteBOMngrSubsvc(vo);
|
String result = boSubsvcService.deleteBOMngrSubsvc(vo);
|
||||||
message.put("message", result);
|
message.put("message", result);
|
||||||
|
|
||||||
return ResponseEntity.ok(
|
return ResponseEntity.ok(
|
||||||
@@ -429,7 +429,7 @@ public class SubsvcController {
|
|||||||
Map<String, Object> content = new HashMap<>();
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
|
||||||
// 조회조건 구독서비스
|
// 조회조건 구독서비스
|
||||||
List<DataMap> SrchSubsvcGnrList = service.selectBOMngrSrchSubsvcGnrList(vo);
|
List<DataMap> SrchSubsvcGnrList = boSubsvcService.selectBOMngrSrchSubsvcGnrList(vo);
|
||||||
content.put("srchSubsvcGnrList", SrchSubsvcGnrList);
|
content.put("srchSubsvcGnrList", SrchSubsvcGnrList);
|
||||||
|
|
||||||
return ResponseEntity.ok(
|
return ResponseEntity.ok(
|
||||||
|
|||||||
@@ -0,0 +1,251 @@
|
|||||||
|
package com.wb.domainserver.domain.mngr.ordr.subsvc.controller;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.purchs.service.BOOrderService;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.purchs.vo.BOOrderLogVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.subsvc.service.BOSubsvcService;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrService;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.*;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.pay.vo.BOPayVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.subsvc.service.BOSubsvcOrdrService;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.setup.dlvygrp.service.BODlvygrpService;
|
||||||
|
import com.wb.domainserver.domain.gcone.setup.nbkk.service.BONbkkService;
|
||||||
|
import com.wb.domainserver.domain.gcone.setup.nbkk.vo.BOSetupNbkkVO;
|
||||||
|
import com.wb.domainserver.domain.mngr.ordr.ordrmngr.vo.DwldItmVO;
|
||||||
|
import com.wb.domainserver.domain.mngr.ordr.ordrmngr.vo.OrdrShippingVO;
|
||||||
|
import com.wb.domainserver.domain.mngr.ordr.ordrmngr.vo.OrdrSrchVO;
|
||||||
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
|
import com.wb.domainserver.exception.code.ErrorCode;
|
||||||
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||||
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
|
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||||
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
|
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||||
|
import io.micrometer.common.util.StringUtils;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.CookieValue;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 구독서비스 주문 관리 Controller
|
||||||
|
*
|
||||||
|
* @author jazz
|
||||||
|
* @since 2026-02-05
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* == (Modification Information) == 개정이력
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2026-02-05 jazz 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/mngr/ordr/subsvc")
|
||||||
|
@Slf4j
|
||||||
|
public class SubsvcOrdrController {
|
||||||
|
|
||||||
|
/** WebClient 호출을 위한 wrapper */
|
||||||
|
@Autowired
|
||||||
|
private WnbtWebClientResponseHandler responseHandler;
|
||||||
|
|
||||||
|
/** WebClient 호출을 위한 wrapper */
|
||||||
|
@Autowired
|
||||||
|
private SendToResrc sendToResrc;
|
||||||
|
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||||
|
@Autowired
|
||||||
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOSubsvcOrdrService boSubsvcOrdrService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOSubsvcService boSubsvcService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 구독서비스 상품준비 조회 폼
|
||||||
|
* @param subsvcVO,subsvcOrderVO,model,authSopmalCd
|
||||||
|
* @return SubsvcOrdrListForm.jsp
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value="/selectSubsvcOrdrListForm")
|
||||||
|
public String selectSubsvcListForm(BOSubsvcVO subsvcVO, BOSubsvcOrderVO subsvcOrderVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||||
|
subsvcVO.setSopmalCd(authSopmalCd);
|
||||||
|
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
subsvcVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
content.put("paramVO", subsvcOrderVO);
|
||||||
|
|
||||||
|
// 조회조건 구독서비스
|
||||||
|
List<?> SrchSubsvcList = boSubsvcService.selectBOMngrSrchSubsvcList(subsvcVO);
|
||||||
|
content.put("srchSubsvcList", SrchSubsvcList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
return "mngr/ordr/subsvc/SubsvcOrdrListForm";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 구독서비스 상품준비 목록 조회 리스트
|
||||||
|
* @param subsvcOrderVO
|
||||||
|
* @param model
|
||||||
|
* @return SubsvcOrdrList.jsp
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value = "/selectSubsvcOrdrList")
|
||||||
|
public String selectSubsvcList(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||||
|
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 페이징 객체 생성 & 페이징정보 할당
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(subsvcOrderVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(subsvcOrderVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
subsvcOrderVO.setPaginationInfo(paginationInfo);
|
||||||
|
subsvcOrderVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
subsvcOrderVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
subsvcOrderVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
if(StringUtils.isEmpty(subsvcOrderVO.getSortDv())){
|
||||||
|
//정렬기준 초기값 셋팅
|
||||||
|
subsvcOrderVO.setSortDv("subsvcGnrAsc");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 목록 조회
|
||||||
|
List<DataMap> list = boSubsvcOrdrService.selectBOSubsvcOrderList(subsvcOrderVO);
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
content.put("paramVO", subsvcOrderVO);
|
||||||
|
|
||||||
|
content.put("list", list);
|
||||||
|
content.put("paginationInfo", subsvcOrderVO.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
|
||||||
|
return "mngr/ordr/subsvc/SubsvcOrdrList";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 구독서비스 상품준비 일괄처리
|
||||||
|
* @param subsvcOrderVO
|
||||||
|
* @return ResponseEntity<WnbtResponse>
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value = "/updateSubsvcOrdrReady", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
public ResponseEntity<WnbtResponse> updateSubsvcOrdrReady(BOSubsvcOrderVO subsvcOrderVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||||
|
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 체크대상정보 파싱
|
||||||
|
* 형태 : 주문고유번호@주문상품고유번호@주문상품옵션고유번호@주문배송고유번호
|
||||||
|
* */
|
||||||
|
subsvcOrderVO.setArrOrdrInnb(new ArrayList<String>());
|
||||||
|
subsvcOrderVO.setArrOrdrGoodsInnb(new ArrayList<String>());
|
||||||
|
subsvcOrderVO.setArrOrdrGoodsOptnInnb(new ArrayList<String>());
|
||||||
|
subsvcOrderVO.setArrOrdrDlvyInnb(new ArrayList<String>());
|
||||||
|
ArrayList<String> arrCheck = (ArrayList<String>)subsvcOrderVO.getArrCheck();
|
||||||
|
|
||||||
|
((ArrayList<String>)subsvcOrderVO.getArrCheck()).forEach(check -> {
|
||||||
|
String[] innb = check.split("@");
|
||||||
|
subsvcOrderVO.getArrOrdrInnb().add(innb[0]);
|
||||||
|
subsvcOrderVO.getArrOrdrGoodsInnb().add(innb[1]);
|
||||||
|
subsvcOrderVO.getArrOrdrGoodsOptnInnb().add(innb[2]);
|
||||||
|
subsvcOrderVO.getArrOrdrDlvyInnb().add(innb[3]);
|
||||||
|
});
|
||||||
|
|
||||||
|
DataMap message = new DataMap();
|
||||||
|
String result = "";
|
||||||
|
|
||||||
|
try{
|
||||||
|
result = boSubsvcOrdrService.updateSubsvcOrdrReady(subsvcOrderVO);
|
||||||
|
}catch(Exception e){
|
||||||
|
log.error(e.getMessage());
|
||||||
|
result = "fail";
|
||||||
|
}
|
||||||
|
|
||||||
|
message.put("message", result);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 구독서비스 상품준비 배송내역 목록 팝업
|
||||||
|
* @param subsvcOrderVO
|
||||||
|
* @param model
|
||||||
|
* @return SubsvcOrdrList.jsp
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value = "/selectSubsvcOrdrDlvyListPop")
|
||||||
|
public String selectSubsvcOrdrDlvyListPop(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||||
|
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
// 목록 조회
|
||||||
|
List<DataMap> list = boSubsvcOrdrService.selectBOSubsvcOrderDlvyList(subsvcOrderVO);
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
content.put("paramVO", subsvcOrderVO);
|
||||||
|
|
||||||
|
content.put("list", list);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
|
||||||
|
return "mngr/ordr/subsvc/SubsvcOrdrDlvyListPop";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -343,6 +343,8 @@
|
|||||||
, CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
, CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||||
FROM (
|
FROM (
|
||||||
SELECT FG.GOODS_INNB
|
SELECT FG.GOODS_INNB
|
||||||
|
, FGO.GOODS_OPTN_INNB
|
||||||
|
, FGO.OPTN_TY
|
||||||
, FG.DLVY_GROUP_INNB
|
, FG.DLVY_GROUP_INNB
|
||||||
, FG.SOPMAL_CD
|
, FG.SOPMAL_CD
|
||||||
, FG.GOODS_NM
|
, FG.GOODS_NM
|
||||||
@@ -378,6 +380,7 @@
|
|||||||
, FGO.CNSMRPRIC
|
, FGO.CNSMRPRIC
|
||||||
, FGO.SLEPRIC
|
, FGO.SLEPRIC
|
||||||
, FGO.SOPMAL_CD
|
, FGO.SOPMAL_CD
|
||||||
|
, FGO.OPTN_TY
|
||||||
FROM GC_GOODS_OPTION FGO
|
FROM GC_GOODS_OPTION FGO
|
||||||
WHERE FGO.OPTN_EXPSR_AT = 'Y'
|
WHERE FGO.OPTN_EXPSR_AT = 'Y'
|
||||||
AND FGO.STDR_DV_AT = 'Y'
|
AND FGO.STDR_DV_AT = 'Y'
|
||||||
|
|||||||
@@ -0,0 +1,240 @@
|
|||||||
|
<?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.wb.domainserver.domain.gcone.ordr.subsvc.mapper.BOSubsvcOrdrMapper">
|
||||||
|
<!--구독서비스 상품준비 관리 목록-->
|
||||||
|
<select id="selectBOSubsvcOrderList" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
|
||||||
|
SELECT *
|
||||||
|
FROM (
|
||||||
|
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||||
|
, COUNT(*) OVER() AS TOT_CNT
|
||||||
|
, MAIN.*
|
||||||
|
FROM (
|
||||||
|
SELECT ROW_NUMBER() OVER(PARTITION BY GO.ORDR_INNB ORDER BY GO.ORDR_INNB ASC, GOIO.ORDR_STTUS_CD ASC, GOI.ORDR_GOODS_INNB ASC, GOIO.ORDR_GOODS_OPTN_INNB ASC) AS LINE
|
||||||
|
, GO.ORDR_INNB
|
||||||
|
, GOI.ORDR_GOODS_INNB
|
||||||
|
, GOIO.ORDR_GOODS_OPTN_INNB /*일괄처리 대상 주문상품옵션고유번호*/
|
||||||
|
, GOIO.ORDR_DLVY_INNB
|
||||||
|
, GS.SUBSVC_NM
|
||||||
|
, GS.SUBSVC_GNR
|
||||||
|
, GS.SUBSVC_GNR_NM
|
||||||
|
, GM.MBR_NM
|
||||||
|
, GM.MBR_ID
|
||||||
|
, GM.MBR_DV_CD
|
||||||
|
, GM.MBR_INNB
|
||||||
|
, fn_get_member_grad_name(GO.SOPMAL_CD, GM.MBR_DV_CD, GM.MBR_INNB) AS GRADE
|
||||||
|
, SUM(CASE WHEN GOIO.ORDR_STTUS_CD BETWEEN '35' AND '75' THEN 1 ELSE 0 END) OVER(PARTITION BY GO.ORDR_INNB)+1 AS CURT_PROCS_ODR
|
||||||
|
, SUM(CASE WHEN GOIO.ORDR_STTUS_CD BETWEEN '35' AND '75' THEN 1 ELSE 0 END) OVER(PARTITION BY GO.ORDR_INNB) AS MBR_LAST_PROCS_ODR /*회원별 최종차수 상품준비 ~ 배송완료*/
|
||||||
|
, MAX(GOIO.UPDT_DT) OVER(PARTITION BY GO.ORDR_INNB) AS LAST_PRCS_DT/*최종처리일*/
|
||||||
|
, IFNULL(GS.LAST_PROCS_ODR,0) AS LAST_PROCS_ODR /*최종차수*/
|
||||||
|
, GOIO.ORDR_STTUS_CD
|
||||||
|
FROM GC_ORDER GO
|
||||||
|
JOIN GC_SUBSVC GS ON GS.SOPMAL_CD = GO.SOPMAL_CD AND GS.SUBSVC_INNB = GO.SUBSVC_INNB
|
||||||
|
JOIN GC_MEMBER GM ON GM.MBR_DV_CD = GO.MBR_DV_CD AND GM.MBR_INNB = GO.MBR_INNB
|
||||||
|
JOIN GC_ORDER_ITEM GOI ON GO.SOPMAL_CD =GOI.SOPMAL_CD AND GO.ORDR_INNB = GOI.ORDR_INNB
|
||||||
|
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOI.SOPMAL_CD = GOIO.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB AND GOIO.OPTN_TY = '01'
|
||||||
|
WHERE GO.USE_AT = 'Y'
|
||||||
|
AND GO.SUBSVC_AT = 'Y'
|
||||||
|
AND GO.SOPMAL_CD = #{sopmalCd}
|
||||||
|
<if test="srchSelSubsvcNm != null and srchSelSubsvcNm != ''">
|
||||||
|
AND GS.SUBSVC_NM = #{srchSelSubsvcNm} /*구독서비스 명*/
|
||||||
|
</if>
|
||||||
|
<if test="srchSelSubsvcGnr != null and srchSelSubsvcGnr != ''">
|
||||||
|
AND GS.SUBSVC_GNR = #{srchSelSubsvcGnr} /*기수*/
|
||||||
|
</if>
|
||||||
|
<if test="srchSubsvcNm != null and srchSubsvcNm != ''">
|
||||||
|
AND GS.SUBSVC_NM LIKE CONCAT('%',#{srchSubsvcNm},'%') /*구독서비스 명*/
|
||||||
|
</if>
|
||||||
|
<if test="srchSubsvcGnrNm != null and srchSubsvcGnrNm != ''">
|
||||||
|
AND GS.SUBSVC_GNR_NM LIKE CONCAT('%',#{srchSubsvcGnrNm},'%') /*기수명*/
|
||||||
|
</if>
|
||||||
|
) MAIN
|
||||||
|
WHERE (@ROWNUM:=0)=0
|
||||||
|
AND MAIN.LINE = 1
|
||||||
|
AND MAIN.ORDR_STTUS_CD = '25'
|
||||||
|
<if test='srchCurMonExclude!= null and srchCurMonExclude == "Y"'>
|
||||||
|
<![CDATA[
|
||||||
|
AND MAIN.LAST_PRCS_DT < CONCAT(DATE_FORMAT(NOW(),'%Y-%m'),'-01') /*당월 처리자 제외*/
|
||||||
|
]]>
|
||||||
|
</if>
|
||||||
|
<choose>
|
||||||
|
<when test="sortDv == 'subsvcGnrAsc'">
|
||||||
|
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC /*구독서비스명+기수*/
|
||||||
|
</when>
|
||||||
|
<when test="sortDv == 'subsvcGnrDesc'">
|
||||||
|
ORDER BY SUBSVC_NM DESC, SUBSVC_GNR DESC /*구독서비스명+기수*/
|
||||||
|
</when>
|
||||||
|
<when test="sortDv == 'mbrAsc'">
|
||||||
|
ORDER BY MBR_NM ASC, MBR_ID ASC /*주문자순*/
|
||||||
|
</when>
|
||||||
|
<when test="sortDv == 'mbrDesc'">
|
||||||
|
ORDER BY MBR_NM DESC, MBR_ID DESC /*주문자순*/
|
||||||
|
</when>
|
||||||
|
<when test="sortDv == 'ordrAsc'">
|
||||||
|
ORDER BY ORDR_INNB ASC /*주문번호순*/
|
||||||
|
</when>
|
||||||
|
<when test="sortDv == 'ordrDesc'">
|
||||||
|
ORDER BY ORDR_INNB DESC /*주문번호순*/
|
||||||
|
</when>
|
||||||
|
<when test="sortDv == 'lastPrcsDtAsc'">
|
||||||
|
ORDER BY LAST_PRCS_DT ASC /*최종처리일순*/
|
||||||
|
</when>
|
||||||
|
<when test="sortDv == 'lastPrcsDtDesc'">
|
||||||
|
ORDER BY LAST_PRCS_DT ASC /*최종처리일순*/
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
ORDER BY GS.SUBSVC_NM ASC, GS.SUBSVC_GNR ASC
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
) PV
|
||||||
|
WHERE 1=1
|
||||||
|
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--구독서비스 상품준비 관리 목록 배송내역 팝업 배송내역목록-->
|
||||||
|
<select id="selectBOSubsvcOrderDlvyList" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
|
||||||
|
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||||
|
, GOIO.ORDR_GOODS_OPTN_INNB
|
||||||
|
, GO.ORDR_INNB
|
||||||
|
, GM.MBR_NM
|
||||||
|
, GM.MBR_ID
|
||||||
|
, GM.MBR_DV_CD
|
||||||
|
, GM.MBR_INNB
|
||||||
|
, fn_get_member_grad_name(GO.SOPMAL_CD, GM.MBR_DV_CD, GM.MBR_INNB) AS GRADE
|
||||||
|
, IFNULL(GOIO.UPDT_DT, GOIO.REGIST_DT) AS PROCS_DT /*발생일자*/
|
||||||
|
, GOI.GOODS_IMG_COURS
|
||||||
|
, GOI.GOODS_NM
|
||||||
|
, GOIO.OPTN_NM_1
|
||||||
|
, GOIO.OPTN_VAL_1
|
||||||
|
, GOIO.CNSMRPRIC /*정가*/
|
||||||
|
, GOIO.SLEPRIC /*판매가*/
|
||||||
|
, fn_get_commcode_name('ORDR_STTUS', GOIO.ORDR_STTUS_CD) AS ORDR_STTUS
|
||||||
|
FROM GC_ORDER GO
|
||||||
|
JOIN GC_MEMBER GM ON GM.MBR_DV_CD = GO.MBR_DV_CD AND GM.MBR_INNB = GO.MBR_INNB
|
||||||
|
JOIN GC_ORDER_ITEM GOI ON GOI.SOPMAL_CD = GO.SOPMAL_CD AND GOI.ORDR_INNB = GO.ORDR_INNB
|
||||||
|
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOI.SOPMAL_CD = GOIO.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB AND GOIO.OPTN_TY = '01'
|
||||||
|
WHERE (@ROWNUM:=0)=0
|
||||||
|
AND GOI.ORDR_INNB = #{ordrInnb}
|
||||||
|
AND GOI.SOPMAL_CD = #{sopmalCd}
|
||||||
|
ORDER BY GOIO.ORDR_GOODS_OPTN_INNB ASC
|
||||||
|
</select>
|
||||||
|
<!--구독서비스 상품준비 관리 상품매칭 - 1. GC_ORDER update-->
|
||||||
|
<update id="updateBOSubsvcGoodsMappgOrdr" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||||
|
<foreach collection="arrOrdrInnb" item="ordrInnb" separator=";">
|
||||||
|
UPDATE GC_ORDER
|
||||||
|
SET ORDR_STTUS_CD = (CASE WHEN ORDR_STTUS_CD = '25' THEN '35' ELSE ORDR_STTUS_CD END)
|
||||||
|
, UPDT_DT = NOW()
|
||||||
|
WHERE SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND ORDR_INNB = #{ordrInnb}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
<!--구독서비스 상품준비 관리 상품매칭 - 2. GC_ORDER_ITEM update-->
|
||||||
|
<update id="updateBOSubsvcGoodsMappgOrdrItem" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||||
|
<foreach collection="arrOrdrGoodsInnb" item="ordrGoodsInnb" separator=";">
|
||||||
|
UPDATE GC_ORDER_ITEM GOI, (SELECT GG.GOODS_INNB, GG.GOODS_NM, GGI.IMG
|
||||||
|
FROM GC_GOODS GG
|
||||||
|
JOIN GC_GOODS_IMAGE GGI ON GGI.SOPMAL_CD = GG.SOPMAL_CD AND GGI.GOODS_INNB = GG.GOODS_INNB AND GGI.CUT_NB = 1 AND GGI.IMG_KND = '02'
|
||||||
|
WHERE GG.GOODS_INNB = #{goodsInnb}
|
||||||
|
LIMIT 1) G
|
||||||
|
SET GOI.GOODS_INNB = G.GOODS_INNB
|
||||||
|
, GOI.GOODS_NM = G.GOODS_NM
|
||||||
|
, GOI.GOODS_IMG_COURS = G.IMG
|
||||||
|
WHERE SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GOI.ORDR_GOODS_INNB = #{ordrGoodsInnb}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
<!--구독서비스 상품준비 관리 상품매칭 - 3. GC_ORDER_ITEM_OPTION update-->
|
||||||
|
<update id="updateBOSubsvcGoodsMappgOrdrItemOptn" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||||
|
<foreach collection="arrOrdrGoodsOptnInnb" item="ordrGoodsOptnInnb" separator=";">
|
||||||
|
UPDATE GC_ORDER_ITEM_OPTION GOIO, (SELECT GOODS_OPTN_INNB
|
||||||
|
, OPTN_TY
|
||||||
|
, OPTN_NM_1
|
||||||
|
, OPTN_NM_2
|
||||||
|
, OPTN_NM_3
|
||||||
|
, OPTN_NM_4
|
||||||
|
, OPTN_VAL_1
|
||||||
|
, OPTN_VAL_2
|
||||||
|
, OPTN_VAL_3
|
||||||
|
, OPTN_VAL_4
|
||||||
|
, OPTN_CD_1
|
||||||
|
, OPTN_CD_2
|
||||||
|
, OPTN_CD_3
|
||||||
|
, OPTN_CD_4
|
||||||
|
, OPTN_INFO
|
||||||
|
, CNSMRPRIC
|
||||||
|
, SLEPRIC
|
||||||
|
, GG.TAX_AT
|
||||||
|
FROM GC_GOODS_OPTION GGO
|
||||||
|
JOIN GC_GOODS GG ON GG.SOPMAL_CD = GGO.SOPMAL_CD AND GG.GOODS_INNB = GGO.GOODS_INNB
|
||||||
|
WHERE GGO.GOODS_OPTN_INNB = #{goodsOptnInnb}
|
||||||
|
AND GGO.OPTN_TY = #{optnTy}
|
||||||
|
LIMIT 1) G
|
||||||
|
SET GOIO.GOODS_OPTN_INNB = G.GOODS_OPTN_INNB
|
||||||
|
, GOIO.OPTN_TY = G.OPTN_TY
|
||||||
|
, GOIO.OPTN_NM_1 = G.OPTN_NM_1
|
||||||
|
, GOIO.OPTN_NM_2 = G.OPTN_NM_2
|
||||||
|
, GOIO.OPTN_NM_3 = G.OPTN_NM_3
|
||||||
|
, GOIO.OPTN_NM_4 = G.OPTN_NM_4
|
||||||
|
, GOIO.OPTN_VAL_1 = G.OPTN_VAL_1
|
||||||
|
, GOIO.OPTN_VAL_2 = G.OPTN_VAL_2
|
||||||
|
, GOIO.OPTN_VAL_3 = G.OPTN_VAL_3
|
||||||
|
, GOIO.OPTN_VAL_4 = G.OPTN_VAL_4
|
||||||
|
, GOIO.OPTN_CD_1 = G.OPTN_CD_1
|
||||||
|
, GOIO.OPTN_CD_2 = G.OPTN_CD_2
|
||||||
|
, GOIO.OPTN_CD_3 = G.OPTN_CD_3
|
||||||
|
, GOIO.OPTN_CD_4 = G.OPTN_CD_4
|
||||||
|
, GOIO.OPTN_INFO = G.OPTN_INFO
|
||||||
|
, GOIO.CNSMRPRIC = G.CNSMRPRIC
|
||||||
|
, GOIO.SLEPRIC = G.SLEPRIC
|
||||||
|
, GOIO.TAX_AT = G.TAX_AT
|
||||||
|
, GOIO.STEP85 = 0
|
||||||
|
, GOIO.STEP35 = GOIO.ORDR_QY
|
||||||
|
, GOIO.STEP45 = 0
|
||||||
|
, GOIO.STEP55 = 0
|
||||||
|
, GOIO.STEP65 = 0
|
||||||
|
, GOIO.STEP75 = 0
|
||||||
|
, GOIO.ORDR_STTUS_CD = '35'
|
||||||
|
, GOIO.UPDT_DT = NOW()
|
||||||
|
WHERE GOIO.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GOIO.ORDR_GOODS_OPTN_INNB = #{ordrGoodsOptnInnb}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
<!--구독서비스 상품준비 관리 상품매칭 - 4. GC_ORDER_SHIPPING update-->
|
||||||
|
<update id="updateBOSubsvcGoodsMappgShipping" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||||
|
<foreach collection="arrOrdrDlvyInnb" item="ordrDlvyInnb" separator=";">
|
||||||
|
UPDATE GC_ORDER_SHIPPING
|
||||||
|
SET ORDR_STTUS_CD = '35'
|
||||||
|
, UPDT_DT = NOW()
|
||||||
|
WHERE SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND ORDR_DLVY_INNB = #{ordrDlvyInnb}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
<!--구독서비스 상품준비 관리 상품매칭 - 5. GC_SUBSVC update-->
|
||||||
|
<update id="updateBOSubsvcGoodsMappgSubsvc" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||||
|
UPDATE GC_SUBSVC GS, ( SELECT SOPMAL_CD, SUBSVC_INNB, MAX(LAST_PROCS_ODR) LAST_PROCS_ODR
|
||||||
|
FROM (
|
||||||
|
SELECT GOIO.SOPMAL_CD, GO.SUBSVC_INNB, SUM(CASE WHEN GOIO.ORDR_STTUS_CD BETWEEN '35' AND '75' THEN 1 ELSE 0 END) OVER(PARTITION BY GO.SOPMAL_CD, GO.ORDR_INNB) AS LAST_PROCS_ODR
|
||||||
|
FROM GC_ORDER GO
|
||||||
|
JOIN GC_ORDER_ITEM GOI ON GOI.SOPMAL_CD = GO.SOPMAL_CD AND GOI.ORDR_INNB = GO.ORDR_INNB
|
||||||
|
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOIO.SOPMAL_CD = GOI.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB
|
||||||
|
WHERE GO.SUBSVC_AT = 'Y'
|
||||||
|
AND GO.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GO.SUBSVC_INNB IN (SELECT DISTINCT SUBSVC_INNB
|
||||||
|
FROM GC_ORDER
|
||||||
|
WHERE SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND ORDR_INNB IN
|
||||||
|
<foreach collection="arrOrdrInnb" item="ordrInnb" open="(" close=")" separator=",">
|
||||||
|
#{ordrInnb}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
) M
|
||||||
|
GROUP BY SOPMAL_CD, SUBSVC_INNB
|
||||||
|
) MAIN
|
||||||
|
SET GS.LAST_PROCS_ODR = MAIN.LAST_PROCS_ODR
|
||||||
|
, UPDT_DT = NOW()
|
||||||
|
WHERE GS.SOPMAL_CD = MAIN.SOPMAL_CD
|
||||||
|
AND GS.SUBSVC_INNB = MAIN.SUBSVC_INNB
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
||||||
|
|
||||||
@@ -2977,6 +2977,7 @@
|
|||||||
<spring:eval expression="@environment.getProperty('spring.servlet.multipart.max-file-size')" var="maxFileSize"/>
|
<spring:eval expression="@environment.getProperty('spring.servlet.multipart.max-file-size')" var="maxFileSize"/>
|
||||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||||
|
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
|
||||||
<input type="hidden" id="cdnurl" value="${cdnurl}"/>
|
<input type="hidden" id="cdnurl" value="${cdnurl}"/>
|
||||||
<section id="section01" class="content-section content-scroll-detect content-fold">
|
<section id="section01" class="content-section content-scroll-detect content-fold">
|
||||||
<div class="content-fold__header">
|
<div class="content-fold__header">
|
||||||
@@ -5071,7 +5072,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="product-group__description">
|
<div class="product-group__description">
|
||||||
<p><c:out value="${goodsInfo.goodsNm}"/></p>
|
<p><c:out value="${goodsInfo.goodsNm}"/></p>
|
||||||
<p class="product-group__description-price"><fmt:formatNumber value="${goodsInfo.slepric}" pattern="#,###"/>원</p>
|
<p class="product-group__description-price"><fmt:formatNumber value="${goodsInfo.slepric}" pattern="#,###"/>${curUnit}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
$('#appendList tr').each(function() {
|
$('#appendList tr').each(function() {
|
||||||
const goodsId = $(this).attr('id').replace('choiseListId', '');
|
const goodsId = $(this).attr('id').replace('choiseListId', '');
|
||||||
|
const goodsOptnInnb = $(this).find('input[name="goodsOptnInnb"]').val();
|
||||||
|
const optnTy = $(this).find('input[name="optnTy"]').val();
|
||||||
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
||||||
const goodsNm = $(this).find('input[name="goodsNm"]').val();
|
const goodsNm = $(this).find('input[name="goodsNm"]').val();
|
||||||
const goodsPrice = $(this).find('input[name="slepric"]').val();
|
const goodsPrice = $(this).find('input[name="slepric"]').val();
|
||||||
@@ -32,6 +34,8 @@
|
|||||||
if (goodsId) {
|
if (goodsId) {
|
||||||
selectedGoods.push({
|
selectedGoods.push({
|
||||||
goodsId: goodsId,
|
goodsId: goodsId,
|
||||||
|
goodsOptnInnb: goodsOptnInnb,
|
||||||
|
optnTy: optnTy,
|
||||||
goodsImg: goodsImg,
|
goodsImg: goodsImg,
|
||||||
goodsNm: goodsNm,
|
goodsNm: goodsNm,
|
||||||
goodsPrice: goodsPrice,
|
goodsPrice: goodsPrice,
|
||||||
@@ -46,6 +50,8 @@
|
|||||||
var copyTr = $(this).clone();
|
var copyTr = $(this).clone();
|
||||||
|
|
||||||
var goodsId = $(this).find('input[name="goodsInnb"]').val();
|
var goodsId = $(this).find('input[name="goodsInnb"]').val();
|
||||||
|
var goodsOptnInnb = $(this).find('input[name="goodsOptnInnb"]').val();
|
||||||
|
var optnTy = $(this).find('input[name="optnTy"]').val();
|
||||||
var goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
var goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
||||||
var goodsNm = $(this).find('input[name="goodsNm"]').val();
|
var goodsNm = $(this).find('input[name="goodsNm"]').val();
|
||||||
var goodsPrice = $(this).find('input[name="slepric"]').val();
|
var goodsPrice = $(this).find('input[name="slepric"]').val();
|
||||||
@@ -75,6 +81,8 @@
|
|||||||
|
|
||||||
selectedGoods.push({
|
selectedGoods.push({
|
||||||
goodsId: goodsId,
|
goodsId: goodsId,
|
||||||
|
goodsOptnInnb: goodsOptnInnb,
|
||||||
|
optnTy: optnTy,
|
||||||
goodsImg: goodsImg,
|
goodsImg: goodsImg,
|
||||||
goodsNm: goodsNm,
|
goodsNm: goodsNm,
|
||||||
goodsPrice: goodsPrice,
|
goodsPrice: goodsPrice,
|
||||||
@@ -151,6 +159,8 @@
|
|||||||
<tr class="searchList">
|
<tr class="searchList">
|
||||||
<td class="text-left">
|
<td class="text-left">
|
||||||
<input type="hidden" id="goodsInnb" name="goodsInnb" value="<c:out value="${ list.goodsInnb }"/>"/>
|
<input type="hidden" id="goodsInnb" name="goodsInnb" value="<c:out value="${ list.goodsInnb }"/>"/>
|
||||||
|
<input type="hidden" id="goodsOptnInnb" name="goodsOptnInnb" value="<c:out value="${ list.goodsOptnInnb }"/>"/>
|
||||||
|
<input type="hidden" id="optnTy" name="optnTy" value="<c:out value="${ list.optnTy }"/>"/>
|
||||||
<input type="hidden" id="goodsImgCours" name="goodsImgCours" value="<c:out value="${cdnurl}${ list.goodsImgCours }"/>"/>
|
<input type="hidden" id="goodsImgCours" name="goodsImgCours" value="<c:out value="${cdnurl}${ list.goodsImgCours }"/>"/>
|
||||||
<input type="hidden" id="goodsNm" name="goodsNm" value="<c:out value="${ list.goodsNm }"/>"/>
|
<input type="hidden" id="goodsNm" name="goodsNm" value="<c:out value="${ list.goodsNm }"/>"/>
|
||||||
<input type="hidden" id="slepric" name="slepric" value="<fmt:parseNumber value="${ list.slepric }"/>"/>
|
<input type="hidden" id="slepric" name="slepric" value="<fmt:parseNumber value="${ list.slepric }"/>"/>
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||||
|
|
||||||
<%--
|
<%--
|
||||||
Class Name : GoodsListR.jsp
|
Class Name : SubsvcList.jsp
|
||||||
Description : 상품 목록 조회 리스트
|
Description : 구독서비스 목록 조회 리스트
|
||||||
Modification Information
|
Modification Information
|
||||||
|
|
||||||
수정일 수정자 수정내용
|
수정일 수정자 수정내용
|
||||||
------- -------- ---------------------------
|
------- -------- ---------------------------
|
||||||
2024-03-20 리브가 최초 생성
|
2026-02-05 jazz 최초 생성
|
||||||
--%>
|
--%>
|
||||||
<section class="content-section">
|
<section class="content-section">
|
||||||
<div class="form-control-container">
|
<div class="form-control-container">
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
<hr class="horizontal-line">
|
<hr class="horizontal-line">
|
||||||
<div class="form-control-container">
|
<div class="form-control-container">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<button class="btn outline sm" onclick="fn_delete_check();return false;">선택 삭제</button>
|
<button class="btn dark sm" onclick="fn_delete_check();return false;">선택 삭제</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
</div>
|
</div>
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<label class="b-checkbox checkbox is-medium ">
|
<label class="b-checkbox checkbox is-medium">
|
||||||
<input type="checkbox" id="checkAll" value="">
|
<input type="checkbox" id="checkAll" value="">
|
||||||
<span class="check"></span>
|
<span class="check"></span>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||||
|
|
||||||
<%--
|
<%--
|
||||||
Class Name : GoodsListRForm.jsp
|
Class Name : SubsvcListForm.jsp
|
||||||
Description : 상품 목록 조회 폼
|
Description : 구독서비스 목록 조회 폼
|
||||||
Modification Information
|
Modification Information
|
||||||
|
|
||||||
수정일 수정자 수정내용
|
수정일 수정자 수정내용
|
||||||
------- -------- ---------------------------
|
------- -------- ---------------------------
|
||||||
2024-03-20 리브가 최초 생성
|
2026-02-05 jazz 최초 생성
|
||||||
--%>
|
--%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
@@ -172,9 +172,11 @@
|
|||||||
const result = JSON.parse(data.resBody.result);
|
const result = JSON.parse(data.resBody.result);
|
||||||
const srchSubsvcGnrList = result.srchSubsvcGnrList;
|
const srchSubsvcGnrList = result.srchSubsvcGnrList;
|
||||||
if (srchSubsvcGnrList.length > 0) {
|
if (srchSubsvcGnrList.length > 0) {
|
||||||
$('#srchSubsvcGnr option').filter(function() {
|
// 회차 초기화
|
||||||
return $(this).val() !== '';
|
$('#srchSelSubsvcGnr').empty().append('<option value="">전체</option>').niceSelect('update');
|
||||||
}).remove();
|
// $('#srchSubsvcGnr option').filter(function() {
|
||||||
|
// return $(this).val() !== '';
|
||||||
|
// }).remove();
|
||||||
|
|
||||||
for (let i = 0; i < srchSubsvcGnrList.length; i++) {
|
for (let i = 0; i < srchSubsvcGnrList.length; i++) {
|
||||||
const srchSubsvcGnr = srchSubsvcGnrList[i];
|
const srchSubsvcGnr = srchSubsvcGnrList[i];
|
||||||
|
|||||||
@@ -0,0 +1,124 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||||
|
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||||
|
<%--
|
||||||
|
Class Name : subsvcOrdrDlvyListPop.jsp
|
||||||
|
Description : 구독서비스 상품준비 관리 배송내역 팝업
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2026-02-07 jazz 최초 생성
|
||||||
|
--%>
|
||||||
|
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||||
|
<div id="subsvcOrdrDlvyListPop" class="modal" style="max-width: 1000px;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4>배송내역</h4>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="form-control-container mb-10">
|
||||||
|
<div class="left">
|
||||||
|
</div>
|
||||||
|
<div class="center">
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class=" table-wrapper mb-40">
|
||||||
|
<table class="table">
|
||||||
|
<caption>주문자/주문번호 정보</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 15%;">
|
||||||
|
<col style="width: 35%;">
|
||||||
|
<col style="width: 15%;">
|
||||||
|
<col style="width: 35%;">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>주문자</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<c:if test="${not empty resultMap.list}">
|
||||||
|
${resultMap.list[0].mbrNm} (${resultMap.list[0].mbrId}/${resultMap.list[0].grade})
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<th>주문번호</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<c:if test="${not empty resultMap.list}">${resultMap.list[0].ordrInnb}</c:if>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<div class=" table-wrapper mb-40">
|
||||||
|
<table class="table vertical" style="max-height: 200px;">
|
||||||
|
<caption>배송정보</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 5%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
<col style="width: 35%;">
|
||||||
|
<col style="width: 15%;">
|
||||||
|
<col style="width: 15%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>차수</th>
|
||||||
|
<th>발생일자</th>
|
||||||
|
<th colspan="2">상품명</th>
|
||||||
|
<th>정가</th>
|
||||||
|
<th>판매가</th>
|
||||||
|
<th>상태</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${ not empty resultMap.list }">
|
||||||
|
<c:forEach items="${ resultMap.list }" var="dlvy" varStatus="status">
|
||||||
|
<tr>
|
||||||
|
<td><c:out value="${dlvy.rnum}"/></td>
|
||||||
|
<fmt:parseDate value="${dlvy.procsDt}" pattern="yyyy-MM-dd HH:mm:ss" var="parsePrcsDt"/>
|
||||||
|
<fmt:formatDate value="${parsePrcsDt }" var="formatPrcsDt" pattern="yyyy-MM-dd"/>
|
||||||
|
<td><c:out value="${formatPrcsDt}"/></td>
|
||||||
|
<td><img src='<c:out value="${cdnurl}${dlvy.goodsImgCours}"/>' onerror="this.src='/pc/images/image_placeholder.png'" alt='<c:out value="${dlvy.goodsNm}"/>' width="56px" height="56px"></td>
|
||||||
|
<td>
|
||||||
|
<div class="order-section__product-info">
|
||||||
|
<span class="order-section__product-productTitle"><c:out value="${dlvy.goodsNm}"/></span>
|
||||||
|
<span class="option-text">
|
||||||
|
<span class="option-badge">옵션</span> <c:out value="${dlvy.optnNm1}"/>:<c:out value="${dlvy.optnVal1}"/>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td><fmt:formatNumber value="${dlvy.cnsmrpric}" pattern="#,###"/></td>
|
||||||
|
<td><fmt:formatNumber value="${dlvy.slepric}" pattern="#,###"/></td>
|
||||||
|
<td><c:out value="${dlvy.ordrSttus}"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<tr>
|
||||||
|
<td colspan="100%"><spring:message code="common.nodata"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a href="#" id="btn_close_modal_bbsC" rel="modal:close" class="btn outline">닫기</a>
|
||||||
|
</div>
|
||||||
|
<a href="#close-modal" rel="modal:close" class="close-modal ">Close</a>
|
||||||
|
</div>
|
||||||
|
<script src="/mngr/js/script.js" defer=""></script>
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||||
|
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||||
|
|
||||||
|
<%--
|
||||||
|
Class Name : SubsvcOrdrList.jsp
|
||||||
|
Description : 구독서비스 상품준비 목록
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2026-02-05 jazz 최초 생성
|
||||||
|
--%>
|
||||||
|
<section class="content-section">
|
||||||
|
<div class="form-control-container">
|
||||||
|
<div class="left">
|
||||||
|
<div class="search-number">
|
||||||
|
<span class="search-number__text">총 <strong><c:out value="${ resultMap.paginationInfo.totalRecordCount }"/></strong>건</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="center">
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="select-box">
|
||||||
|
<select title="정렬순" name="sortDvView" id="sortDvView" onchange="fn_select_list(1);return false;">
|
||||||
|
<option value="subsvcGnrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'subsvcGnrAsc'}">selected="selected"</c:if>>구독서비스+기수 오름차순</option>
|
||||||
|
<option value="subsvcGnrDesc" <c:if test="${resultMap.paramVO.sortDv eq 'subsvcGnrDesc'}">selected="selected"</c:if>>구독서비스+기수 내림차순</option>
|
||||||
|
<option value="mbrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'mbrAsc'}">selected="selected"</c:if>>주문자 오름차순</option>
|
||||||
|
<option value="mbrDesc" <c:if test="${resultMap.paramVO.sortDv eq 'mbrDesc'}">selected="selected"</c:if>>주문자 내림차순</option>
|
||||||
|
<option value="ordrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'ordrAsc'}">selected="selected"</c:if>>주문번호 오름차순</option>
|
||||||
|
<option value="ordrDesc" <c:if test="${resultMap.paramVO.sortDv eq 'ordrDesc'}">selected="selected"</c:if>>주문번호 내림차순</option>
|
||||||
|
<option value="lastPrcsDtAsc" <c:if test="${resultMap.paramVO.sortDv eq 'lastPrcsDtAsc'}">selected="selected"</c:if>>최종처리일 오름차순</option>
|
||||||
|
<option value="lastPrcsDtDesc" <c:if test="${resultMap.paramVO.sortDv eq 'lastPrcsDtDesc'}">selected="selected"</c:if>>최종처리일 내림차순</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="select-box">
|
||||||
|
<select id="pageUnitView" name="pageUnitView" title="페이지당 출력될 목록건수" onchange="fn_select_list(1,this.value);return false;">
|
||||||
|
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||||
|
<option value="<c:out value="${ pageUnit }"/>"
|
||||||
|
<c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit}">selected="selected"</c:if>>
|
||||||
|
<c:out value="${ pageUnit }"/>개씩
|
||||||
|
</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr class="horizontal-line">
|
||||||
|
<div class="form-control-container">
|
||||||
|
<div class="left">
|
||||||
|
<button class="btn sm dark" onclick="fn_allOrdrReady_check();return false;">상품준비 일괄처리</button>
|
||||||
|
</div>
|
||||||
|
<div class="center">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr class="spacing">
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="table vertical">
|
||||||
|
<caption>구독서비스 목록</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 4%;">
|
||||||
|
<col style="width: 20%;">
|
||||||
|
<col style="width: 6%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
<col style="width: 15%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<label class="b-checkbox checkbox is-medium ">
|
||||||
|
<input type="checkbox" id="checkAll" value="">
|
||||||
|
<span class="check"></span>
|
||||||
|
</label>
|
||||||
|
</th>
|
||||||
|
<th>구독서비스</th>
|
||||||
|
<th>기수</th>
|
||||||
|
<th>기수명</th>
|
||||||
|
<th>주문자</th>
|
||||||
|
<th>주문번호</th>
|
||||||
|
<th>처리 차수</th>
|
||||||
|
<th>최종 차수</th>
|
||||||
|
<th>최종 처리일</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${ not empty resultMap.list }">
|
||||||
|
<c:forEach items="${ resultMap.list }" var="subsvcOrdr" varStatus="status">
|
||||||
|
<tr<c:if test="${lastProcsOdr > mbrLastProcsOdr}"> class="sendOut-info__reseller"</c:if>>
|
||||||
|
<td>
|
||||||
|
<label class="b-checkbox checkbox is-medium check-all">
|
||||||
|
<input type="checkbox" name="arrCheck" class="arrCheck" value="${subsvcOrdr.ordrInnb}@${subsvcOrdr.ordrGoodsInnb}@${subsvcOrdr.ordrGoodsOptnInnb}@${subsvcOrdr.ordrDlvyInnb}">
|
||||||
|
<span class="check"></span>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td><c:out value="${subsvcOrdr.subsvcNm}"/></td>
|
||||||
|
<td><c:out value="${subsvcOrdr.subsvcGnr}"/>기</td>
|
||||||
|
<td><c:out value="${subsvcOrdr.subsvcGnrNm}"/></td>
|
||||||
|
<td><c:out value="${subsvcOrdr.mbrNm}"/></br>(<c:out value="${subsvcOrdr.mbrId}"/>/<c:out value="${subsvcOrdr.grade}"/>)</td>
|
||||||
|
<td><c:out value="${subsvcOrdr.ordrInnb}"/></td>
|
||||||
|
<td><c:out value="${subsvcOrdr.curtProcsOdr}"/></td>
|
||||||
|
<td><c:out value="${subsvcOrdr.mbrLastProcsOdr}"/>회 <button class="btn xsm outline light-gray" type="button" onclick="fn_open_modal('#modalDiv','#subsvcOrdrDlvyListPop','<c:url value ='/mngr/ordr/subsvc/selectSubsvcOrdrDlvyListPop'/>',{'ordrInnb':'<c:out value="${subsvcOrdr.ordrInnb}"/>'}); return false;">배송내역</button></td>
|
||||||
|
<fmt:parseDate value="${subsvcOrdr.lastPrcsDt}" pattern="yyyy-MM-dd HH:mm:ss" var="parseLastPrcsDt"/>
|
||||||
|
<fmt:formatDate value="${parseLastPrcsDt }" var="formatLastPrcsDt" pattern="yyyy-MM-dd"/>
|
||||||
|
<td><c:out value="${ formatLastPrcsDt }"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<tr>
|
||||||
|
<td colspan="100%"><spring:message code="common.nodata"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="pagination__container">
|
||||||
|
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_list"/>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,513 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||||
|
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||||
|
|
||||||
|
<%--
|
||||||
|
Class Name : SubsvcOrdrListFrom.jsp
|
||||||
|
Description : 구독서비스 상품준비 목록 조회 폼
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2026-02-05 jazz 최초 생성
|
||||||
|
--%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>일반 관리자</title>
|
||||||
|
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||||
|
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
|
||||||
|
</head>
|
||||||
|
<script>
|
||||||
|
var initFlag = true;
|
||||||
|
$(document).ready(function () {
|
||||||
|
let pageIndex = $("#pageIndex").val();
|
||||||
|
let pageUnit = $("#pageUnit").val();
|
||||||
|
let srchSelSubsvcNm = $('#srchSelSubsvcNm').val();
|
||||||
|
// event 제어
|
||||||
|
fn_event();
|
||||||
|
|
||||||
|
if(srchSelSubsvcNm != ''){
|
||||||
|
fn_getsubsvcGnr(srchSelSubsvcNm);
|
||||||
|
}else{
|
||||||
|
// 목록 조회
|
||||||
|
fn_select_list(pageIndex, pageUnit);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 엔터키 검색
|
||||||
|
$('#listForm').on('keydown', function (event) {
|
||||||
|
if (event.keyCode === 13) {
|
||||||
|
event.preventDefault();
|
||||||
|
fn_select_list(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/*********************************************************
|
||||||
|
* 목록 조회
|
||||||
|
******************************************************** */
|
||||||
|
const fn_select_list = function (pageIndex, pageUnit) {
|
||||||
|
let dataStr;
|
||||||
|
|
||||||
|
if (!pageIndex) {
|
||||||
|
$('#pageIndex').val(1);
|
||||||
|
} else {
|
||||||
|
$('#pageIndex').val(pageIndex);
|
||||||
|
}
|
||||||
|
//정렬기준 셋팅
|
||||||
|
if(typeof $('#sortDvView') !== undefined && $('#sortDvView').val() !== undefined){
|
||||||
|
$('#sortDv').val($('#sortDvView').val());
|
||||||
|
}
|
||||||
|
//한페이지 목록개수 셋팅
|
||||||
|
if(typeof $('#pageUnitView') !== undefined && $('#pageUnitView').val() !== undefined){
|
||||||
|
$('#pageUnit').val($('#pageUnitView').val());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pageUnit) {
|
||||||
|
dataStr = $('#listForm').serialize();
|
||||||
|
} else {
|
||||||
|
if ($('#pageUnit').length) {
|
||||||
|
$('#pageUnit').val(pageUnit);
|
||||||
|
dataStr = $('#listForm').serialize();
|
||||||
|
} else {
|
||||||
|
dataStr = $('#listForm').serialize() + '&pageUnit=' + pageUnit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<c:url value="/mngr/ordr/subsvc/selectSubsvcOrdrList"/>",
|
||||||
|
data: dataStr,
|
||||||
|
success: function (resultHtml) {
|
||||||
|
$('#pageDiv').html(resultHtml);
|
||||||
|
$('#sortDv').val($('#sortDvView').val());
|
||||||
|
$('#pageUnitView').niceSelect();
|
||||||
|
$('#sortDvView').niceSelect();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 현제uri에 프로토콜, 호스트, 쿼리스티링을 제외하여 history갱신 */
|
||||||
|
history.replaceState({}, null, location.pathname);
|
||||||
|
|
||||||
|
/* ****************************
|
||||||
|
* event 제어
|
||||||
|
******************************/
|
||||||
|
const fn_event = function () {
|
||||||
|
/* 검색조건 구독서비스 선택 시 회차 조회 이벤트*/
|
||||||
|
$(document).on('change', '#srchSelSubsvcNm', function(){
|
||||||
|
var srchSelSubsvcNm = $(this).val();
|
||||||
|
if(fn_is_empty(srchSelSubsvcNm)){
|
||||||
|
// 회차 초기화
|
||||||
|
$('#srchSelSubsvcGnr').empty().append('<option value="">전체</option>').niceSelect('update');
|
||||||
|
}else{
|
||||||
|
//해당구독서비스 기수조회
|
||||||
|
fn_getsubsvcGnr(srchSelSubsvcNm);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/* 목록 > 전체선택 체인지 이벤트 */
|
||||||
|
$(document).on('change', '#checkAll', function () {
|
||||||
|
let checkbox = $(this).closest('table').find('input[name="arrCheck"]');
|
||||||
|
|
||||||
|
$(checkbox).prop('checked', false);
|
||||||
|
$(checkbox).prop('checked', $(this).is(':checked'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ****************************
|
||||||
|
* 해당구독서비스 기수조회 AJAX
|
||||||
|
******************************/
|
||||||
|
const fn_getsubsvcGnr = function (srchSelSubsvcNm) {
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: '<c:url value="/mngr/goods/subsvc/selectSrchSubsvcGnrListAjax"/>',
|
||||||
|
data: {
|
||||||
|
'srchSelSubsvcNm': srchSelSubsvcNm
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
if (data.resBody != null) {
|
||||||
|
const result = JSON.parse(data.resBody.result);
|
||||||
|
const srchSubsvcGnrList = result.srchSubsvcGnrList;
|
||||||
|
if (srchSubsvcGnrList.length > 0) {
|
||||||
|
// 회차 초기화
|
||||||
|
$('#srchSelSubsvcGnr').empty().append('<option value="">전체</option>').niceSelect('update');
|
||||||
|
// $('#srchSubsvcGnr option').filter(function() {
|
||||||
|
// return $(this).val() !== '';
|
||||||
|
// }).remove();
|
||||||
|
|
||||||
|
for (let i = 0; i < srchSubsvcGnrList.length; i++) {
|
||||||
|
const srchSubsvcGnr = srchSubsvcGnrList[i];
|
||||||
|
var check = "";
|
||||||
|
if(srchSubsvcGnr.subsvcGnr == '${resultMap.paramVO.srchSelSubsvcGnr}'){
|
||||||
|
check ="selected"
|
||||||
|
}
|
||||||
|
|
||||||
|
if(initFlag == true){
|
||||||
|
$('#srchSelSubsvcGnr').append('<option value="' + srchSubsvcGnr.subsvcGnr + '" '+ check+'>' + srchSubsvcGnr.subsvcGnrNm + '</option>');
|
||||||
|
fn_select_list();
|
||||||
|
initFlag = false;
|
||||||
|
}else{
|
||||||
|
$('#srchSelSubsvcGnr').append('<option value="' + srchSubsvcGnr.subsvcGnr + '">' + srchSubsvcGnr.subsvcGnrNm + '</option>');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$('#srchSelSubsvcGnr').niceSelect('update');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (data) {
|
||||||
|
fn_proc_error_message(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 체크박스 전체 처리
|
||||||
|
* */
|
||||||
|
const fn_change_event = function (_target, _arg) {
|
||||||
|
if (_arg === 'all') {
|
||||||
|
|
||||||
|
if ($('#' + _target + '-all').is(':checked')) {
|
||||||
|
$('[name=' + _target + ']').prop('checked', true);
|
||||||
|
} else {
|
||||||
|
$('[name=' + _target + ']').prop('checked', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
let chkCnt = $('[name=' + _target + ']:checked').length;
|
||||||
|
let allCnt = $('[name=' + _target + ']').length;
|
||||||
|
if (chkCnt !== allCnt && $('#' + _target + '-all').is(':checked')) {
|
||||||
|
$('#' + _target + '-all').prop('checked', false);
|
||||||
|
} else if (chkCnt === allCnt) {
|
||||||
|
$('#' + _target + '-all').prop('checked', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************************
|
||||||
|
* 선택된 대상자 구독서비스 상품준비 일괄처리 AJAX
|
||||||
|
*********************************************************/
|
||||||
|
const fn_allOrdrReady_check = function () {
|
||||||
|
|
||||||
|
let url = '<c:url value="/mngr/ordr/subsvc/updateSubsvcOrdrReady"/>';
|
||||||
|
let check = $("input[name='arrCheck']:checked");
|
||||||
|
let param = $('#listForm').serialize();
|
||||||
|
|
||||||
|
if (check.length === 0) {
|
||||||
|
alert("선택된 대상이 없습니다");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 출고상품 선택 확인*/
|
||||||
|
if($('#goodsInnb').val() == undefined){
|
||||||
|
alert("출고상품 선택이 필요합니다");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (confirm('선택된 주문을 상품준비 일괄처리 하시겠습니까?')) {
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: url,
|
||||||
|
data: param,
|
||||||
|
dataType: "json",
|
||||||
|
success: function (data) {
|
||||||
|
const message = JSON.parse(data.resBody.result).message;
|
||||||
|
if(message == "success"){
|
||||||
|
alert('<spring:message code="success.common.process"/>');
|
||||||
|
fn_select_list();
|
||||||
|
}else{
|
||||||
|
alert('<spring:message code="fail.common.save"/>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 관리자 주문 > 상품조회 > 검색조건 > 날짜 선택 이벤트 */
|
||||||
|
$(document).on('click', '.dateRange-btn', function () {
|
||||||
|
const date = $(this).attr('id');
|
||||||
|
|
||||||
|
$('.dateRange-btn').removeClass('selected');
|
||||||
|
$('#' + date).addClass('selected');
|
||||||
|
|
||||||
|
const datepicker = $(this).closest('.td-inner').find('.datepicker');
|
||||||
|
const start = $(datepicker[0]).attr('id');
|
||||||
|
const end = $(datepicker[1]).attr('id');
|
||||||
|
|
||||||
|
if ('allDays' === date) {
|
||||||
|
$('#' + start + ', #' + end).val('');
|
||||||
|
|
||||||
|
$('#datePeriod').val(date);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn_set_date(start, end, end, date);
|
||||||
|
|
||||||
|
$('#datePeriod').val(date);
|
||||||
|
});
|
||||||
|
|
||||||
|
//카테고리 선택시 카테고리 아이디 저장(검색용)
|
||||||
|
$(document).on('change', 'select[id^=ctgryDepth]', function () {
|
||||||
|
const ctgryOptn = $(this).val()
|
||||||
|
|
||||||
|
if(!fn_is_empty(ctgryOptn)){
|
||||||
|
$('#ctgryId').val(ctgryOptn)
|
||||||
|
}else{
|
||||||
|
//value가 ''인 카테고리 선택할경우
|
||||||
|
let currentCtgryDepth = parseInt($(this).attr('id').replace('ctgryDepth', ''));
|
||||||
|
|
||||||
|
//1차 카테고리가 아닐 경우 이전 카테고리 번호 가져오기
|
||||||
|
if(currentCtgryDepth !== 1){
|
||||||
|
$('#ctgryId').val($('#ctgryDepth' + (currentCtgryDepth - 1)).val())
|
||||||
|
}else{
|
||||||
|
//1차 카테고리 일경우 카테고리 번호 비우기
|
||||||
|
$('#ctgryId').val('')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
//초기화버튼
|
||||||
|
$(document).on('click', '#resetBtn', function () {
|
||||||
|
$('#listForm')[0].reset();
|
||||||
|
$('#srchSelSubsvcNm').niceSelect('update');
|
||||||
|
$('#srchSelSubsvcNm').trigger("change");
|
||||||
|
$('#srchSelSubsvcGnr').niceSelect('update');
|
||||||
|
|
||||||
|
fn_select_list(1);
|
||||||
|
})
|
||||||
|
|
||||||
|
let selected = [];
|
||||||
|
|
||||||
|
/*********************************************************
|
||||||
|
* 상품 검색 팝업 > 상품 목록 조회
|
||||||
|
* param : pageIndex, selected
|
||||||
|
******************************************************** */
|
||||||
|
const fn_goods_search_popup_list = function (pageIndex, selected) {
|
||||||
|
let dataStr;
|
||||||
|
if (!pageIndex) {
|
||||||
|
$('#pageIndex').val(1);
|
||||||
|
} else {
|
||||||
|
$('#pageIndex').val(pageIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#popupListForm').find('input[name=pageIndex]').eq(0).val(pageIndex);
|
||||||
|
const popupListForm = $("#popupListForm").serialize();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<c:url value="/mngr/goods/goodsmngr/selectGoodsSrchPopupList"/>",
|
||||||
|
data: popupListForm,
|
||||||
|
success: function (resultHtml) {
|
||||||
|
$('#goodsList').empty();
|
||||||
|
$('#goodsList').html(resultHtml);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************************
|
||||||
|
* 상품검색 팝업에서 선택된 상품을 출고상품에 셋팅
|
||||||
|
* param 없음
|
||||||
|
******************************************************** */
|
||||||
|
function fn_select_goods_search() {
|
||||||
|
let selected = [];
|
||||||
|
$('#appendList tr').each(function () {
|
||||||
|
const goodsId = $(this).attr('id').replace('choiseListId', '');
|
||||||
|
const goodsOptnInnb = $(this).find('input[name="goodsOptnInnb"]').val();
|
||||||
|
const optnTy = $(this).find('input[name="optnTy"]').val();
|
||||||
|
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
||||||
|
const goodsNm = $(this).find('input[name="goodsNm"]').val();
|
||||||
|
const goodsPrice = $(this).find('input[name="slepric"]').val();
|
||||||
|
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
|
||||||
|
const expsrNm = $(this).find('input[name="expsrNm"]').val();
|
||||||
|
|
||||||
|
selected.push({
|
||||||
|
goodsId: goodsId,
|
||||||
|
goodsOptnInnb: goodsOptnInnb,
|
||||||
|
optnTy: optnTy,
|
||||||
|
goodsImg: goodsImg,
|
||||||
|
goodsNm: goodsNm,
|
||||||
|
goodsPrice: goodsPrice,
|
||||||
|
goodsSttusNm: goodsSttusNm,
|
||||||
|
expsrNm: expsrNm
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 각 화면에 맞춰서 HTML 변경 START
|
||||||
|
var tableBody = $("#parentGoodsContainer");
|
||||||
|
tableBody.empty();
|
||||||
|
|
||||||
|
selected.forEach((good, index) => {
|
||||||
|
if(index == 0) {
|
||||||
|
var productHtml = `
|
||||||
|
<div class="product-group__item">
|
||||||
|
<input type="hidden" id="goodsInnb" name="goodsInnb" value="` + good.goodsId + `">
|
||||||
|
<input type="hidden" id="goodsOptnInnb" name="goodsOptnInnb" value="` + good.goodsOptnInnb + `">
|
||||||
|
<input type="hidden" id="optnTy" name="optnTy" value="` + good.optnTy + `">
|
||||||
|
<span class="product-group__item-number">` + (index + 1) + `</span>
|
||||||
|
<div class="product-group__image">
|
||||||
|
<img src="` + good.goodsImg + `" width="140" alt="` + good.goodsNm + `"
|
||||||
|
onerror="this.src='/mngr/images/image_placeholder.png'"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="product-group__description">
|
||||||
|
<p>` + good.goodsNm + `</p>
|
||||||
|
<p class="product-group__description-price">` + fn_format_comma(good.goodsPrice) + `${curUnit}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
tableBody.append(productHtml);
|
||||||
|
});
|
||||||
|
// 각 화면에 맞춰서 HTML 변경 END
|
||||||
|
|
||||||
|
fn_close_modal('product-search');
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************************
|
||||||
|
* 배송내역 팝업
|
||||||
|
*********************************************************/
|
||||||
|
const fn_select_dlvy_pop = function (ordrInnb) {
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: "<c:url value ='/mngr/ordr/subsvc/selectSubsvcOrdrDlvyListPop'/>",
|
||||||
|
data: {ordrInnb: ordrInnb},
|
||||||
|
success: function (data) {
|
||||||
|
alert(data);
|
||||||
|
$("#modalDiv").empty();
|
||||||
|
$("#modalDiv").html(data);
|
||||||
|
$("#board-list-registration").modal();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<body>
|
||||||
|
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||||
|
<main class="main">
|
||||||
|
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||||
|
<div class="content">
|
||||||
|
<div class="content__inner">
|
||||||
|
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||||
|
<div class="page-title">
|
||||||
|
<h2 class="page-title__title">구독서비스 상품준비 관리</h2>
|
||||||
|
<div class="page-title__btn-container">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<form id='listForm' name="listForm" method="post" action="<c:url value="/mngr/goods/subsvc/selectSubsvcList"/>">
|
||||||
|
<input type="hidden" id="pageIndex" name="pageIndex" value="${ resultMap.paramVO.pageIndex }"/>
|
||||||
|
<input type="hidden" id="sortDv" name="sortDv" value="${ resultMap.paramVO.sortDv }">
|
||||||
|
<input type="hidden" id="pageUnit" name="pageUnit" value="${ resultMap.paramVO.pageUnit }">
|
||||||
|
<input type="hidden" id="subsvcInnb" name="subsvcInnb" value="">
|
||||||
|
<section class="content-section" id="search-section">
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="table">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 12%;">
|
||||||
|
<col>
|
||||||
|
<col style="width: 12%;">
|
||||||
|
<col>
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<th>구독서비스</th>
|
||||||
|
<td colspan="3">
|
||||||
|
<div class="td-inner">
|
||||||
|
<div class="select-box">
|
||||||
|
<select title="구독서비스" id="srchSelSubsvcNm" name="srchSelSubsvcNm">
|
||||||
|
<option value="" <c:if test="${ resultMap.paramVO.srchSelSubsvcNm eq ''}">selected="selected"</c:if>>전체</option>
|
||||||
|
<c:forEach items="${resultMap.srchSubsvcList}" var="srchSubsvc" varStatus="status">
|
||||||
|
<option value="${srchSubsvc.subsvcNm}" <c:if test="${ resultMap.paramVO.srchSelSubsvcNm eq srchSubsvc.subsvcNm}">selected="selected"</c:if>>${srchSubsvc.subsvcNm}</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="select-box">
|
||||||
|
<select title="구독서비스회차" id="srchSelSubsvcGnr" name="srchSelSubsvcGnr">
|
||||||
|
<option value="" <c:if test="${ resultMap.paramVO.srchSelSubsvcGnr eq ''}">selected="selected"</c:if>>전체</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>구독서비스명</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<input class="input-text xl" type="text" title="구독서비스명" id="srchSubsvcNm" name="srchSubsvcNm" value="<c:out value="${ resultMap.paramVO.srchSubsvcNm }" />">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<th>기수명</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<input class="input-text xl" type="text" title="구독서비스명" id="srchSubsvcGnrNm" name="srchSubsvcGnrNm" value="<c:out value="${ resultMap.paramVO.srchSubsvcGnrNm }" />">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>당월 처리자</th>
|
||||||
|
<td colspan="3">
|
||||||
|
<div class="td-inner">
|
||||||
|
<div class="b-checkbox-container">
|
||||||
|
<label class="b-checkbox checkbox">
|
||||||
|
<input type="checkbox" id="srchCurMonExclude" name="srchCurMonExclude" value="Y" <c:if test="${resultMap.paramVO.srchCurMonExclude eq 'Y'}">checked</c:if>>
|
||||||
|
<span class="check"></span>
|
||||||
|
<span class="control-label">당월 처리자 제외</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="form-control-container">
|
||||||
|
<div class="left"></div>
|
||||||
|
<div class="center">
|
||||||
|
<button class="btn outline" id="resetBtn" type="button">초기화</button>
|
||||||
|
<button class="btn primary" id="searchBtn" type="button" onclick="fn_select_list(1);"><spring:message code="button.search"/> </button>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="" >
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="table">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 12%;">
|
||||||
|
<col>
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<th>출고상품<span class="red-7">*</span>
|
||||||
|
<a type="button" onclick="fn_open_modal('#modalDiv','#product-search','/mngr/goods/goodsmngr/selectGoodsSrchPopupForm',{'goodsKndCd':'01'}); return false;" class="btn xsm primary mt-5">검색</a>
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<div id="parentGoodsContainer" class="product-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<div id="pageDiv">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="modalDiv">asfasdfasdaf</div>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user