Quellcode durchsuchen

Merge branch 'develop' of http://112.172.147.34:4936/style24/STYLE24.git into develop

gagamel vor 5 Jahren
Ursprung
Commit
0150f2d5dc

+ 23 - 0
style24.admin/src/main/java/com/style24/admin/biz/dao/TsaGoodsDao.java

@@ -4,6 +4,8 @@ import java.util.Collection;
 
 import com.style24.core.support.annotation.ShopDs;
 import com.style24.persistence.domain.Color;
+import com.style24.persistence.domain.Goods;
+import com.style24.persistence.domain.GoodsSearch;
 import com.style24.persistence.domain.Itemkind;
 import com.style24.persistence.domain.NotiInfo;
 
@@ -84,4 +86,25 @@ public interface TsaGoodsDao {
 	 * @since 2010. 10. 19
 	 */
 	void saveNotiInfo(NotiInfo notiInfo);
+
+	/**
+	 * 상품 목록 건수
+	 *
+	 * @param goodsSearch
+	 * @return
+	 * @author eskim
+	 * @since 2010. 10. 20
+	 */
+	int getGoodsListCount(GoodsSearch goodsSearch);
+
+	/**
+	 * 상품 목록
+	 *
+	 * @param goodsSearch
+	 * @return
+	 * @author eskim
+	 * @since 2010. 10. 20
+	 */
+	Collection<Goods> getGoodsList(GoodsSearch goodsSearch);
+
 }

+ 125 - 0
style24.admin/src/main/java/com/style24/admin/biz/service/TsaGoodsService.java

@@ -3,6 +3,7 @@ package com.style24.admin.biz.service;
 import java.util.Collection;
 
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
@@ -11,6 +12,8 @@ import com.style24.admin.biz.dao.TsaGoodsDao;
 import com.style24.admin.support.security.session.TsaSession;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.domain.Color;
+import com.style24.persistence.domain.Goods;
+import com.style24.persistence.domain.GoodsSearch;
 import com.style24.persistence.domain.Itemkind;
 import com.style24.persistence.domain.NotiInfo;
 
@@ -31,6 +34,9 @@ public class TsaGoodsService {
 	@Autowired
 	private TscMessageByLocale message;
 
+	@Autowired
+	private Environment env;
+
 	@Autowired
 	private TsaGoodsDao goodsDao;
 
@@ -156,4 +162,123 @@ public class TsaGoodsService {
 		}
 	}
 
+	/**
+	 * 상품 목록 건수
+	 *
+	 * @param goodsSearch
+	 * @return
+	 * @author eskim
+	 * @since 2020. 10. 20
+	 */
+	public int getGoodsListCount(GoodsSearch goodsSearch) {
+		return goodsDao.getGoodsListCount(goodsSearch);
+	}
+
+	/**
+	 * 상품 목록
+	 *
+	 * @param goodsSearch
+	 * @return
+	 * @author eskim
+	 * @since 2020. 10. 20
+	 */
+	public Collection<Goods> getGoodsList(GoodsSearch goodsSearch) {
+		return goodsDao.getGoodsList(goodsSearch);
+	}
+
+	/**
+	 * 상품목록 - 기본정보 엑셀다운로드
+	 *
+	 * @param goodsSearch
+	 * @param excelFilenameWithPath - 경로를 포함한 엑셀파일명
+	 * @return
+	 * @author eskim
+	 * @since 2020. 10. 21
+	 */
+	public void getGoodsInfoExcelList(GoodsSearch goodsSearch, String excelFilenameWithPath) {
+
+//		if ("Y".equals(goodsSearch.getImageViewYn())) {
+//			// 헤더 title 설정
+//			String[] listTitles = {"이미지", "상품코드", "업체명", "브랜드명", "상품명", "품목", "판매가능재고", "상품상태", "스타일년도", "시즌",
+//				"정상가", "판매가", "임직원가", "할인율", "가격변경일", "ERP재고연동여부",
+//				"정상이월구분", "승인일시", "EC전송일시"};
+//
+//			// DB 처리 시 사용되는 파라미터명(셀명) 설정
+//			String[] cellNames = {"IMG_PATH1", "GOODS_CD", "SUPPLY_COMP_CD", "BRAND_GRP_NM", "GOODS_NM", "ITEMKIND_NM",
+//				"STOCK_QTY_SUM", "GOODS_STAT", "STYLE_YEAR", "SEASON_CD",  "LIST_PRICE", "CURR_PRICE",
+//				"STAFF_CURR_PRICE", "DC_RATE", "PRICE_UPD_DT", "ERP_STOCK_LINK_YN",
+//				 "FORMAL_GB", "APPR_UPD_DT", "ECMONITOR_REG_DT"};
+//
+//			String[] cellTypes = {GagaExcelConstants.CellType.IMAGE.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
+//				GagaExcelConstants.CellType.CHAR_RIGHT.name(),
+//				GagaExcelConstants.CellType.CHAR_RIGHT.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name()};
+//
+//			String targetPath = env.getProperty("upload.goods.view");
+//			Collection<GagaMap> dataList = goodsDao.getGoodsInfoExcelList(goodsSearch); // map형식으로 조회
+//			if (dataList != null && !dataList.isEmpty()) {
+//				for (GagaMap gagaMap : dataList) {
+//					if ("A".equals(gagaMap.get("IMG_TYPE").toString())) {
+//						if (!StringUtils.isEmpty(gagaMap.get("IMG_PATH6"))) {
+//							gagaMap.set("IMG_PATH1", targetPath + gagaMap.get("IMG_PATH6").toString().replace("/1000/", "/100/"));
+//
+//						} else {
+//							gagaMap.set("IMG_PATH1", targetPath + gagaMap.get("IMG_PATH1").toString().replace("/1000/", "/100/"));
+//						}
+//						gagaMap.set("IMG_PATH1", gagaMap.get("IMG_PATH1").toString());
+//					} else {
+//
+//					}
+//				}
+//			}
+//
+//			try {
+//				GagaExcelUtil.createExcel(excelFilenameWithPath, dataList, "상품 정보", listTitles, cellNames, cellTypes, TsaConstants.EXCEL_FOOTER_TITLE);
+//			} catch (Exception e) {
+//				throw new IllegalStateException(e);
+//			}
+//
+//		} else {
+//			// 헤더 title 설정
+//			String[] listTitles = {"상품코드", "업체명", "브랜드명", "상품명", "품목", "재고", "상품상태", "스타일년도", "시즌",  "정상가",
+//				"판매가", "할인율", "가격변경일", "ERP재고연동여부", "정상이월구분", "반품가능 여부", "교환가능 여부", "무료반품가능 여부",
+//				"무료교환 여부", "이미지 여부"};
+//
+//			// DB 처리 시 사용되는 파라미터명(셀명) 설정
+//			String[] cellNames = {"GOODS_CD", "SUPPLY_COMP_CD", "BRAND_ENM", "GOODS_NM", "ITEMKIND_NM",
+//				"STOCK_QTY_SUM", "GOODS_STAT", "STYLEyEAR", "SEASON_CD",  "LIST_PRICE", "CURR_PRICE",
+//				"DC_RATE", "PRICE_UPD_DT", "ERP_STOCK_LINK_YN", "ERP_PRICE_LINK_YN", "FORMAL_GB", "RETURNABLE_YN",
+//				"CHANGEABLE_YN", "RETURN_FEE_FREE_YN", "CHANGE_FEE_FREE_YN", "GOODS_IMAGE_YN"};
+//
+//			String[] cellTypes = {GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_RIGHT.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_RIGHT.name(),
+//				GagaExcelConstants.CellType.CHAR_RIGHT.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+//				GagaExcelConstants.CellType.CHAR_CENTER.name()};
+//
+//			Collection<GagaMap> dataList = goodsDao.getGoodsInfoExcelList(goodsSearch);
+//
+//			try {
+//				GagaExcelUtil.createExcel(excelFilenameWithPath, dataList, "상품 정보", listTitles, cellNames, cellTypes, TsaConstants.EXCEL_FOOTER_TITLE);
+//			} catch (Exception e) {
+//				throw new IllegalStateException(e);
+//			}
+//		}
+
+	}
+
 }

