Browse Source

상품목록 조회

eskim 5 năm trước cách đây
mục cha
commit
e4535ef761

+ 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);
+
 }

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

@@ -11,6 +11,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;
 
@@ -156,4 +158,27 @@ 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);
+	}
 }

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

@@ -277,7 +277,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");
 
@@ -298,10 +298,11 @@ public class TsaGoodsController extends TsaBaseController {
 		GagaMap result = new GagaMap();
 
 		// 입점업체담당자는 업체코드 설정
-		if ("B000".equals(TsaSession.getInfo().getRoleCd())) {
-			goodsSearch.setSupplyCompCd(TsaSession.getInfo().getSupplyCompCd());
-			goodsSearch.setMdId(TsaSession.getInfo().getUserId());
-		}
+//		if ("B000".equals(TsaSession.getInfo().getRoleCd())) {
+//			goodsSearch.setSupplyCompCd(TsaSession.getInfo().getSupplyCompCd());
+//			goodsSearch.setMdId(TsaSession.getInfo().getUserId());
+//		}
+
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isEmpty(goodsSearch.getCondition())) {
@@ -318,10 +319,10 @@ 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;
 	}

+ 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;
 //

+ 1 - 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;
@@ -70,14 +68,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;

+ 384 - 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,387 @@
 		     , 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 SD.SEARCH_CD||'%'
+		                        OR G.SUPPLY_GOODS_CD LIKE 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 SD.SEARCH_CD||'%'
+		                        OR G.SUPPLY_GOODS_CD LIKE 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">
+		               REGEXP_LIKE(UPPER(G.GOODS_CD), UPPER(#{item}))
+		              </foreach>
+		             )
+		              </when>
+		              <when test='search != null and search == "searchGoodsNum"'>
+		        AND (
+		              <foreach collection="conditionList" item="item" index="index" separator="or">
+		               REGEXP_LIKE(UPPER(G.GOODS_NUM), UPPER(#{item}))
+		              </foreach>
+		             )
+		              </when>
+		              <when test='search != null and search == "searchSupplyGoodsCd"'>
+		        AND (
+		              <foreach collection="conditionList" item="item" index="index" separator="or">
+		               REGEXP_LIKE(UPPER(G.SUPPLY_GOODS_CD), 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 UPPER('%' || #{condition} || '%')
+		              </otherwise>
+		            </choose>
+		        </if>
+		        <if test="goodsCd != null and goodsCd != ''">
+		        AND UPPER(G.GOODS_CD) LIKE UPPER('%' || #{goodsCd} || '%')
+		        </if>
+		         <if test="goodsNm != null and goodsNm != ''">
+		        AND UPPER(G.GOODS_NM) LIKE 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 >= TO_DATE(#{stDate}, 'YYYY-MM-DD')
+		            </if>
+		            <if test="edDate != null and edDate != ''">
+		            <![CDATA[
+		        AND G.PRICE_UPD_DT <= TO_DATE(#{edDate}, 'YYYY-MM-DD')  + 0.99999
+		            ]]>
+		            </if>
+		        </if>
+		        <if test='dateGbn != null and dateGbn == "R"'>
+		            <if test="stDate != null and stDate != ''">
+		        AND G.REG_DT >= TO_DATE(#{stDate}, 'YYYY-MM-DD')
+		            </if>
+		            <if test="edDate != null and edDate != ''">
+		            <![CDATA[
+		        AND G.REG_DT <= TO_DATE(#{edDate}, 'YYYY-MM-DD')  + 0.99999
+		            ]]>
+		            </if>
+		        </if>
+		         <if test='dateGbn != null and dateGbn == "S"'>
+		            <if test="stDate != null and stDate != ''">
+		        AND G.APPR_UPD_DT >= TO_DATE(#{stDate}, 'YYYY-MM-DD')
+		            </if>
+		            <if test="edDate != null and edDate != ''">
+		            <![CDATA[
+		        AND G.APPR_UPD_DT <= TO_DATE(#{edDate}, 'YYYY-MM-DD')  + 0.99999
+		            ]]>
+		            </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>
+	</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>

+ 182 - 178
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();
 	});
 
 	// 조회클릭시
@@ -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');
 	});
 
 	//엑셀다운로드