Bladeren bron

입고상품관리 복수상품 조회

eskim 4 jaren geleden
bovenliggende
commit
0c2206acee

+ 5 - 0
src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -3269,6 +3269,11 @@ public class TsaGoodsController extends TsaBaseController {
 
 		GagaMap result = new GagaMap();
 
+		// multi row 검색관련 처리 
+		if (!StringUtils.isBlank(ifIncomelot.getCondition())) {
+			ifIncomelot.setConditionList(ifIncomelot.getCondition().replaceAll("\r", "").trim().split("\n"));
+		}
+		
 		ifIncomelot.setPageable(new TscPageRequest(ifIncomelot.getPageNo() - 1, ifIncomelot.getPageSize()));
 		ifIncomelot.getPageable().setTotalCount(goodsService.getGoodsWmsIncomelotSkuListCount(ifIncomelot));
 

+ 6 - 0
src/main/java/com/style24/persistence/domain/IfIncomelot.java

@@ -1,5 +1,6 @@
 package com.style24.persistence.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.style24.persistence.TscBaseDomain;
 import com.style24.persistence.TscPageRequest;
 
@@ -39,6 +40,11 @@ public class IfIncomelot extends TscBaseDomain {
 	private String goodsCd;
 	private String stDate;
 	private String edDate;
+	
+	private String condition; 
+	
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] conditionList;
 
 	// Pagination
 	private TscPageRequest pageable;

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

@@ -3598,16 +3598,6 @@
 		<if test='alarmYn != null and alarmYn == "N"'>
 		AND IA.INFORM_DT IS NULL
 		</if>
-		<if test='condition != null and condition != "" '>
-		    <choose>
-		        <when test='search != null and search == "searchGoodsNm"'>
-		AND UPPER(G.GOODS_NM) LIKE  CONCAT(UPPER(#{condition}),'%')
-		        </when>
-				<when test='search != null and search == "searchGoodsCd"'>
-		AND G.GOODS_CD LIKE  CONCAT(UPPER(#{condition}),'%')
-				</when>
-		    </choose>
-		</if>
 		<if test='conditionList != null and conditionList.length>0'>
 		    <choose>
 		      <when test='search != null and search == "searchGoodsCd"'>
@@ -4867,9 +4857,13 @@
 		    <if test="brandCd != null and brandCd != ''">
 		    AND B.BRAND_CD = #{brandCd}
 		    </if>
-		    <if test="goodsCd != null and goodsCd != ''">
-		    AND Z.GOODS_CD = #{goodsCd}
-		    </if>
+		    <if test='conditionList != null and conditionList.length>0'>
+		    AND (
+		        <foreach collection="conditionList" item="item" index="index" separator="or">
+		       Z.GOODS_CD LIKE CONCAT(UPPER(#{item}),'%') 
+		        </foreach>
+		     )
+		     </if>
 	</select>
 	
 	<!-- WMS입고단품목록 -->
@@ -4916,9 +4910,13 @@
 		          <if test="brandCd != null and brandCd != ''">
 		          AND B.BRAND_CD = #{brandCd}
 		          </if>
-		          <if test="goodsCd != null and goodsCd != ''">
-		          AND Z.GOODS_CD = #{goodsCd}
-		          </if>
+		          <if test='conditionList != null and conditionList.length>0'>
+		           AND (
+		              <foreach collection="conditionList" item="item" index="index" separator="or">
+		               Z.GOODS_CD LIKE CONCAT(UPPER(#{item}),'%') 
+		              </foreach>
+		           )
+		           </if>
 		            ORDER BY LOTNO, DATEINCOME, SKUCODE
 		          ) Q
 		LIMIT #{pageable.limitStartRow} ,  #{pageable.pageSize}

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

@@ -32,7 +32,7 @@
 				<table class="frmStyle">
 					<colgroup>
 						<col width="10%"/>
-						<col width="40%"/>
+						<col width="70%"/>
 						<col width="10%"/>
 						<col/>
 					</colgroup>
@@ -47,14 +47,14 @@
 								<option value="">[전체]</option>
 							</select>
 						</td>
-						<th>상품코드<em class="required" title="필수"></em></th>
-						<td>
-							<input id="goodsCd" name=goodsCd type="text" class="w150"  maxlength="20"/>
+						<th rowspan="2">상품코드<em class="required" title="필수"></em></th>
+						<td rowspan="2">
+							<textarea class="textareaR2 w100p" name="condition" id="condition"></textarea>
 						</td>
 					</tr>
 					<tr>
 						<th>입고일<em class="required" title="필수"></em></th>
-						<td colspan="3" id="sellTerms"></td>
+						<td id="sellTerms"></td>
 					</tr>
 				</table>
 				<ul class="panelBar">
@@ -190,7 +190,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 != "pageSize" )) {
+				if ($(el).prop("type") == "text" || $(el).prop("type") == "textarea" || ($(el).prop("type") == "select-one"  &&  el.name != "search" && el.name != "pageSize" )) {
 					if (!(el.value == null || el.value == "")) {
 						cnt++;
 					}