Просмотр исходного кода

Merge branch 'develop' into eskim

eskim 5 лет назад
Родитель
Сommit
00cde9abb9
21 измененных файлов с 1329 добавлено и 503 удалено
  1. 1 0
      style24.admin/.gitignore
  2. 19 0
      style24.admin/src/main/java/com/style24/admin/biz/dao/TsaCommonDao.java
  3. 66 5
      style24.admin/src/main/java/com/style24/admin/biz/dao/TsaDisplayDao.java
  4. 23 1
      style24.admin/src/main/java/com/style24/admin/biz/service/TsaCommonService.java
  5. 67 5
      style24.admin/src/main/java/com/style24/admin/biz/service/TsaDisplayService.java
  6. 64 5
      style24.admin/src/main/java/com/style24/admin/biz/web/TsaDisplayController.java
  7. 7 7
      style24.admin/src/main/java/com/style24/admin/biz/web/TsaMarketingController.java
  8. 20 4
      style24.admin/src/main/java/com/style24/admin/biz/web/TsaOcmController.java
  9. 5 3
      style24.admin/src/main/java/com/style24/persistence/domain/Category.java
  10. 3 0
      style24.admin/src/main/java/com/style24/persistence/domain/Extmall.java
  11. 30 8
      style24.admin/src/main/java/com/style24/persistence/domain/FreeGoodsPromotion.java
  12. 31 0
      style24.admin/src/main/java/com/style24/persistence/domain/FreeGoodsSectionVal.java
  13. 20 0
      style24.admin/src/main/java/com/style24/persistence/domain/Sequence.java
  14. 17 0
      style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaCommon.xml
  15. 421 93
      style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaDsiplay.xml
  16. 80 79
      style24.admin/src/main/resources/i18n/messages/message_ko_KR.properties
  17. 203 231
      style24.admin/src/main/webapp/WEB-INF/views/display/CategoryForm.html
  18. 2 2
      style24.admin/src/main/webapp/WEB-INF/views/marketing/FreeGoodsPromotionForm.html
  19. 98 58
      style24.admin/src/main/webapp/WEB-INF/views/marketing/FreeGoodsPromotionRegiForm.html
  20. 133 0
      style24.admin/src/main/webapp/WEB-INF/views/ocm/ExtmallSearchForm.html
  21. 19 2
      style24.admin/src/main/webapp/ux/js/admin.popup.js

+ 1 - 0
style24.admin/.gitignore

@@ -2,3 +2,4 @@ target/
 .settings/
 .settings/
 .classpath
 .classpath
 /bin/
 /bin/
+/target/

+ 19 - 0
style24.admin/src/main/java/com/style24/admin/biz/dao/TsaCommonDao.java

@@ -2,6 +2,7 @@ package com.style24.admin.biz.dao;
 
 
 import com.style24.core.support.annotation.ShopDs;
 import com.style24.core.support.annotation.ShopDs;
 import com.style24.persistence.domain.SearchData;
 import com.style24.persistence.domain.SearchData;
+import com.style24.persistence.domain.Sequence;
 
 
 /**
 /**
  * 공용 Dao
  * 공용 Dao
@@ -12,6 +13,24 @@ import com.style24.persistence.domain.SearchData;
 @ShopDs
 @ShopDs
 public interface TsaCommonDao {
 public interface TsaCommonDao {
 
 
+	/**
+	 * 시퀀스 조회
+	 * @param value - 시퀀스명
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	Integer getNextSequence(String value);
+
+	/**
+	 * 시퀀스 생성
+	 * @param sequence - 시퀀스정보
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	void createNextSequence(Sequence sequence);
+
 	/**
 	/**
 	 * 엑셀조회를 위한 SEARCH 테이블 삭제
 	 * 엑셀조회를 위한 SEARCH 테이블 삭제
 	 *
 	 *

+ 66 - 5
style24.admin/src/main/java/com/style24/admin/biz/dao/TsaDisplayDao.java

@@ -15,13 +15,74 @@ import com.style24.persistence.domain.Category;
 public interface TsaDisplayDao {
 public interface TsaDisplayDao {
 
 
 	/**
 	/**
-	 * 카테고리관리 목록
-	 *
-	 * @param category
+	 * 카테고리 목록
+	 * @param category - 카테고리 정보
 	 * @return
 	 * @return
-	 * @author eskim
-	 * @since 2020. 12. 16
+	 * @author gagamel
+	 * @since 2021. 1. 4
 	 */
 	 */
 	Collection<Category> getCategoryList(Category category);
 	Collection<Category> getCategoryList(Category category);
 
 
+	/**
+	 * 카테고리1 저장
+	 * @param category - 카테고리 정보
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	void saveCategory1(Category category);
+
+	/**
+	 * 카테고리2 저장
+	 * @param category - 카테고리 정보
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	void saveCategory2(Category category);
+
+	/**
+	 * 카테고리3 저장
+	 * @param category - 카테고리 정보
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	void saveCategory3(Category category);
+
+	/**
+	 * 카테고리4 저장
+	 * @param category - 카테고리 정보
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	void saveCategory4(Category category);
+
+	/**
+	 * 카테고리5 저장
+	 * @param category - 카테고리 정보
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	void saveCategory5(Category category);
+
+	/**
+	 * 상위카테고리 단말여부 "N" 처리
+	 * @param category - 카테고리 정보
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	void updateUpperCategoryLeafNo(Category category);
+
+	/**
+	 * 카테고리4SRCH truncate
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	void truncateCategory4Srch();
+
+	/**
+	 * 카테고리4SRCH 생성
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	void createCategory4Srch();
+
 }
 }

+ 23 - 1
style24.admin/src/main/java/com/style24/admin/biz/service/TsaCommonService.java

@@ -2,9 +2,13 @@ package com.style24.admin.biz.service;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
 
 
 import com.style24.admin.biz.dao.TsaCommonDao;
 import com.style24.admin.biz.dao.TsaCommonDao;
 import com.style24.persistence.domain.SearchData;
 import com.style24.persistence.domain.SearchData;
+import com.style24.persistence.domain.Sequence;
 
 
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 
 
@@ -21,6 +25,25 @@ public class TsaCommonService {
 	@Autowired
 	@Autowired
 	private TsaCommonDao commonDao;
 	private TsaCommonDao commonDao;
 
 
+	/**
+	 * 시퀀스 조회(중첩트랜잭션으로 처리. 부모 트랜잭션의 커밋과 롤백에는 영향을 받지만 자신의 커밋과 롤백은 부모 트랜잭션에게 영향을 주지 않는다.)
+	 * @param sequenceNm - 시퀀스명
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	@Transactional(value = "shopTxnManager", isolation = Isolation.SERIALIZABLE, propagation = Propagation.NESTED)
+	public Integer getNextSequence(String sequenceNm) {
+		Integer nextVal = commonDao.getNextSequence(sequenceNm);
+
+		Sequence sequence = new Sequence();
+		sequence.setSequenceNm(sequenceNm);
+		sequence.setNextVal(nextVal);
+		commonDao.createNextSequence(sequence);
+
+		return sequence.getNextVal();
+	}
+
 	/**
 	/**
 	 * 엑셀조회를 위한 SEARCH 테이블 삭제
 	 * 엑셀조회를 위한 SEARCH 테이블 삭제
 	 *
 	 *
@@ -80,5 +103,4 @@ public class TsaCommonService {
 		return commonDao.getErpSyncYn();
 		return commonDao.getErpSyncYn();
 	}
 	}
 
 
-
 }
 }

+ 67 - 5
style24.admin/src/main/java/com/style24/admin/biz/service/TsaDisplayService.java

@@ -3,9 +3,12 @@ package com.style24.admin.biz.service;
 import java.util.Collection;
 import java.util.Collection;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 
 import com.style24.admin.biz.dao.TsaDisplayDao;
 import com.style24.admin.biz.dao.TsaDisplayDao;
+import com.style24.admin.support.security.session.TsaSession;
 import com.style24.persistence.domain.Category;
 import com.style24.persistence.domain.Category;
 
 
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
@@ -23,17 +26,76 @@ public class TsaDisplayService {
 	@Autowired
 	@Autowired
 	private TsaDisplayDao displayDao;
 	private TsaDisplayDao displayDao;
 
 
+	@Autowired
+	private TsaCommonService commonService;
+
 	/**
 	/**
-	 * 카테고리관리 목록
-	 *
-	 * @param category
+	 * 카테고리 목록
+	 * @param category - 카테고리 정보
 	 * @return
 	 * @return
-	 * @author sasa004
-	 * @since 2020.01.07
+	 * @author gagamel
+	 * @since 2021. 1. 4
 	 */
 	 */
 	public Collection<Category> getCategoryList(Category category) {
 	public Collection<Category> getCategoryList(Category category) {
 		return displayDao.getCategoryList(category);
 		return displayDao.getCategoryList(category);
 	}
 	}
 
 
+	/**
+	 * 카테고리 저장
+	 * @param category - 카테고리 정보
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	@Transactional("shopTxnManager")
+	public void saveCategory(Category category) {
+		category.setRegNo(TsaSession.getInfo().getUserNo());
+		category.setUpdNo(TsaSession.getInfo().getUserNo());
+
+		Integer selLvl = category.getSelLvl();
+
+		// 카테고리번호
+		Integer cateNo = category.getCateNo();
+		if (cateNo == null) {
+			cateNo = commonService.getNextSequence("SEQ_CATE");
+		}
+
+		if (selLvl == 1) {
+			category.setCate1No(cateNo);
+			category.setCate1Nm(category.getCateNm());
+			displayDao.saveCategory1(category);
+		} else if (selLvl == 2) {
+			category.setCate2No(cateNo);
+			category.setCate2Nm(category.getCateNm());
+			displayDao.saveCategory2(category);
+		} else if (selLvl == 3) {
+			category.setCate3No(cateNo);
+			category.setCate3Nm(category.getCateNm());
+			displayDao.saveCategory3(category);
+		} else if (selLvl == 4) {
+			category.setCate4No(cateNo);
+			category.setCate4Nm(category.getCateNm());
+			displayDao.saveCategory4(category);
+		} else if (selLvl == 5) {
+			category.setCate5No(cateNo);
+			category.setCate5Nm(category.getCateNm());
+			displayDao.saveCategory5(category);
+		}
+
+		if (selLvl >= 2) {
+			displayDao.updateUpperCategoryLeafNo(category);
+		}
+	}
+
+	/**
+	 * 카테고리 갱신
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	@Transactional("shopTxnManager")
+	@CacheEvict(value = "cate", allEntries = true)
+	public void refreshCategory() {
+		displayDao.truncateCategory4Srch();
+		displayDao.createCategory4Srch();
+	}
 
 
 }
 }

+ 64 - 5
style24.admin/src/main/java/com/style24/admin/biz/web/TsaDisplayController.java

@@ -4,17 +4,23 @@ import java.util.Collection;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
 
 
 import com.style24.admin.biz.service.TsaDisplayService;
 import com.style24.admin.biz.service.TsaDisplayService;
+import com.style24.admin.biz.service.TsaRendererService;
 import com.style24.admin.support.controller.TsaBaseController;
 import com.style24.admin.support.controller.TsaBaseController;
+import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.domain.Category;
 import com.style24.persistence.domain.Category;
 
 
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 
 
+import com.gagaframework.web.rest.server.GagaResponse;
+
 /**
 /**
  * 전시 Controller
  * 전시 Controller
  *
  *
@@ -26,16 +32,42 @@ import lombok.extern.slf4j.Slf4j;
 @Slf4j
 @Slf4j
 public class TsaDisplayController extends TsaBaseController {
 public class TsaDisplayController extends TsaBaseController {
 
 
+	@Autowired
+	private TscMessageByLocale message;
+
+	@Autowired
+	private TsaRendererService rendererService;
+
 	@Autowired
 	@Autowired
 	private TsaDisplayService displayService;
 	private TsaDisplayService displayService;
 
 
 	/**
 	/**
-	 * 카테고리관리 조회
-	 *
-	 * @param category
+	 * 카테고리관리 화면
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	@GetMapping("/category/form")
+	public ModelAndView categoryForm() {
+		ModelAndView mav = new ModelAndView();
+
+		mav.addObject("siteList", rendererService.getAvailCommonCodeList("G000"));
+		mav.addObject("cateGbList", rendererService.getAvailCommonCodeList("G032"));
+		mav.addObject("cateTypeList", rendererService.getAvailCommonCodeList("G031"));
+		mav.addObject("formalGbList", rendererService.getAvailCommonCodeList("G009"));
+		mav.addObject("conentsLocList", rendererService.getAvailCommonCodeList("G028"));
+
+		mav.setViewName("display/CategoryForm");
+
+		return mav;
+	}
+
+	/**
+	 * 카테고리 목록
+	 * @param category - 카테고리 정보
 	 * @return
 	 * @return
-	 * @author eskim
-	 * @since 2020. 12. 16
+	 * @author gagamel
+	 * @since 2021. 1. 4
 	 */
 	 */
 	@PostMapping("/category/list")
 	@PostMapping("/category/list")
 	@ResponseBody
 	@ResponseBody
@@ -43,4 +75,31 @@ public class TsaDisplayController extends TsaBaseController {
 		return displayService.getCategoryList(category);
 		return displayService.getCategoryList(category);
 	}
 	}
 
 
+	/**
+	 * 카테고리 저장
+	 * @param category - 카테고리 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	@PostMapping("/category/save")
+	@ResponseBody
+	public GagaResponse saveCategory(@RequestBody Category category) {
+		displayService.saveCategory(category);
+		return super.ok(message.getMessage("SUCC_0001"));
+	}
+
+	/**
+	 * 카테고리 갱신
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 4
+	 */
+	@PostMapping("/category/refresh")
+	@ResponseBody
+	public GagaResponse refreshCategory() {
+		displayService.refreshCategory();
+		return super.ok(message.getMessage("SUCC_0010"));
+	}
+
 }
 }

+ 7 - 7
style24.admin/src/main/java/com/style24/admin/biz/web/TsaMarketingController.java

@@ -69,7 +69,7 @@ public class TsaMarketingController extends TsaBaseController {
 	/**
 	/**
 	 * 사은품 프로모션 목록 조회
 	 * 사은품 프로모션 목록 조회
 	 * @author xodud1202
 	 * @author xodud1202
-	 * @since 2020. 10. 17
+	 * @since 2020. 12. 16
 	 */
 	 */
 	@PostMapping("/freeGoodsPromotion/list")
 	@PostMapping("/freeGoodsPromotion/list")
 	@ResponseBody
 	@ResponseBody
@@ -90,12 +90,11 @@ public class TsaMarketingController extends TsaBaseController {
 
 
 
 
 	/**
 	/**
-	 * 세트상품구성 화면
-	 *
-	 * @param
-	 * @return
-	 * @author eskim
-	 * @since 2020. 05. 26
+	 * 사은품 프로모션 등록 팝업창
+	 * @param param
+	 * @return ModelAndView
+	 * @author xodud1202
+	 * @since 2020. 12. 23
 	 */
 	 */
 	@ResponseBody
 	@ResponseBody
 	@GetMapping("/freeGoodsRegiPopup/form")
 	@GetMapping("/freeGoodsRegiPopup/form")
@@ -107,6 +106,7 @@ public class TsaMarketingController extends TsaBaseController {
 		mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", exceptCds));
 		mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", exceptCds));
 
 
 		mav.addObject("param", param);
 		mav.addObject("param", param);
+		log.info("CHECK PARAM.GBN >> " + param.getGbn());
 		mav.setViewName("marketing/FreeGoodsPromotionRegiForm");
 		mav.setViewName("marketing/FreeGoodsPromotionRegiForm");
 		return mav;
 		return mav;
 	}
 	}

+ 20 - 4
style24.admin/src/main/java/com/style24/admin/biz/web/TsaOcmController.java

@@ -2,6 +2,7 @@ package com.style24.admin.biz.web;
 
 
 import java.util.Collection;
 import java.util.Collection;
 
 
+import com.style24.persistence.domain.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -16,10 +17,6 @@ import com.style24.admin.biz.service.TsaRendererService;
 import com.style24.admin.support.controller.TsaBaseController;
 import com.style24.admin.support.controller.TsaBaseController;
 import com.style24.admin.support.security.session.TsaSession;
 import com.style24.admin.support.security.session.TsaSession;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.core.support.message.TscMessageByLocale;
-import com.style24.persistence.domain.Extmall;
-import com.style24.persistence.domain.ExtmallNoti;
-import com.style24.persistence.domain.ExtmallOrigin;
-import com.style24.persistence.domain.ExtmallPriceSync;
 
 
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 
 
@@ -79,6 +76,25 @@ public class TsaOcmController extends TsaBaseController {
 		return ocmService.getExtmallList(extmall);
 		return ocmService.getExtmallList(extmall);
 	}
 	}
 
 