+ 52 - 8
style24.admin/src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -2,7 +2,12 @@ package com.style24.admin.biz.web;
 
 import java.util.Collection;
 
+import javax.servlet.http.HttpServletRequest;
+
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.core.io.InputStreamResource;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Controller;
 import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -27,6 +32,8 @@ import lombok.extern.slf4j.Slf4j;
 
 import com.gagaframework.web.parameter.GagaMap;
 import com.gagaframework.web.rest.server.GagaResponse;
+import com.gagaframework.web.util.GagaDateUtil;
+import com.gagaframework.web.util.GagaFileUtil;
 
 /**
  * 상품관리 Controller
@@ -42,6 +49,9 @@ public class TsaGoodsController extends TsaBaseController {
 	@Autowired
 	private TscMessageByLocale message;
 
+	@Autowired
+	private Environment env;
+
 	@Autowired
 	private TsaGoodsService goodsService;
 
@@ -267,7 +277,7 @@ public class TsaGoodsController extends TsaBaseController {
 		// 시즌
 		mav.addObject("seasonList", rendererService.getAvailCommonCodeList("G006"));
 		// 년도
-		mav.addObject("styleYearList", rendererService.getAvailCommonCodeList("G006"));
+		//mav.addObject("styleYearList", rendererService.getAvailCommonCodeList("G006"));
 		// 연령대
 		mav.addObject("ageGrpCdList", rendererService.getAvailCommonCodeList("G023"));
 		// 사용여부
@@ -277,7 +287,7 @@ public class TsaGoodsController extends TsaBaseController {
 		// 상품구분
 		mav.addObject("goodsTypeList", rendererService.getAvailCommonCodeList("G056"));
 		// MD
-		//mav.addObject("brandMdList", rendererService.getBrandMdList());
+		mav.addObject("brandMdList", rendererService.getBrandMdList());
 
 		mav.setViewName("goods/GoodsListForm");
 
@@ -294,7 +304,7 @@ public class TsaGoodsController extends TsaBaseController {
 	@PostMapping("/list")
 	@ResponseBody
 	public GagaMap getGoodsList(@RequestBody GoodsSearch goodsSearch) {
-		// log.debug("[getGoodsList] goodsSearch=>{}", goodsSearch);
+		log.info("[getGoodsList] goodsSearch=>{}", goodsSearch);
 		GagaMap result = new GagaMap();
 
 		// 입점업체담당자는 업체코드 설정
@@ -305,9 +315,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isEmpty(goodsSearch.getCondition())) {
-//			TsitUtil tsitUtil = new TsitUtil();
-//			String condition = tsitUtil.replaceMultiSelectParamsArr(goodsSearch.getCondition());
-			//goodsSearch.setConditionList(condition.split(","));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
 
 			if ("searchExtendGoodsCd".equals(goodsSearch.getSearch())) {
 				goodsSearch.setSearchGb("EXTEND");
@@ -318,14 +326,50 @@ public class TsaGoodsController extends TsaBaseController {
 
 		goodsSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 		goodsSearch.setPageable(new TsaPageRequest(goodsSearch.getPageNo() - 1, goodsSearch.getPageSize()));
-		//goodsSearch.getPageable().setTotalCount(goodsService.getGoodsListCount(goodsSearch));
+		goodsSearch.getPageable().setTotalCount(goodsService.getGoodsListCount(goodsSearch));
 
 		result.set("pageing", goodsSearch);
-		//result.set("goodsList", goodsService.getGoodsList(goodsSearch));
+		result.set("goodsList", goodsService.getGoodsList(goodsSearch));
 
 		return result;
 	}
 
+	/**
+	 * 상품목록 - 기본정보 엑셀다운로드
+	 *
+	 * @param goodsSearch
+	 * @return
+	 * @author eskim
+	 * @since 2020. 10. 21
+	 */
+	@GetMapping("/info/excel/list")
+	public ResponseEntity<InputStreamResource> downloadGoodsInfoExcelList(HttpServletRequest request, GoodsSearch goodsSearch) throws Exception {
+		String excelfileName = "상품_기본정보_" + GagaDateUtil.getTodayDateTime() + ".xlsx";
+		String excelFilenameWithPath = GagaFileUtil.getConcatenationPath(env.getProperty("download.path"), "excel", excelfileName);
+
+		// 입점업체담당자는 업체코드 설정
+		if ("B000".equals(TsaSession.getInfo().getRoleCd())) {
+			goodsSearch.setSupplyCompCd(TsaSession.getInfo().getSupplyCompCd());
+			goodsSearch.setMdId(TsaSession.getInfo().getUserId());
+		}
+		goodsSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
+
+		// multi row 검색관련 처리
+		if (!StringUtils.isEmpty(goodsSearch.getCondition())) {
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+
+			if ("searchExtendGoodsCd".equals(goodsSearch.getSearch())) {
+				goodsSearch.setSearchGb("EXTEND");
+			} else if ("searchMasterGoodsCd".equals(goodsSearch.getSearch())) {
+				goodsSearch.setSearchGb("MASTER");
+			}
+		}
+
+		// 대용량엑셀파일다운로드는 이런 식으로 ...
+		goodsService.getGoodsInfoExcelList(goodsSearch, excelFilenameWithPath);
+
+		return GagaFileUtil.writeFile(request, excelFilenameWithPath);
+	}
 	/**
 	 * 상품 대량 등록 화면
 	 *

+ 3 - 1
style24.admin/src/main/java/com/style24/admin/support/env/TsaConstants.java

@@ -2,7 +2,7 @@ package com.style24.admin.support.env;
 
 /**
  * 변경될 소지가 있는 변수 값을 정의
- * 
+ *
  * @author gagamel
  * @since 2020. 10. 5
  */
