Переглянути джерело

입점상품가격관리 페이징 처리

eskim 5 роки тому
батько
коміт
c8ebcf018b

+ 18 - 2
style24.scm/src/main/java/com/style24/persistence/domain/GoodsPriceRes.java

@@ -2,6 +2,7 @@ package com.style24.persistence.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.style24.persistence.TscBaseDomain;
+import com.style24.persistence.TssPageRequest;
 
 import lombok.Data;
 
@@ -22,7 +23,7 @@ public class GoodsPriceRes extends TscBaseDomain {
 	private String applyStdt;
 	private String applyEddt;
 	private String cfrmYn;
-	private Integer cfrmNo;
+	private int cfrmNo;
 	private String cfrmDt;
 	private String applyYn;
 
@@ -30,9 +31,18 @@ public class GoodsPriceRes extends TscBaseDomain {
 
 	private String goodsNm;
 	private String supplyGoodsCd;
-	private String brandEnm;
 	private String goodsStat;
+	private String supplyCompCd;
+	private String supplyCompNm;
+	private String brandCd;
+	private String brandEnm;
+	private int listPrice;
 	private int currPrice;
+	private String dateGbn;
+	private String stDate;
+	private String edDate;
+	private String confirmY;
+	private Float goodsSellFeeRate;
 
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private String[] arrGoodsCd;
@@ -43,4 +53,10 @@ public class GoodsPriceRes extends TscBaseDomain {
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private int[] arrGoodsPriceResSq;
 
+	// Pagination
+	private TssPageRequest pageable;
+	private int pageNo = 1;
+	private int pageSize = 50;
+	private int pageUnit = 10;
+
 }

+ 143 - 198
style24.scm/src/main/java/com/style24/persistence/mybatis/shop/TssGoods.xml

@@ -1197,8 +1197,8 @@
 		  <if test="currBprice != null and currBprice != ''">
 		  , CURR_BPRICE = #{currBprice}
 		  , PRICE_UPD_DT = NOW()
-		  </if>
 		  , DC_RATE = #{dcRate}
+		  </if>
 		  , GOODS_STAT = #{goodsStat}
 		  , GOODS_GB = #{goodsGb}
 		  , DELV_FEE_CD = #{delvFeeCd}
@@ -1354,219 +1354,164 @@
 		INSERT INTO TB_GOODS_SEQUENCE (GOODS_SQ) VALUES (NULL)
 	</insert>
 	
-	<!-- 상품 가격예약 목록 건수 -->
-	<select id="getGoodsPriceResCount" parameterType="GoodsSearch" resultType="int">
-		/* TsaGoods.getGoodsPriceResCount */
-		SELECT COUNT(*) AS TOTCNT
-		FROM TB_GOODS G
+	<!-- 상품 옵션 존재여부 확인 -->
+	<select id="getGoodsOptionCount" parameterType="Option" resultType="int">
+		/* TsaGoods.getGoodsOptionCount */
+		SELECT COUNT(*)
+		FROM TB_OPTION
+		WHERE GOODS_CD = #{goodsCd}
+		<if test='optCd != null and optCd != ""'>
+		AND OPT_CD = #{optCd}
+		</if>
+	</select>
+	
+	<!-- 상품 가격 승인 목록 건수 -->
+	<select id="getGoodsSupplyPriceCount"  parameterType="GoodsPriceRes" resultType="int">
+		/* TsaGoods.getGoodsSupplyPriceCount */
+		SELECT COUNT(A.GOODS_PRICE_RES_SQ)
+		FROM TB_GOODS_PRICE_RES A
+		INNER JOIN TB_GOODS G ON A.GOODS_CD = G.GOODS_CD
+		                      AND G.SELF_GOODS_YN = 'N'
 		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_PRICE_RES GR ON G.GOODS_CD = GR.GOODS_CD
-		<if test="searchGb == null or searchGb =='BASIC'" >
-		    <if test="applyStdt != null and applyStdt != ''">
-		                               AND GR.APPLY_EDDT >= DATE_FORMAT(#{applyStdt}, '%Y-%m-%d %H:%i:%S')
-		    </if>
-		    <if test="applyEddt != null and applyEddt != ''">
-		    <![CDATA[
-		                               AND GR.APPLY_STDT < DATE_FORMAT(DATE_ADD(#{applyEddt}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
-		    ]]>
-		    </if>
-		    <if test='beforSkipFlag != null and beforSkipFlag == "Y"'>
-		                               AND GR.APPLY_EDDT >= NOW() 
-		    </if>
-		    <if test="goodsPriceResSt != null and goodsPriceResSt != ''">
-		                               AND GR.RES_GOODS_PRICE >= #{goodsPriceResSt}
-		    </if>
-		    <if test="goodsPriceResEd != null and goodsPriceResEd != ''">
-		    <![CDATA[
-		                               AND GR.RES_GOODS_PRICE <= #{goodsPriceResEd}
-		     ]]>
-		    </if>
+		WHERE 1 = 1
+		<if test="goodsCd != null and goodsCd != ''">
+		AND UPPER(G.GOODS_CD) = LIKE UPPER('%' || #{goodsCd} || '%')
 		</if>
-		<if test="searchGb != null and (searchGb =='EXCEL' or searchGb =='EXCELRESULT')">
-		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 = #{regNo}
-		                  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="mdNo != null and mdNo != ''">
-		               AND G.BRAND_CD IN (
-		                                  SELECT DISTINCT BRAND_CD
-		                                  FROM TB_BRAND_MD
-		                                  WHERE MD_NO = CAST(#{mdNo} AS UNSIGNED)
-		                                  )
-		              </if>
-		           )
+		<if test="supplyCompCd != null and supplyCompCd != ''">
+		AND G.SUPPLY_COMP_CD = #{supplyCompCd}
 		</if>
-		WHERE 1=1
-		<if test="searchGb == null or searchGb =='BASIC'" >
-		<include refid="getGoodsListCondition_sql"/>
+		<if test="brandCd != null and brandCd != ''">
+		AND G.BRAND_CD = #{brandCd}
+		</if>
+		<if test="cfrmYn != null and cfrmYn != ''">
+		AND A.CFRM_YN = #{cfrmYn}
+		</if>
+		<if test='confirmY != null and confirmY == "N"'>
+		    <if test='dateGbn != null and dateGbn == "R"'>
+		        <if test="stDate != null and stDate != ''">
+		AND A.REG_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		        </if>
+		        <if test="edDate != null and edDate != ''">
+		        <![CDATA[
+		AND A.REG_DT < DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
+		        ]]>
+		        </if>
+		    </if>
+		    <if test='dateGbn != null and dateGbn == "P"'>
+		        <if test="stDate != null and stDate != ''">
+		AND A.CFRM_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		        </if>
+		        <if test="edDate != null and edDate != ''">
+		        <![CDATA[
+		AND A.CFRM_DT < DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S') 
+		        ]]>
+		        </if>
+		    </if>
 		</if>
 	</select>
-
-	<!-- 상품 가격예약 목록 -->
-	<select id="getGoodsPriceResList" parameterType="GoodsSearch" resultType="GoodsPriceRes">
-		/* TsaGoods.getGoodsPriceResList */
+	
+	<!-- 상품 가격 승인 목록 -->
+	<select id="getGoodsSupplyPriceList"  parameterType="GoodsPriceRes" resultType="GoodsPriceRes">
+		/* TsaGoods.getGoodsSupplyPriceList */
 		SELECT Z.*
 		FROM (
 		    SELECT A.*, @rownum := @rownum + 1 AS RNUM FROM (
-		        SELECT
-		                G.GOODS_CD
-		              , G.CURR_PRICE
-		              , G.LIST_PRICE
-		              , B.BRAND_ENM
-		              , B.BRAND_GRP_NM
-		              , G.BRAND_CD
-		              , G.SUPPLY_COMP_CD
-		              , G.SUPPLY_GOODS_CD
-		              , G.GOODS_NM
-		              , G.GOODS_TNM
-		              , G.SELF_GOODS_YN
-		              , G.GOODS_STAT
-		              , GR.GOODS_PRICE_RES_SQ
-		              , GR.RES_GOODS_PRICE
-		              , GR.END_GOODS_PRICE
-		              , GR.SELL_FEE_RATE
-		              , DATE_FORMAT(GR.APPLY_STDT,'%Y%m%d%H%i%S') AS APPLY_STDT
-		              , DATE_FORMAT(GR.APPLY_EDDT,'%Y%m%d%H%i%S') AS APPLY_EDDT
-		              , GR.CFRM_YN
-		              , GR.CFRM_NO
-		              , FN_GET_USER_NM(GR.REG_NO) AS CFRM_NM
-		              , DATE_FORMAT(GR.CFRM_DT,'%Y%m%d%H%i%S') AS CFRM_DT
-		              , GR.APPLY_YN
-		              , GR.REG_NO
-		              , FN_GET_USER_NM(GR.REG_NO) AS REG_NM
-		              , DATE_FORMAT(GR.REG_DT,'%Y%m%d%H%i%S') AS REG_DT
-		              , FN_GET_USER_NM(GR.UPD_NO) AS UPD_NM
-		              , DATE_FORMAT(GR.UPD_DT,'%Y%m%d%H%i%S') AS UPD_DT
-		        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_PRICE_RES GR ON G.GOODS_CD = GR.GOODS_CD
-		        <if test="searchGb == null or searchGb =='BASIC'" >
-		            <if test="applyStdt != null and applyStdt != ''">
-		                                       AND GR.APPLY_EDDT >= DATE_FORMAT(#{applyStdt}, '%Y-%m-%d %H:%i:%S')
+		        SELECT X.GOODS_PRICE_RES_SQ
+		             , X.GOODS_CD
+		             , X.RES_GOODS_PRICE
+		             , X.END_GOODS_PRICE
+		             , X.SELL_FEE_RATE
+		             , X.CFRM_YN
+		             , X.CFRM_NM
+		             , X.CFRM_NO
+		             , X.CFRM_DT
+		             , X.APPLY_YN
+		             , X.REG_NM
+		             , X.REG_DT
+		             , X.UPD_NM
+		             , X.UPD_DT
+		             , X.LIST_PRICE
+		             , X.CURR_PRICE
+		            , X.GOODS_STAT
+		             , X.GOODS_SELL_FEE_RATE
+		             , X.SUPPLY_COMP_CD
+		             , X.SUPPLY_COMP_NM
+		             , X.BRAND_CD
+		            , X.BRAND_ENM
+		        FROM (
+		            SELECT A.GOODS_PRICE_RES_SQ
+		                 , A.GOODS_CD
+		                 , A.RES_GOODS_PRICE
+		                 , A.END_GOODS_PRICE
+		                 , A.SELL_FEE_RATE
+		                 , A.CFRM_YN
+		                 , FN_GET_USER_NM(A.CFRM_NO) AS CFRM_NM
+		                 , A.CFRM_NO
+		                 , DATE_FORMAT(A.CFRM_DT,'%Y%m%d%H%i%S') AS CFRM_DT
+		                 , A.APPLY_YN
+		                 , FN_GET_USER_NM(A.REG_NO) AS REG_NM
+		                 , DATE_FORMAT(A.REG_DT,'%Y%m%d%H%i%S') AS REG_DT
+		                 , FN_GET_USER_NM(A.UPD_NO) AS UPD_NM
+		                 , DATE_FORMAT(A.UPD_DT,'%Y%m%d%H%i%S') AS UPD_DT
+		                 , G.LIST_PRICE
+		                 , G.CURR_PRICE
+		                 , G.SELL_FEE_RATE AS GOODS_SELL_FEE_RATE
+		                 , ROW_NUMBER() OVER(PARTITION BY A.GOODS_CD ORDER BY A.REG_DT DESC) AS RNUM
+		                 , G.GOODS_STAT
+		                 , G.BRAND_CD
+		                 , B.BRAND_ENM
+		                 , G.SUPPLY_COMP_CD
+		                 , S.SUPPLY_COMP_NM
+		            FROM TB_GOODS_PRICE_RES A
+		            JOIN ( SELECT @rownum := 0) R
+		            INNER JOIN TB_GOODS G ON A.GOODS_CD = G.GOODS_CD
+		                                  AND G.SELF_GOODS_YN = 'N'
+		            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
+		            WHERE 1 = 1
+		            <if test="goodsCd != null and goodsCd != ''">
+		            AND UPPER(G.GOODS_CD) = LIKE UPPER('%' || #{goodsCd} || '%')
 		            </if>
-		            <if test="applyEddt != null and applyEddt != ''">
-		            <![CDATA[
-		                                       AND GR.APPLY_STDT < DATE_FORMAT(DATE_ADD(#{applyEddt}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
-		            ]]>
+		            <if test="supplyCompCd != null and supplyCompCd != ''">
+		            AND G.SUPPLY_COMP_CD = #{supplyCompCd}
 		            </if>
-		            <if test='beforSkipFlag != null and beforSkipFlag == "Y"'>
-		                                       AND GR.APPLY_EDDT >= NOW() 
+		            <if test="brandCd != null and brandCd != ''">
+		            AND G.BRAND_CD = #{brandCd}
 		            </if>
-		            <if test="goodsPriceResSt != null and goodsPriceResSt != ''">
-		                                       AND GR.RES_GOODS_PRICE >= #{goodsPriceResSt}
+		            <if test="cfrmYn != null and cfrmYn != ''">
+		            AND A.CFRM_YN = #{cfrmYn}
 		            </if>
-		            <if test="goodsPriceResEd != null and goodsPriceResEd != ''">
-		            <![CDATA[
-		                                       AND GR.RES_GOODS_PRICE <= #{goodsPriceResEd}
-		             ]]>
+		            <if test='confirmY != null and confirmY == "N"'>
+		                <if test='dateGbn != null and dateGbn == "R"'>
+		                    <if test="stDate != null and stDate != ''">
+		            AND A.REG_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		                    </if>
+		                    <if test="edDate != null and edDate != ''">
+		                    <![CDATA[
+		            AND A.REG_DT < DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
+		                    ]]>
+		                    </if>
+		                </if>
+		                <if test='dateGbn != null and dateGbn == "P"'>
+		                    <if test="stDate != null and stDate != ''">
+		            AND A.CFRM_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		                    </if>
+		                    <if test="edDate != null and edDate != ''">
+		                    <![CDATA[
+		            AND A.CFRM_DT < DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S') 
+		                    ]]>
+		                    </if>
+		                </if>
 		            </if>
+		) X
+		        WHERE 1 = 1
+		        <if test='confirmY != null and confirmY == "Y"'>
+		        AND RNUM = 1
+		        AND CFRM_DT IS NULL
 		        </if>
-		        <if test="searchGb != null and (searchGb =='EXCEL' or searchGb =='EXCELRESULT')">
-		        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 = #{regNo}
-		                          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="mdNo != null and mdNo != ''">
-		                      AND G.BRAND_CD IN (
-		                                          SELECT DISTINCT BRAND_CD
-		                                          FROM TB_BRAND_MD
-		                                          WHERE MD_NO = CAST(#{mdNo} AS UNSIGNED)
-		                                          )
-		                      </if>
-		                   )
-		        </if>
-		        WHERE 1=1
-		        AND G.SELF_GOODS_YN = #{selfGoodsYn}
-		        <if test="searchGb == null or searchGb =='BASIC'" >
-		        <include refid="getGoodsListCondition_sql"/>
-		        ORDER BY  GR.APPLY_STDT DESC, GR.APPLY_EDDT DESC, G.GOODS_CD, GR.GOODS_PRICE_RES_SQ
-		        </if>
-		        <if test="searchGb != null and searchGb =='EXCEL'">
-		        ORDER BY SD.TMP_DISP_ORD
-		        </if>
+		        ORDER BY X.REG_DT DESC, X.GOODS_CD
 		<include refid="getListPagingCondition_sql"/>
 	</select>
-
-	<!-- 상품 가격예약 조회(기간 체크용) -->
-	<select id="getGoodsPriceResDupChkCount" parameterType="GoodsPriceRes" resultType="int">
-		/* TsaGoods.getGoodsPriceResDupChkCount */
-		SELECT COUNT(GOODS_CD)
-		FROM TB_GOODS_PRICE_RES
-		WHERE GOODS_CD = #{goodsCd}
-		<![CDATA[
-		AND APPLY_STDT <= DATE_FORMAT(#{applyStdt}, '%Y%m%d%H%i%S')
-		]]>
-		AND APPLY_EDDT >= DATE_FORMAT(#{applyEddt},'%Y%m%d%H%i%S')
-	</select>
-
-	<!-- 상품 가격예약 등록 -->
-	<insert id="createGoodPriceRes" parameterType="GoodsPriceRes">
-		/* TsaGoods.createGoodPriceRes */
-		INSERT INTO TB_GOODS_PRICE_RES (
-		  GOODS_PRICE_RES_SQ
-		, GOODS_CD
-		, RES_GOODS_PRICE
-		, END_GOODS_PRICE
-		, SELL_FEE_RATE
-		, APPLY_STDT
-		, APPLY_EDDT
-		, CFRM_YN
-		, CFRM_NO
-		, CFRM_DT
-		, APPLY_YN
-		, REG_NO
-		, REG_DT
-		, UPD_NO
-		, UPD_DT
-		)
-		VALUES(
-		  NULL
-		, #{goodsCd}
-		, #{resGoodsPrice}
-		, #{endGoodsPrice}
-		, #{sellFeeRate}
-		, STR_TO_DATE(#{applyStdt},'%Y%m%d%H%i%S')
-		, STR_TO_DATE(#{applyEddt},'%Y%m%d%H%i%S')
-		, NVL(#{cfrmYn},'N')
-		, #{cfrmNo}
-		, #{cfrmDt}
-		, NVL(#{applyYn},'N')
-		, #{regNo}
-		, NOW()
-		, #{updNo}
-		, NOW()
-		)
-	</insert>
-	
-	
-	<!-- 상품 옵션 존재여부 확인 -->
-	<select id="getGoodsOptionCount" parameterType="Option" resultType="int">
-		/* TsaGoods.getGoodsOptionCount */
-		SELECT COUNT(*)
-		FROM TB_OPTION
-		WHERE GOODS_CD = #{goodsCd}
-		<if test='optCd != null and optCd != ""'>
-		AND OPT_CD = #{optCd}
-		</if>
-	</select>
 	
 </mapper>

+ 18 - 28
style24.scm/src/main/java/com/style24/scm/biz/dao/TssGoodsDao.java

@@ -246,53 +246,43 @@ public interface TssGoodsDao {
 	void saveGoodsNotiInfo(GoodsNotiInfo goodsNotiInfo);
 
 	/**
-	 * 상품 가격예약 목록 건수
-	 *
-	 * @param goodsSearch
-	 * @return Integer
-	 * @author eskim
-	 * @since 2020. 11. 13
-	 */
-	int getGoodsPriceResCount(GoodsSearch goodsSearch);
-
-	/**
-	 * 상품 가격예약 목록
+	 * 상품 가격예약 등록(화면)
 	 *
-	 * @param goodsSearch
-	 * @return Collection<GoodsPriceRes>
+	 * @param goodsPriceRes
+	 * @return void
 	 * @author eskim
 	 * @since 2020. 11. 13
 	 */
-	Collection<GoodsPriceRes> getGoodsPriceResList(GoodsSearch goodsSearch);
+	void createGoodPriceRes(GoodsPriceRes goodsPriceRes);
 
 	/**
-	 * 상품 가격예약 조회(기간 체크용)
+	 * 상품 옵션 존재여부 확인
 	 *
-	 * @param goodsPriceRes
-	 * @return int
+	 * @param option
+	 * @return
 	 * @author eskim
-	 * @since 2020. 11. 13
+	 * @since 2020. 11. 17
 	 */
-	int getGoodsPriceResDupChkCount(GoodsPriceRes goodsPriceRes);
+	int getGoodsOptionCount(Option option);
 
 	/**
-	 * 상품 가격예약 등록(화면)
+	 * 상품 가격 승인 목록 건수
 	 *
-	 * @param goodsPriceRes
-	 * @return void
+	 * @param goodsPriceHst
+	 * @return
 	 * @author eskim
-	 * @since 2020. 11. 13
+	 * @since 2020. 11. 26
 	 */
-	void createGoodPriceRes(GoodsPriceRes goodsPriceRes);
+	int getGoodsSupplyPriceCount(GoodsPriceRes goodsPriceRes);
 
 	/**
-	 * 상품 옵션 존재여부 확인
+	 * 상품 가격 승인 목록
 	 *
-	 * @param option
+	 * @param goodsPriceHst
 	 * @return
 	 * @author eskim
-	 * @since 2020. 11. 17
+	 * @since 2020. 11. 26
 	 */
-	int getGoodsOptionCount(Option option);
+	Collection<GoodsPriceRes> getGoodsSupplyPriceList(GoodsPriceRes goodsPriceRes);
 
 }

+ 20 - 162
style24.scm/src/main/java/com/style24/scm/biz/service/TssGoodsService.java

@@ -1,7 +1,6 @@
 package com.style24.scm.biz.service;
 
 import java.io.IOException;
-import java.text.SimpleDateFormat;
 import java.util.Collection;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -496,7 +495,7 @@ public class TssGoodsService {
 		goods.setGoodsTnm(GagaStringUtil.replace(GagaStringUtil.replace(goods.getGoodsTnm(), "&lt;", "<"), "&gt;", ">"));
 		goods.setGoodsSnm1(GagaStringUtil.replace(GagaStringUtil.replace(goods.getGoodsSnm1(), "&lt;", "<"), "&gt;", ">"));
 
-		// 가격, 수수료 승인처리시 
+		// 가격, 수수료 승인처리시
 //		// 가격변경일
 //		if (goods.getCurrPrice() != goods.getCurrPriceOrg()) {
 //			goods.setCurrBprice(goods.getCurrPriceOrg());
@@ -519,7 +518,8 @@ public class TssGoodsService {
 				goodsPriceRes.setSellFeeRate(goods.getSellFeeRate());
 			}
 			goodsPriceRes.setApplyStdt(GagaDateUtil.getTodayDateTime());	//yyyymmddhhmiss
-			goodsPriceRes.setApplyEddt(GagaDateUtil.getTodayDateTime());	//yyyymmddhhmiss   // 수정햬야함
+			int toYear = Integer.parseInt(GagaDateUtil.getToday("yyyy")) + 4;
+			goodsPriceRes.setApplyEddt(toYear +"1231235959");	//yyyymmddhhmiss
 			goodsPriceRes.setCfrmYn("N");
 			goodsPriceRes.setApplyYn("N");
 			goodsPriceRes.setRegNo(goods.getRegNo());
@@ -836,184 +836,42 @@ public class TssGoodsService {
 	}
 
 	/**
-	 * 상품 가격예약 목록 건수
-	 *
-	 * @param goodsSearch
-	 * @return Integer
-	 * @author eskim
-	 * @since 2020. 11. 13
-	 */
-	public int getGoodsPriceResCount(GoodsSearch goodsSearch) {
-		return goodsDao.getGoodsPriceResCount(goodsSearch);
-	}
-
-	/**
-	 * 상품 가격예약 목록
-	 *
-	 * @param goodsSearch
-	 * @return Collection<TsaGoodsResSell>
-	 * @author eskim
-	 * @since 2020. 11. 13
-	 */
-	public Collection<GoodsPriceRes> getGoodsPriceResList(GoodsSearch goodsSearch) {
-		return goodsDao.getGoodsPriceResList(goodsSearch);
-	}
-
-	/**
-	 * 상품 가격예약 등록
+	 * 상품별 옵션 등록 여부 확인
 	 *
-	 * @param goodsPriceRes
-	 * @return void
+	 * @param
+	 * @return
 	 * @author eskim
-	 * @since 2020. 11. 13
+	 * @since 2020. 11. 17
 	 */
-	@Transactional("shopTxnManager")
-	public void createGoodPriceRes(GoodsPriceRes goodsPriceRes) {
-		if (goodsPriceRes.getArrGoodsCd().length <= 0) {
-			throw new IllegalStateException(message.getMessage("FAIL_1001"));
-		}
-		int idx = 0;
-		for (String goodsCd : goodsPriceRes.getArrGoodsCd()) {
-
-			goodsPriceRes.setGoodsCd(goodsCd);
-			goodsPriceRes.setEndGoodsPrice(goodsPriceRes.getArrEndGoodsPrice()[idx]);
-			goodsPriceRes.setRegNo(TssSession.getInfo().getUserNo());
-			goodsPriceRes.setUpdNo(TssSession.getInfo().getUserNo());
-
-			if (goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0) {
-				throw new IllegalStateException("이미 등록된 상품 가격예약이 존재합니다. \n(상품코드 : " + goodsCd + ")");
-			}
-
-			goodsDao.createGoodPriceRes(goodsPriceRes);
+	public int getGoodsOptionCount(Option option) {
 
-			Goods goods = new Goods();
-			goods.setRegNo(TssSession.getInfo().getUserNo());
-			goods.setUpdNo(TssSession.getInfo().getUserNo());
-			goods.setGoodsCd(goodsPriceRes.getGoodsCd());
-			idx++;
-		}
+		return goodsDao.getGoodsOptionCount(option);
 	}
 
 	/**
-	 * 상품 가격예약 저장
+	 * 상품 가격승인관리 목록 건수
 	 *
-	 * @param goodsPriceList
+	 * @param goodsPriceHst
 	 * @return
 	 * @author eskim
-	 * @since 2020. 11. 16
+	 * @since 2020. 11. 26
 	 */
-	@Transactional("shopTxnManager")
-	public void saveGoodsPriceExcelupload(Collection<GoodsPriceRes> goodsPriceList, String excelFilename) {
+	public int getGoodsSupplyPriceCount(GoodsPriceRes goodsPriceHst) {
 
-		String targetPath = GagaFileUtil.getConcatenationPath(env.getProperty("upload.excel.target.path"), "excel");
-		if (goodsPriceList == null || goodsPriceList.isEmpty()) {
-			this.deleteExceluploadFile(targetPath, excelFilename);
-			throw new IllegalStateException(message.getMessage("FAIL_1001"));
-		}
-
-		// 입력값 확인
-		String goodsPriceResvCheck = getGoodsPriceResvCheck(goodsPriceList);
-		if (!"SUCC".equals(goodsPriceResvCheck)) {
-			this.deleteExceluploadFile(targetPath, excelFilename);
-			throw new IllegalStateException(goodsPriceResvCheck);
-		}
-
-		int index = 0;
-		for (GoodsPriceRes goodsPriceRes : goodsPriceList) {
-			goodsPriceRes.setUpdNo(TssSession.getInfo().getUserNo());
-			goodsPriceRes.setRegNo(TssSession.getInfo().getUserNo());
-
-			// 엑셀조회를 위한 SEARCH 테이블 생성
-			SearchData searchData = new SearchData();
-			searchData.setRegNo(goodsPriceRes.getRegNo());
-			searchData.setSearchCd(goodsPriceRes.getGoodsCd());
-			searchData.setDispOrd(index);
-			if (index == 0) {
-				commonService.deleteExceluploadSearCh(searchData);
-			}
-
-			commonService.createExceluploadSearch(searchData);
-
-			goodsDao.createGoodPriceRes(goodsPriceRes);
-
-			index++;
-		}
-	}
-
-	/*
-	 * 상품 가격예약 엑셀조회용 상품 저장 - 입력값 확인
-	 */
-	private String getGoodsPriceResvCheck(Collection<GoodsPriceRes> goodsPriceList) {
-
-		int cnt = 0;
-		for (GoodsPriceRes goodsPriceRes : goodsPriceList) {
-
-			if (StringUtils.isEmpty(goodsPriceRes.getGoodsCd())) {
-				return (cnt + 2) + "행의 상품코드를 확인해주세요";
-			}
-			if (StringUtils.isEmpty(goodsPriceRes.getResGoodsPrice())) {
-				return (cnt + 2) + "행의 예약가격을 확인해주세요.";
-			}
-			if (goodsPriceRes.getResGoodsPrice() <= 0) {
-				return (cnt + 2) + "행의 예약가격을 확인해주세요.";
-			}
-
-			String nowDate = GagaDateUtil.getToday();	//yyyyMMdd
-			SimpleDateFormat dateFormatParser = new SimpleDateFormat("yyyyMMdd");
-			dateFormatParser.setLenient(false);
-			try {
-				dateFormatParser.parse(goodsPriceRes.getApplyStdt());
-			} catch (Exception e) {
-				return (cnt + 2) + "행의 예약시작일을 확인해주세요.";
-			}
-			try {
-				dateFormatParser.parse(goodsPriceRes.getApplyEddt());
-			} catch (Exception e) {
-				return (cnt + 2) + "행의 예약종료일을 확인해주세요.";
-			}
-
-			if (Integer.parseInt(goodsPriceRes.getApplyStdt()) > Integer.parseInt(goodsPriceRes.getApplyEddt())) {
-				return (cnt + 2) + "행의 예약 시작일은 종료일보다 보다 클 수 없습니다.";
-			}
-
-			if (Integer.parseInt(goodsPriceRes.getApplyStdt()) <= Integer.parseInt(nowDate)) {
-				return (cnt + 2) + "행의 예약 시작일자는 현재일자 보다 작거나 같을 수 없습니다.";
-			}
-
-			//정상가와 비교
-			Goods searchGoods = new Goods();
-			searchGoods.setGoodsCd(goodsPriceRes.getGoodsCd());
-			Goods goods = goodsDao.getGoods(searchGoods);
-			if (goods == null) {
-				return (cnt + 2) + "행의 상품코드를 확인해주세요";
-			}
-			if (goods.getListPrice() < goodsPriceRes.getResGoodsPrice()) {
-				return (cnt + 2) + "행의 상품 정상가보다 예약판매가가 더 큽니다.";
-			}
-			if (!"Y".equals(goods.getSelfGoodsYn())) {
-				return (cnt + 2) + "행의 상품은 자사상품이 아닙니다.";
-			}
-
-			if (goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0) {
-				return (cnt + 2) + "행은 이미 등록된 상품 가격예약이 존재합니다. \n(상품코드 : " + goodsPriceRes.getGoodsCd() + ")";
-			}
-
-			cnt++;
-		}
-
-		return "SUCC";
+		return goodsDao.getGoodsSupplyPriceCount(goodsPriceHst);
 	}
 
 	/**
-	 * 상품별 옵션 등록 여부 확인
+	 * 상품 가격승인관리 목록 조회
 	 *
-	 * @param
+	 * @param goodsPriceHst
 	 * @return
 	 * @author eskim
-	 * @since 2020. 11. 17
+	 * @since 2020. 11. 26
 	 */
-	public int getGoodsOptionCount(Option option) {
+	public Collection<GoodsPriceRes> getGoodsSupplyPriceList(GoodsPriceRes goodsPriceHst) {
 
-		return goodsDao.getGoodsOptionCount(option);
+		return goodsDao.getGoodsSupplyPriceList(goodsPriceHst);
 	}
+
 }

+ 12 - 84
style24.scm/src/main/java/com/style24/scm/biz/web/TssGoodsController.java

@@ -634,7 +634,8 @@ public class TssGoodsController extends TssBaseController {
 			supplyCompCd = TssSession.getInfo().getSupplyCompCd();
 		}
 		mav.addObject("supplyCompList", rendererService.getSupplyCompanyList(supplyCompCd, "N"));
-
+		// 사용여부
+		mav.addObject("useYnList", rendererService.getAvailCommonCodeList("G002"));
 		// 상품상태
 		String[] exceptCds = {"G008_00"};
 		mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", exceptCds));
@@ -646,101 +647,28 @@ public class TssGoodsController extends TssBaseController {
 	}
 
 	/**
-	 * 상품 가격예약 목록 조회
+	 * 상품 가격승인관리 목록 조회
 	 *
-	 * @param goodsSearch
-	 * @return GagaMap
+	 * @return
 	 * @author eskim
-	 * @since 2020. 11. 13
+	 * @since 2020. 11. 26
 	 */
-	@PostMapping("/price/reserve/list")
+	@PostMapping("/supply/price/list")
 	@ResponseBody
-	public GagaMap goodsPriceReserveList(@RequestBody GoodsSearch goodsSearch) {
+	public GagaMap getGoodsSupplyPriceList(@RequestBody GoodsPriceRes goodsPriceRes) {
 
 		GagaMap result = new GagaMap();
 
-		// 입점업체담당자는 업체코드 설정
-		if ("G001-B000".equals(TssSession.getInfo().getRoleCd())) {
-			goodsSearch.setSupplyCompCd(TssSession.getInfo().getSupplyCompCd());
-			goodsSearch.setMdNo(TssSession.getInfo().getUserNo().toString());
-		}
 
-		goodsSearch.setRegNo(TssSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
-		goodsSearch.setPageable(new TssPageRequest(goodsSearch.getPageNo() - 1, goodsSearch.getPageSize()));
-		goodsSearch.getPageable().setTotalCount(goodsService.getGoodsPriceResCount(goodsSearch));
+		goodsPriceRes.setRegNo(TssSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
+		goodsPriceRes.setPageable(new TssPageRequest(goodsPriceRes.getPageNo() - 1, goodsPriceRes.getPageSize()));
+		goodsPriceRes.getPageable().setTotalCount(goodsService.getGoodsSupplyPriceCount(goodsPriceRes));
 
-		result.set("pageing", goodsSearch);
-		result.set("goodsPriceResList", goodsService.getGoodsPriceResList(goodsSearch));
+		result.set("pageing", goodsPriceRes);
+		result.set("goodsList", goodsService.getGoodsSupplyPriceList(goodsPriceRes));
 
 		return result;
 	}
 
-	/**
-	 * 상품 가격예약 등록 화면
-	 *
-	 * @return
-	 * @author eskim
-	 * @since 2020. 11. 13
-	 */
-	@GetMapping("/price/reserve/popup/form")
-	@ResponseBody
-	public ModelAndView goodsPriceReserveRegistForm() {
-		ModelAndView mav = new ModelAndView();
-
-		mav.setViewName("goods/GoodsPriceReservePopupForm");
-		return mav;
-	}
-
-	/**
-	 * 상품 가격예약 저장
-	 *
-	 * @param goodsResSell
-	 * @return GagaResponse
-	 * @author eskim
-	 * @since 2020. 11. 13
-	 */
-	@PostMapping("/price/reserve/save")
-	@ResponseBody
-	public GagaResponse saveGoodsPriceRes(@RequestBody GoodsPriceRes goodsPriceRes) {
-		goodsService.createGoodPriceRes(goodsPriceRes);
-		return super.ok(message.getMessage("SUCC_0001"));
-	}
-
-	/**
-	 * 상품 가격예약 변경
-	 *
-	 * @param goods
-	 * @return
-	 * @throws Exception
-	 * @author eskim
-	 * @since 2020. 02. 20
-	 */
-	@PostMapping("/price/excelupload/save")
-	@ResponseBody
-	public GagaResponse saveGoodsPriceResvExcelupload(@RequestBody Goods goods) throws Exception {
-
-		log.info("[saveGoodsPriceResvExcelupload] goods={} ", goods);
-		ObjectMapper mapper = new ObjectMapper();
-
-		String targetPath = GagaFileUtil.getConcatenationPath(env.getProperty("upload.excel.target.path"), "excel");
-		log.info("[saveGoodsPriceResvExcelupload] targetPath={} ", targetPath);
-		// DB 처리 시 사용되는 파라미터명(셀명) 설정
-		String[] cellName = {"goodsCd", "resGoodsPrice", "applyStdt", "applyEddt"};
-
-		Collection<GagaMap> ecxelGoodsList = GagaExcelUtil.getList(GagaFileUtil.getConcatenationPath(targetPath, goods.getExcelFileNm()), 0, cellName, 0);
-
-		Collection<GoodsPriceRes> goodsPriceList = new ArrayList<>();
-		for (GagaMap map : ecxelGoodsList) {
-			GoodsPriceRes goodsPriceRes = mapper.convertValue(map, GoodsPriceRes.class);
-			goodsPriceList.add(goodsPriceRes);
-		}
-
-		goodsService.saveGoodsPriceExcelupload(goodsPriceList, goods.getExcelFileNm());
-
-		// 파일 삭제
-		GagaFileUtil.deleteFile(GagaFileUtil.getConcatenationPath(targetPath, goods.getExcelFileNm()));
-
-		return super.ok("");
-	}
 
 }

+ 84 - 36
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsSupplyPriceForm.html

@@ -22,7 +22,7 @@
 		<!-- 메뉴 설명 -->
 		<div class="infoBox menu-desc">
 		</div>
-		<form id="goodsPriceHstForm" name="goodsPriceHstForm" action="#" th:action="@{'/goods/price/hst/list'}">
+		<form id="goodsPriceHstForm" name="goodsPriceHstForm" action="#" th:action="@{'/goods/supply/price/list'}">
 		<input type="hidden" id="confirmY" name="confirmY">
  		<!-- 패널 영역1 -->
 		<div class="panelStyle" >
@@ -33,7 +33,9 @@
 				<table class="frmStyle">
 					<colgroup>
 						<col width="10%"/>
-						<col width="40%"/>
+						<col width="23%"/>
+						<col width="10%"/>
+						<col width="23%"/>
 						<col width="10%"/>
 						<col/>
 					</colgroup>
@@ -41,7 +43,7 @@
 						<th>업체/브랜드</th>
 						<td>
 							<select name="supplyCompCd" id="supplyCompCd">
-								<option value="" th:if="${sessionInfo.roleCd} != 'A101'">[전체]</option>
+								<option value="" >[전체]</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">
@@ -52,17 +54,24 @@
 						<td>
 							<input type="text" class="w150" name="goodsCd" id="goodsCd" maxlength="50"/>
 						</td>
+						<th>승인여부</th>
+						<td>
+							<select  name="cfrmYn" id="cfrmYn">
+								<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 colspan="3" id="sellTerms"></td>
+						<td colspan="5" 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>&nbsp;&nbsp;&nbsp;&nbsp;
-						<button type="button" class="btn btn-base btn-lg" id="btnConfirmSearch" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">미승인목록 조회</button>
+						<!-- <button type="button" class="btn btn-base btn-lg" id="btnConfirmSearch" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">미승인목록 조회</button> -->
 					</li>
 				</ul>
 			</div>
@@ -73,12 +82,26 @@
 			<!-- 상단버튼 영역  -->
 			<ul class="panelBar">
 				<li class="right">
-					<button type="button" class="btn btn-success btn-lg" id="btnSaveGoodsPriceConfirm" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">승인</button>
+					<!-- <button type="button" class="btn btn-success btn-lg" id="btnSaveGoodsPriceConfirm" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">승인</button> -->
+					검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>&nbsp;
+					쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;
+					<select id="pageSize" name="pageSize">
+						<option value="50" selected="selected">50개씩 보기</option>
+						<option value="100">100개씩 보기</option>
+						<option value="500">500개씩 보기</option>
+						<option value="1000">1000개씩 보기</option>
+					</select>
+					<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
 				</li>
 			</ul>
 			<!-- //상단버튼 영역  -->
 			<!-- 검색결과 영역 -->
 			<div id="gridList" style="width: 100%; height: 550px;" class="ag-theme-balham"></div>
+			<ul class="panelBar">
+				<li class="center">
+					<div class="tablePaging" id="goodsListPagination"></div>
+				</li>
+			</ul>
 			<!-- 검색결과 영역 -->
 		</div>
 		</form>
@@ -94,11 +117,8 @@
 	columnDefs = [
 		{width: 40, minWidth: 40, cellClass: 'text-right', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
 		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
-		{headerName: "등록일", field: "regYmd", width: 90, cellClass: 'text-center',
-			cellRenderer: function(params) {
-				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDD").format("YYYY-MM-DD") : '';
-			}
-		},
+		{headerName: "업체", field: "supplyCompNm" , width: 100, cellClass: 'text-center'},
+		{headerName: "브랜드", field: "brandEnm" , width: 100, cellClass: 'text-center'},
 		{headerName: "상품코드", field: "goodsCd", width: 130, cellClass: 'text-center'
 			,cellRenderer: function(params) {
 				return '<a href="javascript:void(0);">' + params.value + '</a>';
@@ -109,36 +129,45 @@
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
 			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
 		},
-		{headerName: "온라인 판매가", field: "onPrice", width: 120, cellClass: 'text-right'
+		{headerName: "온라인 현재판매가", field: "currPrice", width: 120, cellClass: 'text-right'
 			,valueFormatter: function(params) {return params.value.addComma();}
 		},
-		{headerName: "판매가조정대상금액", field: "gapPrice", width: 140, cellClass: 'text-right'
+		{headerName: "판매가조정대상금액", field: "resGoodsPrice", width: 140, cellClass: 'text-right'
 			,cellRenderer: function(params) {
-				var gapPrice = Number(params.data.onPrice) - Number(params.data.erpPrice);
-				
-				if (gapPrice >= 0){
-					return '<font color="red"> '+ gapPrice.addComma() +'</font>';
+				if (params.data.resGoodsPrice <= 0){
+					return "-";
 				}else{
-					return '<font color="blue"> '+ gapPrice.addComma() +'</font>';
+					var gapPrice = Number(params.data.currPrice) - Number(params.data.resGoodsPrice);
+					
+					if (gapPrice >= 0){
+						return '<font color="red"> '+ params.value.addComma() +'</font>';
+					}else{
+						return '<font color="blue"> '+ params.value.addComma() +'</font>';
+					}
+
 				}
 			}
 		},
-		{headerName: "온라인 판매수수료", field: "onTagPrice", width: 140, cellClass: 'text-right'
+		{headerName: "온라인 판매수수료", field: "goodsSellFeeRate", width: 140, cellClass: 'text-right'
 			,valueFormatter: function(params) {return params.value.addComma();}
 		},
-		{headerName: "판매수수료 조정대상수수료", field: "gapTagPrice", width: 180, cellClass: 'text-right'
+		{headerName: "판매수수료 조정대상수수료", field: "sellFeeRate", width: 180, cellClass: 'text-right'
 			,cellRenderer: function(params) {
-				var gapTagPrice = Number(params.data.onTagPrice) - Number(params.data.erpTagPrice);
-				
-				if (gapTagPrice >= 0){
-					return '<font color="red"> '+ gapTagPrice.addComma() +'</font>';
+				if (gagajf.isNull(params.data.sellFeeRate)){
+					return "-";
 				}else{
-					return '<font color="blue"> '+ gapTagPrice.addComma() +'</font>';
-				}
+					var gapRate = Number(params.data.goodsSellFeeRate) - Number(params.data.sellFeeRate);
+					
+					if (gapRate >= 0){
+						return '<font color="red"> '+ params.data.sellFeeRate +'</font>';
+					}else{
+						return '<font color="blue"> '+ params.data.sellFeeRate +'</font>';
+					}
+				}	
 			}
 		},
-		{headerName: "승인자", field: "applyId", width: 130, cellClass: 'text-center'},
-		{headerName: "승인일자", field: "applyDt" , width: 150, cellClass: 'text-center',
+		{headerName: "승인자", field: "cfrmNm", width: 130, cellClass: 'text-center'},
+		{headerName: "승인일자", field: "cfrmDt" , width: 150, cellClass: 'text-center',
 			cellRenderer: function(params) {
 				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
 			}
@@ -148,7 +177,7 @@
 				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'}
 		
 	];
 	
@@ -216,8 +245,10 @@
 		
 		if(!fnConditionCheck()) return;
 		
-		var formId = "#goodsPriceHstForm";
-		gagaAgGrid.fetch($(formId).prop('action'), gridOptions, formId);
+		//var formId = "#goodsPriceHstForm";
+		//gagaAgGrid.fetch($(formId).prop('action'), gridOptions, formId);
+		gagaPaging.init('goodsPriceHstForm', fnSearchCallBack, 'goodsListPagination', $('#goodsPriceHstForm').find('#pageSize').val());
+		gagaPaging.load($("#goodsPriceHstForm input[name=pageNo]").val());
 	}
 
 	//검색 조건 확인
@@ -239,7 +270,7 @@
 			for (i = 0; i < form.elements.length; i++ ) {
 				var el = form.elements[i];
 				
-				if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "dateGbn")) {
+				if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "dateGbn" && el.name != "pageSize")) {
 					if (!(el.value == null || el.value == "")) {
 						cnt++;
 					}
@@ -257,6 +288,23 @@
 		return true;
 	}
 	
+	var fnSearchCallBack = function(result){
+
+		$('#goodsPriceHstForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		$('#goodsPriceHstForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
+		$('#goodsPriceHstForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+		$('#goodsPriceHstForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+		gridOptions.api.setRowData(result.goodsList);
+		gagaPaging.createPagination(result.pageing.pageable);
+		
+	}
+
+	//페이징
+	$('#goodsPriceHstForm select[name=pageSize]').on('change', function() {
+		$("#goodsPriceHstForm input[name=pageNo]").val('1');
+		fnGoodsPriceHstListSearch('N');
+	});
+	
 	//업체변경시
 	$('#goodsPriceHstForm select[name=supplyCompCd]').on('change', function() {
 		var actionUrl = '/renderer/supplyCompany/brand/list/' + $(this).val();
@@ -324,17 +372,17 @@
 		$("#goodsPriceHstForm").find('#sellTerms').prepend(selectCode);
 		
 		
-		if(sessRoleCd == "G001_A101") {
+		if(sessRoleCd == "G001_B000") {
 			$("#goodsPriceHstForm select[name=supplyCompCd]").val([[${sessionInfo.supplyCompCd}]]);
-			$("#goodsPriceHstForm select[name=supplyCompCd]").attr("disabled", true);
-			$("select[disabled]").addClass("formControl");
+			//$("#goodsPriceHstForm select[name=supplyCompCd]").attr("disabled", true);
+			//$("select[disabled]").addClass("formControl");
 			var actionUrl = '/renderer/brand/AuthBrandlist';
 			cfnCreateCombo(actionUrl, $('#goodsPriceHstForm select[name=brandCd]'), "[전체]");
 		}
 		
 		// Create a agGrid
 		gagaAgGrid.createGrid('gridList', gridOptions);
-
+		
 	});
 
 /*]]>*/