+	/**
+	 * 제휴몰 목록 화면(팝업)
+	 * @param extmall - 제휴몰 정보
+	 * @return
+	 * @author xodud1202
+	 * @since 2020. 12. 28
+	 */
+	@GetMapping("/extmall/search/form")
+	public ModelAndView extmallSearchForm(Extmall extmall) {
+		ModelAndView mav = new ModelAndView();
+
+		// 상품상태
+		mav.addObject("extmallGbList", rendererService.getCommonCodeList("G003", "Y"));
+
+		mav.addObject("params", extmall);
+		mav.setViewName("ocm/ExtmallSearchForm");
+		return mav;
+	}
+
 	/**
 	/**
 	 * 제휴몰 등록/수정 처리
 	 * 제휴몰 등록/수정 처리
 	 * @param extmall - 제휴몰 정보
 	 * @param extmall - 제휴몰 정보

+ 5 - 3
style24.admin/src/main/java/com/style24/persistence/domain/Category.java

@@ -19,7 +19,7 @@ public class Category extends TscBaseDomain {
 //	private String upperCateCode;
 //	private String upperCateCode;
 	private String cateNm;
 	private String cateNm;
 	private Integer clsLvl;
 	private Integer clsLvl;
-	private String selLvl;
+
 	private Integer dispOrd;
 	private Integer dispOrd;
 	private String dispYn;
 	private String dispYn;
 	private String useYn;
 	private String useYn;
@@ -33,8 +33,6 @@ public class Category extends TscBaseDomain {
 //
 //
 //	private String fullCateCd;
 //	private String fullCateCd;
 //	private String fullCateNm;
 //	private String fullCateNm;
-//
-	private String siteCd;
 //
 //
 //	private String brandGrpNm;
 //	private String brandGrpNm;
 //
 //
@@ -49,4 +47,8 @@ public class Category extends TscBaseDomain {
 	private Integer cate5No;
 	private Integer cate5No;
 	private String cate5Nm;
 	private String cate5Nm;
 
 
+	// 검색조건
+	private String siteCd;
+	private Integer selLvl;
+
 }
 }

+ 3 - 0
style24.admin/src/main/java/com/style24/persistence/domain/Extmall.java

@@ -25,4 +25,7 @@ public class Extmall extends TscBaseDomain {
 	private String dwdpYn;			// 직접회수여부(Y:제휴몰에서회수, N:자사몰에서회수)
 	private String dwdpYn;			// 직접회수여부(Y:제휴몰에서회수, N:자사몰에서회수)
 	private String useYn;			// 사용여부
 	private String useYn;			// 사용여부
 
 
+	// 검색조건
+	private String searchTxt;		// 검색어
+	private String callbackFn;		// 콜백함수
 }
 }

+ 30 - 8
style24.admin/src/main/java/com/style24/persistence/domain/FreeGoodsPromotion.java

@@ -1,9 +1,12 @@
 package com.style24.persistence.domain;
 package com.style24.persistence.domain;
 
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.style24.persistence.TsaPageRequest;
 import com.style24.persistence.TsaPageRequest;
 import com.style24.persistence.TscBaseDomain;
 import com.style24.persistence.TscBaseDomain;
 import lombok.Data;
 import lombok.Data;
 
 
+import java.util.List;
+
 /**
 /**
  * 품목 Domain
  * 품목 Domain
  *
  *
@@ -14,14 +17,33 @@ import lombok.Data;
 @Data
 @Data
 public class FreeGoodsPromotion extends TscBaseDomain {
 public class FreeGoodsPromotion extends TscBaseDomain {
 	// 사은품 프로모션
 	// 사은품 프로모션
-	private int freeGiftSq;			// 프로모션ID
-	private String freeGiftName;	// 프로모션명
-	private String freeGiftStat;	// 프로모션 상태
-	private String freeGiftStdt;	// 프로모션 시작일
-	private String freeGiftEddt;	// 프로모션 종료일
-	private String promotionGubun;	// 프로모션 조회 검색 구분
-	private String searchTxt;		// 프로모션 검색 조건
-	private String gbn;				// 팝업 구분 : C=등록, U=수정
+	private int freeGiftSq;				// 프로모션ID
+	private String freeGiftName;		// 프로모션명
+	private String freeGiftStat;		// 프로모션 상태
+	private String freeGiftStdt;		// 프로모션 시작일
+	private String freeGiftEddt;		// 프로모션 종료일
+	private String selfYn;				// 자사몰 적용 여부
+	private String allYn;				// 모두 지급 구분 (모두지급 일때는 포인트 금액을 설정 할 수 없음 Y(모두지급), N(선택사은품))
+
+	// 사은품 프로모션 제휴몰
+	private int freegiftExtmallSq;		// 프로모션 제휴몰 ID
+	private String extmallId;			// 외부몰ID
+	private String vendorId;			// 벤더ID
+
+	// 사은품 프로모션 적용 및 제외 상품
+	private String goodsGb;				// 상품 구분 (G800_10|기본상품, G800_20|적용상품, G800_30|제외상품, G800_40|ALL)
+	private String targetGb;			// 적용 구분 (G260_10|상품, G260_12|브랜드, G260_13|공급처)
+	private String targetVal;			// 적용 값 (브랜드코드, 상품코드, 공급처코드)
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)	private String[] applyGoodsCds;		// 적용 상품 번호
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)	private String[] exceptGoodsCds;	// 제외 상품 번호
+
+	// 사은품 조건
+	private List<FreeGoodsSectionVal> goodsListNew;		// 사은품 조건 리스트
+
+	// 기타 조건
+	private String promotionGubun;		// 프로모션 조회 검색 구분
+	private String searchTxt;			// 프로모션 검색 조건
+	private String gbn;					// 팝업 구분 : C=등록, U=수정
 
 
 	// Pagination
 	// Pagination
 	private TsaPageRequest pageable;
 	private TsaPageRequest pageable;

+ 31 - 0
style24.admin/src/main/java/com/style24/persistence/domain/FreeGoodsSectionVal.java

@@ -0,0 +1,31 @@
+package com.style24.persistence.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.style24.persistence.TsaPageRequest;
+import com.style24.persistence.TscBaseDomain;
+import lombok.Data;
+
+import java.util.Collection;
+
+/**
+ * 품목 Domain
+ *
+ * @author gagamel
+ * @since 2020. 10. 7
+ */
+@SuppressWarnings("serial")
+@Data
+public class FreeGoodsSectionVal {
+	// 사은품 조건
+	private int freegiftSectionSq;		// 사은품 조건 목록 ID
+	private int freegiftValSq;			// 사은품 조건 리스트 사은품ID
+	private int usePoint;				// 포인트액
+	private int itemQty;				// 지급 수량
+	private int limitQty;				// 한정 수량
+	private int leftQty;				// 잔여 수량
+	private String sectionGb;			// 사은품 조건 구분(G810_10|수량, G810_11|금액)
+	private String sectionVal;			// 구간 설정 값 | 구간 할인 시작 (수량이상, 금액이상)
+	private String itemCd;				// 사은품ID
+	private String itemOptCd1;			// ??
+	private String itemOptCd2;			// ??
+}

+ 20 - 0
style24.admin/src/main/java/com/style24/persistence/domain/Sequence.java

@@ -0,0 +1,20 @@
+package com.style24.persistence.domain;
+
+import java.io.Serializable;
+
+import lombok.Data;
+
+/**
+ * SEQUENCE Domain
+ * 
+ * @author gagamel
+ * @since 2021. 1. 4
+ */
+@SuppressWarnings("serial")
+@Data
+public class Sequence implements Serializable {
+
+	private String sequenceNm;	// 시퀀스명
+	private Integer nextVal;	// 다음값
+
+}

+ 17 - 0
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaCommon.xml

@@ -2,6 +2,22 @@
 <!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.style24.admin.biz.dao.TsaCommonDao">
 <mapper namespace="com.style24.admin.biz.dao.TsaCommonDao">
 
 
