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

Merge remote-tracking branch 'origin/develop' into card007

card007 4 лет назад
Родитель
Сommit
5c46eacf29

+ 4 - 0
src/main/java/com/style24/persistence/domain/FreeGoods.java

@@ -26,4 +26,8 @@ public class FreeGoods extends TscBaseDomain {
 	private String searchTxt;		// 팝업 검색어
 	private String callbackFn;		// 팝업 리콜펑션명
 	private String brandEnm;		// 브랜드명
+	
+	private String skucode;  
+	private String skumodelno; 
+	
 }

+ 88 - 55
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -3928,61 +3928,94 @@
 	<!-- 사은품 목록 -->
 	<select id="getFreeGoodsList" parameterType="GoodsSearch" resultType="FreeGoods">
 		/* TsaGoods.getFreeGoodsList */
-		SELECT G.PRODUCT_NO
-		     , G.PRODUCT_CODE
-		     , G.GOODS_NM
-		     , G.USE_YN
-		     , G.SYS_IMG_NM
-		     , G.BRAND_CD
-		     , B.BRAND_ENM
-		     , FN_GET_USER_NM(G.REG_NO) AS REG_NM
-		     , DATE_FORMAT(G.REG_DT,'%Y%m%d%H%i%S') AS REG_DT
-		     , FN_GET_USER_NM(G.UPD_NO) AS UPD_NM
-		     , DATE_FORMAT(G.UPD_DT,'%Y%m%d%H%i%S') AS UPD_DT
-		FROM TB_FREE_GOODS G
-		INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
-		INNER JOIN TB_BRAND_SUPPLY BS ON G.BRAND_CD = BS.BRAND_CD
-		WHERE 1 = 1
-		<if test='conditionList != null and conditionList.length>0'>
-		    <choose>
-		      <when test='search != null and search == "searchProductNo"'>
-		AND (
-		      <foreach collection="conditionList" item="item" index="index" separator="or">
-		       G.PRODUCT_NO = #{item}
-		      </foreach>
-		     )
-		      </when>
-		      <when test='search != null and search == "searchGoodsNm"'>
-		AND (
-		      <foreach collection="conditionList" item="item" index="index" separator="or">
-		       UPPER(G.GOODS_NM) LIKE CONCAT(UPPER(#{item}),'%')
-		      </foreach>
-		     )
-		      </when>
-		      <otherwise>
-		AND 1 = 1
-		      </otherwise>
-		    </choose>
-		</if>
-		<if test="supplyCompCd != null and supplyCompCd != ''">
-		AND BS.SUPPLY_COMP_CD = #{supplyCompCd}
-		</if>
-		<if test="multiBrand != null and multiBrand != ''">
-		AND B.BRAND_CD IN
-		    <foreach collection="multiBrand" item="item" index="index"  open="(" close=")" separator=",">
-		#{item}
-		    </foreach>
-		</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>
+		SELECT G.* FROM (
+			SELECT G.PRODUCT_NO
+			     , G.PRODUCT_CODE
+			     , G.GOODS_NM
+			     , G.USE_YN
+			     , G.SYS_IMG_NM
+			     , G.BRAND_CD
+			     , B.BRAND_ENM
+			     , FN_GET_USER_NM(G.REG_NO) AS REG_NM
+			     , DATE_FORMAT(G.REG_DT,'%Y%m%d%H%i%S') AS REG_DT
+			     , FN_GET_USER_NM(G.UPD_NO) AS UPD_NM
+			     , DATE_FORMAT(G.UPD_DT,'%Y%m%d%H%i%S') AS UPD_DT
+			     , (SELECT MAX(SKUCODE) FROM TB_IF_INCOMELOTITEM INC WHERE INC.PRODUCTNO = G.PRODUCT_NO ) AS SKUCODE
+			     , (SELECT MAX(SKUMODELNO) FROM TB_IF_INCOMELOTITEM INC WHERE INC.PRODUCTNO = G.PRODUCT_NO ) AS SKUMODELNO
+			FROM TB_FREE_GOODS G
+			INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
+			INNER JOIN TB_BRAND_SUPPLY BS ON G.BRAND_CD = BS.BRAND_CD
+			WHERE 1 = 1
+			<if test='conditionList != null and conditionList.length>0'>
+			    <choose>
+			      <when test='search != null and search == "searchProductNo"'>
+			AND (
+			      <foreach collection="conditionList" item="item" index="index" separator="or">
+			       G.PRODUCT_NO = #{item}
+			      </foreach>
+			     )
+			      </when>
+			      <when test='search != null and search == "searchGoodsNm"'>
+			AND (
+			      <foreach collection="conditionList" item="item" index="index" separator="or">
+			       UPPER(G.GOODS_NM) LIKE CONCAT(UPPER(#{item}),'%')
+			      </foreach>
+			     )
+			      </when>
+			      <when test='search != null and search == "searchProductCode"'>
+			AND (
+			      <foreach collection="conditionList" item="item" index="index" separator="or">
+			       UPPER(G.PRODUCT_CODE) LIKE CONCAT(UPPER(#{item}),'%')
+			      </foreach>
+			     )
+			      </when>			      
+			      <otherwise>
+			AND 1 = 1
+			      </otherwise>
+			    </choose>
+			</if>
+			<if test="supplyCompCd != null and supplyCompCd != ''">
+			AND BS.SUPPLY_COMP_CD = #{supplyCompCd}
+			</if>
+			<if test="multiBrand != null and multiBrand != ''">
+			AND B.BRAND_CD IN
+			    <foreach collection="multiBrand" item="item" index="index"  open="(" close=")" separator=",">
+			#{item}
+			    </foreach>
+			</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>
+		) G
+		WHERE 1=1
+			<if test='conditionList != null and conditionList.length>0'>
+			    <choose>
+			      <when test='search != null and search == "searchSkucode"'>
+			AND (
+			      <foreach collection="conditionList" item="item" index="index" separator="or">
+			       G.SKUCODE = #{item}
+			      </foreach>
+			     )
+			      </when>
+			      <when test='search != null and search == "searchSkumodelno"'>
+			AND (
+			      <foreach collection="conditionList" item="item" index="index" separator="or">
+			       UPPER(G.SKUMODELNO) LIKE CONCAT(UPPER(#{item}),'%')
+			      </foreach>
+			     )
+			      </when>
+			      <otherwise>
+			AND 1 = 1
+			      </otherwise>
+			    </choose>
+			</if>		
 		ORDER BY G.PRODUCT_NO DESC
 	</select>
 

+ 14 - 16
src/main/java/com/style24/persistence/mybatis/shop/TsaReview.xml

@@ -15,7 +15,7 @@
 		<if test="goodsCds != null and goodsCds != ''">
 		AND    (
 		        <foreach collection="goodsCds" item="item" index="index" separator="or">
-		        R.GOODS_CD LIKE CONCAT(UPPER(#{item}),'%') 
+		        R.GOODS_CD LIKE CONCAT(UPPER(#{item}),'%')
 		        </foreach>
 		       )
 		</if>
@@ -43,7 +43,7 @@
 		    </if>
 		</if>
 	</select>
-	
+
 	<!--상품평 목록  -->
 	<select id="getReviewList" parameterType="Review" resultType="Review">
 		/* TsaReview.getReviewList */
@@ -77,8 +77,6 @@
 		     , C.CUST_NM                                                  /*고객명*/
 		     , R.ORD_NO                                                   /*주문번호*/
 		     , R.ORD_DTL_NO                                               /*주문상세번호*/
-		     , R.REVIEW_TITLE                                             /*상품평제목*/
-		     , R.REVIEW_CONTENT                                           /*상품평내용*/
 		     , R.SCORE                                                    /*구매평점*/
 		     , R.HEIGHT                                                   /*키*/
 		     , R.WEIGHT                                                   /*몸무게*/
@@ -97,7 +95,7 @@
 		     , R.BPNT_GIVE_YN                                             /*베스트포인트지급여부*/
 		     , R.CONFIRM_YN                                               /*확인여부*/
 		     , FN_GET_USER_NM(R.CONFIRM_UNO)            AS CONFIRM_UNM    /*확인자명*/
-		     , DATE_FORMAT(R.CONFIRM_DT,'%Y%m%d%H%i%S') AS CONFIRM_DT     /*확인일시*/ 
+		     , DATE_FORMAT(R.CONFIRM_DT,'%Y%m%d%H%i%S') AS CONFIRM_DT     /*확인일시*/
 		     , R.ADM_RPL                                                  /*관리자댓글*/
 		     , FN_GET_USER_NM(R.ADM_RPL_REG_NO)         AS ADM_RPL_REG_NM /*관리자댓글작성자명*/
 		     , DATE_FORMAT(R.ADM_RPL_DT,'%Y%m%d%H%i%S') AS ADM_RPL_DT     /*관리자댓글작성일시*/
@@ -110,7 +108,7 @@
 		<if test="goodsCds != null and goodsCds != ''">
 		AND    (
 		        <foreach collection="goodsCds" item="item" index="index" separator="or">
-		        R.GOODS_CD LIKE CONCAT(UPPER(#{item}),'%') 
+		        R.GOODS_CD LIKE CONCAT(UPPER(#{item}),'%')
 		        </foreach>
 		       )
 		</if>
@@ -140,7 +138,7 @@
 		ORDER  BY R.REG_DT DESC
 		LIMIT #{pageable.limitStartRow}, #{pageable.pageSize}
 	</select>
-	
+
 	<!--상품평 정보 -->
 	<select id="getReview" parameterType="Integer" resultType="Review">
 		/* TsaReview.getReview */
@@ -177,7 +175,7 @@
 		     , R.BPNT_GIVE_YN                                                  /*베스트포인트지급여부*/
 		     , R.CONFIRM_YN                                                    /*확인여부*/
 		     , FN_GET_USER_NM(R.CONFIRM_UNO)                 AS CONFIRM_UNM    /*확인자명*/
-		     , DATE_FORMAT(R.CONFIRM_DT,'%Y-%m-%d %H:%i:%S') AS CONFIRM_DT     /*확인일시*/ 
+		     , DATE_FORMAT(R.CONFIRM_DT,'%Y-%m-%d %H:%i:%S') AS CONFIRM_DT     /*확인일시*/
 		     , R.ADM_RPL                                                       /*관리자댓글*/
 		     , FN_GET_USER_NM(R.ADM_RPL_REG_NO)              AS ADM_RPL_REG_NM /*관리자댓글작성자명*/
 		     , DATE_FORMAT(R.ADM_RPL_DT,'%Y-%m-%d %H:%i:%S') AS ADM_RPL_DT     /*관리자댓글작성일시*/
@@ -199,7 +197,7 @@
 		AND    R.GOODS_CD = G.GOODS_CD
 		AND    R.REVIEW_SQ = #{reviewSq}
 	</select>
-	
+
 	<!--상품평 첨부파일 목록 -->
 	<select id="getReviewAttachList" parameterType="Integer" resultType="ReviewAttach">
 		/* TsaReview.getReviewAttachList */
@@ -215,7 +213,7 @@
 		AND    DEL_YN = 'N' /*삭제안된넘*/
 		ORDER  BY FILE_GB DESC, RV_ATC_SQ
 	</select>
-	
+
 	<!-- 상품평 관리자댓글 저장 -->
 	<update id="updateReviewUserReply" parameterType="Review">
 		/* TsaReview.updateReviewUserReply */
@@ -228,7 +226,7 @@
 		WHERE  REVIEW_SQ = #{reviewSq}
 		AND    RPL_CFM_YN = 'N' /*고객이 관리자댓글 확인을 안한넘*/
 	</update>
-	
+
 	<!-- 동영상상품평포인트 생성-->
 	<insert id="createVideoReviewPoint" parameterType="Review" keyProperty="custPntSq">
 		/* TsaReview.createVideoReviewPoint */
@@ -261,7 +259,7 @@
 		AND    CONFIRM_YN = 'N' /*동영상노출처리안한넘*/
 		AND    PNT_GIVE_STAT = 'G043_10' /*포인트지급예정 상태*/
 	</insert>
-	
+
 	<!-- 동영상상품평포인트이력 생성-->
 	<insert id="createVideoReviewPointHistory" parameterType="Review">
 		/* TsaReview.createVideoReviewPointHistory */
@@ -304,7 +302,7 @@
 		AND    CONFIRM_YN = 'N' /*동영상노출처리안한넘*/
 		AND    PNT_GIVE_STAT = 'G043_10' /*포인트지급예정 상태*/
 	</insert>
-	
+
 	<!-- 상품평 동영상 노출 처리 -->
 	<update id="updateVideoReviewDisplay" parameterType="Review">
 		/* TsaReview.updateVideoReviewDisplay */
@@ -318,7 +316,7 @@
 		AND    CONFIRM_YN = 'N' /*동영상노출처리안한넘*/
 		AND    PNT_GIVE_STAT = 'G043_10' /*포인트지급예정 상태*/
 	</update>
-	
+
 	<!-- 베스트상품평포인트 생성-->
 	<insert id="createBestReviewPoint" parameterType="Review" keyProperty="custPntSq">
 		/* TsaReview.createBestReviewPoint */
@@ -392,7 +390,7 @@
 		WHERE  REVIEW_SQ = #{reviewSq}
 		AND    BEST_YN = 'N' /*베스트상품이아닌넘. 베스트여부 값이 변경될 수도 있으므로 체크로직 추가*/
 	</insert>
-	
+
 	<!-- 베스트상품평 선정 처리 -->
 	<update id="updateBestReviewSelection" parameterType="Review">
 		/* TsaReview.updateBestReviewSelection */
@@ -405,5 +403,5 @@
 		WHERE  REVIEW_SQ = #{reviewSq}
 		AND    BEST_YN = 'N' /*베스트상품이아닌넘. 베스트여부 값이 변경될 수도 있으므로 체크로직 추가*/
 	</update>
-	
+
 </mapper>

+ 11 - 6
src/main/webapp/WEB-INF/views/goods/GoodsFreeGoodsForm.html

@@ -47,9 +47,11 @@
 						<th rowspan="2">키워드</th>
 						<td rowspan="2">
 							<select name="search" id="search">
-								<option value="searchProductNo">사은품번호</option>
+								<option value="searchProductNo">WMS상품번호</option>
 								<option value="searchGoodsNm">사은품명</option>
-								<option value="searchGoodsNum">품번</option>
+								<option value="searchProductCode">WMS상품코드</option>
+								<option value="searchSkucode">SKUCODE</option>
+								<option value="searchSkumodelno">SKUMODELNO</option>
 							</select>
 							<textarea class="textareaR2 w130" name="condition" id="condition"></textarea>
 						</td>
@@ -95,9 +97,9 @@
 						<td colspan='10'>사은품 상세</td>
 					</tr>
 					<tr>
-						<th>사은품번호</th>
+						<th>WMS상품번호</th>
 						<td>
-							<input class="w130" type="text"  name="productNo"  data-valid-name="사은품번호"  readonly="readonly"/>
+							<input class="w130" type="text"  name="productNo"  data-valid-name="wms상품번호"  readonly="readonly"/>
 						</td>
 						<th>품번</th>
 						<td>
@@ -155,13 +157,16 @@
 			}
 		},
 		{headerName: "브랜드", field: "brandEnm", width: 130, cellClass: 'text-center'},
-		{headerName: "사은품 상품번호", field: "productNo", width: 120, cellClass: 'text-center',
+		{headerName: "wms상품번호", field: "productNo", width: 120, cellClass: 'text-center',
 			cellRenderer: function(params) {
 				return '<a href="javascript:void(0);">' + params.value + '</a>';
 			}
 		},
-		{headerName: "사은품 품번", field: "goodsNum", width: 150, cellClass: 'text-center'},
+		{headerName: "WMS상품코드", field: "productCode", width: 100, cellClass: 'text-center'},
+		{headerName: "SKUCODE", field: "skucode", width: 90, cellClass: 'text-center'},		
  		{headerName: "사은품명", field: "goodsNm", width: 300, cellClass: 'text-left'},
+ 		{headerName: "SKUMODELNO", field: "skumodelno", width: 100, cellClass: 'text-left'},
+
 		{headerName: "사용여부", field: "useYn", width: 100, cellClass: 'text-center'},
 		{headerName: "등록일자", field: "regDt", width: 150, cellClass: 'text-center',
 			cellRenderer: function(params) {