JUSEUNG пре 5 година
родитељ
комит
e3aa6bc09e

+ 0 - 1
.gitignore

@@ -3,7 +3,6 @@ target/
 .classpath
 /bin/
 /target/
-.project
 
 ### IntelliJ IDEA ###
 .idea

+ 5 - 0
src/main/java/com/style24/persistence/domain/GoodsMass.java

@@ -14,6 +14,7 @@ import lombok.Data;
 @Data
 public class GoodsMass extends TscBaseDomain {
 
+	private String goodsCd;
 	private String goodsNum;
 	private String brandCd;		//브랜드코드
 	private String itemkindCd;	//품목코드
@@ -38,6 +39,10 @@ public class GoodsMass extends TscBaseDomain {
 	private String taxGb;		//과세구분(10:과세, 20:비과세)
 	private String adultYn;		//성인용품여부 'Y', 'N'
 
+	private String optStr;
+	private String baseStockStr;
+	private String currStockStr;
+
 	private String niClsfCd;
 	private String niContent1;
 	private String niContent2;

+ 19 - 19
src/main/java/com/style24/persistence/mybatis/shop/TssGoods.xml

@@ -1127,6 +1127,8 @@
 		/* TssGoods.createGoods */
 		INSERT INTO TB_GOODS (
 		    GOODS_CD
+		  , PRODUCT_NO
+		  , PRODUCT_CODE
 		  , BRAND_CD
 		  , ITEMKIND_CD
 		  , GOODS_NM
@@ -1141,6 +1143,7 @@
 		  , GOODS_TYPE
 		  , LIST_PRICE
 		  , CURR_PRICE
+		  , COST_PRICE
 		  , DC_RATE
 		  , GOODS_STAT
 		  , SELF_MALL_YN
@@ -1160,6 +1163,7 @@
 		  , MAKE_YMD
 		  , TAX_GB
 		  , ERP_STOCK_LINK_YN
+		  , ADULT_YN
 		  , REG_NO
 		  , REG_DT
 		  , UPD_NO
@@ -1167,13 +1171,15 @@
 		)
 		VALUES(
 		    #{goodsCd}
+		  , #{productNo}
+		  , #{productCode}
 		  , #{brandCd}
 		  , #{itemkindCd}
 		  , NVL(#{goodsNm},'상품명없음')
 		  , #{goodsTnm}
 		  , #{goodsSnm}
 		  , #{goodsSnm1}
-		  , #{mainColorCd}
+		  , NVL(#{mainColorCd},'00')
 		  , #{styleYear}
 		  , #{seasonCd}
 		  , #{sexGb}
@@ -1181,6 +1187,7 @@
 		  , NVL(#{goodsType},'N')
 		  , #{listPrice}
 		  , #{currPrice}
+		  , #{costPrice}
 		  , #{dcRate}
 		  , #{goodsStat}
 		  , NVL(#{selfMallYn},'Y') 
@@ -1200,6 +1207,7 @@
 		  , #{makeYmd}
 		  , #{taxGb}
 		  , NVL(#{erpStockLinkYn},'N')
+		  , NVL(#{adultYn},'N')
 		  , #{regNo}
 		  , NOW()
 		  , #{updNo}
@@ -1846,7 +1854,7 @@
 	</insert>
 	
 	<!-- wms 상품정보 조회 -->
-	<select  id="getWmsGoodsInfo" parameterType="GoodsMass" resultType="WmsGoods" >
+	<select  id="getWmsGoodsInfo" parameterType="Goods" resultType="WmsGoods" >
 		/* TssGoods.getWmsGoodsInfo */
 		SELECT PRODUCT_NO
 		     , PRODUCT_CODE
@@ -1899,8 +1907,7 @@
 	<insert id="createGoodsRegLog" parameterType="GoodsMass">
 		/* TsaGoods.createGoodsRegLog */
 		INSERT INTO TB_GOODS_REG_LOG (
-		    GOODS_REG_SQ
-		  , PROC_GB
+		    PROC_GB
 		  , GOODS_CD
 		  , SUPPLY_COMP_CD
 		  , GOODS_NM
@@ -1922,9 +1929,6 @@
 		  , GOODS_GB
 		  , TAX_GB
 		  , ADULT_YN
-		  , OPT_STR
-		  , BASE_STOCK_STR
-		  , CURR_STOCK_STR
 		  , NI_CLSF_CD
 		  , NI_CONTENT1
 		  , NI_CONTENT2
@@ -1960,8 +1964,7 @@
 		  , REG_DT
 		)
 		VALUES(
-		    NULL
-		  , #{procGb}
+		    #{procGb}
 		  , #{goodsCd}
 		  , #{supplyCompCd}
 		  , #{goodsNm}
@@ -1983,9 +1986,6 @@
 		  , #{goodsGb}
 		  , #{taxGb}
 		  , #{adultYn}
-		  , #{optStr}
-		  , #{baseStockStr}
-		  , #{currStockStr}
 		  , #{niClsfCd}
 		  , #{niContent1}
 		  , #{niContent2}
@@ -2021,8 +2021,7 @@
 		  , NOW()
 		)
 	</insert>
-	
-	
+		
 	<!-- 상품 품목별 매핑 카테고리 저장 (LEAF 상위카테고리까지)-->
 	<insert id="createCategoryGoods_ORG" parameterType="Goods">
 		/* TssGoods.createCategoryGoods */
@@ -2152,13 +2151,14 @@
 			, D.STOCK_APPL_RATE
 		FROM TB_IF_PRODUCTSKU A 
 		INNER JOIN TB_GOODS B ON A.PRODUCTCODE = B.PRODUCT_CODE 
-							 AND B.SELF_GOODS_YN = 'Y'
-							 AND B.GOODS_TYPE = 'N'
+		                      AND B.SELF_GOODS_YN = 'Y'
+		                      AND B.GOODS_TYPE = 'G056_N'
+		                      AND B.GOODS_CD = #{goodsCd}
 		INNER JOIN TB_STOCK_SYNC_BASE C ON B.BRAND_CD = C.BRAND_CD
-									   AND C.STOCK_SYNC_YN = 'Y'
+		                                AND C.STOCK_SYNC_YN = 'Y'
 		INNER JOIN TB_DELIVERY_LOC D ON B.SUPPLY_COMP_CD = D.SUPPLY_COMP_CD
-									AND C.DELV_LOC_CD = D.DELV_LOC_CD
-									AND D.USE_YN = 'Y'
+		                             AND C.DELV_LOC_CD = D.DELV_LOC_CD
+		                             AND D.USE_YN = 'Y'
 		WHERE 1 = 1
 		GROUP BY B.GOODS_CD, A.SKUCODE, D.DELV_LOC_CD, D.STOCK_APPL_RATE
 		) Z

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

@@ -425,7 +425,7 @@ public interface TssGoodsDao {
 	 * @author eskim
 	 * @since 2021. 01. 12
 	 */
-	WmsGoods getWmsGoodsInfo(GoodsMass goodsMass);
+	WmsGoods getWmsGoodsInfo(Goods goods);
 
 	/**
 	 * 상품통계 생성

+ 22 - 14
src/main/java/com/style24/scm/biz/service/TssGoodsService.java

@@ -1140,13 +1140,9 @@ public class TssGoodsService {
 			//고시항목 필수값 확인
 			goods = this.getGoodsNotiCheck(goods, goodsNotiList, gagaMap, procJob);
 
-			Collection<Option> goodsWmsSizeList = new ArrayList<>();
-
-			// 상품사이즈 정보 -- 재고 정보연동 해야함
-			goodsWmsSizeList = goodsDao.getGoodsWmsSizeList(goods);
-			if (goodsWmsSizeList == null || goodsWmsSizeList.isEmpty()) {
-				goods.setGoodsRegMsg("WMS 상품 사이즈 정보 없음");
-				goods.setGoodsStat("20");
+			if ("10".equals(goods.getGoodsStat())) { // 정보 오류
+				this.setGoodsRegResult(goods, goodsMass, procJob);
+				continue;
 			}
 
 			// 할인율
@@ -1162,6 +1158,15 @@ public class TssGoodsService {
 			goodsDao.saveGoodsWmsIncomelot(wmsGoods); // wms 상품 상품등록일 변경
 
 			this.createGoodsNoti(gagaMap, goodsNotiList); // 상품고시정보 저장
+
+			Collection<Option> goodsWmsSizeList = new ArrayList<>();
+			// 상품사이즈 정보 -- 재고 정보연동 해야함
+			goodsWmsSizeList = goodsDao.getGoodsWmsSizeList(goods);
+			if (goodsWmsSizeList == null || goodsWmsSizeList.isEmpty()) {
+				goods.setGoodsRegMsg("WMS 상품 사이즈 정보 없음");
+				goods.setGoodsStat("20");
+			}
+
 			this.createSelfGoodsSize(goods, goodsWmsSizeList); // 자사 상품사이즈 정보 자장
 
 			// 사용자 검색어를 검색어에 적용
@@ -1200,11 +1205,11 @@ public class TssGoodsService {
 	private Goods createSelfGoodsInfo(GoodsMass goodsMass, String procJob) {
 
 		Goods goods = new Goods();
-		goods.setGoodsStat("40"); // 상품상태
+		goods.setGoodsStat("G008_40"); // 상품상태
 		goods.setGoodsRegMsg("승인대기");
 
-		// 품번정보 확인 (FRJ 는 11, 그외는 10)
-		if (StringUtils.isEmpty(goodsMass.getGoodsNum()) || (goodsMass.getGoodsNum().length() >= 10 && goodsMass.getGoodsNum().length() <= 11)) {
+		// 품번정보 확인 (FRJ 는 11, 그외는 10)
+		if (StringUtils.isEmpty(goodsMass.getGoodsNum()) || goodsMass.getGoodsNum().length() < 10 || goodsMass.getGoodsNum().length() > 11) {
 			goods.setGoodsRegMsg("품번코드 오류");
 			goods.setGoodsStat("10");
 			return goods;
@@ -1231,7 +1236,7 @@ public class TssGoodsService {
 		}
 
 		// wms 상품 정보 확인
-		WmsGoods wmsGoodsInfo = goodsDao.getWmsGoodsInfo(goodsMass);
+		WmsGoods wmsGoodsInfo = goodsDao.getWmsGoodsInfo(goods);
 		if (wmsGoodsInfo == null) {
 			goods.setGoodsRegMsg("WMS 미존재 상품코드");
 			goods.setGoodsStat("10");
@@ -1332,7 +1337,7 @@ public class TssGoodsService {
 
 		CommonCode commonCode = new CommonCode();
 		commonCode.setUseYn("Y");
-		commonCode.setCdGb("G0006"); // 시즌
+		commonCode.setCdGb("G006"); // 시즌
 		commonCode.setCd(goods.getSeasonCd());
 		Collection<CommonCode> styleYearList = rendererService.getCommonCodeList(commonCode);
 		if (styleYearList == null || styleYearList.isEmpty()) {
@@ -1348,7 +1353,7 @@ public class TssGoodsService {
 			return goods;
 		}
 		goods.setSexGb(goodsMass.getSexGb()); // 성별
-		commonCode.setCdGb("G0007"); // 성별
+		commonCode.setCdGb("G007"); // 성별
 		commonCode.setCd(goods.getSexGb());
 		Collection<CommonCode> sexGbList = rendererService.getCommonCodeList(commonCode);
 		if (sexGbList == null || sexGbList.isEmpty()) {
@@ -1504,6 +1509,9 @@ public class TssGoodsService {
 		if (UPDATE_NO_PATTERN.equals(goodsMass.getCurrPrice()) || StringUtils.isEmpty(goodsMass.getCurrPrice())) {
 			goodsMass.setCurrPrice("0");
 		}
+		if (StringUtils.isEmpty(goodsMass.getCostPrice())) {
+			goodsMass.setCostPrice("0");
+		}
 		if ("10".equals(goods.getGoodsStat())) {
 			goodsMass.setRegSuccYn("N");
 		}
@@ -1532,7 +1540,7 @@ public class TssGoodsService {
 			for (GoodsNotiInfo goodsNotiInfo : goodsNotiList) {
 				if ("Y".equals(goodsNotiInfo.getReqYn()) && StringUtils.isEmpty(goodsNotiInfo.getNiContent())) {
 					goods.setGoodsRegMsg("고시항목 오류");
-					goods.setGoodsStat("20");
+					goods.setGoodsStat("G008_20");
 					return goods;
 				}
 			}

+ 15 - 0
src/main/java/com/style24/scm/biz/web/TssGoodsController.java

@@ -779,6 +779,21 @@ public class TssGoodsController extends TssBaseController {
 		return mav;
 	}
 
+	/**
+	 * 상품 대량등록 결과 조회
+	 *
+	 * @param goodsSearch
+	 * @return
+	 * @author eskim
+	 * @since 2020. 01. 13
+	 */
+	@PostMapping("/reg/log/list")
+	@ResponseBody
+	public Collection<GoodsMass> getGoodsRegLogList(@RequestBody GoodsSearch goodsSearch) {
+		//return goodsService.getGoodsRegLogList(goodsSearch);
+		return null;
+	}
+
 	/**
 	 * 상품대량등록 엑셀 저장
 	 *

+ 3 - 41
src/main/webapp/WEB-INF/views/goods/GoodsMassRegisterForm.html

@@ -143,7 +143,7 @@
 		{headerName: "작업일시", field: "regDt", width: 150, cellClass: 'text-center'},
 		{headerName: "상품등록여부", field: "regSuccYn", width: 100, cellClass: 'text-center'},
 		{headerName: "등록결과메세지", field: "regFailRsn", width: 200, cellClass: 'text-left'},
-		{headerName: "등록브랜드코드", field: "brandCd", width: 120, cellClass: 'text-center'},
+		{headerName: "브랜드코드", field: "brandCd", width: 120, cellClass: 'text-center'},
 		{headerName: "업체코드", field: "supplyCompCd", width: 130, cellClass: 'text-center'},
 		{headerName: "상품코드", field: "goodsCd", width: 130, cellClass: 'text-center'},
 		{headerName: "상품명", field: "goodsNm", width: 150, cellClass: 'text-left'},
@@ -151,27 +151,6 @@
 		{headerName: "검색어", field: "goodsSnm1", width: 150, cellClass: 'text-left'},
 		{headerName: "제조국", field: "makeNm", width: 100, cellClass: 'text-center'},
 		{headerName: "제조일", field: "makeYmd", width: 100, cellClass: 'text-center'},
-		{headerName: "이지미타입", field: "imgType", width: 100, cellClass: 'text-center'},
-		{headerName: "이미지경로1", field: "imgPath1", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로2", field: "imgPath2", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로3", field: "imgPath3", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로4", field: "imgPath4", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로5", field: "imgPath5", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로6", field: "imgPath6", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로7", field: "imgPath7", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로8", field: "imgPath8", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로9", field: "imgPath9", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로10", field: "imgPath10", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로11", field: "imgPath11", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로12", field: "imgPath12", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로13", field: "imgPath13", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로14", field: "imgPath14", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로15", field: "imgPath15", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로16", field: "imgPath16", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로17", field: "imgPath17", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로18", field: "imgPath18", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로19", field: "imgPath19", width: 200, cellClass: 'text-left'},
-		{headerName: "이미지경로20", field: "imgPath20", width: 200, cellClass: 'text-left'},
 		{headerName: "고시분류코드", field: "niClsfCd", width: 200, cellClass: 'text-center',
 			cellEditorParams: { values: gagaAgGrid.extractValues(niClsfCdList) },
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(niClsfCdList, params.value); },
@@ -205,7 +184,6 @@
 		{headerName: "고시내용26", field: "niContent26", width: 200, cellClass: 'text-left'},
 		{headerName: "고시내용27", field: "niContent27", width: 200, cellClass: 'text-left'},
 		{headerName: "고시내용28", field: "niContent28", width: 200, cellClass: 'text-left'},
-		{headerName: "브랜드", field: "brandCd", width: 100, cellClass: 'text-center'},
 		{headerName: "품목", field: "itemkindCd", width: 100, cellClass: 'text-center'},
 		{headerName: "스타일연도", field: "styleYear", width: 100, cellClass: 'text-center'},
 		{headerName: "시즌", field: "seasonCd", width: 80, cellClass: 'text-center'},
@@ -233,30 +211,14 @@
 	
 	//자사상품대량등록 클릭시
 	$('#btnGoodsSelfCreate').on('click', function() {
-		cfnExcelUploadPopup('createSelfGoods', 'createSelfGoods');
+		cfnExcelUploadPopup('createGoods', 'createSelfGoods');
 	});
 	
-	var createSelfGoods = function(result){
-		var data = {procJob : result.procJob
-					,excelFileNm : result.excelFileNm
-					};
-		var jsonData = JSON.stringify(data);
-		gagajf.ajaxJsonSubmit('/goods/mass/excelupload/create', jsonData, fnGoodsSelfCreateCallBack);
-	}
-	
-	var fnGoodsSelfCreateCallBack = function(result){
-		
-		var date = new Date();
-		$("#massForm input[name=stDate]").val(date.format("YYYY-MM-DD"));
-		$("#massForm input[name=edDate]").val(date.format("YYYY-MM-DD"));
-		fnGoodsListSearch();
-	}
-	
 	//입점상품대량등록 클릭시
 	$('#btnGoodsCreate').on('click', function() {
 		cfnExcelUploadPopup('createGoods', 'createGoods');
 	});
-	
+
 	var createGoods = function(result){
 		var data = {procJob : result.procJob
 					,excelFileNm : result.excelFileNm