+	<!-- 시퀀스 값 조회 -->
+	<select id="getNextSequence" parameterType="String" resultType="Integer">
+		/* TsaCommon.getNextSequence */
+		SELECT IFNULL((SELECT NEXT_VAL
+		               FROM   TB_SEQUENCE
+		               WHERE  SEQUENCE_NM = #{sequenceNm}
+		              ),0) + 1 AS NEXT_VAL
+	</select>
+
+	<!-- 시퀀스 생성 -->
+	<insert id="createNextSequence" parameterType="Sequence">
+		/* TsaCommon.createNextSequence */
+		INSERT INTO TB_SEQUENCE (SEQUENCE_NM, NEXT_VAL) VALUES (#{sequenceNm}, #{nextVal})
+		ON DUPLICATE KEY UPDATE NEXT_VAL = #{nextVal}
+	</insert>
+	
 	<!-- 엑셀조회를 위한 SEARCH 테이블 삭제  -->
 	<!-- 엑셀조회를 위한 SEARCH 테이블 삭제  -->
 	<delete id="deleteExceluploadSearCh" parameterType="SearchData">
 	<delete id="deleteExceluploadSearCh" parameterType="SearchData">
 		/* TsaCommon.deleteExceluploadSearCh */
 		/* TsaCommon.deleteExceluploadSearCh */
@@ -71,4 +87,5 @@
 		WHERE CD_GB = 'G077'
 		WHERE CD_GB = 'G077'
 		AND CD = 'ERPSYNCYN'
 		AND CD = 'ERPSYNCYN'
 	</select>
 	</select>
+	
 </mapper>
 </mapper>

+ 421 - 93
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaDsiplay.xml

@@ -2,123 +2,451 @@
 <!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.style24.admin.biz.dao.TsaDisplayDao">
 <mapper namespace="com.style24.admin.biz.dao.TsaDisplayDao">
 
 
-	<!-- 카테고리관리 목록 -->
+	<!-- 카테고리 목록 -->
 	<select id="getCategoryList" parameterType="Category" resultType="Category">
 	<select id="getCategoryList" parameterType="Category" resultType="Category">
 		/* TsaDisplay.getCategoryList */
 		/* TsaDisplay.getCategoryList */
 		<if test='selLvl != null and selLvl != ""'>
 		<if test='selLvl != null and selLvl != ""'>
-		<choose>
-		<when test='selLvl == "1"'>
-		SELECT SITE_CD
-		     , CATE_GB
-		     , '' AS CATE1_NO
-		     , '' AS CATE2_NO
-		     , '' AS CATE3_NO
-		     , '' AS CATE4_NO
-		     , '' AS CATE5_NO
-		     , '' AS CATE_NO
-		     , '' AS CATE_NM
-		     , '' AS CATE_TYPE     /*카테고리유형*/
-		     , 'N' AS LEAF_YN      /*단말여부*/
-		     , '' AS DISP_ORD      /*우선순위*/
-		     , '' AS FORMAL_GB     /*정상이월구분*/
-		     , '' AS CONTENTS_LOC  /*컨텐츠위치코드*/
-		     , 'N' AS DISP_YN   /*전시여부*/
-		     , 'Y' AS USE_YN   /*사용여부*/
-		FROM TB_CATE1
-		WHERE SITE_CD =  #{siteCd}
-		AND USE_YN = 'Y'
-		GROUP BY SITE_CD, CATE_GB
-		</when>
-		<otherwise>
-		SELECT SITE_CD
-		     , CATE_GB
+		SELECT SITE_CD                 /*사이트코드*/
+		     , CATE_GB                 /*카테고리구분*/
+		    <if test='selLvl == 1'>
 		     , CATE1_NO
 		     , CATE1_NO
-		     <if test='selLvl == "2"'>
-		     , '' AS CATE2_NO
-		     , '' AS CATE3_NO
-		     , '' AS CATE4_NO
-		     , '' AS CATE5_NO
-		     , CATE1_NO AS CATE_NO     /*카테고리코드*/
+		     , NULL     AS CATE2_NO
+		     , NULL     AS CATE3_NO
+		     , NULL     AS CATE4_NO
+		     , NULL     AS CATE5_NO
+		     , CATE1_NO AS CATE_NO     /*카테고리번호*/
 		     , CATE1_NM AS CATE_NM     /*카테고리명*/
 		     , CATE1_NM AS CATE_NM     /*카테고리명*/
-		     </if>
-		     <if test='selLvl == "3"'>
+		    </if>
+		    <if test='selLvl == 2'>
 		     , CATE2_NO
 		     , CATE2_NO
-		     , '' AS CATE3_NO
-		     , '' AS CATE4_NO
-		     , '' AS CATE5_NO
-		     , CATE2_NO AS CATE_NO     /*카테고리코드*/
+		     , NULL     AS CATE3_NO
+		     , NULL     AS CATE4_NO
+		     , NULL     AS CATE5_NO
+		     , CATE2_NO AS CATE_NO     /*카테고리번호*/
 		     , CATE2_NM AS CATE_NM     /*카테고리명*/
 		     , CATE2_NM AS CATE_NM     /*카테고리명*/
-		     </if>
-		     <if test='selLvl == "4"'>
+		    </if>
+		    <if test='selLvl == 3'>
 		     , CATE2_NO
 		     , CATE2_NO
 		     , CATE3_NO
 		     , CATE3_NO
-		     , '' AS CATE4_NO
-		     , '' AS CATE5_NO
-		     , CATE3_NO AS CATE_NO     /*카테고리코드*/
+		     , NULL     AS CATE4_NO
+		     , NULL     AS CATE5_NO
+		     , CATE3_NO AS CATE_NO     /*카테고리번호*/
 		     , CATE3_NM AS CATE_NM     /*카테고리명*/
 		     , CATE3_NM AS CATE_NM     /*카테고리명*/
-		     </if>
-		     <if test='selLvl == "5"'>
+		    </if>
+		    <if test='selLvl == 4'>
 		     , CATE2_NO
 		     , CATE2_NO
 		     , CATE3_NO
 		     , CATE3_NO
 		     , CATE4_NO
 		     , CATE4_NO
-		     , '' AS CATE5_NO
-		     , CATE4_NO AS CATE_NO     /*카테고리코드*/
+		     , NULL     AS CATE5_NO
+		     , CATE4_NO AS CATE_NO     /*카테고리번호*/
 		     , CATE4_NM AS CATE_NM     /*카테고리명*/
 		     , CATE4_NM AS CATE_NM     /*카테고리명*/
-		     </if>
-		     <if test='selLvl == "6"'>
+		    </if>
+		    <if test='selLvl == 5'>
 		     , CATE2_NO
 		     , CATE2_NO
 		     , CATE3_NO
 		     , CATE3_NO
 		     , CATE4_NO
 		     , CATE4_NO
 		     , CATE5_NO
 		     , CATE5_NO
-		     , CATE5_NO AS CATE_NO     /*카테고리코드*/
+		     , CATE5_NO AS CATE_NO     /*카테고리번호*/
 		     , CATE5_NM AS CATE_NM     /*카테고리명*/
 		     , CATE5_NM AS CATE_NM     /*카테고리명*/
-		     </if>
-		     , CATE_TYPE    /*카테고리유형*/
-		     , LEAF_YN      /*단말여부*/
-		     , DISP_ORD     /*우선순위*/
-		     , FORMAL_GB    /*정상이월구분*/
-		     , CONTENTS_LOC /*컨텐츠위치코드*/
-		     , DISP_YN      /*전시여부*/
-		     , USE_YN       /*사용여부*/
-		<if test='selLvl == "2"'>
-		  FROM TB_CATE1
-		 WHERE SITE_CD = #{siteCd}
-		   AND CATE_GB = #{cateGb}
+		    </if>
+		     , CATE_TYPE               /*카테고리유형*/
+		     , LEAF_YN                 /*단말여부*/
+		     , DISP_ORD                /*노출순서*/
+		     , FORMAL_GB               /*정상이월구분*/
+		     , CONTENTS_LOC            /*컨텐츠위치*/
+		     , DISP_YN                 /*전시여부*/
+		     , USE_YN                  /*사용여부*/
+		    <if test='selLvl == 1'>
+		FROM   TB_CATE1
+		WHERE  SITE_CD = #{siteCd}
+		AND    CATE_GB = #{cateGb}
+		    </if>
+		    <if test='selLvl == 2'>
+		FROM   TB_CATE2
+		WHERE  SITE_CD = #{siteCd}
+		AND    CATE_GB = #{cateGb}
+		AND    CATE1_NO = #{cate1No}
+		    </if>
+		    <if test='selLvl == 3'>
+		FROM   TB_CATE3
+		WHERE  SITE_CD = #{siteCd}
+		AND    CATE_GB = #{cateGb}
+		AND    CATE1_NO = #{cate1No}
+		AND    CATE2_NO = #{cate2No}
+		    </if>
+		    <if test='selLvl == 4'>
+		FROM   TB_CATE4
+		WHERE  SITE_CD = #{siteCd}
+		AND    CATE_GB = #{cateGb}
+		AND    CATE1_NO = #{cate1No}
+		AND    CATE2_NO = #{cate2No}
+		AND    CATE3_NO = #{cate3No}
+		    </if>
+		    <if test='selLvl == 5'>
+		FROM   TB_CATE5
+		WHERE  SITE_CD = #{siteCd}
+		AND    CATE_GB = #{cateGb}
+		AND    CATE1_NO = #{cate1No}
+		AND    CATE2_NO = #{cate2No}
+		AND    CATE3_NO = #{cate3No}
+		AND    CATE4_NO = #{cate4No}
+		    </if>
+		ORDER  BY DISP_ORD
+		</if>
+	</select>
+	
+	<!-- 카테고리1 저장 -->
+	<insert id="saveCategory1" parameterType="Category">
+		/* TsaDisplay.saveCategory1 */
+		INSERT INTO TB_CATE1 (
+		       SITE_CD
+		     , CATE_GB
+		     , CATE1_NO
+		     , CATE1_NM
+		     , CATE_TYPE
+		     , LEAF_YN
+		     , DISP_ORD
+		     , FORMAL_GB
+		     , CONTENTS_LOC
+		     , DISP_YN
+		     , USE_YN
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       #{siteCd}
+		     , #{cateGb}
+		     , #{cate1No}
+		     , #{cate1Nm}
+		     , #{cateType}
+		     , 'Y'
+		     , #{dispOrd}
+		     , #{formalGb}
+		     , #{contentsLoc}
+		     , #{dispYn}
+		     , #{useYn}
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+		ON DUPLICATE KEY UPDATE
+		       CATE1_NM = #{cate1Nm}
+		     , CATE_TYPE = #{cateType}
+		     , DISP_ORD = #{dispOrd}
+		     , FORMAL_GB = #{formalGb}
+		     , CONTENTS_LOC = #{contentsLoc}
+		     , DISP_YN = #{dispYn}
+		     , USE_YN = #{useYn}
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+	</insert>
+	
+	<!-- 카테고리2 저장 -->
+	<insert id="saveCategory2" parameterType="Category">
+		/* TsaDisplay.saveCategory2 */
+		INSERT INTO TB_CATE2 (
+		       SITE_CD
+		     , CATE_GB
+		     , CATE1_NO
+		     , CATE2_NO
+		     , CATE2_NM
+		     , CATE_TYPE
+		     , LEAF_YN
+		     , DISP_ORD
+		     , FORMAL_GB
+		     , CONTENTS_LOC
+		     , DISP_YN
+		     , USE_YN
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       #{siteCd}
+		     , #{cateGb}
+		     , #{cate1No}
+		     , #{cate2No}
+		     , #{cate2Nm}
+		     , #{cateType}
+		     , 'Y'
+		     , #{dispOrd}
+		     , #{formalGb}
+		     , #{contentsLoc}
+		     , #{dispYn}
+		     , #{useYn}
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+		ON DUPLICATE KEY UPDATE
+		       CATE1_NO = #{cate1No}
+		     , CATE2_NM = #{cate2Nm}
+		     , CATE_TYPE = #{cateType}
+		     , DISP_ORD = #{dispOrd}
+		     , FORMAL_GB = #{formalGb}
+		     , CONTENTS_LOC = #{contentsLoc}
+		     , DISP_YN = #{dispYn}
+		     , USE_YN = #{useYn}
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+	</insert>
+	
+	<!-- 카테고리3 저장 -->
+	<insert id="saveCategory3" parameterType="Category">
+		/* TsaDisplay.saveCategory3 */
+		INSERT INTO TB_CATE3 (
+		       SITE_CD
+		     , CATE_GB
+		     , CATE1_NO
+		     , CATE2_NO
+		     , CATE3_NO
+		     , CATE3_NM
+		     , CATE_TYPE
+		     , LEAF_YN
+		     , DISP_ORD
+		     , FORMAL_GB
+		     , CONTENTS_LOC
+		     , DISP_YN
+		     , USE_YN
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       #{siteCd}
+		     , #{cateGb}
+		     , #{cate1No}
+		     , #{cate2No}
+		     , #{cate3No}
+		     , #{cate3Nm}
+		     , #{cateType}
+		     , 'Y'
+		     , #{dispOrd}
+		     , #{formalGb}
+		     , #{contentsLoc}
+		     , #{dispYn}
+		     , #{useYn}
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+		ON DUPLICATE KEY UPDATE
+		       CATE2_NO = #{cate2No}
+		     , CATE3_NM = #{cate3Nm}
+		     , CATE_TYPE = #{cateType}
+		     , DISP_ORD = #{dispOrd}
+		     , FORMAL_GB = #{formalGb}
+		     , CONTENTS_LOC = #{contentsLoc}
+		     , DISP_YN = #{dispYn}
+		     , USE_YN = #{useYn}
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+	</insert>
+	
+	<!-- 카테고리4 저장 -->
+	<insert id="saveCategory4" parameterType="Category">
+		/* TsaDisplay.saveCategory4 */
+		INSERT INTO TB_CATE4 (
+		       SITE_CD
+		     , CATE_GB
+		     , CATE1_NO
+		     , CATE2_NO
+		     , CATE3_NO
+		     , CATE4_NO
+		     , CATE4_NM
+		     , CATE_TYPE
+		     , LEAF_YN
+		     , DISP_ORD
+		     , FORMAL_GB
+		     , CONTENTS_LOC
+		     , DISP_YN
+		     , USE_YN
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       #{siteCd}
+		     , #{cateGb}
+		     , #{cate1No}
+		     , #{cate2No}
+		     , #{cate3No}
+		     , #{cate4No}
+		     , #{cate4Nm}
+		     , #{cateType}
+		     , 'Y'
+		     , #{dispOrd}
+		     , #{formalGb}
+		     , #{contentsLoc}
+		     , #{dispYn}
+		     , #{useYn}
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+		ON DUPLICATE KEY UPDATE
+		       CATE3_NO = #{cate3No}
+		     , CATE4_NM = #{cate4Nm}
+		     , CATE_TYPE = #{cateType}
+		     , DISP_ORD = #{dispOrd}
+		     , FORMAL_GB = #{formalGb}
+		     , CONTENTS_LOC = #{contentsLoc}
+		     , DISP_YN = #{dispYn}
+		     , USE_YN = #{useYn}
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+	</insert>
+	
+	<!-- 카테고리5 저장 -->
+	<insert id="saveCategory5" parameterType="Category">
+		/* TsaDisplay.saveCategory5 */
+		INSERT INTO TB_CATE5 (
+		       SITE_CD
+		     , CATE_GB
+		     , CATE1_NO
+		     , CATE2_NO
+		     , CATE3_NO
+		     , CATE4_NO
+		     , CATE5_NO
+		     , CATE5_NM
+		     , CATE_TYPE
+		     , LEAF_YN
+		     , DISP_ORD
+		     , FORMAL_GB
+		     , CONTENTS_LOC
+		     , DISP_YN
+		     , USE_YN
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       #{siteCd}
+		     , #{cateGb}
+		     , #{cate1No}
+		     , #{cate2No}
+		     , #{cate3No}
+		     , #{cate4No}
+		     , #{cate5No}
+		     , #{cate5Nm}
+		     , #{cateType}
+		     , 'Y'
+		     , #{dispOrd}
+		     , #{formalGb}
+		     , #{contentsLoc}
+		     , #{dispYn}
+		     , #{useYn}
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+		ON DUPLICATE KEY UPDATE
+		       CATE4_NO = #{cate4No}
+		     , CATE5_NM = #{cate5Nm}
+		     , CATE_TYPE = #{cateType}
+		     , DISP_ORD = #{dispOrd}
+		     , FORMAL_GB = #{formalGb}
+		     , CONTENTS_LOC = #{contentsLoc}
+		     , DISP_YN = #{dispYn}
+		     , USE_YN = #{useYn}
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+	</insert>
+	
+	<!-- 상위카테고리 단말여부 "N" 처리-->
+	<update id="updateUpperCategoryLeafNo" parameterType="Category">
+		/* TsaDisplay.updateUpperCategoryLeafNo */
+		<if test='selLvl == 2'>
+		UPDATE TB_CATE1
 		</if>
 		</if>
-		<if test='selLvl == "3"'>
-		  FROM TB_CATE2
-		 WHERE SITE_CD = #{siteCd}
-		   AND CATE_GB = #{cateGb}
-		   AND CATE1_NO = #{cate1No}
+		<if test='selLvl == 3'>
+		UPDATE TB_CATE2
 		</if>
 		</if>
-		<if test='selLvl == "4"'>
-		  FROM TB_CATE3
-		 WHERE SITE_CD = #{siteCd}
-		   AND CATE_GB = #{cateGb}
-		   AND CATE1_NO = #{cate1No}
-		   AND CATE2_NO = #{cate2No}
+		<if test='selLvl == 4'>
+		UPDATE TB_CATE3
 		</if>
 		</if>
-		<if test='selLvl == "5"'>
-		  FROM TB_CATE4
-		 WHERE SITE_CD = #{siteCd}
-		   AND CATE_GB = #{cateGb}
-		   AND CATE1_NO = #{cate1No}
-		   AND CATE2_NO = #{cate2No}
-		   AND CATE3_NO = #{cate3No}
+		<if test='selLvl == 5'>
+		UPDATE TB_CATE4
 		</if>
 		</if>
-		<if test='selLvl == "6"'>
-		  FROM TB_CATE5
-		 WHERE SITE_CD = #{siteCd}
-		   AND CATE_GB = #{cateGb}
-		   AND CATE1_NO = #{cate1No}
-		   AND CATE2_NO = #{cate2No}
-		   AND CATE3_NO = #{cate3No}
-		   AND CATE4_NO = #{cate4No}
+		SET    LEAF_YN = 'N'
+		WHERE  SITE_CD = #{siteCd}
+		AND    CATE_GB = #{cateGb}
+		<if test='selLvl gte 2'>
+		AND    CATE1_NO = #{cate1No}
 		</if>
 		</if>
-		 ORDER BY SITE_CD, DISP_ORD
-		</otherwise>
-		</choose>
+		<if test='selLvl gte 3'>
+		AND    CATE2_NO = #{cate2No}
 		</if>
 		</if>
-	</select>
+		<if test='selLvl gte 4'>
+		AND    CATE3_NO = #{cate3No}
+		</if>
+		<if test='selLvl gte 5'>
+		AND    CATE4_NO = #{cate4No}
+		</if>
+		AND    LEAF_YN = 'Y'
+	</update>
+	
+	<!-- 카테고리4SRCH truncate -->
+	<delete id="truncateCategory4Srch">
+		/* TsaDisplay.truncateCategory4Srch */
+		TRUNCATE TABLE TB_CATE_4SRCH
+	</delete>
+	
+	<!-- 카테고리4SRCH 생성 -->
+	<insert id="createCategory4Srch">
+		/* TsaDisplay.createCategory4Srch */
+		INSERT INTO TB_CATE_4SRCH (
+		       SITE_CD
+		     , CATE_GB
+		     , LEAF_CATE_NO
+		     , CATE_TYPE
+		     , CATE1_NO
+		     , CATE1_NM
+		     , CATE2_NO
+		     , CATE2_NM
+		     , CATE3_NO
+		     , CATE3_NM
+		     , CATE4_NO
+		     , CATE4_NM
+		     , CATE5_NO
+		     , CATE5_NM
+		     , FULL_CATE_NO
+		     , FULL_CATE_NM
+		     , DISP_ORD
+		     , FORMAL_GB
+		     , CONTENTS_LOC
+		)
+		SELECT SITE_CD
+		     , CATE_GB
+		     , LEAF_CATE_NO
+		     , CATE_TYPE
+		     , CATE1_NO
+		     , CATE1_NM
+		     , CATE2_NO
+		     , CATE2_NM
+		     , CATE3_NO
+		     , CATE3_NM
+		     , CATE4_NO
+		     , CATE4_NM
+		     , CATE5_NO
+		     , CATE5_NM
+		     , FULL_CATE_NO
+		     , FULL_CATE_NM
+		     , DISP_ORD
+		     , FORMAL_GB
+		     , CONTENTS_LOC
+		FROM   VW_CATE_4SRCH
+	</insert>
 	
 	
 </mapper>
 </mapper>

+ 80 - 79
style24.admin/src/main/resources/i18n/messages/message_ko_KR.properties

@@ -1,79 +1,80 @@
-## -----------------------------------------------------------------------------
-## Message properties
-## -----------------------------------------------------------------------------
-SUCC_0001=\uc131\uacf5\uc801\uc73c\ub85c \uc800\uc7a5\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-SUCC_0002=\uc131\uacf5\uc801\uc73c\ub85c \uc218\uc815\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-SUCC_0003=\uc131\uacf5\uc801\uc73c\ub85c \uc0ad\uc81c\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-SUCC_0004=\uc131\uacf5\uc801\uc73c\ub85c \ucc98\ub9ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-SUCC_0005=\uc131\uacf5\uc801\uc73c\ub85c \ubc1c\uc1a1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-SUCC_0006=\uc131\uacf5\uc801\uc73c\ub85c \ubc1c\ud589\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-SUCC_0007=\uc131\uacf5\uc801\uc73c\ub85c \uc5c5\ub85c\ub4dc \ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-#SUCC_0008=\uc131\uacf5\uc801\uc73c\ub85c \ub4f1\ub85d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-SUCC_0009=\uc131\uacf5\uc801\uc73c\ub85c \ubcc0\uacbd\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-
-FAIL_0001=\uc624\ub958\ub85c \uc778\ud574 \uc800\uc7a5\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-FAIL_0002=\uc624\ub958\ub85c \uc778\ud574 \uc218\uc815\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-FAIL_0003=\uc624\ub958\ub85c \uc778\ud574 \uc0ad\uc81c\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-FAIL_0004=\uc624\ub958\ub85c \uc778\ud574 \ucc98\ub9ac\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-FAIL_0005=\uc624\ub958\ub85c \uc778\ud574 \ubc1c\uc1a1\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-FAIL_0006=\uc624\ub958\ub85c \uc778\ud574 \ubc1c\ud589\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-FAIL_0007=\uc624\ub958\ub85c \uc778\ud574 \uc5c5\ub85c\ub4dc \ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-#FAIL_0008=\uc624\ub958\ub85c \uc778\ud574 \ub4f1\ub85d\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-FAIL_0009=\uc624\ub958\ub85c \uc778\ud574 \ubcc0\uacbd\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-FAIL_1001=\uc800\uc7a5\ud560 \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.
-FAIL_1002=\uc804\uc1a1\ud560 \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.
-FAIL_1003=\uc5d1\uc140\ub2e4\uc6b4\ub85c\ub4dc\ud560 \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.
-FAIL_1004=\uc0ad\uc81c\ud560 \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.
-
-LOGN_0001=\uc785\ub825\ud558\uc2e0 \uc815\ubcf4\ub85c \uac00\uc785\ub41c \ub0b4\uc5ed\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.
-LOGN_0002=\ube44\ubc00\ubc88\ud638\uac00 \uc77c\uce58\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
-LOGN_0003=\ub85c\uadf8\uc778 \uc0c1\ud0dc\uac00 \uc544\ub2d9\ub2c8\ub2e4. \ub2e4\uc2dc \ub85c\uadf8\uc778 \ud574\uc8fc\uc138\uc694.
-LOGN_0004=\ube44\ubc00\ubc88\ud638\ub97c \ubcc0\uacbd\ud55c \ub0a0\ub85c\ubd80\ud130 3\uac1c\uc6d4\uc774 \uacbd\uacfc\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-
-##\uc8fc\ubb38
-ORDER_0001=\uc8fc\ubb38\uc815\ubcf4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.
-ORDER_0002=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uacb0\uc81c\uc644\ub8cc][\ucd9c\uace0\uc644\ub8cc] \uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uc0c1\ud488\uc900\ube44\uc911\uc73c\ub85c \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
-ORDER_0003=\ud574\ub2f9 \uc0c1\ud488 \ube0c\ub79c\ub4dc \uc218\uc815 \uad8c\ud55c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.
-ORDER_0004=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uc0c1\ud488\uc900\ube44\uc911][\uad6c\ub9e4\ud655\uc815] \uc0c1\ud0dc\uc5d0\ub9cc \uc1a1\uc7a5\ubc88\ud638\ub97c \uc785\ub825\ud558\uc2e4\uc218 \uc788\uc2b5\ub2c8\ub2e4.
-ORDER_0005=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ucd9c\uace0\uc644\ub8cc]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uad6c\ub9e4\ud655\uc815 \uc0c1\ud0dc\ub85c \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
-ORDER_0006=\uad6c\ub9e4\ud655\uc815\uc744 \ud558\uc2e4\uc218 \uc788\ub294 \uc0c1\ud488\uc774 \uc5c6\uc2b5\ub2c8\ub2e4. \n\ubc18\ud488\uc774\ub098 \uad50\ud658\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.
-ORDER_0007=\uc8fc\ubb38 \uc804\uccb4\ucde8\uc18c\ub97c \ud558\uc2e4\uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n\uad50\ud658,\ubc18\ud488,\ucde8\uc18c\uc911\uc778 \uc0c1\ud488\uc774 \uc788\ub294\uc9c0 \ud655\uc778 \ubc14\ub78d\ub2c8\ub2e4.
-ORDER_0008=\ud0c0 \uc5c5\uccb4\uc758 \uc0c1\ud488\uc774 \uc788\uc2b5\ub2c8\ub2e4. \uc804\uccb4 \ubc18\ud488\uc744 \uc9c4\ud589\ud558\uc2e4\uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-ORDER_0009=\ud3ec\uc778\ud2b8 \uc6d0\ubcf5 \ucc98\ub9ac\ub97c \uc2e4\ud328\ud558\uc600\uc2b5\ub2c8\ub2e4.
-ORDER_0010=\uacb0\uc81c \ucde8\uc18c\ub97c \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.
-ORDER_0011=\uce74\ub4dc \uacb0\uc81c\uc778 \uacbd\uc6b0\uc5d0\ub9cc \ubd80\ubd84\ucde8\uc18c\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0012=\ucde8\uc18c\uc218\ub7c9\uc744 \ud655\uc778\ud574\uc8fc\uc138\uc694. \ucde8\uc18c\uac00\ub2a5 \uc218\ub7c9\ubcf4\ub2e4 \ub9ce\uc2b5\ub2c8\ub2e4.
-ORDER_0013=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uacb0\uc81c\uc644\ub8cc][\uc0c1\ud488\uc900\ube44\uc911]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ubd80\ubd84\ucde8\uc18c\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0014=\ucd9c\uace0\uc644\ub8cc\ub97c \ud558\uc2e4\uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n\uc8fc\ubb38 \ucde8\uc18c\uc2e0\uccad\ub41c \uc8fc\ubb38\uc744 \uba3c\uc800 \ucc98\ub9ac\ud574\uc8fc\uc2dc\uae30\ubc14\ub78d\ub2c8\ub2e4.
-ORDER_0015=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ucd9c\uace0\uc644\ub8cc]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uc8fc\ubb38\uad50\ud658\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0016=\uad50\ud658\uc218\ub7c9\uc744 \ud655\uc778\ud574\uc8fc\uc138\uc694.\uad50\ud658\uac00\ub2a5 \uc218\ub7c9\ubcf4\ub2e4 \ub9ce\uc2b5\ub2c8\ub2e4.
-ORDER_0017=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uad50\ud658\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uad50\ud658\uc9c4\ud589\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0018=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uad50\ud658\uc9c4\ud589]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uad50\ud658\uc644\ub8cc\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0019=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uad50\ud658\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uad50\ud658\ubc18\ub824\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0020=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ubc18\ud488\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ubc18\ud488\uc9c4\ud589\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0021=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ubc18\ud488\uc9c4\ud589]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ubc18\ud488\uc644\ub8cc\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0022=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ubc18\ud488\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ubc18\ud488\ubc18\ub824\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0023=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ucde8\uc18c\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ucde8\uc18c\ubc18\ub824\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0024=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ucde8\uc18c\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ucde8\uc18c\uc644\ub8cc\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
-ORDER_0025=\ubc18\ud488\uc218\ub7c9\uc744 \ud655\uc778\ud574\uc8fc\uc138\uc694. \ubc18\ud488\uac00\ub2a5 \uc218\ub7c9\ubcf4\ub2e4 \ub9ce\uc2b5\ub2c8\ub2e4.
-ORDER_0026=\uc8fc\ubb38 \uc804\uccb4\ubc18\ud488\uc744 \ud558\uc2e4\uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n\uad50\ud658,\ubc18\ud488,\ucde8\uc18c\uc911\uc778 \uc0c1\ud488\uc774 \uc788\ub294\uc9c0 \ud655\uc778 \ubc14\ub78d\ub2c8\ub2e4.
-ORDER_0027=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uc0c1\ud488\uc900\ube44\uc911] \uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uacb0\uc81c\uc644\ub8cc \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
-ORDER_0028=\uacb0\uc81c \uc644\ub8cc \uc0c1\ud0dc\ub85c \ubcc0\uacbd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n\ucde8\uc18c,\ubc18\ud488\uc774 \uc644\ub8cc\ub41c \uc8fc\ubb38\uc785\ub2c8\ub2e4.
-ORDER_0029=\uc8fc\ubb38 \uc0c1\ud0dc\ub97c \ud655\uc778\ud574 \uc8fc\uc138\uc694. [\ucd9c\uace0\uc911][\uad6c\ub9e4\ud655\uc815]\uc0c1\ud0dc\uc778 \uc8fc\ubb38\uac74\uc774 \uc788\uc2b5\ub2c8\ub2e4.
-ORDER_0030=\ud544\uc218\uac12\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.
-ORDER_0031=\uc8fc\ubb38\uc804\uccb4\ucde8\uc18c \ucc98\ub9ac\uac00 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-
-#\uc0ac\ubc29\ub137
-SABANGNET_0001=\uc131\uacf5\uc801\uc73c\ub85c \uc0c1\ud488 \uc815\ubcf4\uac00 \uc804\uc1a1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc131\uacf5)
-SABANGNET_0002=\uc131\uacf5\uc801\uc73c\ub85c \uc1fc\ud551\ubab0\ubcc4 DATA \uac00 \uc804\uc1a1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc131\uacf5)
-SABANGNET_0003=\uc131\uacf5\uc801\uc73c\ub85c \uc0c1\ud488 \uc694\uc57d \uc815\ubcf4\uac00 \uc804\uc1a1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc131\uacf5)
-SABANGNET_0004=\uc8fc\ubb38\uc774 \uc218\uc9d1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc131\uacf5, \uc2e4\ud328: {2}\uac74)
-SABANGNET_0005=\uc131\uacf5\uc801\uc73c\ub85c \uc1a1\uc7a5\ubc88\ud638\uac00 \ub4f1\ub85d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-SABANGNET_0006=\ucde8\uc18c\uc8fc\ubb38\uc774 \uc218\uc9d1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc2e4\ud328 {2}\uac74 \uc131\uacf5)
-SABANGNET_0007=\uad50\ud658\uc8fc\ubb38\uc774 \uc218\uc9d1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc2e4\ud328 {2}\uac74 \uc131\uacf5)
-SABANGNET_0008=\ubc18\ud488\uc8fc\ubb38\uc774 \uc218\uc9d1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc2e4\ud328 {2}\uac74 \uc131\uacf5)
-SABANGNET_0009=\uc720\ud6a8\uc131 \uac80\uc99d \uc2e4\ud328\ub85c \ucc98\ub9ac\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-SABANGNET_0010=\ucd9c\uace0\ub97c \uc704\ud574 ERP\ub85c \uc804\uc1a1\ud558\uc600\uc2b5\ub2c8\ub2e4.(\uc131\uacf5: {0}\uac74, \uc2e4\ud328: {1}\uac74)
-
-#\ubc30\uc1a1
-DELIVERY_0001=\ub4f1\ub85d \uc2e4\ud328\ud558\uc600\uc2b5\ub2c8\ub2e4. \uc774\ubbf8 \ub4f1\ub85d\ub41c \ucd9c\uace0\uae08\uc9c0 \uc0c1\ud488\uc774 \uc788\uc2b5\ub2c8\ub2e4.
+## -----------------------------------------------------------------------------
+## Message properties
+## -----------------------------------------------------------------------------
+SUCC_0001=\uc131\uacf5\uc801\uc73c\ub85c \uc800\uc7a5\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+SUCC_0002=\uc131\uacf5\uc801\uc73c\ub85c \uc218\uc815\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+SUCC_0003=\uc131\uacf5\uc801\uc73c\ub85c \uc0ad\uc81c\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+SUCC_0004=\uc131\uacf5\uc801\uc73c\ub85c \ucc98\ub9ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+SUCC_0005=\uc131\uacf5\uc801\uc73c\ub85c \ubc1c\uc1a1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+SUCC_0006=\uc131\uacf5\uc801\uc73c\ub85c \ubc1c\ud589\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+SUCC_0007=\uc131\uacf5\uc801\uc73c\ub85c \uc5c5\ub85c\ub4dc \ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+#SUCC_0008=\uc131\uacf5\uc801\uc73c\ub85c \ub4f1\ub85d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+SUCC_0009=\uc131\uacf5\uc801\uc73c\ub85c \ubcc0\uacbd\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+SUCC_0010=\uc131\uacf5\uc801\uc73c\ub85c \uac31\uc2e0\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+
+FAIL_0001=\uc624\ub958\ub85c \uc778\ud574 \uc800\uc7a5\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
+FAIL_0002=\uc624\ub958\ub85c \uc778\ud574 \uc218\uc815\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
+FAIL_0003=\uc624\ub958\ub85c \uc778\ud574 \uc0ad\uc81c\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
+FAIL_0004=\uc624\ub958\ub85c \uc778\ud574 \ucc98\ub9ac\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
+FAIL_0005=\uc624\ub958\ub85c \uc778\ud574 \ubc1c\uc1a1\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
+FAIL_0006=\uc624\ub958\ub85c \uc778\ud574 \ubc1c\ud589\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
+FAIL_0007=\uc624\ub958\ub85c \uc778\ud574 \uc5c5\ub85c\ub4dc \ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
+#FAIL_0008=\uc624\ub958\ub85c \uc778\ud574 \ub4f1\ub85d\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
+FAIL_0009=\uc624\ub958\ub85c \uc778\ud574 \ubcc0\uacbd\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
+FAIL_1001=\uc800\uc7a5\ud560 \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.
+FAIL_1002=\uc804\uc1a1\ud560 \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.
+FAIL_1003=\uc5d1\uc140\ub2e4\uc6b4\ub85c\ub4dc\ud560 \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.
+FAIL_1004=\uc0ad\uc81c\ud560 \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.
+
+LOGN_0001=\uc785\ub825\ud558\uc2e0 \uc815\ubcf4\ub85c \uac00\uc785\ub41c \ub0b4\uc5ed\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.
+LOGN_0002=\ube44\ubc00\ubc88\ud638\uac00 \uc77c\uce58\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
+LOGN_0003=\ub85c\uadf8\uc778 \uc0c1\ud0dc\uac00 \uc544\ub2d9\ub2c8\ub2e4. \ub2e4\uc2dc \ub85c\uadf8\uc778 \ud574\uc8fc\uc138\uc694.
+LOGN_0004=\ube44\ubc00\ubc88\ud638\ub97c \ubcc0\uacbd\ud55c \ub0a0\ub85c\ubd80\ud130 3\uac1c\uc6d4\uc774 \uacbd\uacfc\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+
+##\uc8fc\ubb38
+ORDER_0001=\uc8fc\ubb38\uc815\ubcf4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.
+ORDER_0002=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uacb0\uc81c\uc644\ub8cc][\ucd9c\uace0\uc644\ub8cc] \uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uc0c1\ud488\uc900\ube44\uc911\uc73c\ub85c \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
+ORDER_0003=\ud574\ub2f9 \uc0c1\ud488 \ube0c\ub79c\ub4dc \uc218\uc815 \uad8c\ud55c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.
+ORDER_0004=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uc0c1\ud488\uc900\ube44\uc911][\uad6c\ub9e4\ud655\uc815] \uc0c1\ud0dc\uc5d0\ub9cc \uc1a1\uc7a5\ubc88\ud638\ub97c \uc785\ub825\ud558\uc2e4\uc218 \uc788\uc2b5\ub2c8\ub2e4.
+ORDER_0005=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ucd9c\uace0\uc644\ub8cc]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uad6c\ub9e4\ud655\uc815 \uc0c1\ud0dc\ub85c \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
+ORDER_0006=\uad6c\ub9e4\ud655\uc815\uc744 \ud558\uc2e4\uc218 \uc788\ub294 \uc0c1\ud488\uc774 \uc5c6\uc2b5\ub2c8\ub2e4. \n\ubc18\ud488\uc774\ub098 \uad50\ud658\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.
+ORDER_0007=\uc8fc\ubb38 \uc804\uccb4\ucde8\uc18c\ub97c \ud558\uc2e4\uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n\uad50\ud658,\ubc18\ud488,\ucde8\uc18c\uc911\uc778 \uc0c1\ud488\uc774 \uc788\ub294\uc9c0 \ud655\uc778 \ubc14\ub78d\ub2c8\ub2e4.
+ORDER_0008=\ud0c0 \uc5c5\uccb4\uc758 \uc0c1\ud488\uc774 \uc788\uc2b5\ub2c8\ub2e4. \uc804\uccb4 \ubc18\ud488\uc744 \uc9c4\ud589\ud558\uc2e4\uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
+ORDER_0009=\ud3ec\uc778\ud2b8 \uc6d0\ubcf5 \ucc98\ub9ac\ub97c \uc2e4\ud328\ud558\uc600\uc2b5\ub2c8\ub2e4.
+ORDER_0010=\uacb0\uc81c \ucde8\uc18c\ub97c \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.
+ORDER_0011=\uce74\ub4dc \uacb0\uc81c\uc778 \uacbd\uc6b0\uc5d0\ub9cc \ubd80\ubd84\ucde8\uc18c\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0012=\ucde8\uc18c\uc218\ub7c9\uc744 \ud655\uc778\ud574\uc8fc\uc138\uc694. \ucde8\uc18c\uac00\ub2a5 \uc218\ub7c9\ubcf4\ub2e4 \ub9ce\uc2b5\ub2c8\ub2e4.
+ORDER_0013=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uacb0\uc81c\uc644\ub8cc][\uc0c1\ud488\uc900\ube44\uc911]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ubd80\ubd84\ucde8\uc18c\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0014=\ucd9c\uace0\uc644\ub8cc\ub97c \ud558\uc2e4\uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n\uc8fc\ubb38 \ucde8\uc18c\uc2e0\uccad\ub41c \uc8fc\ubb38\uc744 \uba3c\uc800 \ucc98\ub9ac\ud574\uc8fc\uc2dc\uae30\ubc14\ub78d\ub2c8\ub2e4.
+ORDER_0015=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ucd9c\uace0\uc644\ub8cc]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uc8fc\ubb38\uad50\ud658\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0016=\uad50\ud658\uc218\ub7c9\uc744 \ud655\uc778\ud574\uc8fc\uc138\uc694.\uad50\ud658\uac00\ub2a5 \uc218\ub7c9\ubcf4\ub2e4 \ub9ce\uc2b5\ub2c8\ub2e4.
+ORDER_0017=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uad50\ud658\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uad50\ud658\uc9c4\ud589\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0018=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uad50\ud658\uc9c4\ud589]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uad50\ud658\uc644\ub8cc\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0019=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uad50\ud658\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uad50\ud658\ubc18\ub824\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0020=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ubc18\ud488\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ubc18\ud488\uc9c4\ud589\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0021=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ubc18\ud488\uc9c4\ud589]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ubc18\ud488\uc644\ub8cc\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0022=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ubc18\ud488\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ubc18\ud488\ubc18\ub824\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0023=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ucde8\uc18c\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ucde8\uc18c\ubc18\ub824\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0024=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\ucde8\uc18c\uc2e0\uccad]\uc0c1\ud0dc\uc5d0\uc11c\ub9cc \ucde8\uc18c\uc644\ub8cc\uac00 \uac00\ub2a5\ud569\ub2c8\ub2e4.
+ORDER_0025=\ubc18\ud488\uc218\ub7c9\uc744 \ud655\uc778\ud574\uc8fc\uc138\uc694. \ubc18\ud488\uac00\ub2a5 \uc218\ub7c9\ubcf4\ub2e4 \ub9ce\uc2b5\ub2c8\ub2e4.
+ORDER_0026=\uc8fc\ubb38 \uc804\uccb4\ubc18\ud488\uc744 \ud558\uc2e4\uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n\uad50\ud658,\ubc18\ud488,\ucde8\uc18c\uc911\uc778 \uc0c1\ud488\uc774 \uc788\ub294\uc9c0 \ud655\uc778 \ubc14\ub78d\ub2c8\ub2e4.
+ORDER_0027=\uc8fc\ubb38\uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.\n[\uc0c1\ud488\uc900\ube44\uc911] \uc0c1\ud0dc\uc5d0\uc11c\ub9cc \uacb0\uc81c\uc644\ub8cc \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
+ORDER_0028=\uacb0\uc81c \uc644\ub8cc \uc0c1\ud0dc\ub85c \ubcc0\uacbd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n\ucde8\uc18c,\ubc18\ud488\uc774 \uc644\ub8cc\ub41c \uc8fc\ubb38\uc785\ub2c8\ub2e4.
+ORDER_0029=\uc8fc\ubb38 \uc0c1\ud0dc\ub97c \ud655\uc778\ud574 \uc8fc\uc138\uc694. [\ucd9c\uace0\uc911][\uad6c\ub9e4\ud655\uc815]\uc0c1\ud0dc\uc778 \uc8fc\ubb38\uac74\uc774 \uc788\uc2b5\ub2c8\ub2e4.
+ORDER_0030=\ud544\uc218\uac12\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.
+ORDER_0031=\uc8fc\ubb38\uc804\uccb4\ucde8\uc18c \ucc98\ub9ac\uac00 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+
+#\uc0ac\ubc29\ub137
+SABANGNET_0001=\uc131\uacf5\uc801\uc73c\ub85c \uc0c1\ud488 \uc815\ubcf4\uac00 \uc804\uc1a1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc131\uacf5)
+SABANGNET_0002=\uc131\uacf5\uc801\uc73c\ub85c \uc1fc\ud551\ubab0\ubcc4 DATA \uac00 \uc804\uc1a1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc131\uacf5)
+SABANGNET_0003=\uc131\uacf5\uc801\uc73c\ub85c \uc0c1\ud488 \uc694\uc57d \uc815\ubcf4\uac00 \uc804\uc1a1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc131\uacf5)
+SABANGNET_0004=\uc8fc\ubb38\uc774 \uc218\uc9d1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc131\uacf5, \uc2e4\ud328: {2}\uac74)
+SABANGNET_0005=\uc131\uacf5\uc801\uc73c\ub85c \uc1a1\uc7a5\ubc88\ud638\uac00 \ub4f1\ub85d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+SABANGNET_0006=\ucde8\uc18c\uc8fc\ubb38\uc774 \uc218\uc9d1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc2e4\ud328 {2}\uac74 \uc131\uacf5)
+SABANGNET_0007=\uad50\ud658\uc8fc\ubb38\uc774 \uc218\uc9d1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc2e4\ud328 {2}\uac74 \uc131\uacf5)
+SABANGNET_0008=\ubc18\ud488\uc8fc\ubb38\uc774 \uc218\uc9d1\ub418\uc5c8\uc2b5\ub2c8\ub2e4.(\ucd1d {0}\uac74 \uc911 {1}\uac74 \uc2e4\ud328 {2}\uac74 \uc131\uacf5)
+SABANGNET_0009=\uc720\ud6a8\uc131 \uac80\uc99d \uc2e4\ud328\ub85c \ucc98\ub9ac\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
+SABANGNET_0010=\ucd9c\uace0\ub97c \uc704\ud574 ERP\ub85c \uc804\uc1a1\ud558\uc600\uc2b5\ub2c8\ub2e4.(\uc131\uacf5: {0}\uac74, \uc2e4\ud328: {1}\uac74)
+
+#\ubc30\uc1a1
+DELIVERY_0001=\ub4f1\ub85d \uc2e4\ud328\ud558\uc600\uc2b5\ub2c8\ub2e4. \uc774\ubbf8 \ub4f1\ub85d\ub41c \ucd9c\uace0\uae08\uc9c0 \uc0c1\ud488\uc774 \uc788\uc2b5\ub2c8\ub2e4.