@@ -11,4 +11,6 @@ public class TsaConstants {
 	// 사이트코드
 	public static final String SITE_CD = "10";
 
+	public static final String EXCEL_FOOTER_TITLE = "Copyright(c) 2020 STYLE24, All rights reserved.";
+
 }

+ 9 - 6
style24.admin/src/main/java/com/style24/persistence/domain/Goods.java

@@ -66,6 +66,9 @@ public class Goods extends TsaBaseDomain {
 	private String erpPriceLinkYn;		//ERP가격연계여부(자사상품만 사용. Y:연계)
 	private String erpStockLinkYn;		//ERP재고연계여부(자사상품만 사용. Y:연계)
 
+	private String brandEnm;		//브랜드영문명
+	private String brandGrpNm;		//브랜드그룹명
+
 //	private String goodsDesc;
 //	private String goodsPcTopDesc;
 //	private String goodsPcDownDesc;
@@ -77,15 +80,15 @@ public class Goods extends TsaBaseDomain {
 //	private String chImgYn = "N";
 //	private String chNotiYn = "N";
 //	private String chStockDataYn = "N";
-//	private String stockQtySum;
-//	private String goodsImageYn;
-//	private String itemkindNm;
+	private String stockQtySum;
+	private String goodsImageYn;
+	private String itemkindNm;
 //	private String niClsfCd;
 //	private Integer currPriceOrg;
 //
-//	private String imgType;
-//	private String imgPath1;
-//	private String imgPath4;
+	private String imgType;
+	private String imgPath1;
+	private String imgPath6;
 //
 //	private String niClsfNm;
 //

+ 3 - 8
style24.admin/src/main/java/com/style24/persistence/domain/GoodsSearch.java

@@ -36,8 +36,6 @@ public class GoodsSearch extends TsaBaseDomain {
 	private String soldOutYn;
 	private String erpStockLinkYn;
 	private String erpPriceLinkYn;
-	private String erpInfoLinkYn;
-	private String erpTagPriceLinkYn;
 	private String mdId;
 	private String currPrice;
 	private String currPriceSt;
@@ -52,6 +50,7 @@ public class GoodsSearch extends TsaBaseDomain {
 	private String stockQtySt;
 	private String stockQtyEd;
 	private String cateCd;
+	private String ageGrpCd;
 
 	private String regSuccYn;
 	private String searchGb;
@@ -70,14 +69,9 @@ public class GoodsSearch extends TsaBaseDomain {
 	private String applyFlag;
 	private String barcode;
 	private String dateGbn;
-	private String alarmYn;
-	private String instockAlarmSq;
 
 	private String goodsType;
-	private String selfMallYn;
-	private String goodsIcon;
-	private String priceGbn;
-	private String termGb;
+	private String dispYn;
 
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private String[] siteCd;
@@ -101,4 +95,5 @@ public class GoodsSearch extends TsaBaseDomain {
 
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private String[] conditionList;
+
 }

+ 388 - 1
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -163,7 +163,7 @@
 
 	<!-- 정보고시 항목 등록 -->
 	<insert id="saveNotiInfo" parameterType="NotiInfo">
-		/* AdmGoods.saveNotiInfo */
+		/* TsaGoods.saveNotiInfo */
 		INSERT INTO TB_NOTI_INFO (
 		       SUPPLY_COMP_CD
 		     , NI_CLSF_CD
@@ -193,4 +193,391 @@
 		     , UPD_DT = NOW()
 	</insert>
 	
+	<!-- 상품 목록 건수 -->
+	<select id="getGoodsListCount" parameterType="GoodsSearch" resultType="int">
+		/* TsaGoods.getGoodsListCount */
+		        SELECT COUNT(*) AS TOTCNT
+		        FROM TB_GOODS G
+		        INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
+		        INNER JOIN TB_SUPPLY_COMPANY S ON G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
+		        INNER JOIN TB_GOODS_SUMMARY GS ON G.GOODS_CD = GS.GOODS_CD
+		        <if test="searchGb != null and searchGb =='EXTEND'">
+		        INNER JOIN TB_GOODS_EXTEND GE ON G.GOODS_CD =  GE.EXTEND_GOODS_CD
+		                                      AND GE.GOODS_CD IN
+		            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+		                                          UPPER(#{item})
+		            </foreach>
+		        </if>
+		        <if test="searchGb != null and searchGb =='MASTER'">
+		        INNER JOIN TB_GOODS_EXTEND GE ON G.GOODS_CD =  GE.GOODS_CD
+		                                      AND GE.EXTEND_GOODS_CD IN
+		            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+		                                          UPPER(#{item})
+		            </foreach>
+		        </if>
+		        <if test="searchGb != null and searchGb =='EXCEL'">
+		        INNER JOIN (
+		                     SELECT SEARCH_CD
+		                          , TMP_DISP_ORD
+		                     FROM (
+		                           SELECT SEARCH_CD
+		                                , MIN(DISP_ORD) AS TMP_DISP_ORD
+		                           FROM TB_SEARCH_DATA
+		                           WHERE REG_NO = #{regId}
+		                           GROUP BY SEARCH_CD) T
+		                   ) SD
+		                   ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
+		                        OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')) 
+		                        <if test="mdId != null and mdId != ''">
+		                        AND G.BRAND_CD IN (
+		                                           SELECT DISTINCT BRAND_CD
+		                                           FROM TB_BRAND_MD
+		                                           WHERE MD_ID = #{mdId}
+		                                           )
+		                       </if>
+		                   )
+		        </if>
+		        LEFT OUTER JOIN TB_GOODS_IMG GI ON G.GOODS_CD = GI.GOODS_CD
+		        WHERE 1=1
+		        <if test="searchGb == null or searchGb =='BASIC' or searchGb =='EXTEND' or searchGb =='MASTER'" >
+		        <include refid="getGoodsListContion_sql"/>
+		        </if>
+	</select>
+
+	<!-- 상품 목록 -->
+	<select id="getGoodsList" parameterType="GoodsSearch" resultType="Goods">
+		/* TsaGoods.getGoodsList */
+		SELECT Z.*
+		    /*, (CASE WHEN Z.GOODS_TYPE = 'N' THEN (SELECT NVL(SUM(CURR_STOCK_QTY - BASE_STOCK_QTY),0) FROM VW_STOCK WHERE GOODS_CD = Z.GOODS_CD) 
+		            ELSE (SELECT NVL(SUM(CURR_STOCK_QTY - BASE_STOCK_QTY),0) FROM VW_STOCK_EXTEND WHERE GOODS_CD = Z.GOODS_CD) 
+		            END) AS STOCK_QTY_SUM */
+		    , (SELECT ITEMKIND_NM FROM TB_ITEMKIND WHERE ITEMKIND_CD = Z.ITEMKIND_CD ) AS ITEMKIND_NM
+		    , FN_GET_USER_NM(REG_NO) AS REG_NM
+		    , FN_GET_USER_NM(UPD_NO) AS UPD_NM
+		FROM (
+		    SELECT A.*, @rownum := @rownum + 1 AS RNUM FROM (
+		        SELECT
+		                G.GOODS_CD
+		              , G.GOODS_TYPE
+		              , B.BRAND_ENM
+		              , B.BRAND_GRP_NM
+		              , G.BRAND_CD
+		              , G.ITEMKIND_CD
+		              , G.SUPPLY_COMP_CD
+		              , G.SUPPLY_GOODS_CD
+		              , G.GOODS_NUM
+		              , G.GOODS_NM
+		              , G.GOODS_STAT
+		              , G.LIST_PRICE
+		              , G.CURR_PRICE
+		              , G.DC_RATE
+		              , G.SELF_GOODS_YN
+		              , G.DISP_YN
+		              , G.FORMAL_GB
+		              , G.STYLE_YEAR
+		              , G.SEASON_CD
+		              , G.ERP_STOCK_LINK_YN
+		              , G.ERP_PRICE_LINK_YN
+		              , G.CHANGEABLE_YN
+		              , G.RETURNABLE_YN
+		              , DATE_FORMAT(G.FRST_CFRM_DT, '%Y%m%d%H%i%S') AS FRST_CFRM_DT
+		              , G.SELL_FEE_RATE
+		              , DATE_FORMAT(G.PRICE_UPD_DT,'%Y%m%d%H%i%S') AS PRICE_UPD_DT
+		              , CASE WHEN IMG_PATH1 IS NULL THEN
+		                     'N'
+		                ELSE
+		                     'Y'
+		                END AS GOODS_IMAGE_YN
+		              , GI.IMG_PATH1
+		              , GI.IMG_PATH6
+		              , GI.IMG_TYPE
+		              , G.REG_NO
+		              , DATE_FORMAT(G.REG_DT,'%Y%m%d%H%i%S') AS REG_DT
+		              , G.UPD_NO
+		              , DATE_FORMAT(G.UPD_DT,'%Y%m%d%H%i%S') AS UPD_DT
+		              , GS.SELL_DAY15_QTY
+		              <choose>
+		                  <when test="searchGb != null and searchGb =='EXCEL'">
+		              , SD.TMP_DISP_ORD
+		                  </when>
+		                  <otherwise>
+		              , 0 AS TMP_DISP_ORD
+		                  </otherwise>
+		              </choose>
+		        FROM TB_GOODS G
+		        JOIN ( SELECT @rownum := 0) R
+		        INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
+		        INNER JOIN TB_SUPPLY_COMPANY S ON G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
+		        INNER JOIN TB_GOODS_SUMMARY GS ON G.GOODS_CD = GS.GOODS_CD
+		        <if test="searchGb != null and searchGb =='EXTEND'">
+		        INNER JOIN TB_GOODS_EXTEND GE ON G.GOODS_CD =  GE.EXTEND_GOODS_CD
+		                                      AND GE.GOODS_CD IN
+		            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+		                                          UPPER(#{item})
+		            </foreach>
+		        </if>
+		        <if test="searchGb != null and searchGb =='MASTER'">
+		        INNER JOIN TB_GOODS_EXTEND GE ON G.GOODS_CD =  GE.GOODS_CD
+		                                      AND GE.EXTEND_GOODS_CD IN
+		            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+		                                          UPPER(#{item})
+		            </foreach>
+		        </if>
+		        <if test="searchGb != null and searchGb =='EXCEL'">
+		        INNER JOIN (
+		                     SELECT SEARCH_CD
+		                          , TMP_DISP_ORD
+		                     FROM (
+		                           SELECT SEARCH_CD
+		                                , MIN(DISP_ORD) AS TMP_DISP_ORD
+		                           FROM TB_SEARCH_DATA
+		                           WHERE REG_NO = #{regId}
+		                           GROUP BY SEARCH_CD) T
+		                   ) SD
+		                   ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
+		                        OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')) 
+		                        <if test="mdId != null and mdId != ''">
+		                        AND G.BRAND_CD IN (
+		                                           SELECT DISTINCT BRAND_CD
+		                                           FROM TB_BRAND_MD
+		                                           WHERE MD_ID = #{mdId}
+		                                           )
+		                       </if>
+		                   )
+		        </if>
+		        LEFT OUTER JOIN TB_GOODS_IMG GI ON G.GOODS_CD = GI.GOODS_CD
+		        WHERE 1=1
+		        <if test="searchGb == null or searchGb =='BASIC' or searchGb =='EXTEND' or searchGb =='MASTER'" >
+		        <include refid="getGoodsListContion_sql"/>
+		        ORDER BY G.REG_DT DESC, G.GOODS_CD
+		        </if>
+		        <if test="searchGb != null and searchGb =='EXCEL'">
+		        ORDER BY GS.TMP_DISP_ORD
+		        </if>
+		<include refid="getListPagingContion_sql"/>
+	</select>
+	
+	<!-- 상품 목록 조건 정보 -->
+	<sql id="getGoodsListContion_sql">
+		        <if test='conditionList != null and conditionList.length>0'>
+		            <choose>
+		              <when test='search != null and search == "searchGoodsCd"'>
+		        AND (
+		              <foreach collection="conditionList" item="item" index="index" separator="or">
+		               UPPER(G.GOODS_CD) LIKE CONCAT('%',UPPER(#{item}),'%') 
+		              </foreach>
+		             )
+		              </when>
+		              <when test='search != null and search == "searchGoodsNum"'>
+		        AND (
+		              <foreach collection="conditionList" item="item" index="index" separator="or">
+		               UPPER(G.GOODS_NUM) LIKE CONCAT('%',UPPER(#{item}),'%')
+		              </foreach>
+		             )
+		              </when>
+		              <when test='search != null and search == "searchSupplyGoodsCd"'>
+		        AND (
+		              <foreach collection="conditionList" item="item" index="index" separator="or">
+		               UPPER(G.SUPPLY_GOODS_CD) LIKE CONCAT('%',UPPER(#{item}),'%')
+		              </foreach>
+		             )
+		              </when>
+		              <when test='search != null and search == "searchExtendGoodsCd"'>
+		        AND 1 = 1
+		              </when>
+		              <when test='search != null and search == "searchMasterGoodsCd"'>
+		        AND 1 = 1
+		              </when>
+		              <otherwise>
+		        AND UPPER(G.REG_ID) LIKE CONCAT('%',UPPER(#{item}),'%')
+		              </otherwise>
+		            </choose>
+		        </if>
+		        <if test="goodsCd != null and goodsCd != ''">
+		        AND UPPER(G.GOODS_CD) LIKE CONCAT('%',UPPER(#{goodsCd}),'%')
+		        </if>
+		         <if test="goodsNm != null and goodsNm != ''">
+		        AND UPPER(G.GOODS_NM) LIKE CONCAT('%',UPPER(#{goodsNm}),'%')
+		        </if>
+		         <if test="goodsType != null and goodsType != ''">
+		        AND G.GOODS_TYPE = #{goodsType}
+		        </if>
+		        <if test="supplyCompCd != null and supplyCompCd != ''">
+		        AND G.SUPPLY_COMP_CD = #{supplyCompCd}
+		        </if>
+		        <if test="brandCd != null and brandCd != ''">
+		        AND G.BRAND_CD = #{brandCd}
+		        </if>
+		        <if test="multiBrand != null and multiBrand != ''">
+		        AND G.BRAND_CD IN
+		            <foreach collection="multiBrand" item="item" index="index"  open="(" close=")" separator=",">
+		        #{item}
+		            </foreach>
+		        </if>
+		        <if test="goodsType != null and goodsType != ''">
+		        AND G.GOODS_TYPE = #{goodsType}
+		        </if>
+		        <if test="dispYn != null and dispYn != ''">
+		        AND G.DISP_YN = #{dispYn}
+		        </if>
+		        <if test="itemkindCd != null and itemkindCd != ''">
+		        AND G.ITEMKIND_CD = #{itemkindCd}
+		        </if>
+		        <if test="multiItemkindCd != null and multiItemkindCd != ''">
+		        AND G.ITEMKIND_CD IN
+		            <foreach collection="multiItemkindCd" item="item" index="index"  open="(" close=")" separator=",">
+		        #{item}
+		            </foreach>
+		        </if>
+		        <if test="goodsStat != null and goodsStat != ''">
+		        AND G.GOODS_STAT = #{goodsStat}
+		        </if>
+		        <if test="multiGoodsStat != null and multiGoodsStat != ''">
+		        AND G.GOODS_STAT IN
+		            <foreach collection="multiGoodsStat" item="item" index="index"  open="(" close=")" separator=",">
+		        #{item}
+		            </foreach>
+		        </if>
+		        <if test="styleYear != null and styleYear != ''">
+		        AND G.STYLE_YEAR = (SELECT CD_NM FROM TB_COMMON_CODE WHERE CD = #{styleYear} AND CD_GB='G023')
+		        </if>
+		        <if test="multiStyleYear != null and multiStyleYear != ''">
+		        AND G.STYLE_YEAR IN (SELECT CD_NM 
+		                             FROM TB_COMMON_CODE 
+		                             WHERE CD_GB='G023' 
+		                             AND CD IN 
+		                             <foreach collection="multiStyleYear" item="item" index="index"  open="(" close=")" separator=",">
+		                             #{item}
+		                             </foreach>
+		                             )
+		        </if>
+		        <if test="seasonCd != null and seasonCd != ''">
+		        AND G.SEASON_CD = #{seasonCd}
+		        </if>
+		        <if test="multiSeasonCd != null and multiSeasonCd != ''">
+		        AND G.SEASON_CD IN
+		            <foreach collection="multiSeasonCd" item="item" index="index"  open="(" close=")" separator=",">
+		        #{item}
+		            </foreach>
+		        </if>
+		        <if test="sexGb != null and sexGb != ''">
+		        AND G.SEX_GB = #{sexGb}
+		        </if>
+		        <if test="changeableYn != null and changeableYn != ''">
+		        AND G.CHANGEABLE_YN = #{changeableYn}
+		        </if>
+		        <if test="returnableYn != null and returnableYn != ''">
+		        AND G.RETURNABLE_YN = #{returnableYn}
+		        </if>
+		        <if test="returnFeeFreeYn != null and returnFeeFreeYn != ''">
+		        AND G.RETURN_FEE_FREE_YN = #{returnFeeFreeYn}
+		        </if>
+		        <if test="changeFeeFreeYn != null and changeFeeFreeYn != ''">
+		        AND G.CHANGE_FEE_FREE_YN = #{changeFeeFreeYn}
+		        </if>
+		        <if test="formalGb != null and formalGb != ''">
+		        AND G.FORMAL_GB = #{formalGb}
+		        </if>
+		        <if test='soldOutYn != null and soldOutYn == "Y"'>
+		        AND EXISTS (
+		                    SELECT GOODS_CD 
+		                    FROM VW_STOCK
+		                    WHERE SOLDOUT_YN = 'Y'
+		                    AND GOODS_CD = G.GOODS_CD
+		                   )
+		        </if>
+		        <if test='soldOutYn != null and soldOutYn == "N"'>
+		        AND NOT EXISTS (
+		                    SELECT GOODS_CD 
+		                    FROM VW_STOCK
+		                    WHERE SOLDOUT_YN = 'Y'
+		                    AND GOODS_CD = G.GOODS_CD
+		                   )
+		        </if>
+		        <if test="erpStockLinkYn != null and erpStockLinkYn != ''">
+		        AND G.ERP_STOCK_LINK_YN = #{erpStockLinkYn}
+		        </if>
+		        <if test="erpPriceLinkYn != null and erpPriceLinkYn != ''">
+		        AND G.ERP_PRICE_LINK_YN = #{erpPriceLinkYn}
+		        </if>
+		        <if test="mdId != null and mdId != ''">
+		        AND G.BRAND_CD IN (
+		            SELECT DISTINCT BRAND_CD
+		            FROM   TB_BRAND_MD
+		            WHERE  MD_ID = #{mdId}
+		        )
+		        </if>
+		        <if test="currPriceSt != null and currPriceSt != ''">
+		        AND G.CURR_PRICE >= #{currPriceSt}
+		        </if>
+		        <if test="currPriceEd != null and currPriceEd != ''">
+		        <![CDATA[
+		        AND G.CURR_PRICE <= #{currPriceEd}
+		         ]]>
+		        </if>
+		        <if test="dcRateSt != null and dcRateSt != ''">
+		        AND G.DC_RATE >= #{dcRateSt}
+		        </if>
+		        <if test="dcRateEd != null and dcRateEd != ''">
+		        <![CDATA[
+		        AND G.DC_RATE <= #{dcRateEd}
+		        ]]>
+		        </if>
+		        <if test='dateGbn != null and dateGbn == "P"'>
+		            <if test="stDate != null and stDate != ''">
+		        AND G.PRICE_UPD_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		            </if>
+		            <if test="edDate != null and edDate != ''">
+		            <![CDATA[
+		        AND G.PRICE_UPD_DT < DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
+		            ]]>
+		            </if>
+		        </if>
+		        <if test='dateGbn != null and dateGbn == "R"'>
+		            <if test="stDate != null and stDate != ''">
+		        AND G.REG_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		            </if>
+		            <if test="edDate != null and edDate != ''">
+		            <![CDATA[
+		        AND G.REG_DT < DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
+		            ]]>
+		            </if>
+		        </if>
+		        <if test='dateGbn != null and dateGbn == "S"'>
+		            <if test="stDate != null and stDate != ''">
+		        AND G.APPR_UPD_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		            </if>
+		            <if test="edDate != null and edDate != ''">
+		            <![CDATA[
+		        AND G.APPR_UPD_DT < DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
+		            ]]>
+		            </if>
+		        </if>
+		        <if test="stockQtySt != null and stockQtySt != ''">
+		        AND ST.CURR_STOCK_QTY >= #{stockQtySt}
+		        </if>
+		        <if test="stockQtyEd != null and stockQtyEd != ''">
+		        <![CDATA[
+		        AND ST.CURR_STOCK_QTY <= #{stockQtyEd}
+		        ]]>
+		        </if>
+		        <if test="ageGrpCd != null and ageGrpCd != ''">
+		        AND G.AGE_GRP_CD = #{ageGrpCd}
+		        </if>
+	</sql>
+	
+	<!-- 목록 페이징 정보 -->
+	<sql id="getListPagingContion_sql">
+		<choose>
+		<when test="pageable != null">
+		    ) A
+		)Z WHERE RNUM BETWEEN  #{pageable.startRow} AND #{pageable.endRow}
+		</when>
+		<otherwise>
+		    ) A
+		)Z
+		</otherwise>
+		</choose>
+	</sql>
+	
 </mapper>

+ 183 - 179
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsListForm.html

@@ -27,166 +27,179 @@
 		<input type="hidden" id="searchGb" name="searchGb" />
 		<input type="hidden" id="imageViewYn" name="imageViewYn" />
 	 		<!-- 패널 영역1 -->
-			<div class="panelStyle" >
-				<!-- 검색조건 영역 -->
-				<!-- TITLE -->
-				<div class="panelTitle">
-					<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 키워드, 발생일</font>중 하나를 꼭 입력해 주세요.</h3>
-					<span class="panelControl">
-						<i class="fa fa-chevron-up"></i>
-					</span>
-				</div>
-				<!-- //TITLE -->
-				<div class="panelContent">
-						<table class="frmStyle">
-							<colgroup>
-								<col style="width: 7%;"/>
-								<col style="width: 18%;"/>
-								<col style="width: 7%;"/>
-								<col style="width: 18%;"/>
-								<col style="width: 7%;"/>
-								<col style="width: 18%;"/>
-								<col style="width: 7%;"/>
-								<col/>
-							</colgroup>
-							<tr>
-								<th>업체/브랜드<i class="star"></i></th>
-								<td colspan="3">
-									<select name="supplyCompCd" id="supplyCompCd">
-										<option value="" th:if="${sessionInfo.roleCd} != 'B000'">[전체]</option>
-										<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-									<select name="brandCd" id="brandCd">
-										<option value="">[전체]</option>
-									</select>
-								</td>
-								<th>키워드<i class="star"></i></th>
-								<td colspan="3">
-									<select name="search" id="search">
-										<option value="searchGoodsCd">상품코드</option>
-										<option value="searchGoodsNm">상품명</option>
-										<option value="searchGoodsNum">품번</option>
-										<option value="searchSupplyGoodsCd">업체상품코드</option>
-									</select>
-									<input type="text" class="w40p" name="condition" id="condition" maxlength="50"/>
-								</td>
-							</tr>
-							<tr>
-								<th>품목</th>
-								<td>
-									<select name="itemkindCd" id="itemkindCd">
-										<option value="">[전체]</option>
-										<option th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-								</td>
-								<th>상품상태</th>
-								<td>
-									<select  name="goodsStat" id="goodsStat">
-										<option value="">[전체]</option>
-										<option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-								</td>
-								<th>년도/시즌</th>
-								<td>
-									<select  name="styleYear" id="styleYear">
-										<option value="">[전체]</option>
-										<option th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-									<select  name="seasonCd" id="seasonCd">
-										<option value="">[전체]</option>
-										<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-								</td>
-								<th>상품구분</th>
-								<td>
-									<select name="goodsType" id="goodsType">
-										<option value="">[전체]</option>
-										<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-								</td>
-							</tr>
-							<tr>
-								<th>재고연동여부</th>
-								<td>
-									<select  name="erpStockLinkYn" id="erpStockLinkYn">
-										<option value="">[전체]</option>
-										<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-								</td>
-								<th>정상/이월 구분</th>
-								<td>
-									<select  name="formalGb" id="formalGb">
-										<option value="">[전체]</option>
-										<option th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-								</td>
-								<th>성별</th>
-								<td>
-									<select  name="sexGb" id="sexGb">
-										<option value="">[전체]</option>
-										<option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-								</td>
-								<th>연령대</th>
-								<td>
-									<select  name="ageGrpCd" id="ageGrpCd">
-										<option value="">[전체]</option>
-										<option th:if="${ageGrpCdList}" th:each="oneData, status : ${ageGrpCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-								</td>
-							</tr>
-							<tr>
-								<th>품절여부</th>
-								<td>
-									<select  name="soldOutYn" id="soldOutYn">
-										<option value="">[전체]</option>
-										<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-								</td>
-								<th>담당MD</th>
-								<td>
-									<select  name="mdId" id="mdId">
-										<option value="">[전체]</option>
-										<!-- <option th:if="${brandMdList}" th:each="oneData, status : ${brandMdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option> -->
-									</select>
-								</td>
-								<th>반품교환</th>
-								<td>
-									<label class="chkBox"><input type="checkbox" name="returnableYn" value="Y"/>반품가능</label>
-									<label class="chkBox"><input type="checkbox" name="changeableYn" value="Y"/>교환가능</label>
-									<!-- <label class="chkBox"><input type="checkbox" name="returnFeeFreeYn" value="Y"/>무료반품</label>
-									<label class="chkBox"><input type="checkbox" name="changeFeeFreeYn" value="Y"/>무료교환</label> -->
-								</td>
-								<th>자사몰노출여부</th>
-								<td>
-									<select  name="dispYn" id="dispYn">
-										<option value="">[전체]</option>
-										<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-									</select>
-								</td>
-							</tr>
-							<tr>
-								<th>판매가</th>
-								<td>
-									<input type="text" class="w90" name="currPriceSt" id="currPriceSt" maxlength="10" data-valid-type="numeric"/>원 ~ <input type="text" class="w90" name="currPriceEd" id="currPriceEd" maxlength="10" data-valid-type="numeric"/>원
-								</td>
-								<th>할인율</th>
-								<td colspan="5">
-									<input type="text" class="w70" name="dcRateSt" id="dcRateSt" maxlength="3" data-valid-type="numeric"/> % ~ <input type="text" class="w70" name="dcRateEd" id="dcRateEd" maxlength="3" data-valid-type="numeric"/> %
-								</td>
-							</tr>
-							<tr>
-								<th>발생일<i class="star"></i></th>
-								<td colspan="7" id="sellTerms"></td>
-							</tr>
-						</table>
-						<ul class="panelBar">
-							<li class="center">
-								<button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button>
-								<button type="button" class="btn btn-info btn-lg" id="btnInit" >조회</button>
-							</li>
-						</ul>
-				</div>
+		<div class="panelStyle" >
+			<!-- 검색조건 영역 -->
+			<!-- TITLE -->
+			<div class="panelTitle">
+				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 키워드, 발생일</font>중 하나를 꼭 입력해 주세요.</h3>
+				<span class="panelControl">
+					<i class="fa fa-chevron-up"></i>
+				</span>
+			</div>
+			<!-- //TITLE -->
+			<div class="panelContent">
+				<table class="frmStyle">
+					<colgroup>
+						<col style="width: 7%;"/>
+						<col style="width: 21%;"/>
+						<col style="width: 7%;"/>
+						<col style="width: 18%;"/>
+						<col style="width: 7%;"/>
+						<col style="width: 18%;"/>
+						<col style="width: 7%;"/>
+						<col/>
+					</colgroup>
+					<tr>
+						<th>업체/브랜드<em class="required" title="필수"></em></th>
+						<td colspan="3">
+							<select name="supplyCompCd" id="supplyCompCd">
+								<option value="" th:if="${sessionInfo.roleCd} != 'B000'">[전체]</option>
+								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+							<span id="multiBrand"></span>
+						</td>
+						<th>상품구분</th>
+						<td>
+							<select name="goodsType" id="goodsType">
+								<option value="">[전체]</option>
+								<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th rowspan="4">키워드<em class="required" title="필수"></em></th>
+						<td rowspan="4">
+							<select name="search" id="search">
+								<option value="searchGoodsCd">상품코드</option>
+								<option value="searchGoodsNm">상품명</option>
+								<option value="searchGoodsNum">품번</option>
+								<option value="searchSupplyGoodsCd">업체상품코드</option>
+							</select>
+							<!-- <input type="text" class="w40p" name="condition" id="condition" maxlength="50"/> -->
+							<textarea class="textareaR3 w70p" name="condition" id="condition"></textarea>
+						</td>
+					</tr>
+					<tr>
+						<th>품목</th>
+						<td>
+							<div class="multiCheckBox"  style="width:300px">
+								<button type="button" class="sltBtn">[전체]</button>
+								<ul style="overflow:auto; height:170px;">
+									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiItemkindCd" onclick="uifnAllCheck('multiItemkindCd')">전체선택</label></li>
+									<li th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}"><label class="chkBox"><input type="checkbox" name="multiItemkindCd" th:id="${'itemkindCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
+							</div>
+						</td>
+						<th>상품상태</th>
+						<td>
+							<div class="multiCheckBox"  style="width:200px">
+								<button type="button" class="sltBtn">[전체]</button>
+								<ul style="overflow:auto; height:170px">
+									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiGoodsStat" onclick="uifnAllCheck('multiGoodsStat')">전체선택</label></li>
+									<li th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}"><label class="chkBox"><input type="checkbox" name="multiGoodsStat" th:id="${'goodsStat' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
+							</div>
+						</td>
+						<th>년도/시즌</th>
+						<td>
+							<select  name="styleYear" id="styleYear">
+								<option value="">[전체]</option>
+								<option value="2017">[2017] 2017</option>
+								<option value="2018">[2018] 2018</option>
+								<option value="2019">[2019] 2019</option>
+								<option value="2020">[2020] 2020</option>
+								<option value="2021">[2021] 2021</option>
+							</select>
+							<select  name="seasonCd" id="seasonCd">
+								<option value="">[전체]</option>
+								<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>정상/이월 구분</th>
+						<td>
+							<select  name="formalGb" id="formalGb">
+								<option value="">[전체]</option>
+								<option th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>연령대</th>
+						<td>
+							<select  name="ageGrpCd" id="ageGrpCd">
+								<option value="">[전체]</option>
+								<option th:if="${ageGrpCdList}" th:each="oneData, status : ${ageGrpCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>성별</th>
+						<td>
+							<select  name="sexGb" id="sexGb">
+								<option value="">[전체]</option>
+								<option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>재고연동여부</th>
+						<td>
+							<select  name="erpStockLinkYn" id="erpStockLinkYn">
+								<option value="">[전체]</option>
+								<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>자사몰노출여부</th>
+						<td>
+							<select  name="dispYn" id="dispYn">
+								<option value="">[전체]</option>
+								<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>품절여부</th>
+						<td>
+							<select  name="soldOutYn" id="soldOutYn">
+								<option value="">[전체]</option>
+								<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>반품가능여부</th>
+						<td>
+							<select  name="returnableYn" id="returnableYn">
+								<option value="">[전체]</option>
+								<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+							<!-- <label class="chkBox"><input type="checkbox" name="returnableYn" value="Y"/>반품가능</label>
+							<label class="chkBox"><input type="checkbox" name="changeableYn" value="Y"/>교환가능</label>
+							<label class="chkBox"><input type="checkbox" name="returnFeeFreeYn" value="Y"/>무료반품</label>
+							<label class="chkBox"><input type="checkbox" name="changeFeeFreeYn" value="Y"/>무료교환</label> -->
+						</td>
+						<th>담당MD</th>
+						<td>
+							<select  name="mdId" id="mdId">
+								<option value="">[전체]</option>
+								<option th:if="${brandMdList}" th:each="oneData, status : ${brandMdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>판매가</th>
+						<td>
+							<input type="text" class="w90" name="currPriceSt" id="currPriceSt" maxlength="10" data-valid-type="numeric"/>원 ~ <input type="text" class="w90" name="currPriceEd" id="currPriceEd" maxlength="10" data-valid-type="numeric"/>원
+						</td>
+						<th>할인율</th>
+						<td>
+							<input type="text" class="w70" name="dcRateSt" id="dcRateSt" maxlength="3" data-valid-type="numeric"/> % ~ <input type="text" class="w70" name="dcRateEd" id="dcRateEd" maxlength="3" data-valid-type="numeric"/> %
+						</td>
+					</tr>
+					<tr>
+						<th>발생일<em class="required" title="필수"></em></th>
+						<td colspan="7" id="sellTerms"></td>
+					</tr>
+				</table>
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button>
+						<button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>
+					</li>
+				</ul>
+			</div>
 			<!-- //검색조건 영역 -->
 		</div>
 		<!-- 패널 영역1 -->
@@ -412,7 +425,7 @@
 			}
 		},
 		{headerName: "품목", field: "itemkindNm", width: 150, cellClass: 'text-center'},
-		{headerName: "판매가능재고", field: "stockQtySum", width: 120, cellClass: 'text-right',
+		/*{headerName: "판매가능재고", field: "stockQtySum", width: 120, cellClass: 'text-right',
 			valueFormatter: function(params) {	return params.value.addComma();},
 			cellStyle : function(params){
 				if ("00" == params.data.goodsStat  || "10" == params.data.goodsStat || "20" == params.data.goodsStat || "30" == params.data.goodsStat) {
@@ -424,7 +437,7 @@
 				}
 				return { 'background-color': color};
 			} 
-		},
+		},*/
 		{headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
 			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
@@ -436,11 +449,6 @@
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(seasonList, params.value); },
 			valueParser: function (params) { return gagaAgGrid.lookupKey(seasonList, params.newValue); }
 		},
-		{headerName: "TAG가", field: "tagPrice" , width: 100, cellClass: 'text-right'
-			,valueFormatter: function(params) {return params.value.addComma();},
-			cellEditor: 'textCellEditor',
-			cellEditorParams: { maxlength: 14, validType: 'numeric'}
-		},
 		{headerName: "정상가", field: "listPrice" , width: 100, cellClass: 'text-right'
 			,valueFormatter: function(params) {return params.value.addComma();},
 			cellEditor: 'textCellEditor',
@@ -458,29 +466,24 @@
 			}
 		},
 		{headerName: "ERP재고연동여부", field: "erpStockLinkYn", width: 120, cellClass: 'text-center'},
-		{headerName: "ERP가격연동여부", field: "erpPriceLinkYn", width: 120, cellClass: 'text-center'},
 		{headerName: "이월구분", field: "formalGb", width: 100, cellClass: 'text-center',
 			cellEditorParams: { values: gagaAgGrid.extractValues(formalGbList) },
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(formalGbList, params.value); },
 			valueParser: function (params) { return gagaAgGrid.lookupKey(formalGbList, params.newValue); }
 		},
 		{headerName: "반품가능", field: "returnableYn" , width: 90, cellClass: 'text-center'},
-		{headerName: "교환가능", field: "changeableYn" , width: 90, cellClass: 'text-center'},
-		{headerName: "무료반품", field: "returnFeeFreeYn" , width: 90, cellClass: 'text-center'},
-		{headerName: "무료교환", field: "changeFeeFreeYn" , width: 90, cellClass: 'text-center'},
-		{headerName: "필수이미지여부", field: "goodsImageYn" , width: 120, cellClass: 'text-center'},
 		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center',
 			cellRenderer: function(params) {
 				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
 			}
 		},
-		{headerName: "등록자", field: "regId" , width: 100, cellClass: 'text-center'},
+		{headerName: "등록자", field: "regNm" , width: 100, cellClass: 'text-center'},
 		{headerName: "수정일시", field: "updDt", width: 150, cellClass: 'text-center',
 			cellRenderer: function(params) {
 				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
 			}
 		},
-		{headerName: "수정자", field: "updId" , width: 100, cellClass: 'text-center'}
+		{headerName: "수정자", field: "updNm" , width: 100, cellClass: 'text-center'}
 	];
 
 	// Get GridOptions
@@ -517,7 +520,7 @@
 		//$("#searchForm input[type=radio]").parent("label").removeClass("checked");
 		$("#searchForm input[type=checkbox]").parent("label").removeClass("checked");
 		$("#searchForm input[type=radio][checked]").parent("label").addClass("checked");
-
+		$("#multiBrand").empty();
 	});
 
 	// 조회클릭시
@@ -552,7 +555,7 @@
 		var cnt = 0;
 
 		if( !gagajf.isNull($("#searchForm select[name=supplyCompCd]").val())
-				|| !gagajf.isNull($("#searchForm input[name=condition]").val())
+				|| !gagajf.isNull($("#searchForm textarea[name=condition]").val())
 				|| (!gagajf.isNull($("#searchForm input[name=stDate]").val()) && !gagajf.isNull($("#searchForm input[name=edDate]").val()))
 				|| !gagajf.isNull($("#searchForm select[name=brandGrpNm]").val())
 			){
@@ -653,9 +656,10 @@
 		if(sessRoleCd == "B000"){
 			actionUrl = '/renderer/brand/AuthBrandlist';
 		}
-		$("#searchForm select[name=brandCd] option:gt(0)").remove();
-
-		cfnCreateCombo(actionUrl, $('#searchForm select[name=brandCd]'), "[전체]", brandCd);
+		
+		//$("#searchForm select[name=brandCd] option:gt(0)").remove();
+		//cfnCreateCombo(actionUrl, $('#searchForm select[name=brandCd]'), "[전체]", brandCd);
+		cfnCreateMultiCombo(actionUrl,"multiBrand",  "[전체]",null, 'Y');
 	});
 
 	//엑셀다운로드