فهرست منبع

상품 일괄 상태변경시 확인사항 추가

eskim 5 سال پیش
والد
کامیت
c54581c8d8

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

@@ -795,13 +795,13 @@ public interface TsaGoodsDao {
 	void saveVideoDispLoc(Video video);
 
 	/**
-	 * 상품 사이즈 존재여부 확인
+	 * 상품 옵션 존재여부 확인
 	 *
 	 * @param option
 	 * @return
 	 * @author eskim
 	 * @since 2020. 11. 17
 	 */
-	int getGoodsSizeCount(Option option);
+	int getGoodsOptionCount(Option option);
 
 }

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

@@ -2137,16 +2137,16 @@ public class TsaGoodsService {
 	}
 
 	/**
-	 * 상품별 사이즈 등록 여부 확인
+	 * 상품별 옵션 등록 여부 확인
 	 *
 	 * @param
 	 * @return
 	 * @author eskim
 	 * @since 2020. 11. 17
 	 */
-	public int getGoodsSizeCount(Option option) {
+	public int getGoodsOptionCount(Option option) {
 
-		return goodsDao.getGoodsSizeCount(option);
+		return goodsDao.getGoodsOptionCount(option);
 	}
 
 }

+ 2 - 2
style24.admin/src/main/java/com/style24/admin/biz/service/TsaStockService.java

@@ -178,8 +178,8 @@ public class TsaStockService {
 			if (!"N".equals(stock.getSoldoutYn()) && !"Y".equals(stock.getSoldoutYn())) {
 				return (cnt + 2) + "행의 품절여부  확인해주세요.";
 			}
-			// 상품코드 사이즈 확인
-			int stockCnt = goodsService.getGoodsSizeCount(stock);
+			// 상품코드 옵션 확인
+			int stockCnt = goodsService.getGoodsOptionCount(stock);
 			if (stockCnt <= 0) {
 				return (cnt + 2) + "행의 상품 사이즈는 존재하지 않습니다.<br/>확인해주세요.";
 			}

+ 29 - 25
style24.admin/src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -44,6 +44,7 @@ import com.style24.persistence.domain.Itemkind;
 import com.style24.persistence.domain.NotiInfo;
 import com.style24.persistence.domain.Notice;
 import com.style24.persistence.domain.NoticeGoods;
+import com.style24.persistence.domain.Option;
 import com.style24.persistence.domain.User;
 import com.style24.persistence.domain.Video;
 import com.style24.persistence.domain.WmsColorMapping;
@@ -590,33 +591,36 @@ public class TsaGoodsController extends TsaBaseController {
 						returnGoods += tmpGoods.getGoodsCd() + ",";
 						continue;
 					}
-					// 사이즈 등록 여부 확인
-//					Stock stock = new Stock();
-//					stock.setGoodsCd(tmpGoods.getGoodsCd());
-//					int stockCnt = goodsService.getGoodsSizeCount(stock);
-//					if (stockCnt <= 0) {
-//						returnGoods += tmpGoods.getGoodsCd() + ",";
-//						continue;
-//					}
+					// 옵션 등록 여부 확인 - 일반상품만 확인
+					if ("G056_N".equals(dataGoods.getGoodsType())){
+						Option stock = new Option();
+						stock.setGoodsCd(tmpGoods.getGoodsCd());
+						int stockCnt = goodsService.getGoodsOptionCount(stock);
+						if (stockCnt <= 0) {
+							returnGoods += tmpGoods.getGoodsCd() + ",";
+							continue;
+						}
+
+					}
 
 					//고시정보
-//					GoodsNotiInfo goodsNotiInfo = new GoodsNotiInfo();
-//					goodsNotiInfo.setGoodsCd(tmpGoods.getGoodsCd());
-//					goodsNotiInfo.setSupplyCompCd(tmpGoods.getSupplyCompCd());
-//					goodsNotiInfo.setNiClsfCd(tmpGoods.getNiClsfCd());
-//					Collection<GoodsNotiInfo> goodsNotiInfoList = goodsService.getGoodsNotiInfoList(goodsNotiInfo);
-//					if (goodsNotiInfoList == null || goodsNotiInfoList.isEmpty()) {
-//						returnGoods += tmpGoods.getGoodsCd() + ",";
-//					} else {
-//						for (GoodsNotiInfo tmpGoodsNotiInfo : goodsNotiInfoList) {
-//							if ("Y".equals(tmpGoodsNotiInfo.getReqYn()) || "Y".equals(tmpGoodsNotiInfo.getDispYn())) {
-//								if (StringUtils.isEmpty(tmpGoodsNotiInfo.getNiContent())) {
-//									returnGoods += tmpGoods.getGoodsCd() + ",";
-//									break;
-//								}
-//							}
-//						}
-//					}
+					GoodsNotiInfo goodsNotiInfo = new GoodsNotiInfo();
+					goodsNotiInfo.setGoodsCd(tmpGoods.getGoodsCd());
+					goodsNotiInfo.setSupplyCompCd(tmpGoods.getSupplyCompCd());
+					goodsNotiInfo.setNiClsfCd(tmpGoods.getNiClsfCd());
+					Collection<GoodsNotiInfo> goodsNotiInfoList = goodsService.getGoodsNotiInfoList(goodsNotiInfo);
+					if (goodsNotiInfoList == null || goodsNotiInfoList.isEmpty()) {
+						returnGoods += tmpGoods.getGoodsCd() + ",";
+					} else {
+						for (GoodsNotiInfo tmpGoodsNotiInfo : goodsNotiInfoList) {
+							if ("Y".equals(tmpGoodsNotiInfo.getReqYn()) || "Y".equals(tmpGoodsNotiInfo.getDispYn())) {
+								if (StringUtils.isEmpty(tmpGoodsNotiInfo.getNiContent())) {
+									returnGoods += tmpGoods.getGoodsCd() + ",";
+									break;
+								}
+							}
+						}
+					}
 				}
 			}
 

+ 5 - 4
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -2851,14 +2851,15 @@
 		     , UPD_DT = NOW()
 	</insert>
 	
-	<!-- 상품 사이즈 존재여부 확인 -->
-	<select id="getGoodsSizeCount" parameterType="Option" resultType="int">
-		/* TsaGoods.getGoodsSizeCount */
+	<!-- 상품 옵션 존재여부 확인 -->
+	<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>
+	
 </mapper>