+ 203 - 231
style24.admin/src/main/webapp/WEB-INF/views/display/CategoryForm.html

@@ -31,46 +31,31 @@
 				<table class="frmStyle" aria-describedby="검색조건">
 				<table class="frmStyle" aria-describedby="검색조건">
 					<colgroup>
 					<colgroup>
 						<col width="10%"/>
 						<col width="10%"/>
-						<col width="10%"/>
-						<col width="10%"/>
-						<col width="10%"/>
-						<col width="10%"/>
-						<col width="10%"/>
-						<col width="10%"/>
-						<col width="10%"/>
-						<col width="10%"/>
-						<col width="10%"/>
+						<col/>
 					</colgroup>
 					</colgroup>
 					<tr>
 					<tr>
-						<th>사이트</th>
+						<th>카테고리</th>
 						<td>
 						<td>
+							<input type="hidden" name="selLvl"/>
 							<select name="siteCd">
 							<select name="siteCd">
-								<option value="">[전체]</option>
+<!-- 								<option value="">[사이트]</option> -->
 								<option th:if="${siteList}" th:each="oneData, status : ${siteList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 								<option th:if="${siteList}" th:each="oneData, status : ${siteList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 							</select>
-						</td>
-						<th>카테고리구분</th>
-						<td>
-							<select name="cateGb" id="selCate1" onchange="fnChangeSelect($(this).val(), 2);">
-								<option value="">[선택]</option>
+							<select name="cateGb" id="selCate1" onchange="fnChangeSearchCondition($(this).val(), 1);">
+								<option value="">[카테고리구분]</option>
+								<option th:if="${cateGbList}" th:each="oneData, status : ${cateGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 							</select>
-						</td>
-						<th>대카테고리</th>
-						<td>
-							<select name="tcateNo" id="selCate2" onchange="fnChangeSelect($(this).val(), 3);">
-								<option value="">[선택]</option>
+							<select name="cate1No" id="selCate2" onchange="fnChangeSearchCondition($(this).val(), 2);">
+								<option value="">[카테고리1]</option>
 							</select>
 							</select>
-						</td>
-						<th>중카테고리</th>
-						<td>
-							<select name="mcateNo" id="selCate3" onchange="fnChangeSelect($(this).val(), 4);">
-								<option value="">[선택]</option>
+							<select name="cate2No" id="selCate3" onchange="fnChangeSearchCondition($(this).val(), 3);">
+								<option value="">[카테고리2]</option>
 							</select>
 							</select>
-						</td>
-						<th>소카테고리</th>
-						<td>
-							<select name="scateNo" id="selCate4" onchange="fnChangeSelect($(this).val(), 5);">
-								<option value="">[선택]</option>
+							<select name="cate3No" id="selCate4" onchange="fnChangeSearchCondition($(this).val(), 4);">
+								<option value="">[카테고리3]</option>
+							</select>
+							<select name="cate4No" id="selCate5" onchange="fnChangeSearchCondition($(this).val(), 5);">
+								<option value="">[카테고리4]</option>
 							</select>
 							</select>
 						</td>
 						</td>
 					</tr>
 					</tr>
@@ -98,9 +83,9 @@
 						<col/>
 						<col/>
 					</colgroup>
 					</colgroup>
 					<tr>
 					<tr>
-						<th>카테고리번호<i class="required" title="필수"></i></th>
+						<th>카테고리번호</th>
 						<td>
 						<td>
-							<input type="text" class="w200" name="cateNo" placeholder="자동생성" disabled="disabled" required="required" data-valid-name="카테고리번호"/>
+							<input type="text" class="w200" name="cateNo" placeholder="자동생성" readonly="readonly"/>
 						</td>
 						</td>
 						<th>카테고리명<i class="required" title="필수"></i></th>
 						<th>카테고리명<i class="required" title="필수"></i></th>
 						<td class="infoTxt">
 						<td class="infoTxt">
@@ -108,47 +93,52 @@
 						</td>
 						</td>
 						<th>카테고리유형<i class="required" title="필수"></i></th>
 						<th>카테고리유형<i class="required" title="필수"></i></th>
 						<td>
 						<td>
-							<select name="cateType" id="cateType" data-valid-name="카테고리유형">
+							<select name="cateType" data-valid-name="카테고리유형">
 								<option th:if="${cateTypeList}" th:each="oneData, status : ${cateTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 								<option th:if="${cateTypeList}" th:each="oneData, status : ${cateTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 							</select>
 						</td>
 						</td>
 					</tr>
 					</tr>
 					<tr>
 					<tr>
-						<th>상위카테고리<i class="star"></i></th>
+						<th>상위카테고리<i class="required" title="필수"></i></th>
 						<td colspan="5">
 						<td colspan="5">
-							<input name="selLvl" type="hidden"/>
-							<select name="siteCd" id="cateLvl" data-valid-name="사이트" onchange="fnChangeSelectCateLvl($(this).val(), 1);">
-								<option value="null">[선택]</option>
-								<option th:if="${siteCdList}" th:each="oneData, status : ${siteCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							<input type="hidden" name="selLvl"/>
+							<select name="siteCd" data-valid-name="사이트">
+<!-- 								<option value="">[사이트]</option> -->
+								<option th:if="${siteList}" th:each="oneData, status : ${siteList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 							</select>
-							<select name="cateGb" id="cateLvl1" data-valid-name="카테고리구분" onchange="fnChangeSelectCateLvl($(this).val(), 2);">
-								<option value="">[선택]</option>
+							<select name="cateGb" id="cateLvl1" data-valid-name="카테고리구분" onchange="fnChangeUpperCategory($(this).val(), 1);">
+								<option value="">[카테고리구분]</option>
+								<option th:if="${cateGbList}" th:each="oneData, status : ${cateGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 							</select>
-							<select name="tcateCd" id="cateLvl2" data-valid-name="대카테고리" onchange="fnChangeSelectCateLvl($(this).val(), 3);">
-								<option value="">[선택]</option>
+							<select name="cate1No" id="cateLvl2" data-valid-name="카테고리1" onchange="fnChangeUpperCategory($(this).val(), 2);">
+								<option value="">[카테고리1]</option>
 							</select>
 							</select>
-							<select name="mcateCd" id="cateLvl3" data-valid-name="중카테고리" onchange="fnChangeSelectCateLvl($(this).val(), 4);">
-								<option value="">[선택]</option>
+							<select name="cate2No" id="cateLvl3" data-valid-name="카테고리2" onchange="fnChangeUpperCategory($(this).val(), 3);">
+								<option value="">[카테고리2]</option>
 							</select>
 							</select>
-							<select name="scateCd" id="cateLvl4" data-valid-name="소카테고리" onchange="fnChangeSelectCateLvl($(this).val(), 5);">
-								<option value="">[선택]</option>
+							<select name="cate3No" id="cateLvl4" data-valid-name="카테고리3" onchange="fnChangeUpperCategory($(this).val(), 4);">
+								<option value="">[카테고리3]</option>
+							</select>
+							<select name="cate4No" id="cateLvl5" data-valid-name="카테고리4" onchange="fnChangeUpperCategory($(this).val(), 5);">
+								<option value="">[카테고리4]</option>
 							</select>
 							</select>
 						</td>
 						</td>
 					</tr>
 					</tr>
 					<tr>
 					<tr>
 						<th>노출순서<i class="required" title="필수"></i></th>
 						<th>노출순서<i class="required" title="필수"></i></th>
 						<td>
 						<td>
-							<input type="text" class="w100" name="dispOrd" maxlength="5" required="required" data-valid-type="integer" data-valid-name="노출순서"/>
+							<input type="text" class="aR w100" name="dispOrd" maxlength="5" required="required" data-valid-type="integer" data-valid-name="노출순서"/>
 						</td>
 						</td>
 						<th>정상이월구분</th>
 						<th>정상이월구분</th>
 						<td>
 						<td>
 							<select name="formalGb">
 							<select name="formalGb">
-								<option th:if="${formalList}" th:each="oneData, status : ${formalList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+								<option value="">[선택]</option>
+								<option th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 							</select>
 						</td>
 						</td>
 						<th>컨텐츠위치</th>
 						<th>컨텐츠위치</th>
 						<td>
 						<td>
-							<select name="contentsLoc" disabled="disabled" required="required" data-valid-name="컨텐츠위치">
+							<select name="contentsLoc">
 								<option value="">[선택]</option>
 								<option value="">[선택]</option>
 								<option th:if="${contentsLocList}" th:each="oneData, status : ${contentsLocList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 								<option th:if="${contentsLocList}" th:each="oneData, status : ${contentsLocList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 							</select>
@@ -176,7 +166,7 @@
 				<li class="right">
 				<li class="right">
 					<button type="button" class="btn btn-info btn-lg" id="btnNew">신규</button>
 					<button type="button" class="btn btn-info btn-lg" id="btnNew">신규</button>
 					<button type="button" class="btn btn-success btn-lg" id="btnSave">저장</button>
 					<button type="button" class="btn btn-success btn-lg" id="btnSave">저장</button>
-					<button type="button" class="btn btn-base btn-lg" id="btnRef4Srch" th:if="${sessionInfo.roleCd == '0000'}">4SRCH 갱신</button>
+					<button type="button" class="btn btn-base btn-lg" id="btnRefresh4Srch" th:if="${sessionInfo.roleCd == 'G001_0000'}">4SRCH 갱신</button>
 				</li>
 				</li>
 			</ul>
 			</ul>
 			<!-- //버튼 배치 영역 -->
 			<!-- //버튼 배치 영역 -->
@@ -189,6 +179,8 @@
 	let siteList = gagajf.convertToArray([[${siteList}]]);
 	let siteList = gagajf.convertToArray([[${siteList}]]);
 	let cateGbList = gagajf.convertToArray([[${cateGbList}]]);
 	let cateGbList = gagajf.convertToArray([[${cateGbList}]]);
 	let cateTypeList = gagajf.convertToArray([[${cateTypeList}]]);
 	let cateTypeList = gagajf.convertToArray([[${cateTypeList}]]);
+	let formalGbList = gagajf.convertToArray([[${formalGbList}]]);
+	let conentsLocList = gagajf.convertToArray([[${conentsLocList}]]);
 
 
 	let columnDefs = [
 	let columnDefs = [
 		{
 		{
@@ -197,7 +189,7 @@
 		},
 		},
 		{
 		{
 			headerName: "카테고리구분", field: "cateGb", width: 150, cellClass: 'text-center',
 			headerName: "카테고리구분", field: "cateGb", width: 150, cellClass: 'text-center',
-			valueFormatter: function (params) { return gagaAgGrid.lookupValue(cateGbList, params.value); }
+			cellRenderer: function (params) { return gagaAgGrid.lookupValue(cateGbList, params.value); }
 		},
 		},
 		{headerName: "카테고리번호", field: "cateNo", width: 150, cellClass: 'text-center'},
 		{headerName: "카테고리번호", field: "cateNo", width: 150, cellClass: 'text-center'},
 		{
 		{
@@ -208,12 +200,18 @@
 		},
 		},
 		{
 		{
 			headerName: "카테고리유형", field: "cateType", width: 150, cellClass: 'text-center',
 			headerName: "카테고리유형", field: "cateType", width: 150, cellClass: 'text-center',
-			valueFormatter: function (params) { gagaAgGrid.lookupValue(cateTypeList, params.value); }
+			cellRenderer: function (params) { gagaAgGrid.lookupValue(cateTypeList, params.value); }
 		},
 		},
 		{headerName: "말단여부", field: "leafYn", width: 80, cellClass: 'text-center'},
 		{headerName: "말단여부", field: "leafYn", width: 80, cellClass: 'text-center'},
 		{headerName: "노출순서", field: "dispOrd", width: 100, cellClass: 'text-center'},
 		{headerName: "노출순서", field: "dispOrd", width: 100, cellClass: 'text-center'},
-		{headerName: "정상이월구분", field: "formalGb", width: 150, cellClass: 'text-center'},
-		{headerName: "컨텐츠위치", field: "contentsLoc", width: 150, cellClass: 'text-center'},
+		{
+			headerName: "정상이월구분", field: "formalGb", width: 150, cellClass: 'text-center',
+			cellRenderer: function (params) { return gagaAgGrid.lookupValue(formalGbList, params.value); }
+		},
+		{
+			headerName: "컨텐츠위치", field: "contentsLoc", width: 200, cellClass: 'text-center',
+			cellRenderer: function (params) { return gagaAgGrid.lookupValue(conentsLocList, params.value); }
+		},
 		{headerName: "노출여부", field: "dispYn", width: 80, cellClass: 'text-center'},
 		{headerName: "노출여부", field: "dispYn", width: 80, cellClass: 'text-center'},
 		{headerName: "사용여부", field: "useYn", width: 80, cellClass: 'text-center'}
 		{headerName: "사용여부", field: "useYn", width: 80, cellClass: 'text-center'}
 	];
 	];
@@ -226,164 +224,174 @@
 			return;
 			return;
 		
 		
 		$("#btnNew").click();
 		$("#btnNew").click();
-		var formId = '#detailForm';
-		$(formId + " input[name=cateNo]").val(event.data.cateNo);
-		$(formId + " input[name=cateNm]").val(event.data.cateNm);
-		$(formId + " select[name=cateType]").val(event.data.cateType);
-		$(formId + " input[name=dispOrd]").val(event.data.dispOrd);
-		$(formId + " select[name=formalGb]").val(event.data.formalGb);
-		$(formId + " select[name=contentsLoc]").val(event.data.contentsLoc);
-		$(formId + " input:radio[name=dispYn]:input[value="+event.data.dispYn+"]").click();
-		$(formId + " input:radio[name=useYn]:input[value="+event.data.useYn+"]").click();
-		var selLvl = $("#selLvl").val();
-		$("#cateLvl").html($("#selCate").html());
-		$("#cateLvl").val($("#selCate").val());
-		for(var i=1; i<5; i++){
-			$("#cateLvl"+i).html($("#selCate"+i).html());
-			$("#cateLvl"+i).val($("#selCate"+i).val());
-			if(i>=selLvl){
-				$("#cateLvl"+i).hide();
-			}else{
-				$("#cateLvl"+i).show();
+		$('#detailForm input[name=siteCd]').val(event.data.siteCd);
+		$('#detailForm input[name=cateNo]').val(event.data.cateNo);
+		$('#detailForm input[name=cateNm]').val(event.data.cateNm);
+		$('#detailForm select[name=cateType]').val(event.data.cateType);
+		
+		// 상위카테고리
+		var selLvl = $("#searchForm input[name=selLvl]").val();
+		for (let i = 1; i <= 5; i++) {
+			$("#cateLvl" + i).html($("#selCate" + i).html());
+			$("#cateLvl" + i).val($("#selCate" + i).val());
+			if (i >= selLvl) {
+				$("#cateLvl" + i).hide();
+			} else {
+				$("#cateLvl" + i).show();
 			}
 			}
 		}
 		}
-		$(formId + " input[name=selLvl]").val(selLvl);
-		if(event.data.cateType=="20"){
-			$(formId + " select[name=contentsLoc]").val(event.data.contentsLoc);
-			$(formId + " select[name=contentsLoc]").prop('disabled', false);
-			$(formId + " select[name=contentsLoc]").removeClass('formControl');
+		$('#detailForm input[name=selLvl]').val(selLvl);
+		
+		$('#detailForm input[name=dispOrd]').val(event.data.dispOrd);
+		$('#detailForm select[name=formalGb]').val(event.data.formalGb);
+		$('#detailForm select[name=contentsLoc]').val(event.data.contentsLoc);
+		
+		// 카테고리유형에 따른 컨텐츠위치 설정 변경
+		if (event.data.cateType == 'G031_10') {
+			$('#detailForm select[name=contentsLoc]').prop('disabled', true);
+		} else if (event.data.cateType == 'G031_20') {
+			$('#detailForm select[name=contentsLoc]').prop('disabled', false);
 		}
 		}
+		
+		$('#detailForm input:radio[name=dispYn]:input[value=' + event.data.dispYn + ']').click();
+		$('#detailForm input:radio[name=useYn]:input[value=' + event.data.useYn + ']').click();
 	}
 	}
 
 
-	var fnChangeSelect = function(val, selLvl){
-		if (val == '') {
+	/**
+	 * 검색폼의 카테고리 선택 시
+	 */
+	var fnChangeSearchCondition = function(val, selLvl) {
+		if (gagajf.isNull(val)) {
 			if (selLvl > 1) {
 			if (selLvl > 1) {
 				selLvl = selLvl - 1;
 				selLvl = selLvl - 1;
 			} else {
 			} else {
 				selLvl = 1;
 				selLvl = 1;
 			}
 			}
 		}
 		}
-		$("#selLvl").val(selLvl);
+		$('#searchForm input[name=selLvl]').val(selLvl);
 		
 		
 		// Fetch data
 		// Fetch data
-		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm', fnChangeCategory);
-	}
-	
-	var fnChangeCategory = function(data){
-		var selLvl = $("#selLvl").val();
-		var cd = '';
-		var nm = '';
-		var html = '<option value="">[선택]</option>';
-		for (var i = 1; i < 5; i++) {
-			if (i > selLvl) {
-				$("#selCate"+i).html(html);
+		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm', function(data) {
+			let selLvl = Number($('#searchForm input[name=selLvl]').val()) + 1;
+			
+			for (let i = 2; i <= 5; i++) {
+				if (i >= selLvl) {
+					$('#selCate' + i).html('<option value="">[카테고리' + (i - 1) + ']</option>');
+				}
 			}
 			}
-		}
-		
-		for (var i = 0; i < data.length; i++) {
-			if (data[i].useYn == 'Y') {
-				if (selLvl == '1') {
-					cd = data[i].cateGb;
-					nm = gagaAgGrid.lookupValue(cateGbList, cd);
-				} else {
-					cd = data[i].cateCd;
-					nm = data[i].cateNm;
+			
+			let tag = '';
+			for (let i = 0; i < data.length; i++) {
+				if (data[i].useYn == 'Y') {
+					tag += '<option value="' + data[i].cateNo + '">[' + data[i].cateNo + '] ' + data[i].cateNm + '</option>';
 				}
 				}
-				html += '<option value="'+cd+'">['+cd+'] '+nm+'</option>';
 			}
 			}
-		}
-		$("#selCate" + selLvl).html(html);
-		$("#btnNew").click();
+			
+			$("#selCate" + selLvl).append(tag);
+			$("#btnNew").click();
+		});
 	}
 	}
 	
 	
