Procházet zdrojové kódy

상품고시정보조회 구현

gagamel před 5 roky
rodič
revize
9eaa585ba6

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

@@ -1102,5 +1102,22 @@ public interface TsaGoodsDao {
 	 */
 	public void saveGoodsWmsIncomelot(WmsGoods wmsGoods);
 
+	/**
+	 * 고시분류별 상품고시정보 목록
+	 * @param goodsNotiInfo - 상품고시정보
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 21
+	 */
+	public Collection<GoodsNotiInfo> getGoodsNotiInfoListByNotiClsf(GoodsNotiInfo goodsNotiInfo);
+
+	/**
+	 * 고시분류 칼럼 정보
+	 * @param niClsfCd - 고시분류코드
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 21
+	 */
+	GoodsNotiInfo getNotiClsfColumnInfo(String niClsfCd);
 
 }

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

@@ -99,7 +99,6 @@ public class TsaGoodsService {
 	@Autowired
 	private NaverLowestPriceApi naverLowestPriceApi;
 
-
 	@Autowired
 	private ObjectMapper mapper;
 
@@ -143,7 +142,7 @@ public class TsaGoodsService {
 		for (Itemkind itemkind : itemkindList) {
 			itemkind.setRegNo(TsaSession.getInfo().getUserNo());
 			itemkind.setUpdNo(TsaSession.getInfo().getUserNo());
-			itemkind.setItemkindNm(GagaStringUtil.replace(GagaStringUtil.replace(itemkind.getItemkindNm(), "&lt;", "<"),"&gt;", ">"));
+			itemkind.setItemkindNm(GagaStringUtil.replace(GagaStringUtil.replace(itemkind.getItemkindNm(), "&lt;", "<"), "&gt;", ">"));
 			//itemkind.setItemkindEnm(GagaStringUtil.replace(GagaStringUtil.replace(itemkind.getItemkindEnm(), "&lt;", "<"),"&gt;", ">"));
 			goodsDao.saveItemkindInfo(itemkind);
 		}
@@ -234,7 +233,7 @@ public class TsaGoodsService {
 
 		for (NotiInfo notiInfo : notiInfoList) {
 			if (!StringUtils.isBlank(notiInfo.getNiContent())) {
-				notiInfo.setNiContent(GagaStringUtil.replace(GagaStringUtil.replace(notiInfo.getNiContent(),"&lt;", "<"),"&gt;", ">"));
+				notiInfo.setNiContent(GagaStringUtil.replace(GagaStringUtil.replace(notiInfo.getNiContent(), "&lt;", "<"), "&gt;", ">"));
 			}
 			notiInfo.setRegNo(TsaSession.getInfo().getUserNo());
 			notiInfo.setUpdNo(TsaSession.getInfo().getUserNo());
@@ -376,11 +375,11 @@ public class TsaGoodsService {
 		if ("Y".equals(goodsSearch.getImageViewYn())) {
 			// 헤더 title 설정
 			String[] listTitles = {"이미지", "상품코드", "업체명", "브랜드명", "상품명", "품목", "재고", "상품상태", "스타일년도", "시즌",
-				"정상가", "판매가", "할인율", "가격변경일", "ERP재고연동여부", "정상이월구분", "반품가능 여부","승인일시"};
+				"정상가", "판매가", "할인율", "가격변경일", "ERP재고연동여부", "정상이월구분", "반품가능 여부", "승인일시"};
 
 			// DB 처리 시 사용되는 파라미터명(셀명) 설정
 			String[] cellNames = {"SYS_IMG_NM", "GOODS_CD", "SUPPLY_COMP_CD", "BRAND_GRP_NM", "GOODS_NM", "ITEMKIND_NM",
-				"STOCK_QTY_SUM", "GOODS_STAT", "STYLE_YEAR", "SEASON_CD",  "LIST_PRICE", "CURR_PRICE",
+				"STOCK_QTY_SUM", "GOODS_STAT", "STYLE_YEAR", "SEASON_CD", "LIST_PRICE", "CURR_PRICE",
 				"DC_RATE", "PRICE_UPD_DT", "ERP_STOCK_LINK_YN", "FORMAL_GB", "RETURNABLE_YN", "FRST_CFRM_DT"};
 
 			String[] cellTypes = {GagaExcelConstants.CellType.IMAGE.name(),
@@ -398,8 +397,8 @@ public class TsaGoodsService {
 			Collection<GagaMap> dataList = goodsDao.getGoodsInfoExcelList(goodsSearch); // map형식으로 조회
 			if (dataList != null && !dataList.isEmpty()) {
 				for (GagaMap gagaMap : dataList) {
-					if (!StringUtils.isBlank(gagaMap.get("SYS_IMG_NM").toString()) ) {
-						gagaMap.set("SYS_IMG_NM", targetPath + '/' +  gagaMap.get("SYS_IMG_NM").toString());
+					if (!StringUtils.isBlank(gagaMap.get("SYS_IMG_NM").toString())) {
+						gagaMap.set("SYS_IMG_NM", targetPath + '/' + gagaMap.get("SYS_IMG_NM").toString());
 					}
 				}
 			}
@@ -413,22 +412,22 @@ public class TsaGoodsService {
 		} else {
 			// 헤더 title 설정
 			String[] listTitles = {"상품코드", "업체명", "브랜드명", "상품명", "품목", "재고", "상품상태", "스타일년도",
-				"시즌",  "정상가", "판매가", "할인율", "가격변경일", "ERP재고연동여부", "정상이월구분", "반품가능 여부", "승인일시"};
+				"시즌", "정상가", "판매가", "할인율", "가격변경일", "ERP재고연동여부", "정상이월구분", "반품가능 여부", "승인일시"};
 
 			// DB 처리 시 사용되는 파라미터명(셀명) 설정
 			String[] cellNames = {"GOODS_CD", "SUPPLY_COMP_CD", "BRAND_GRP_NM", "GOODS_NM", "ITEMKIND_NM", "STOCK_QTY_SUM", "GOODS_STAT", "STYLE_YEAR",
-				"SEASON_CD",  "LIST_PRICE", "CURR_PRICE", "DC_RATE", "PRICE_UPD_DT", "ERP_STOCK_LINK_YN", "FORMAL_GB", "RETURNABLE_YN", "FRST_CFRM_DT"};
+				"SEASON_CD", "LIST_PRICE", "CURR_PRICE", "DC_RATE", "PRICE_UPD_DT", "ERP_STOCK_LINK_YN", "FORMAL_GB", "RETURNABLE_YN", "FRST_CFRM_DT"};
 
 			String[] cellTypes = {
-			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
-			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
-			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
-			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
-			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
-			GagaExcelConstants.CellType.CHAR_RIGHT.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
-			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
-			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
-			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name()};
+				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
+				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
+				GagaExcelConstants.CellType.CHAR_RIGHT.name(), GagaExcelConstants.CellType.CHAR_RIGHT.name(),
+				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+				GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name()};
 
 			Collection<GagaMap> dataList = goodsDao.getGoodsInfoExcelList(goodsSearch);
 
@@ -540,7 +539,7 @@ public class TsaGoodsService {
 			for (GoodsDesc tmpGoodsDesc : goodsDescList) {
 				goodsDescSb.append(tmpGoodsDesc.getGoodsDesc());
 			}
-		}else {
+		} else {
 			goodsDescSb.append("");
 		}
 		return goodsDescSb.toString();
@@ -984,7 +983,7 @@ public class TsaGoodsService {
 				goods.setListPrice(newRepGoodsPrice);
 				goods.setDcRate(0);
 				goods.setChDataYn("Y");
-			}else {
+			} else {
 				if (goods.getCurrPrice() != goods.getCurrPriceOrg()) {
 					goods.setCurrBprice(goods.getCurrPriceOrg());
 					goods.setListPrice(goods.getCurrPrice());
@@ -992,7 +991,7 @@ public class TsaGoodsService {
 				}
 			}
 
-		}else {
+		} else {
 			// 가격변경일
 			if (goods.getCurrPrice() != goods.getCurrPriceOrg()) {
 				goods.setCurrBprice(goods.getCurrPriceOrg());
@@ -1087,11 +1086,11 @@ public class TsaGoodsService {
 			goodsOrderGrade.setGoodsCd(goods.getGoodsCd());
 			goodsOrderGrade.setRegNo(TsaSession.getInfo().getUserNo());
 			goodsDao.deleteGoodsCustGrade(goodsOrderGrade);
-			for(String custGrade : goods.getGoodsOrderGrade()) {
+			for (String custGrade : goods.getGoodsOrderGrade()) {
 				goodsOrderGrade.setCustGrade(custGrade);
 				goodsDao.createGoodsCustGrade(goodsOrderGrade);
 			}
-		}else {
+		} else {
 			Goods goodsOrderGrade = new Goods();
 			goodsOrderGrade.setGoodsCd(goods.getGoodsCd());
 			goodsOrderGrade.setRegNo(TsaSession.getInfo().getUserNo());
@@ -1288,7 +1287,6 @@ public class TsaGoodsService {
 		}
 	}
 
-
 	/**
 	 * 상품 사이즈 옵션정보 이력 생성
 	 *
@@ -1462,7 +1460,7 @@ public class TsaGoodsService {
 			if (StringUtils.isBlank(extendGoods.getBrandCd())) {
 				throw new IllegalStateException(message.getMessage("구성상품 중 " + goodsCompose.getCompsGoodsCd() + " 상품 정보를 확인해 주세요."));
 			}
-			listPriceSum += extendGoods.getListPrice() * goodsCompose.getQty() ;
+			listPriceSum += extendGoods.getListPrice() * goodsCompose.getQty();
 			currPriceSum += goodsCompose.getCompsCurrPrice(); // 입력값
 
 			if ("Y".equals(goodsCompose.getBaseYn())) {
@@ -1811,7 +1809,7 @@ public class TsaGoodsService {
 			goodsResSell.setRegNo(TsaSession.getInfo().getUserNo());
 			goodsResSell.setUpdNo(TsaSession.getInfo().getUserNo());
 
-			if(goodsDao.getGoodsResSellDupChkCount(goodsResSell) > 0 ) {
+			if (goodsDao.getGoodsResSellDupChkCount(goodsResSell) > 0) {
 				throw new IllegalStateException("이미 등록된 상품예약판매가 존재합니다. \n(상품코드 : " + goodsCd + ")");
 			}
 
@@ -1993,7 +1991,7 @@ public class TsaGoodsService {
 			goodsPriceRes.setRegNo(TsaSession.getInfo().getUserNo());
 			goodsPriceRes.setUpdNo(TsaSession.getInfo().getUserNo());
 
-			if(goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0 ) {
+			if (goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0) {
 				throw new IllegalStateException("이미 등록된 상품 가격예약이 존재합니다. \n(상품코드 : " + goodsCd + ")");
 			}
 
@@ -2100,12 +2098,12 @@ public class TsaGoodsService {
 			SimpleDateFormat dateFormatParser = new SimpleDateFormat("yyyyMMddHH");
 			dateFormatParser.setLenient(false);
 			try {
-				dateFormatParser.parse(goodsPriceRes.getApplyStdt() );
+				dateFormatParser.parse(goodsPriceRes.getApplyStdt());
 			} catch (Exception e) {
 				return (cnt + 2) + "행의 예약시작일시을 확인해주세요.";
 			}
 			try {
-				dateFormatParser.parse(goodsPriceRes.getApplyEddt() );
+				dateFormatParser.parse(goodsPriceRes.getApplyEddt());
 			} catch (Exception e) {
 				return (cnt + 2) + "행의 예약종료일시을 확인해주세요.";
 			}
@@ -2132,18 +2130,16 @@ public class TsaGoodsService {
 				return (cnt + 2) + "행의 상품은 자사상품이 아닙니다.";
 			}
 
-			if(goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0 ) {
+			if (goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0) {
 				return (cnt + 2) + "행은 이미 등록된 상품 가격예약이 존재합니다. \n(상품코드 : " + goodsPriceRes.getGoodsCd() + ")";
 			}
 
-
 			cnt++;
 		}
 
 		return "SUCC";
 	}
 
-
 	/**
 	 * 상품 동영상 목록 조회
 	 *
@@ -2186,18 +2182,18 @@ public class TsaGoodsService {
 	public void saveGoodsVideo(Video video) {
 		video.setRegNo(TsaSession.getInfo().getUserNo());
 		video.setUpdNo(TsaSession.getInfo().getUserNo());
-		if (video.getVideoSq() == null ||  video.getVideoSq() == 0) {
+		if (video.getVideoSq() == null || video.getVideoSq() == 0) {
 
 			String videoSeq = goodsDao.getVideoSeq(video);
 			if (StringUtils.isBlank(videoSeq)) {
 				goodsDao.createVideo(video);
-			}else {
+			} else {
 				//video.setVideoSq(Integer.parseInt(videoSeq));  //why?
 				//goodsDao.updateVideo(video);
 			}
 		}
 
-		if (video.getVideoSq() == null ||  video.getVideoSq() == 0) {
+		if (video.getVideoSq() == null || video.getVideoSq() == 0) {
 			String videoSeq = goodsDao.getVideoSeq(video);
 
 			if (!StringUtils.isBlank(videoSeq)) {
@@ -2295,7 +2291,6 @@ public class TsaGoodsService {
 			goodsPriceRes.setRegNo(TsaSession.getInfo().getUserNo());
 			goodsPriceRes.setUpdNo(TsaSession.getInfo().getUserNo());
 
-
 			Goods goods = new Goods();
 			goods.setRegNo(TsaSession.getInfo().getUserNo());
 			goods.setUpdNo(TsaSession.getInfo().getUserNo());
@@ -2362,7 +2357,7 @@ public class TsaGoodsService {
 		}
 
 		// 2. 일 최초 조회이면 테이블 삭제
-		String regYmd  = goodsDao.getGoodsNaverLowestPriceReqYmd();
+		String regYmd = goodsDao.getGoodsNaverLowestPriceReqYmd();
 		if (!StringUtils.isBlank(regYmd) && !regYmd.equals(GagaDateUtil.getToday())) {
 			goodsDao.deleteGoodsNaverLowestPrice();
 		}
@@ -2393,7 +2388,7 @@ public class TsaGoodsService {
 				log.info("saveGoodsNaverLowestPrice  22 =  {}", GagaDateUtil.getTodayDateTime());
 				NaverLowestPrice naverLowestPrice = naverLowestPriceApi.getLowestPrice(goodsCd);
 
-				log.info("[saveGoodsNaverLowestPrice] naverLowestPrice= {}",naverLowestPrice);
+				log.info("[saveGoodsNaverLowestPrice] naverLowestPrice= {}", naverLowestPrice);
 				if (naverLowestPrice != null) {
 					GoodsNaverLowestPrice goodsNaverLowestPrice = new GoodsNaverLowestPrice();
 					goodsNaverLowestPrice.setReqYmd(GagaDateUtil.getToday());
@@ -2496,7 +2491,8 @@ public class TsaGoodsService {
 
 			int idx = 0;
 			for (AdKeywordGoods adKeywordGoods : adKeywordGoodsList) {
-				if (idx == 0) goodsDao.deleteAdKeywordGoods(adKeywordGoods); // 전체 상품 삭제
+				if (idx == 0)
+					goodsDao.deleteAdKeywordGoods(adKeywordGoods); // 전체 상품 삭제
 				adKeywordGoods.setAdKeywordSq(adKeyword.getAdKeywordSq());
 				adKeywordGoods.setRegNo(TsaSession.getInfo().getUserNo());
 				adKeywordGoods.setUpdNo(TsaSession.getInfo().getUserNo());
@@ -2550,7 +2546,6 @@ public class TsaGoodsService {
 		return goodsDao.getReinboundInformList(goodsSearch);
 	}
 
-
 	/**
 	 * 재입고알림 발송 처리
 	 *
@@ -2626,7 +2621,7 @@ public class TsaGoodsService {
 	 * @since 2020. 12. 21
 	 */
 	@Transactional("shopTxnManager")
-	public void saveGoodsImageList(Collection<GoodsImg> goodsImgList){
+	public void saveGoodsImageList(Collection<GoodsImg> goodsImgList) {
 		int index = 0;
 		for (GoodsImg goodsImg : goodsImgList) {
 			// 상품이미지 전체 삭제
@@ -2662,7 +2657,7 @@ public class TsaGoodsService {
 	 * @since 2020. 12. 21
 	 */
 	@Transactional("shopTxnManager")
-	public void updateFreeGoods(FreeGoods freeGoods){
+	public void updateFreeGoods(FreeGoods freeGoods) {
 
 		freeGoods.setUpdNo(TsaSession.getInfo().getUserNo());
 		goodsDao.updateFreeGoods(freeGoods);
@@ -2699,9 +2694,9 @@ public class TsaGoodsService {
 	 * @since 2021. 01. 05
 	 */
 	@Transactional("shopTxnManager")
-	public void saveFreeGoods(Collection<WmsGoods> wmsGoodsList){
+	public void saveFreeGoods(Collection<WmsGoods> wmsGoodsList) {
 
-		for (WmsGoods wmsGoods: wmsGoodsList) {
+		for (WmsGoods wmsGoods : wmsGoodsList) {
 			FreeGoods freeGoods = new FreeGoods();
 			freeGoods.setProductNo(wmsGoods.getProductNo());
 			freeGoods.setProductCode(wmsGoods.getProductCode());
@@ -2721,4 +2716,26 @@ public class TsaGoodsService {
 		}
 	}
 
+	/**
+	 * 고시분류별 상품고시정보 목록
+	 * @param goodsNotiInfo - 상품고시정보
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 21
+	 */
+	public Collection<GoodsNotiInfo> getGoodsNotiInfoListByNotiClsf(GoodsNotiInfo goodsNotiInfo) {
+		return goodsDao.getGoodsNotiInfoListByNotiClsf(goodsNotiInfo);
+	}
+
+	/**
+	 * 고시분류 칼럼 정보
+	 * @param niClsfCd - 고시분류코드
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 21
+	 */
+	public GoodsNotiInfo getNotiClsfColumnInfo(String niClsfCd) {
+		return goodsDao.getNotiClsfColumnInfo(niClsfCd);
+	}
+
 }

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

@@ -488,7 +488,6 @@ public class TsaGoodsController extends TsaBaseController {
 	@ResponseBody
 	public GagaMap getGoodsList(@RequestBody GoodsSearch goodsSearch) {
 
-
 		GagaMap result = new GagaMap();
 
 		// 입점업체담당자는 업체코드 설정
@@ -513,7 +512,7 @@ public class TsaGoodsController extends TsaBaseController {
 		goodsSearch.getPageable().setTotalCount(goodsService.getGoodsListCount(goodsSearch));
 
 		// 다다익선 업체+브랜드 상품조회시 사용
-		if("N".equals(goodsSearch.getPageingYn())){
+		if ("N".equals(goodsSearch.getPageingYn())) {
 			goodsSearch.setPageable(null);
 		}
 
@@ -1056,7 +1055,7 @@ public class TsaGoodsController extends TsaBaseController {
 				String brandYmdDir = GagaFileUtil.getConcatenationPath(brandDir, GagaDateUtil.getToday());	//디비 저장용
 
 				File uniqueFile = GagaFileUtil.getUniqueFile(new File(GagaFileUtil.getConcatenationPath(goodsUploadPath, newFilename)));
-				File newFile = new File(GagaFileUtil.getConcatenationPath(goodsUploadPath,  uniqueFile.getName()));
+				File newFile = new File(GagaFileUtil.getConcatenationPath(goodsUploadPath, uniqueFile.getName()));
 				log.info("newFile.getPath(): {}", newFile.getPath());
 
 				// resizing 처리 시 오류가 발생할 경우 삭제하기 위해 설정
@@ -1078,11 +1077,11 @@ public class TsaGoodsController extends TsaBaseController {
 				}
 
 				goodsImg.setDispOrd(index++);
-				goodsImg.setOrgImgNm(GagaFileUtil.getConcatenationPath(brandYmdDir,newFile.getName()));
-				goodsImg.setSysImgNm(GagaFileUtil.getConcatenationPath(brandYmdDir,newFile.getName()));
+				goodsImg.setOrgImgNm(GagaFileUtil.getConcatenationPath(brandYmdDir, newFile.getName()));
+				goodsImg.setSysImgNm(GagaFileUtil.getConcatenationPath(brandYmdDir, newFile.getName()));
 			} else {
-				goodsImg.setOrgImgNm(GagaFileUtil.getConcatenationPath(goodsImg.getSysImgUrl() ,goodsImg.getSysImgNm()));
-				goodsImg.setSysImgNm(GagaFileUtil.getConcatenationPath(goodsImg.getSysImgUrl() ,goodsImg.getSysImgNm()));
+				goodsImg.setOrgImgNm(GagaFileUtil.getConcatenationPath(goodsImg.getSysImgUrl(), goodsImg.getSysImgNm()));
+				goodsImg.setSysImgNm(GagaFileUtil.getConcatenationPath(goodsImg.getSysImgUrl(), goodsImg.getSysImgNm()));
 				goodsImg.setDispOrd(index++);
 			}
 		}
@@ -2411,6 +2410,37 @@ public class TsaGoodsController extends TsaBaseController {
 		return mav;
 	}
 
+	/**
+	 * 고시분류별 상품고시정보 목록
+	 * @param goodsNotiInfo - 상품고시정보
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 21
+	 */
+	@PostMapping("/noti/info/list")
+	@ResponseBody
+	public Collection<GoodsNotiInfo> getGoodsNotiInfoListByNotiClsf(@RequestBody GoodsNotiInfo goodsNotiInfo) {
+		// multi row 검색관련 처리
+		if (!StringUtils.isBlank(goodsNotiInfo.getGoodsCd())) {
+			goodsNotiInfo.setGoodsCds(goodsNotiInfo.getGoodsCd().replaceAll("\r", "").split("\n"));
+		}
+
+		return goodsService.getGoodsNotiInfoListByNotiClsf(goodsNotiInfo);
+	}
+
+	/**
+	 * 고시분류의 칼럼 목록
+	 * @param niClsfCd - 고시분류코드
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 21
+	 */
+	@GetMapping("/noti/info/column/{niClsfCd}")
+	@ResponseBody
+	public GoodsNotiInfo getNotiClsfColumnInfo(@PathVariable String niClsfCd) {
+		return goodsService.getNotiClsfColumnInfo(niClsfCd);
+	}
+
 	/**
 	 * 사은품 화면
 	 * @return
@@ -2483,7 +2513,7 @@ public class TsaGoodsController extends TsaBaseController {
 	public GagaResponse updateFreeGoods(@RequestBody FreeGoods freeGoods) {
 
 		if (freeGoods.getNewSysImgNm() != null && !"".equals(freeGoods.getNewSysImgNm())) {
-			String sysImgNm =  freeGoods.getProductNo() + "_" + GagaDateUtil.getTodayDateTime() + "." + org.springframework.util.StringUtils.getFilenameExtension(freeGoods.getNewSysImgNm());
+			String sysImgNm = freeGoods.getProductNo() + "_" + GagaDateUtil.getTodayDateTime() + "." + org.springframework.util.StringUtils.getFilenameExtension(freeGoods.getNewSysImgNm());
 
 			String imgUploadPath = env.getProperty("upload.default.target.path");
 			imgUploadPath = GagaFileUtil.getConcatenationPath(imgUploadPath, "display", "freegoods");

+ 21 - 0
src/main/java/com/style24/persistence/domain/GoodsNotiInfo.java

@@ -1,5 +1,6 @@
 package com.style24.persistence.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.style24.persistence.TscBaseDomain;
 
 import lombok.Data;
@@ -25,4 +26,24 @@ public class GoodsNotiInfo extends TscBaseDomain {
 	private String niItemNm;
 	private String supplyVendorCd;
 
+	// 상품고시정보조회에서 사용
+	private String goodsNm;
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] goodsCds;
+	private String col1;
+	private String col2;
+	private String col3;
+	private String col4;
+	private String col5;
+	private String col6;
+	private String col7;
+	private String col8;
+	private String col9;
+	private String col10;
+	private String col11;
+	private String col12;
+	private String col13;
+	private String col14;
+	private int colCnt;
+
 }

+ 67 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -3782,4 +3782,71 @@
 		WHERE PRODUCT_NO = #{productNo}
 	</update>
 	
+	<!-- 고시분류별 상품고시정보 목록 -->
+	<select id="getGoodsNotiInfoListByNotiClsf" parameterType="GoodsNotiInfo" resultType="GoodsNotiInfo">
+		/* TsaGoods.getGoodsNotiInfoListByNotiClsf */
+		SELECT A.GOODS_CD
+		     , MAX(B.GOODS_NM)                                          AS GOODS_NM
+		     , MAX(CASE WHEN A.RK =  1 THEN A.NI_CONTENT ELSE NULL END) AS COL1
+		     , MAX(CASE WHEN A.RK =  2 THEN A.NI_CONTENT ELSE NULL END) AS COL2
+		     , MAX(CASE WHEN A.RK =  3 THEN A.NI_CONTENT ELSE NULL END) AS COL3
+		     , MAX(CASE WHEN A.RK =  4 THEN A.NI_CONTENT ELSE NULL END) AS COL4
+		     , MAX(CASE WHEN A.RK =  5 THEN A.NI_CONTENT ELSE NULL END) AS COL5
+		     , MAX(CASE WHEN A.RK =  6 THEN A.NI_CONTENT ELSE NULL END) AS COL6
+		     , MAX(CASE WHEN A.RK =  7 THEN A.NI_CONTENT ELSE NULL END) AS COL7
+		     , MAX(CASE WHEN A.RK =  8 THEN A.NI_CONTENT ELSE NULL END) AS COL8
+		     , MAX(CASE WHEN A.RK =  9 THEN A.NI_CONTENT ELSE NULL END) AS COL9
+		     , MAX(CASE WHEN A.RK = 10 THEN A.NI_CONTENT ELSE NULL END) AS COL10
+		     , MAX(CASE WHEN A.RK = 11 THEN A.NI_CONTENT ELSE NULL END) AS COL11
+		     , MAX(CASE WHEN A.RK = 12 THEN A.NI_CONTENT ELSE NULL END) AS COL12
+		     , MAX(CASE WHEN A.RK = 13 THEN A.NI_CONTENT ELSE NULL END) AS COL13
+		     , MAX(CASE WHEN A.RK = 14 THEN A.NI_CONTENT ELSE NULL END) AS COL14
+		FROM   (
+		        SELECT GOODS_CD
+		             , NI_ITEM_CD
+		             , NI_CONTENT
+		             , RANK() OVER(PARTITION BY GOODS_CD ORDER BY NI_ITEM_CD) AS RK /*정렬순서 중요함. 변경하지 마세요.*/
+		        FROM   TB_GOODS_NOTI_INFO
+		        WHERE  NI_CLSF_CD = #{niClsfCd}
+		        <if test="goodsCds != '' and goodsCds != ''">
+		        AND    (
+		                <foreach collection="goodsCds" item="item" index="index" separator="or">
+		                UPPER(GOODS_CD) LIKE CONCAT('%',UPPER(#{item}),'%') 
+		                </foreach>
+		               )
+		        </if>
+		       ) A
+		     , TB_GOODS B
+		WHERE  A.GOODS_CD = B.GOODS_CD
+		GROUP  BY A.GOODS_CD
+		ORDER  BY A.GOODS_CD
+	</select>
+	
+	<!-- 고시분류 칼럼 정보 -->
+	<select id="getNotiClsfColumnInfo" parameterType="String" resultType="GoodsNotiInfo">
+		/* TsaGoods.getNotiClsfColumnInfo */
+		SELECT MAX(CASE WHEN RK =  1 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL1
+		     , MAX(CASE WHEN RK =  2 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL2
+		     , MAX(CASE WHEN RK =  3 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL3
+		     , MAX(CASE WHEN RK =  4 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL4
+		     , MAX(CASE WHEN RK =  5 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL5
+		     , MAX(CASE WHEN RK =  6 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL6
+		     , MAX(CASE WHEN RK =  7 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL7
+		     , MAX(CASE WHEN RK =  8 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL8
+		     , MAX(CASE WHEN RK =  9 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL9
+		     , MAX(CASE WHEN RK = 10 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL10
+		     , MAX(CASE WHEN RK = 11 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL11
+		     , MAX(CASE WHEN RK = 12 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL12
+		     , MAX(CASE WHEN RK = 13 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL13
+		     , MAX(CASE WHEN RK = 14 THEN FN_GET_CODE_NM('G005',NI_ITEM_CD) ELSE NULL END) AS COL14
+		     , COUNT(*)                                                                    AS COL_CNT
+		FROM   (
+		        SELECT NI_ITEM_CD
+		             , RANK() OVER(ORDER BY NI_ITEM_CD) AS RK /*정렬순서 중요함. 변경하지 마세요.*/
+		        FROM   TB_NOTI_INFO
+		        WHERE  NI_CLSF_CD = #{niClsfCd}
+		        GROUP  BY NI_ITEM_CD
+		       ) A
+	</select>
+	
 </mapper>

+ 24 - 23
src/main/webapp/WEB-INF/views/goods/GoodsNotiInfoForm.html

@@ -39,13 +39,12 @@
 						<th>고시분류<em class="required" title="필수"></em></th>
 						<td>
 							<select name="niClsfCd" required="required" data-valid-name="고시분류">
-								<option value="">[전체]</option>
 								<option th:if="${niClsfCdList}" th:each="oneData, status : ${niClsfCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 						</td>
 						<th>상품코드</th>
 						<td>
-							<textarea class="textareaR3 w70p" name="goodsCds" id="goodsCds"></textarea>
+							<textarea class="textareaR3 w200" name="goodsCd" id="goodsCd"></textarea>
 						</td>
 					</tr>
 				</table>
@@ -77,32 +76,33 @@
 
 <script th:inline="javascript">
 /*<![CDATA[*/
-	var roleList = gagajf.convertToArray([[${roleList}]]);
-	
 	// specify the columns
-	var columnDefs = [
+	let columnDefs = [
 		{headerName: "상품코드", field: "goodsCd", width: 120, cellClass: 'text-center'},
-		{headerName: "COL1", field: "col1", width: 100},
-		{headerName: "COL2", field: "col2", width: 100},
-		{headerName: "COL3", field: "col3", width: 100},
-		{headerName: "COL4", field: "col4", width: 100},
-		{headerName: "COL5", field: "col5", width: 100},
-		{headerName: "COL6", field: "col6", width: 100},
-		{headerName: "COL7", field: "col7", width: 100},
-		{headerName: "COL8", field: "col8", width: 100},
-		{headerName: "COL9", field: "col9", width: 100},
-		{headerName: "COL10", field: "col10", width: 100},
-		{headerName: "COL11", field: "col11", width: 100},
-		{headerName: "COL12", field: "col12", width: 100},
-		{headerName: "COL13", field: "col13", width: 100}
+		{headerName: "상품명", field: "goodsNm", width: 300},
+		{headerName: "COL1", field: "col1", width: 150},
+		{headerName: "COL2", field: "col2", width: 150},
+		{headerName: "COL3", field: "col3", width: 150},
+		{headerName: "COL4", field: "col4", width: 150},
+		{headerName: "COL5", field: "col5", width: 150},
+		{headerName: "COL6", field: "col6", width: 150},
+		{headerName: "COL7", field: "col7", width: 150},
+		{headerName: "COL8", field: "col8", width: 150},
+		{headerName: "COL9", field: "col9", width: 150},
+		{headerName: "COL10", field: "col10", width: 150},
+		{headerName: "COL11", field: "col11", width: 150},
+		{headerName: "COL12", field: "col12", width: 150},
+		{headerName: "COL13", field: "col13", width: 150},
+		{headerName: "COL14", field: "col14", width: 150}
 	];
 	
 	// Get GridOptions
-	var gridOptions = gagaAgGrid.getGridOptions(columnDefs);
+	let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
 	
 	// Grid 속성 변경
-	var fnChangeGridProperty = function(colInfo) {
-		var colCnt = Number(colInfo.useColsCnt);
+	let fnChangeGridProperty = function(colInfo) {
+		console.log(colInfo);
+		let colCnt = Number(colInfo.colCnt);
 		
 		// 컬럼 이름 변경
 		if (colCnt >= 1) gagaAgGrid.setColumnHeaderName(gridOptions, 'col1', colInfo.col1);
@@ -118,10 +118,11 @@
 		if (colCnt >= 11) gagaAgGrid.setColumnHeaderName(gridOptions, 'col11', colInfo.col11);
 		if (colCnt >= 12) gagaAgGrid.setColumnHeaderName(gridOptions, 'col12', colInfo.col12);
 		if (colCnt >= 13) gagaAgGrid.setColumnHeaderName(gridOptions, 'col13', colInfo.col13);
+		if (colCnt >= 14) gagaAgGrid.setColumnHeaderName(gridOptions, 'col14', colInfo.col14);
 		gridOptions.columnApi.resetColumnState();
 
 		// 컬럼 숨김 처리
-		for (var k = 1; k <= 13; k++) {
+		for (var k = 1; k <= 14; k++) {
 			// 컬럼 숨긴걸 초기화 한다.
 			gagaAgGrid.showOrHideColumn(gridOptions, 'col' + k, true);
 		
@@ -141,7 +142,7 @@
 		// Fetch data
 		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm', function() {
 			// 업로드의 칼럼정보 가져오기
-			var actionUrl = '/goods/noti/info/column/' + $('#searchForm select[name=niClsfCd]').val();
+			let actionUrl = '/goods/noti/info/column/' + $('#searchForm select[name=niClsfCd]').val();
 			
 			$.getJSON(actionUrl
 					, function(result, status) {