Selaa lähdekoodia

업체 변경연동관련 수정

eskim 5 vuotta sitten
vanhempi
commit
779454d6f9

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

@@ -412,11 +412,17 @@ public class TsaGoodsService {
 			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());
+						gagaMap.set("SYS_IMG_NM", targetPath + '/' + gagaMap.get("SYS_IMG_NM").toString() + "?RS=60");
 					}
 				}
 			}
 
+			log.info("[ excelFilenameWithPath] {}", excelFilenameWithPath);
+			log.info("[ dataList] {}", dataList.size());
+			log.info("[ listTitles] {}", listTitles);
+			log.info("[ cellNames] {}", cellNames);
+			log.info("[ cellTypes] {}", cellTypes);
+			
 			try {
 				GagaExcelUtil.createExcel(excelFilenameWithPath, dataList, "상품 정보", listTitles, cellNames, cellTypes, TsaConstants.EXCEL_FOOTER_TITLE);
 			} catch (Exception e) {

+ 6 - 6
src/main/java/com/style24/admin/biz/web/TsaBusinessController.java

@@ -168,10 +168,10 @@ public class TsaBusinessController extends TsaBaseController {
 	public Collection<SupplyCompany> getSupplyCompanyList(@RequestBody SupplyCompany supplyComp) {
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(supplyComp.getSearchSupplyCompCd())) {
-			supplyComp.setMultiSupplyCompCd(supplyComp.getSearchSupplyCompCd().replaceAll("\r", "").split("\n"));
+			supplyComp.setMultiSupplyCompCd(supplyComp.getSearchSupplyCompCd().replaceAll("\r", "").trim().split("\n"));
 		}
 		if (!StringUtils.isBlank(supplyComp.getSearchSupplyCompNm())) {
-			supplyComp.setMultiSupplyCompNm(supplyComp.getSearchSupplyCompNm().replaceAll("\r", "").split("\n"));
+			supplyComp.setMultiSupplyCompNm(supplyComp.getSearchSupplyCompNm().replaceAll("\r", "").trim().split("\n"));
 		}
 		//log.info("supplyComp  {}", supplyComp);
 		return businessService.getSupplyCompanyList(supplyComp);
@@ -321,10 +321,10 @@ public class TsaBusinessController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(brand.getSearchBrandCd())) {
-			brand.setMultiBrandCd(brand.getSearchBrandCd().replaceAll("\r", "").split("\n"));
+			brand.setMultiBrandCd(brand.getSearchBrandCd().replaceAll("\r", "").trim().split("\n"));
 		}
 		if (!StringUtils.isBlank(brand.getSearchBrandNm())) {
-			brand.setMultiBrandNm(brand.getSearchBrandNm().replaceAll("\r", "").split("\n"));
+			brand.setMultiBrandNm(brand.getSearchBrandNm().replaceAll("\r", "").trim().split("\n"));
 		}
 
 		return businessService.getBrandList(brand);
@@ -763,10 +763,10 @@ public class TsaBusinessController extends TsaBaseController {
 	public Collection<BrandGroup> getBrandGroupList(@RequestBody BrandGroup brandGroup) {
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(brandGroup.getSearchBrandGroupNo())) {
-			brandGroup.setMultiBrandGroupNo(brandGroup.getSearchBrandGroupNo().replaceAll("\r", "").split("\n"));
+			brandGroup.setMultiBrandGroupNo(brandGroup.getSearchBrandGroupNo().replaceAll("\r", "").trim().split("\n"));
 		}
 		if (!StringUtils.isBlank(brandGroup.getSearchBrandGroupNm())) {
-			brandGroup.setMultiBrandGroupNm(brandGroup.getSearchBrandGroupNm().replaceAll("\r", "").split("\n"));
+			brandGroup.setMultiBrandGroupNm(brandGroup.getSearchBrandGroupNm().replaceAll("\r", "").trim().split("\n"));
 		}
 		return businessService.getBrandGroupList(brandGroup);
 	}

+ 35 - 13
src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -496,7 +496,7 @@ public class TsaGoodsController extends TsaBaseController {
 	@ResponseBody
 	public GagaMap getGoodsList(@RequestBody GoodsSearch goodsSearch) {
 
-		//log.info("[getGoodsList] goodsSearch = {}", goodsSearch);
+		log.info("[getGoodsList] goodsSearch = {}", goodsSearch);
 		GagaMap result = new GagaMap();
 
 		// 입점업체담당자는 업체코드 설정
@@ -507,7 +507,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 
 			if ("searchExtendGoodsCd".equals(goodsSearch.getSearch())) {
 				goodsSearch.setSearchGb("EXTEND");
@@ -572,7 +572,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 
 			if ("searchExtendGoodsCd".equals(goodsSearch.getSearch())) {
 				goodsSearch.setSearchGb("EXTEND");
@@ -580,6 +580,28 @@ public class TsaGoodsController extends TsaBaseController {
 				goodsSearch.setSearchGb("MASTER");
 			}
 		}
+		
+		if (!StringUtils.isBlank(goodsSearch.getBrandList())) {
+			try {
+				String [] arrBrandCd = mapper.readValue(goodsSearch.getBrandList(), String[].class);
+				goodsSearch.setMultiBrand(arrBrandCd);
+			} catch (Exception e) {
+				e.printStackTrace();
+				throw new IllegalStateException("브랜드코드 검색중 오류로 인해 조회되지 않았습니다.");
+			}
+		}
+
+		if (!StringUtils.isBlank(goodsSearch.getSupplyCompList())) {
+			try {
+				String [] arrSupplyComp = mapper.readValue(goodsSearch.getSupplyCompList(), String[].class);
+				goodsSearch.setMultiSupplyCompCd(arrSupplyComp);
+			} catch (Exception e) {
+				e.printStackTrace();
+				throw new IllegalStateException("업체코드 검색중 오류로 인해 조회되지 않았습니다.");
+			}
+		}
+		
+		log.info("[downloadGoodsInfoExcelList] goodsSearch = {}", goodsSearch);
 
 		// 대용량엑셀파일다운로드는 이런 식으로 ...
 		goodsService.getGoodsInfoExcelList(goodsSearch, excelFilenameWithPath);
@@ -1575,7 +1597,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 		}
 
 		goodsSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
@@ -1776,7 +1798,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 		}
 		if (!StringUtils.isBlank(goodsSearch.getBrandList())) {
 			try {
@@ -2067,7 +2089,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 		}
 
 		return goodsService.getNoticeList(goodsSearch);
@@ -2190,7 +2212,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 
 			if ("searchExtendGoodsCd".equals(goodsSearch.getSearch())) {
 				goodsSearch.setSearchGb("EXTEND");
@@ -2425,7 +2447,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 
 			if ("searchExtendGoodsCd".equals(goodsSearch.getSearch())) {
 				goodsSearch.setSearchGb("EXTEND");
@@ -2450,7 +2472,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 		}
 
 		return goodsService.saveGoodsNaverPrice(goodsSearch);
@@ -2560,7 +2582,7 @@ public class TsaGoodsController extends TsaBaseController {
 	public Collection<GoodsNotiInfo> getGoodsNotiInfoListByNotiClsf(@RequestBody GoodsNotiInfo goodsNotiInfo) {
 		// multi row 검색관련 처리
 		if (StringUtils.isNotBlank(goodsNotiInfo.getGoodsCd())) {
-			goodsNotiInfo.setGoodsCds(goodsNotiInfo.getGoodsCd().replaceAll("\r", "").split("\n"));
+			goodsNotiInfo.setGoodsCds(goodsNotiInfo.getGoodsCd().replaceAll("\r", "").trim().split("\n"));
 		}
 
 		return goodsService.getGoodsNotiInfoListByNotiClsf(goodsNotiInfo);
@@ -2632,7 +2654,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 		}
 
 		return goodsService.getFreeGoodsList(goodsSearch);
@@ -2835,7 +2857,7 @@ public class TsaGoodsController extends TsaBaseController {
 
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 		}
 
 		goodsSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
@@ -2863,7 +2885,7 @@ public class TsaGoodsController extends TsaBaseController {
 		Goods goods = new Goods();
 		// multi row 검색관련 처리
 		if (!StringUtils.isBlank(goodsSearch.getCondition())) {
-			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").split("\n"));
+			goodsSearch.setConditionList(goodsSearch.getCondition().replaceAll("\r", "").trim().split("\n"));
 			goods.setArrGoodsCd(goodsSearch.getConditionList());
 		}
 		

+ 27 - 12
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -138,9 +138,11 @@
 		FROM TB_NOTI_INFO B
 		INNER JOIN TB_COMMON_CODE C ON B.NI_CLSF_CD = C.CD 
 		WHERE B.SUPPLY_COMP_CD = CASE #{supplyCompCd} 
-		                         WHEN '1003' THEN '1003'
-		                         WHEN '1004' THEN '1004'
-		                         WHEN '1005' THEN '1005'
+		                         WHEN '1' THEN '1'
+		                         WHEN '2' THEN '2'
+		                         WHEN '3' THEN '3'
+		                         WHEN '4' THEN '4'
+		                         WHEN '5' THEN '5'
 		                         ELSE 'E' END 
 		AND C.CD_GB = 'G004'   /*고시정보*/
 		ORDER BY C.DISP_ORD
@@ -157,9 +159,11 @@
 		     , B.DISP_ORD
 		FROM TB_NOTI_INFO B
 		WHERE B.SUPPLY_COMP_CD = CASE #{supplyCompCd} 
-		                         WHEN '1003' THEN '1003'
-		                         WHEN '1004' THEN '1004'
-		                         WHEN '1005' THEN '1005'
+		                         WHEN '1' THEN '1'
+		                         WHEN '2' THEN '2'
+		                         WHEN '3' THEN '3'
+		                         WHEN '4' THEN '4'
+		                         WHEN '5' THEN '5'
 		                         ELSE 'E' END 
 		<if test="niClsfCd != null and niClsfCd != ''">
 		AND B.NI_CLSF_CD = #{niClsfCd}
@@ -413,7 +417,14 @@
 		    , CASE IFNULL((SELECT COUNT(SYS_IMG_NM) FROM TB_GOODS_IMG  WHERE GOODS_CD = Q.GOODS_CD AND COLOR_CD = Q.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y' ),0) 
 		            WHEN 0 THEN 'N'
 		            ELSE 'Y' END AS GOODS_IMAGE_YN
+		<choose>
+		<when test='goodsPriceYn != null and goodsPriceYn == "Y"'>
 		    , IFNULL(GB.PC_CURR_PRICE, Q.CURR_PRICE)  AS BENEFIT_PRICE
+		</when>
+		<otherwise>
+		    , 0  AS BENEFIT_PRICE
+		</otherwise>
+		</choose>
 		FROM (     
 		SELECT Z.*
 		FROM (
@@ -1004,9 +1015,11 @@
 		INNER JOIN TB_NOTI_INFO A ON C.NI_CLSF_CD = A.NI_CLSF_CD
 		                          AND C.NI_ITEM_CD = A.NI_ITEM_CD
 		                          AND A.SUPPLY_COMP_CD = CASE B.SUPPLY_COMP_CD
-		                                                      WHEN '1003' THEN '1003'
-		                                                      WHEN '1004' THEN '1004'
-		                                                      WHEN '1005' THEN '1005'
+		                                                      WHEN '1' THEN '1'
+		                                                      WHEN '2' THEN '2'
+		                                                      WHEN '3' THEN '3'
+		                                                      WHEN '4' THEN '4'
+		                                                      WHEN '5' THEN '5'
 		                                                      ELSE 'E' 
 		                                                 END
 		WHERE C.GOODS_CD = #{goodsCd}
@@ -1048,9 +1061,11 @@
 		 WHERE 1 = 1
 		 AND N.NI_CLSF_CD = #{niClsfCd}
 		 AND N.SUPPLY_COMP_CD =  CASE G.SUPPLY_COMP_CD
-		                                WHEN '1003' THEN '1003'
-		                                WHEN '1004' THEN '1004'
-		                                WHEN '1005' THEN '1005'
+		                                WHEN '1' THEN '1'
+		                                WHEN '2' THEN '2'
+		                                WHEN '3' THEN '3'
+		                                WHEN '4' THEN '4'
+		                                WHEN '5' THEN '5'
 		                                ELSE 'E' 
 		                           END 
 		 ORDER BY  G.GOODS_CD , N.NI_CLSF_CD, N.DISP_ORD

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

@@ -31,9 +31,9 @@
 					<li>
 						<h3>업체명</h3>
 						<select name="supplyCompCd" id="supplyCompCd">
-							<option value="1003" selected="selected">한세드림</option>
-							<option value="1004">(주)에프알제이</option>
-							<option value="1005">(주)엠케이트렌드</option>
+							<option value="3" selected="selected">한세드림</option>
+							<option value="4">(주)에프알제이</option>
+							<option value="5">(주)엠케이트렌드</option>
 						</select>
 						<button type="button" class="btn btn-dark btn-sm" id="btnAddRow">행추가</button>
 					</li>

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

@@ -31,9 +31,9 @@
 					<li>
 						<h3>업체명</h3>
 						<select name="supplyCompCd" id="supplyCompCd">
-							<option value="1003" selected="selected">한세드림</option>
-							<option value="1004">(주)에프알제이</option>
-							<option value="1005">(주)엠케이트렌드</option>
+							<option value="3" selected="selected">한세드림</option>
+							<option value="4">(주)에프알제이</option>
+							<option value="5">(주)엠케이트렌드</option>
 						</select>
 						<button type="button" class="btn btn-dark btn-sm" id="btnAddRow">행추가</button>
 					</li>

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

@@ -31,9 +31,9 @@
 					<li>
 						<h3>업체명</h3>
 						<select name="supplyCompCd" id="supplyCompCd">
-							<option value="1003" selected="selected">한세드림</option>
-							<option value="1004">(주)에프알제이</option>
-							<option value="1005">(주)엠케이트렌드</option>
+							<option value="3" selected="selected">한세드림</option>
+							<option value="4">(주)에프알제이</option>
+							<option value="5">(주)엠케이트렌드</option>
 						</select>
 						<button type="button" class="btn btn-dark btn-sm" id="btnAddRow">행추가</button>
 					</li>