-	var fnChangeSelectCateLvl = function(val, selLvl){
-		if(val==''){
-			if(selLvl>1){
-				selLvl = selLvl - 1;
-			}else{
-				selLvl = '';
-			}
+	// 카테고리유형 변경 시
+	$('#detailForm select[name=cateType]').on('change', function() {
+		if ($(this).val() == 'G031_10') { // 상품분류카테고리
+			$("#detailForm select[name=contentsLoc]").prop('disabled', true);
+		} else if ($(this).val() == 'G031_20') { // 컨텐츠카테고리
+			$("#detailForm select[name=contentsLoc]").prop('disabled', false);
 		}
 		}
-		$("#detailForm input[name=selLvl]").val(selLvl);
-		gagajf.ajaxFormSubmit($('#searchForm').prop('action'), "#detailForm", fnChangeCateLvl);
-	}
+	});
 	
 	
-	var fnChangeCateLvl = function(data){
-		var selLvl = $("#detailForm input[name=selLvl]").val();
-		var cd = '';
-		var nm = '';
-		var html = '<option value="">[선택]</option>';
-		for(var i=1; i<5; i++){
-			if(i>selLvl){
-				$("#cateLvl"+i).html(html);
+	// 등록/수정폼의 상위카테고리 선택 시
+	var fnChangeUpperCategory = function(val, selLvl) {
+		if (gagajf.isNull(val)) {
+			if (selLvl > 1) {
+				selLvl = selLvl - 1;
+			} else {
+				selLvl = 1;
 			}
 			}
 		}
 		}
-		for(var i=0; i<data.length; i++){
-			if(data[i].useYn=='Y'){
-				if(selLvl=='1'){
-					cd = data[i].cateGb;
-					nm = gagaAgGrid.lookupValue(cateGbList, cd);
-				}else{
-					cd = data[i].cateCd;
-					nm = data[i].cateNm;
+		$('#detailForm input[name=selLvl]').val(selLvl);
+		
+		gagajf.ajaxFormSubmit($('#searchForm').prop('action'), "#detailForm", function(data) {
+			let selLvl = Number($('#detailForm input[name=selLvl]').val()) + 1;
+			
+			for (let i = 2; i <= 5; i++) {
+				if (i >= selLvl) {
+					$('#cateLvl' + i).html('<option value="">[카테고리' + (i - 1) + ']</option>');
 				}
 				}
-				html += '<option value="'+cd+'">['+cd+'] '+nm+'</option>';
 			}
 			}
-		}
-		$("#cateLvl"+selLvl).html(html);
+			
+			let tag = '';
+			for (let i = 0; i < data.length; i++) {
+				if (data[i].useYn == 'Y') {
+					tag += '<option value="' + data[i].cateNo + '">[' + data[i].cateNo + '] ' + data[i].cateNm + '</option>';
+				}
+			}
+			
+			$("#cateLvl" + selLvl).append(tag);
+		});
 	}
 	}
 	
 	
-	// 카테고리 저장/수정
+	// 신규
+	$('#btnNew').on('click', function(){
+		$("#detailForm")[0].reset();
+// 		$("#detailForm input[name=selLvl]").val('');
+		for (let i = 2; i <= 5; i++) {
+			$("#cateLvl" + i).show();
+		}
+	});
+	
+	// 저장
 	$('#btnSave').on('click', function() {
 	$('#btnSave').on('click', function() {
-		var formId = '#detailForm';
-		var cateCd = $(formId + " input[name=cateCd]").val();
-		var cateNm = $(formId + " input[name=cateNm]").val();
+		// 입력 값 체크
+		if (!gagajf.validation('#detailForm'))
+			return false;
 		
 		
-		var cateType = $(formId + " select[name=cateType]").val();
-		var dispOrd = $(formId + " input[name=dispOrd]").val();
-		var formalGb = $(formId + " select[name=formalGb]").val();
-		var contentsLoc = $(formId + " select[name=contentsLoc]").val();
-		var dispYn = $(formId + " input:radio[name=dispYn]:checked").val();
-		var useYn = $(formId + " input:radio[name=useYn]:checked").val();
-		var siteCd = $(formId + " select[name=siteCd]").val();
-		var cateGb = $(formId + " select[name=cateGb]").val();
-		var tcateCd = $(formId + " select[name=tcateCd]").val();
-		var mcateCd = $(formId + " select[name=mcateCd]").val();
-		var scateCd = $(formId + " select[name=scateCd]").val();
-		var dcateCd = $(formId + " select[name=dcateCd]").val();
-		var selLvl = Number($(formId + " input[name=selLvl]").val());
-		if(cateNm==''){
-			gagajf.alertMessage(formId + " input[name=cateNm]", 'input');
-			return;
-		}
-		if(cateType==''){
-			gagajf.alertMessage(formId + " select[name=cateType]", 'select');
-			return;
-		}
-		if(dispOrd==''){
-			gagajf.alertMessage(formId + " input[name=dispOrd]", 'input');
-			return;
-		}
-		if(siteCd==''){
-			gagajf.alertMessage(formId + " select[name=siteCd]", 'select');
-			return;
+		let selLvl = Number($('#detailForm input[name=selLvl]').val());
+		if (gagajf.isNull($('#detailForm select[name=cate1No]').val())) {
+			if (selLvl > 2) {
+				mcxDialog.alertC('카테고리1을 선택해 주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#detailForm select[name=cate1No]').focus();
+					}
+				});
+				return;
+			}
 		}
 		}
-		var testSelLvl = $("#selLvl").val();
-		if(tcateCd==''){
-			if(testSelLvl>2){
-				gagajf.alertMessage(formId + " select[name=tcateCd]", 'select');
+		
+		if (gagajf.isNull($('#detailForm select[name=cate2No]').val())) {
+			if (selLvl > 3) {
+				mcxDialog.alertC('카테고리2를 선택해 주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#detailForm select[name=cate2No]').focus();
+					}
+				});
 				return;
 				return;
 			}
 			}
-		}		
-		if(mcateCd==''){
-			if(testSelLvl>3){
-				gagajf.alertMessage(formId + " select[name=mcateCd]", 'select');
+		}
+		
+		if (gagajf.isNull($('#detailForm select[name=cate3No]').val())) {
+			if (selLvl > 4) {
+				mcxDialog.alertC('카테고리3을 선택해 주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#detailForm select[name=cate3No]').focus();
+					}
+				});
 				return;
 				return;
 			}
 			}
 		}
 		}
-		if(scateCd==''){
-			if(testSelLvl>4){
-				gagajf.alertMessage(formId + " select[name=scateCd]", 'select');
+		
+		if (gagajf.isNull($('#detailForm select[name=cate4No]').val())) {
+			if (selLvl > 5) {
+				mcxDialog.alertC('카테고리4를 선택해 주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#detailForm select[name=cate4No]').focus();
+					}
+				});
 				return;
 				return;
 			}
 			}
 		}
 		}
@@ -391,69 +399,33 @@
 		mcxDialog.confirm('저장하시겠습니까?', {
 		mcxDialog.confirm('저장하시겠습니까?', {
 			cancelBtnText: "취소",
 			cancelBtnText: "취소",
 			sureBtnText: "확인",
 			sureBtnText: "확인",
-			sureBtnClick: function(){
-				var data = {
-						formId : formId,
-						cateCd : cateCd,
-						cateNm : cateNm,
-						cateType : cateType,
-						dispOrd : dispOrd,
-						formalGb : formalGb,
-						contentsLoc : contentsLoc,
-						dispYn : dispYn,
-						useYn : useYn,
-						siteCd : siteCd,
-						cateGb : cateGb,
-						tcateCd : tcateCd,
-						mcateCd : mcateCd,
-						scateCd : scateCd,
-						dcateCd : dcateCd,
-						selLvl : selLvl
-				};
-				var jsonData = JSON.stringify(data);
-				gagajf.ajaxJsonSubmit($(formId).prop('action'), jsonData, fnSaveCallback);
+			sureBtnClick: function() {
+				$("#detailForm select[name=contentsLoc]").prop('disabled', false);
+				
+				var jsonData = JSON.stringify($('#detailForm').serializeObject());
+				gagajf.ajaxFormSubmit($('#detailForm').prop('action'), '#detailForm', function() {
+					$('#btnNew').trigger('click');
+				});
 			}
 			}
 		});
 		});
 	});
 	});
 	
 	
-	$("#btnRef4Srch").on("click", function(){
-		var data = [];
-		var jsonData = JSON.stringify(data);
-		gagajf.ajaxJsonSubmit('/display/category/refresh4srch', jsonData, fnSaveCallback);
-	});
-	
-	// 신규 버튼 클릭
-	$("#btnNew").on("click", function(){
-		$("#detailForm")[0].reset();
-		$("#detailForm input[name=selLvl]").val('');
-		for(var i=1; i<5; i++){
-			$("#cateLvl"+i).show();
-		}
-	});
-	
-	$("#cateType").on("change", function(){
-		if($(this).val()=='20'){
-			$("#detailForm select[name=contentsLoc]").prop('disabled', false);
-			$("#detailForm select[name=contentsLoc]").removeClass('formControl');
-		}else{
-			$("#detailForm select[name=contentsLoc]").prop('disabled', true);
-			$("#detailForm select[name=contentsLoc]").addClass('formControl');
-		}
+	// 카테고리 갱신
+	$("#btnRefresh4Srch").on("click", function() {
+		mcxDialog.confirm('갱신하시겠습니까?', {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function() {
+				gagajf.ajaxJsonSubmit('/display/category/refresh', null);
+			}
+		});
 	});
 	});
 	
 	
-	var fnSaveCallback = function() {
-		// Fetch data
-		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm', fnChangeCategory);
-		$("#btnNew").click();
-	}
-	
 	$(document).ready(function() {
 	$(document).ready(function() {
 		// Create a agGrid
 		// Create a agGrid
 		gagaAgGrid.createGrid('gridList', gridOptions);
 		gagaAgGrid.createGrid('gridList', gridOptions);
 		
 		
 		$("#detailForm select[name=contentsLoc]").prop('disabled', false);
 		$("#detailForm select[name=contentsLoc]").prop('disabled', false);
-		gagajf.setDate('schStDate', 'schEdDate', 't');
-		fnChangeSelect($("#selCate").val(), 1);
 	});
 	});
 /*]]>*/
 /*]]>*/
 </script>
 </script>

+ 2 - 2
style24.admin/src/main/webapp/WEB-INF/views/marketing/FreeGoodsPromotionForm.html

@@ -95,7 +95,7 @@
 				<div id="gridList" style="width: 100%; height: 700px;" class="ag-theme-balham lh60"></div>
 				<div id="gridList" style="width: 100%; height: 700px;" class="ag-theme-balham lh60"></div>
 			</div>
 			</div>
 		</form>
 		</form>
-<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js?v=2019072202"></script>
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js"></script>
 <script th:inline="javascript">
 <script th:inline="javascript">
 /*<![CDATA[*/
 /*<![CDATA[*/
 	var columnDefs = [];
 	var columnDefs = [];
@@ -205,7 +205,7 @@
 
 
 	// 조회클릭시
 	// 조회클릭시
 	$('#btnFreeGoodsRegi').on('click', function() {
 	$('#btnFreeGoodsRegi').on('click', function() {
-		cfnOpenFreeGoodsPromotionSetPopup();
+		cfnOpenFreeGoodsPromotionSetPopup('C');
 	});
 	});
 
 
 
 

+ 98 - 58
style24.admin/src/main/webapp/WEB-INF/views/marketing/FreeGoodsPromotionRegiForm.html

@@ -29,27 +29,9 @@
 				<input type="hidden" id="exceptGoodsCds" name="exceptGoodsCds"/>		<!-- 제외상품 리스트 -->
 				<input type="hidden" id="exceptGoodsCds" name="exceptGoodsCds"/>		<!-- 제외상품 리스트 -->
 				<input type="hidden" id="freeGoods1Cds" name="freeGoods1Cds"/>			<!-- 적용 사은품1 리스트 -->
 				<input type="hidden" id="freeGoods1Cds" name="freeGoods1Cds"/>			<!-- 적용 사은품1 리스트 -->
 				<input type="hidden" id="freeGoods2Cds" name="freeGoods2Cds"/>			<!-- 적용 사은품2 리스트 -->
 				<input type="hidden" id="freeGoods2Cds" name="freeGoods2Cds"/>			<!-- 적용 사은품2 리스트 -->
+				<input type="hidden" id="extmallIds" name="extmallIds" value=""/>			<!-- 적용 사은품2 리스트 -->
 
 
 				<div class="panelContent">
 				<div class="panelContent">
-					<ul class="notice">
-						<li>구성상품 등록시 기본값&nbsp;
-							<!-- 아이콘 툴팁 -->
-							<div class="iconTooltip">
-								<i class="fa fa-info" aria-hidden="true"></i>
-								<span class="left" style="width:400px; text-align:left;">
-									<!-- class="left" 또는 class="right" -->
-									- 상품상태 : 정보부족<br/>
-									- 정상가 : 구성상품의 정상가 합<br/>
-									- 판매가 : 구성상품 판매가 입력값의 합<br/>
-									- 브랜드코드 : 구성상품의 기준여부 'Y'상품의 브랜드코드<br/>
-									- 품목코드 : 구성상품의 기준여부 'Y'상품의 품목코드<br/>
-									- 포인트 : 구성상품의 기준여부 'Y'상품의 브랜드 포인트<br/>
-									- 배송비정책 : 구성상품의 기준여부 'Y'상품의 브랜드 배송비정책<br/>
-								</span>
-							</div>
-							<!-- //아이콘 툴팁 -->
-						</li>
-					</ul>
 					<table class="frmStyle">
 					<table class="frmStyle">
 						<colgroup>
 						<colgroup>
 							<col width="10%"/>
 							<col width="10%"/>
@@ -61,7 +43,7 @@
 							<th>프로모션명<em class="required" title="필수"></em></th>
 							<th>프로모션명<em class="required" title="필수"></em></th>
 							<td>
 							<td>
 								<!-- 수정시 프로모션명 입력 : before -->
 								<!-- 수정시 프로모션명 입력 : before -->
-								<input class="w50p" type="text" id="freegiftNm" name="freegiftNm" maxlength="30"/>
+								<input class="w50p" type="text" id="freegiftNm" name="freegiftNm" minlength="2" maxlength="30" required="required" data-valid-name="프로모션명"/>
 							</td>
 							</td>
 							<th>프로모션ID</th>
 							<th>프로모션ID</th>
 							<td>
 							<td>
@@ -86,8 +68,9 @@
 						<tr>
 						<tr>
 							<th>적용 몰 구분<em class="required" title="필수"></em></th>
 							<th>적용 몰 구분<em class="required" title="필수"></em></th>
 							<td colspan="3">
 							<td colspan="3">
-								<!-- 적용 몰 구분 입력(공통 가져와야할듯?) : before -->
-								<input type="checkbox" id="jasa"/><label for="jasa">자사몰</label>
+								<label class="chkBox"><input type="checkbox" name="mallCds" value="G011_10"/>자사몰</label>
+								<label class="chkBox" id="G011_20"><input type="checkbox" name="mallCds" value="G011_20"/>제휴몰</label>
+								<button type="button" class="btn btnRight btn-success btn-lg" id="btnExtmallPopup">선택</button><span id="extmallCntArea"> 선택 : <span id="extmallCnt">00</span>개</span>
 							</td>
 							</td>
 						</tr>
 						</tr>
 					</table>
 					</table>
@@ -122,7 +105,7 @@
 											<div class="padding10 inner-tb-solid">
 											<div class="padding10 inner-tb-solid">
 												<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddCompany">업체 추가</button>
 												<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddCompany">업체 추가</button>
 												<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteCompany">선택삭제</button>
 												<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteCompany">선택삭제</button>
-												<span>선택 : 00개</span>
+												<span>선택 : <span id="companyCnt">00</span>개</span>
 												<br/>
 												<br/>
 												<div id="gridFGPromotionCompanyList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 												<div id="gridFGPromotionCompanyList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 											</div>
 											</div>
@@ -132,7 +115,7 @@
 											<div class="padding10 inner-tb-solid">
 											<div class="padding10 inner-tb-solid">
 												<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddBrand">브랜드 추가</button>
 												<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddBrand">브랜드 추가</button>
 												<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteBrand">선택삭제</button>
 												<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteBrand">선택삭제</button>
-												<span>선택 : 00개</span>
+												<span>선택 : <span id="brandCnt">00</span>개</span>
 												<br/>
 												<br/>
 												<!-- 브랜드 선택 팝업(단수 선택 팝업... 복수를 새로 만들어야하는지 ? 아니면 변수처리해야하는지 ? -->
 												<!-- 브랜드 선택 팝업(단수 선택 팝업... 복수를 새로 만들어야하는지 ? 아니면 변수처리해야하는지 ? -->
 												<div id="gridFGBrandList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 												<div id="gridFGBrandList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
@@ -146,7 +129,7 @@
 										<div class="padding10">
 										<div class="padding10">
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddApplyGoods">상품 추가</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddApplyGoods">상품 추가</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteApplyGoods">선택삭제</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteApplyGoods">선택삭제</button>
-											<span>선택 : 00개</span>
+											<span>선택 : <span id="applyGoodsCnt">00</span>개</span>
 											<br/>
 											<br/>
 											<div id="gridFGApplyGoodsList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 											<div id="gridFGApplyGoodsList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 										</div>
 										</div>
@@ -179,7 +162,7 @@
 										<div class="padding10">
 										<div class="padding10">
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddExceptGoods">상품 추가</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddExceptGoods">상품 추가</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteExtGoods">선택삭제</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteExtGoods">선택삭제</button>
-											<span>선택 : 00개</span>
+											<span>선택 : <span id="exceptGoodsCnt">00</span>개</span>
 											<br/>
 											<br/>
 											<div id="gridFGExceptGoodsList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 											<div id="gridFGExceptGoodsList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 										</div>
 										</div>
@@ -210,8 +193,8 @@
 									<th>지급 방법<em class="required" title="필수"></em></th>
 									<th>지급 방법<em class="required" title="필수"></em></th>
 									<td>
 									<td>
 										<div>
 										<div>
-											<span><label class="rdoBtn"><input type="radio" name="sendBox"/>모두 지급 (설정한 사은품을 모두 지급합니다)</label></span>
-											<span><label class="rdoBtn"><input type="radio" name="sendBox"/>선택 사은품 (목록 중 1개를 선택하게 합니다)</label></span>
+											<span><label class="rdoBtn"><input type="radio" name="allYn" value="Y" checked/>모두 지급 (설정한 사은품을 모두 지급합니다)</label></span>
+											<span><label class="rdoBtn"><input type="radio" name="allYn" value="N"/>선택 사은품 (목록 중 1개를 선택하게 합니다)</label></span>
 										</div>
 										</div>
 									</td>
 									</td>
 								</tr>
 								</tr>
@@ -226,8 +209,6 @@
 											<span>사은품 목록</span>
 											<span>사은품 목록</span>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddFreeGoods1">+ 사은품 선택</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddFreeGoods1">+ 사은품 선택</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteFreeGoods1">선택삭제</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteFreeGoods1">선택삭제</button>
-											<input type="button" value="+ 사은품 선택" id="goodsList" /> <!-- 선택 시 팝업 노출 -->
-											<input type="button" value="선택삭제" id="deleteGoodsList" />
 											<br/>
 											<br/>
 											<div id="gridFreeGoods1List" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 											<div id="gridFreeGoods1List" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 										</div>
 										</div>
@@ -250,8 +231,7 @@
 						</div>
 						</div>
 					</div>
 					</div>
 				</div>
 				</div>
-
-				<div class="panelStyle" style="margin:unset;">
+				<div class="panelStyle" th:if="${#strings.toString(param.gbn) == 'U'}" style="margin:unset;">
 					<!-- //TITLE -->
 					<!-- //TITLE -->
 					<div class="inner-panelContent">
 					<div class="inner-panelContent">
 						<div class="panelContent">
 						<div class="panelContent">
@@ -362,15 +342,8 @@
 				cellEditorParams: { maxlength: 14, validType: 'numeric'}
 				cellEditorParams: { maxlength: 14, validType: 'numeric'}
 			},
 			},
 			{headerName: "한정수량", field: "limitQty" , width: 100, cellClass: 'text-center'
 			{headerName: "한정수량", field: "limitQty" , width: 100, cellClass: 'text-center'
-				,valueFormatter: function(params) {
-					if(params.value && params.value > 0) {
-						return params.value.addComma();
-					} else {
-						return 0;
-					}
-				},
-				cellEditor: 'textCellEditor',
-				cellEditorParams: { maxlength: 14, validType: 'numeric'}
+				,cellEditor: 'textCellEditor'
+				,cellEditorParams: { maxlength: 14, validType: 'numeric'}
 			},
 			},
 			{headerName: "잔여수량", field: "leftQty", width: 120, cellClass: 'text-center'
 			{headerName: "잔여수량", field: "leftQty", width: 120, cellClass: 'text-center'
 				,valueFormatter: function(params) {
 				,valueFormatter: function(params) {
@@ -460,20 +433,55 @@
 			cfnCreateCalendar('#promotionTerms', 'freegoodsStdt', 'freegoodsEddt', true, '행사기간', 'X');
 			cfnCreateCalendar('#promotionTerms', 'freegoodsStdt', 'freegoodsEddt', true, '행사기간', 'X');
 		});
 		});
 
 
+		// 제휴몰 체크 상태 확인
+		$("#G011_20").on("click", function() {
+			// 체크여부 확인 (선택되면 자동 checked 추가되는데, 추가되기 전 동작해서 반대로 지정)
+			if($("#G011_20").hasClass("checked")) {
+				$("#btnExtmallPopup").hide();
+				$("#extmallCntArea").hide();
+				$("#extmallCnt").text(0);
+				$("#extmallIds").val("");
+			} else {
+				$("#btnExtmallPopup").show();
+				$("#extmallCntArea").show();
+			}
+		});
+
+		$('#freeGoodsPromotionForm input[name=freegiftNm]').on('focusout', function() {
+			if($('#freeGoodsPromotionForm input[name=freegiftNm]').val().length < 2) {
+				mcxDialog.alert("2자~30자 이상 프로모션명을 입력하세요.");
+				return;
+			}
+		});
+
+		// list 데이터 세팅
+		function setSendGridListVal(gridListOption, key, inputId) {
+			let list = gagaAgGrid.getAllRowData(gridListOption);
+			let cds = [];
+			for(let k = 0 ; k < list.length ; k++) {
+				cds.push(eval("list[k]." + key));
+			}
+
+			var jsonData = JSON.stringify(cds);
+			$("#" + inputId).val(jsonData);
+		}
+
 		// 저장 버튼 클릭시
 		// 저장 버튼 클릭시
-		$('#freeGoodsPromotionForm #btnFreegoodsPromotionSave').on('click', function() {
+		$('#btnFreegoodsPromotionSave').on('click', function() {
 			// 각 ag-grid list 수량
 			// 각 ag-grid list 수량
 			let supplyCompCnt = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList).length;
 			let supplyCompCnt = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList).length;
 			let brandCnt = gagaAgGrid.getAllRowData(gridOptionsFGBrandList).length;
 			let brandCnt = gagaAgGrid.getAllRowData(gridOptionsFGBrandList).length;
 			let applyGoodsCnt = gagaAgGrid.getAllRowData(gridOptionsFGApplyGoodsList).length;
 			let applyGoodsCnt = gagaAgGrid.getAllRowData(gridOptionsFGApplyGoodsList).length;
-			// let supplyCompCnt = gagaAgGrid.getAllRowData(gridOptionsFGExceptGoodsList).length;
+			let exceptGoodsCnt = gagaAgGrid.getAllRowData(gridOptionsFGExceptGoodsList).length;
 			let freeGoods1Cnt = gagaAgGrid.getAllRowData(gridOptionsFreeGoods1List).length;
 			let freeGoods1Cnt = gagaAgGrid.getAllRowData(gridOptionsFreeGoods1List).length;
 			let freeGoods2Cnt = gagaAgGrid.getAllRowData(gridOptionsFreeGoods2List).length;
 			let freeGoods2Cnt = gagaAgGrid.getAllRowData(gridOptionsFreeGoods2List).length;
 
 
-			// 프로모션명 확인
-			if(gagajf.isEmpty($("#freeGoodsPromotionForm #freegiftNm").val())) {
-				mcxDialog.alert("프로모션명을 입력해주세요");
-				$("#freeGoodsPromotionForm #freegiftNm").focus();
+			if (!gagajf.validation('#freeGoodsPromotionForm')) {
+				return false;
+			};
+
+			if($('#freeGoodsPromotionForm input[name=freegiftNm]').val().length < 2) {
+				mcxDialog.alert("2자~30자 이상 프로모션명을 입력하세요.");
 				return false;
 				return false;
 			}
 			}
 
 
@@ -481,14 +489,8 @@
 			let fromDate = $('#freeGoodsPromotionForm input[name=freegiftStdt]').val();
 			let fromDate = $('#freeGoodsPromotionForm input[name=freegiftStdt]').val();
 			let toDate = $('#freeGoodsPromotionForm input[name=freegiftEddt]').val();
 			let toDate = $('#freeGoodsPromotionForm input[name=freegiftEddt]').val();
 
 
-			if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
-				mcxDialog.alert("행사 기간 시작일자와 종료일자를 입력하세요.");
-				$('#freeGoodsPromotionForm input[name=freegiftStdt]').focus();
-				return false;
-			}
-
 			if (fromDate > toDate) {
 			if (fromDate > toDate) {
-				mcxDialog.alert("시작일자는 종료일자 보다  수 없습니다.");
+				mcxDialog.alert("시작일자는 종료일자 보다 늦을 수 없습니다.");
 				$('#freeGoodsPromotionForm input[name=freegiftStdt]').focus();
 				$('#freeGoodsPromotionForm input[name=freegiftStdt]').focus();
 				return false;
 				return false;
 			}
 			}
@@ -517,7 +519,12 @@
 				return false;
 				return false;
 			}
 			}
 
 
-
+			// 각 리스트 데이터 세팅
+			if(supplyCompCnt > 0) { setSendGridListVal(gridOptionsFGCompanyList, "supplyCompCd", "supplyCompCds"); }		// 공급업체 설정 데이터
+			if(brandCnt > 0) { setSendGridListVal(gridOptionsFGBrandList, "brandCd", "brandCds"); }							// 브랜드 설정 데이터
+			if(applyGoodsCnt > 0) { setSendGridListVal(gridOptionsFGApplyGoodsList, "goodsCd", "applyGoodsCds"); }			// 적용 상품 설정 데이터
+			if(exceptGoodsCnt > 0) { setSendGridListVal(gridOptionsFGExceptGoodsList, "goodsCd", "exceptGoodsCds"); }		// 제외 상품 설정 데이터
+			if(freeGoods1Cnt > 0) { setSendGridListVal(gridOptionsFreeGoods1List, "goodsCd", "freeGoods1Cds"); }			// 사은품 조건 1
 		});
 		});
 
 
 		// 공급업체 설정 / 업체 추가 콜백함수
 		// 공급업체 설정 / 업체 추가 콜백함수
@@ -535,6 +542,8 @@
 				// 중복되지 않은 데이터 리스트에 추가
 				// 중복되지 않은 데이터 리스트에 추가
 				if(addChk) {	gagaAgGrid.addRowData(gridOptionsFGCompanyList, result[i], "supplyCompCd");	}
 				if(addChk) {	gagaAgGrid.addRowData(gridOptionsFGCompanyList, result[i], "supplyCompCd");	}
 			}
 			}
+
+			$("#companyCnt").text(gridOptionsFGCompanyList.api.getDisplayedRowCount());
 		};
 		};
 
 
 		// 브랜드 설정 / 브랜드 추가 콜백함수 (단수로 가져오므로 복수일 경우에 수정 확인 필요)
 		// 브랜드 설정 / 브랜드 추가 콜백함수 (단수로 가져오므로 복수일 경우에 수정 확인 필요)
@@ -550,16 +559,20 @@
 				// 중복되지 않은 데이터 리스트에 추가
 				// 중복되지 않은 데이터 리스트에 추가
 				if(addChk) {	gagaAgGrid.addRowData(gridOptionsFGBrandList, result[i], "brandCd");	}
 				if(addChk) {	gagaAgGrid.addRowData(gridOptionsFGBrandList, result[i], "brandCd");	}
 			}
 			}
+
+			$("#brandCnt").text(gridOptionsFGBrandList.api.getDisplayedRowCount());
 		};
 		};
 
 
 		// 적용 상품 리스트 콜백함수
 		// 적용 상품 리스트 콜백함수
 		var fnSetPopupApplyGoodsInfo = function(result) {
 		var fnSetPopupApplyGoodsInfo = function(result) {
 			gridAddGoodsList(gridOptionsFGApplyGoodsList, result);
 			gridAddGoodsList(gridOptionsFGApplyGoodsList, result);
+			$("#applyGoodsCnt").text(gridOptionsFGApplyGoodsList.api.getDisplayedRowCount());
 		};
 		};
 
 
 		// 제외 상품 리스트 콜백함수
 		// 제외 상품 리스트 콜백함수
 		var fnSetPopupExceptGoodsInfo = function(result) {
 		var fnSetPopupExceptGoodsInfo = function(result) {
 			gridAddGoodsList(gridOptionsFGExceptGoodsList, result);
 			gridAddGoodsList(gridOptionsFGExceptGoodsList, result);
+			$("#exceptGoodsCnt").text(gridOptionsFGExceptGoodsList.api.getDisplayedRowCount());
 		};
 		};
 
 
 		// 사은품 조건1 상품 리스트 콜백함수
 		// 사은품 조건1 상품 리스트 콜백함수
@@ -567,7 +580,7 @@
 			gridAddGoodsList(gridOptionsFreeGoods1List, result);
 			gridAddGoodsList(gridOptionsFreeGoods1List, result);
 		};
 		};
 
 
-		// 사은품 조건1 상품 리스트 콜백함수
+		// 사은품 조건2 상품 리스트 콜백함수
 		var fnSetPopupFreeGoods2Info = function(result) {
 		var fnSetPopupFreeGoods2Info = function(result) {
 			gridAddGoodsList(gridOptionsFreeGoods2List, result);
 			gridAddGoodsList(gridOptionsFreeGoods2List, result);
 		};
 		};
@@ -587,16 +600,39 @@
 			}
 			}
 		}
 		}
 
 
+		// 제휴몰 list 콜백함수
+		function fnSetPopupExtmallInfo(result) {
+			let extmallIds = [];
+			if($("#extmallIds").val() != null && $("#extmallIds").val() != "") {
+				extmallIds = JSON.parse($("#extmallIds").val());
+			}
+
+			for(let i = 0 ; i < result.length ; i++) {
+				let addChk = true;
+				for(let j = 0 ; j < extmallIds.length ; j++) {
+					if(result[i].extmallId == extmallIds[j]) {	addChk = false;	}
+				}
+
+				if(addChk) {	extmallIds.push(result[i].extmallId)	};
+			}
+
+			var jsonData = JSON.stringify(extmallIds);
+			$("#extmallIds").val(jsonData);
+			$("#extmallCnt").text(extmallIds.length);
+		}
+
+		// 제휴몰 선택 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnExtmallPopup').on('click', function() {
+			cfnOpenExtmallListPopup("fnSetPopupExtmallInfo");
+		});
 		// 공급업체 설정 업체 추가 버튼 클릭시
 		// 공급업체 설정 업체 추가 버튼 클릭시
 		$('#freeGoodsPromotionForm #btnAddCompany').on('click', function() {
 		$('#freeGoodsPromotionForm #btnAddCompany').on('click', function() {
 			cfnOpenCompanyListPopup("fnSetPopupComapnyInfo");
 			cfnOpenCompanyListPopup("fnSetPopupComapnyInfo");
 		});
 		});
-
 		// 브랜드 추가 버튼 클릭시 (복수 브랜드때 수정 필요)
 		// 브랜드 추가 버튼 클릭시 (복수 브랜드때 수정 필요)
 		$('#freeGoodsPromotionForm #btnAddBrand').on('click', function() {
 		$('#freeGoodsPromotionForm #btnAddBrand').on('click', function() {
 			cfnOpenBrandListPopup("fnSetPopupBrandInfo", "M");
 			cfnOpenBrandListPopup("fnSetPopupBrandInfo", "M");
 		});
 		});
-
 		// 적용 상품 추가 버튼 클릭시
 		// 적용 상품 추가 버튼 클릭시
 		$('#freeGoodsPromotionForm #btnAddApplyGoods').on('click', function() {
 		$('#freeGoodsPromotionForm #btnAddApplyGoods').on('click', function() {
 			cfnOpenGoodsPopup("fnSetPopupApplyGoodsInfo");
 			cfnOpenGoodsPopup("fnSetPopupApplyGoodsInfo");
@@ -617,18 +653,22 @@
 		// 공급업체 설정 선택삭제 버튼 클릭시
 		// 공급업체 설정 선택삭제 버튼 클릭시
 		$('#freeGoodsPromotionForm #btnDeleteCompany').on('click', function() {
 		$('#freeGoodsPromotionForm #btnDeleteCompany').on('click', function() {
 			gridOptionsFGCompanyList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGCompanyList)});
 			gridOptionsFGCompanyList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGCompanyList)});
+			$("#companyCnt").text(gridOptionsFGCompanyList.api.getDisplayedRowCount());
 		});
 		});
 		// 브랜드 설정 선택삭제 버튼 클릭시
 		// 브랜드 설정 선택삭제 버튼 클릭시
 		$('#freeGoodsPromotionForm #btnDeleteBrand').on('click', function() {
 		$('#freeGoodsPromotionForm #btnDeleteBrand').on('click', function() {
 			gridOptionsFGBrandList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGBrandList)});
 			gridOptionsFGBrandList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGBrandList)});
+			$("#brandCnt").text(gridOptionsFGBrandList.api.getDisplayedRowCount());
 		});
 		});
 		// 적용상품 선택삭제 버튼 클릭시
 		// 적용상품 선택삭제 버튼 클릭시
 		$('#freeGoodsPromotionForm #btnDeleteApplyGoods').on('click', function() {
 		$('#freeGoodsPromotionForm #btnDeleteApplyGoods').on('click', function() {
 			gridOptionsFGApplyGoodsList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGApplyGoodsList)});
 			gridOptionsFGApplyGoodsList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGApplyGoodsList)});
+			$("#applyGoodsCnt").text(gridOptionsFGApplyGoodsList.api.getDisplayedRowCount());
 		});
 		});
 		// 제외상품 선택삭제 버튼 클릭시
 		// 제외상품 선택삭제 버튼 클릭시
 		$('#freeGoodsPromotionForm #btnDeleteExtGoods').on('click', function() {
 		$('#freeGoodsPromotionForm #btnDeleteExtGoods').on('click', function() {
 			gridOptionsFGExceptGoodsList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGExceptGoodsList)});
 			gridOptionsFGExceptGoodsList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGExceptGoodsList)});
+			$("#exceptGoodsCnt").text(gridOptionsFGExceptGoodsList.api.getDisplayedRowCount());
 		});
 		});
 		// 사은품조건1 선택삭제 버튼 클릭시
 		// 사은품조건1 선택삭제 버튼 클릭시
 		$('#freeGoodsPromotionForm #btnDeleteFreeGoods1').on('click', function() {
 		$('#freeGoodsPromotionForm #btnDeleteFreeGoods1').on('click', function() {

+ 133 - 0
style24.admin/src/main/webapp/WEB-INF/views/ocm/ExtmallSearchForm.html

@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : ExtmallSearchForm.html
+ * @desc    : 제휴몰 리스트 팝업
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.12.28   xodud1202   최초 작성
+ *******************************************************************************
+ -->
+<div class="modalPopup" data-width="500" id="popupExtmallList">
+	<div class="panelStyle">
+		<!-- TITLE -->
+		<div class="panelTitle">
+			<strong>공급업체 목록</strong>
+			<button type="button" class="close" onclick="uifnPopupClose('popupExtmallList');"><em class="fa fa-times"></em></button>
+		</div>
+		<!-- //TITLE -->
+
+		<!-- 검색 조건 -->
+		<div class="panelContent">
+			<form id="searchExtmallListForm" name="searchExtmallListForm" action="#" th:action="@{'/ocm/extmall/list'}" onsubmit="$('#btnSearchExtmallList').trigger('click'); return false;">
+
+				<table class="frmStyle" aria-describedby="검색조건">
+					<colgroup>
+						<col style="width:15%;"/>
+						<col/>
+					</colgroup>
+					<tbody>
+					<tr>
+						<th>제휴몰 명</th>
+						<td>
+							<input type="text" name="searchTxt" th:value="${params.searchTxt}" maxlength="20" onkeypress="if (event.keyCode == 13) { $('#btnSearchExtmallList').trigger('click'); }"/>
+						</td>
+					</tr>
+					</tbody>
+				</table>
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-base btn-lg" id="btnSearchExtmallList">조회</button>
+					</li>
+				</ul>
+			</form>
+		</div>
+		<!-- //검색 조건 -->
+
+		<!-- 리스트 영역 -->
+		<div class="panelContent">
+			<div id="gridComapanyPopupList" style="width: 100%; height: 470px" class="ag-theme-balham"></div>
+		</div>
+		<!-- //리스트 영역 -->
+
+		<!-- 버튼 배치 영역 -->
+		<ul class="panelBar">
+			<li class="right">
+				<button type="button" class="btn btn-info btn-lg" id="btnConfirmExtmall">확인</button>
+			</li>
+		</ul>
+	</div>
+
+	<script th:inline="javascript">
+		/*<![CDATA[*/
+		let extmallGbList = gagajf.convertToArray([[${extmallGbList}]]);		// 상품 상태 리스트
+		let columnExtmallPopupDefList = [
+			{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+			{headerName: "제휴몰구분", field: "vendorId" , width: 120, cellClass: 'text-center',
+				cellEditorParams: { values: gagaAgGrid.extractValues(extmallGbList) },
+				valueFormatter: function (params) { return gagaAgGrid.lookupValue(extmallGbList, params.value); },
+				valueParser: function (params) { return gagaAgGrid.lookupKey(extmallGbList, params.newValue); }
+			},
+			{headerName: "제휴몰ID", field: "extmallId", width: 150, cellClass: 'text-center'},
+			{headerName: "제휴몰명", field: "extmallNm", width: 150, cellClass: 'text-center'}
+		];
+
+		let gridOptionsExtmallPopupList = gagaAgGrid.getGridOptions(columnExtmallPopupDefList);
+		gridOptionsExtmallPopupList.rowSelection = "multiple";
+
+		// Row double click
+		gridOptionsExtmallPopupList.onRowDoubleClicked = function(event) {
+			$('#btnConfirmExtmall').trigger('click');
+		}
+
+		// 조회
+		$('#btnSearchExtmallList').on('click', function() {
+			// Fetch data
+			gagaAgGrid.fetch($('#searchExtmallListForm').prop('action'), gridOptionsExtmallPopupList, '#searchExtmallListForm');
+		});
+
+		// 확인
+		$('#btnConfirmExtmall').on('click', function() {
+			var selectedData = gagaAgGrid.selectedRowData(gridOptionsExtmallPopupList);
+
+			if (selectedData.length == 0) {
+				mcxDialog.alert('선택된 공급업체가 없습니다.');
+				return false;
+			}
+
+			var callbackFn = [[${params.callbackFn}]];
+
+			var jsonData = JSON.stringify(selectedData);
+
+			if (typeof callbackFn != 'undefined' && callbackFn) {
+				if (typeof callbackFn == 'function') {
+					callbackFn(jsonData);
+				} else {
+					if (callbackFn) {
+						if (callbackFn.indexOf("(") == -1) {
+							eval(callbackFn + "(" + jsonData + ")");
+						} else {
+							eval(callbackFn(jsonData));
+						}
+					}
+				}
+				uifnPopupClose('popupExtmallList');
+			}
+		});
+
+		$(document).ready(function() {
+			// Create a agGrid
+			gagaAgGrid.createGrid('gridComapanyPopupList', gridOptionsExtmallPopupList);
+		});
+		/*]]>*/
+	</script>
+
+</div>
+
+</html>

+ 19 - 2
style24.admin/src/main/webapp/ux/js/admin.popup.js

@@ -698,8 +698,8 @@ var cfnOpenBrandListPopup = function(callbackfn, multiGb, searchTxt) {
  * @since  : 2020/12/21
  * @since  : 2020/12/21
  * @author : xodud1202
  * @author : xodud1202
  */
  */
-var cfnOpenFreeGoodsPromotionSetPopup = function() {
-	var actionUrl = "/marketing/freeGoodsRegiPopup/form?gbn=C";
+var cfnOpenFreeGoodsPromotionSetPopup = function(gbn) {
+	var actionUrl = "/marketing/freeGoodsRegiPopup/form?gbn=" + gbn;
 
 
 	uifnPopupClose('popupFreeGoodsPromotionRegi');
 	uifnPopupClose('popupFreeGoodsPromotionRegi');
 	cfnOpenModalPopup(actionUrl, 'popupFreeGoodsPromotionRegi');
 	cfnOpenModalPopup(actionUrl, 'popupFreeGoodsPromotionRegi');
@@ -720,4 +720,21 @@ var cfnOpenCompanyListPopup = function(callbackfn) {
 	if (typeof(callbackfn) != 'undefined') actionUrl += "?callbackFn=" + callbackfn;
 	if (typeof(callbackfn) != 'undefined') actionUrl += "?callbackFn=" + callbackfn;
 	uifnPopupClose('popupCompanyList');
 	uifnPopupClose('popupCompanyList');
 	cfnOpenModalPopup(actionUrl, 'popupCompanyList');
 	cfnOpenModalPopup(actionUrl, 'popupCompanyList');
+}
+
+/**
+ * @type   : function
+ * @access : public
+ * @desc   : 공급업체 조회 팝업
+ * <pre>
+ *     cfnOpenCompanyListPopup();
+ * </pre>
+ * @since  : 2020/12/23
+ * @author : xodud1202
+ */
+var cfnOpenExtmallListPopup = function(callbackfn) {
+	var actionUrl = "/ocm/extmall/search/form";
+	if (typeof(callbackfn) != 'undefined') actionUrl += "?callbackFn=" + callbackfn;
+	uifnPopupClose('popupExtmallList');
+	cfnOpenModalPopup(actionUrl, 'popupExtmallList');
 }
 }