Explorar o código

상품 등록 로그 조회

eskim %!s(int64=5) %!d(string=hai) anos
pai
achega
bb3389c4f4

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

@@ -35,7 +35,7 @@ public class GoodsMass extends TscBaseDomain {
 	private String goodsSnm1;		//상품검색명1(사용자등록용)
 	private String goodsGb;			//상품구분(공콩코드 G073)
 	private String formalGb; 		//정상이월구분(공통코드G009)
-	private String distributionGb;		//유통구분(공콩코드 G065)
+//	private String distributionGb;		//유통구분(공콩코드 G065)
 	private String taxGb;		//과세구분(10:과세, 20:비과세)
 	private String adultYn;		//성인용품여부 'Y', 'N'
 

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

@@ -2165,4 +2165,94 @@
 		GROUP BY GOODS_CD, OPT_CD
 	</select>
 	
+	<!-- 상품등록로그 목록 조회 -->
+	<select id="getGoodsRegLogList" parameterType="GoodsSearch" resultType="GoodsMass">
+		/* TsaGoods.getGoodsRegLogList */
+		SELECT A.GOODS_REG_SQ
+		     , A.PROC_GB
+		     , A.GOODS_CD
+		     , A.SUPPLY_COMP_CD
+		     , A.GOODS_NM
+		     , A.GOODS_TNM
+		     , A.GOODS_SNM1
+		     , A.ORIGIN_CD
+		     , A.MAKE_YMD
+		     , A.BRAND_CD
+		     , A.ITEMKIND_CD
+		     , A.STYLE_YEAR
+		     , A.SEASON_CD
+		     , A.SEX_GB
+		     , A.GOODS_NUM
+		     , A.LIST_PRICE
+		     , A.CURR_PRICE
+		     , A.COST_PRICE
+		     , A.SUPPLY_GOODS_CD
+		     , A.FORMAL_GB
+		     , A.GOODS_GB
+		     , A.TAX_GB
+		     , A.ADULT_YN
+		     -- , A.OPT_STR
+		     -- , A.BASE_STOCK_STR
+		     -- , A.CURR_STOCK_STR
+		     -- , A.GOODS_DESC_INFO
+		     , A.NI_CLSF_CD
+		     , A.NI_CONTENT1
+		     , A.NI_CONTENT2
+		     , A.NI_CONTENT3
+		     , A.NI_CONTENT4
+		     , A.NI_CONTENT5
+		     , A.NI_CONTENT6
+		     , A.NI_CONTENT7
+		     , A.NI_CONTENT8
+		     , A.NI_CONTENT9
+		     , A.NI_CONTENT10
+		     , A.NI_CONTENT11
+		     , A.NI_CONTENT12
+		     , A.NI_CONTENT13
+		     , A.NI_CONTENT14
+		     , A.NI_CONTENT15
+		     , A.NI_CONTENT16
+		     , A.NI_CONTENT17
+		     , A.NI_CONTENT18
+		     , A.NI_CONTENT19
+		     , A.NI_CONTENT20
+		     , A.NI_CONTENT21
+		     , A.NI_CONTENT22
+		     , A.NI_CONTENT23
+		     , A.NI_CONTENT24
+		     , A.NI_CONTENT25
+		     , A.NI_CONTENT26
+		     , A.NI_CONTENT27
+		     , A.NI_CONTENT28
+		     , A.REG_SUCC_YN
+		     , A.REG_FAIL_RSN
+		     , A.REG_NO
+		     , FN_GET_USER_NM(A.REG_NO) AS REG_NM 
+		     , DATE_FORMAT(A.REG_DT, '%Y%m%d%H%i%S') AS REG_DT
+		FROM TB_GOODS_REG_LOG A
+		-- LEFT OUTER JOIN TB_GOODS B ON A.GOODS_CD = B.GOODS_CD
+		WHERE 1 = 1 
+		<if test='condition != null and condition != "" '>
+		AND (UPPER(A.GOODS_CD) LIKE CONCAT('%',UPPER(#{condition}),'%')
+		     OR 
+		     UPPER(A.SUPPLY_GOODS_CD) LIKE CONCAT('%',UPPER(#{condition}),'%')
+		    )
+		</if>
+		<if test='regSuccYn != null and regSuccYn != "" '>
+		AND A.REG_SUCC_YN  = #{regSuccYn}
+		</if>
+		<if test='regNo != null and regNo != "" '>
+		AND A.REG_No = #{regNo}
+		</if>
+		<if test="stDate != null and stDate != ''">
+		AND A.REG_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		</if>
+		<if test="edDate != null and edDate != ''">
+		<![CDATA[
+		AND A.REG_DT < DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S') 
+		]]>
+		</if>
+		ORDER BY A.REG_DT DESC, A.GOODS_CD
+	</select>
+	
 </mapper>

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

@@ -483,4 +483,15 @@ public interface TssGoodsDao {
 	 */
 	Collection<Option> getGoodsWmsSizeList(Goods goods);
 
+	/**
+	 * 상품등록로그 목록
+	 *
+	 * @param goodsSearch
+	 * @return
+	 * @author eskim
+	 * @since 2021. 01. 13
+	 */
+	Collection<GoodsMass> getGoodsRegLogList(GoodsSearch goodsSearch);
+
+
 }

+ 20 - 0
src/main/java/com/style24/scm/biz/service/TssGoodsService.java

@@ -1073,6 +1073,24 @@ public class TssGoodsService {
 		}
 	}
 
+	/**
+	 * 상품등록로그 목록
+	 *
+	 * @param goodsSearch
+	 * @return
+	 * @author eskim
+	 * @since 2020. 01. 13
+	 */
+	public Collection<GoodsMass> getGoodsRegLogList(GoodsSearch goodsSearch) {
+
+		// 입점업체담당자는 업체코드 설정
+		if ("G001_B000".equals(TssSession.getInfo().getRoleCd()) || "G001_E000".equals(TssSession.getInfo().getRoleCd())) {
+			goodsSearch.setSupplyCompCd(TssSession.getInfo().getSupplyCompCd());
+			goodsSearch.setRegNo(TssSession.getInfo().getUserNo());
+		}
+		return goodsDao.getGoodsRegLogList(goodsSearch);
+	}
+
 	/**
 	 * 상품대량등록 엑셀 저장 - 자사상품
 	 *
@@ -1157,6 +1175,8 @@ public class TssGoodsService {
 			wmsGoods.setProductNo(goods.getProductNo());
 			goodsDao.saveGoodsWmsIncomelot(wmsGoods); // wms 상품 상품등록일 변경
 
+			goodsMass.setGoodsCd(goods.getGoodsCd());
+
 			this.createGoodsNoti(gagaMap, goodsNotiList); // 상품고시정보 저장
 
 			Collection<Option> goodsWmsSizeList = new ArrayList<>();

+ 1 - 2
src/main/java/com/style24/scm/biz/web/TssGoodsController.java

@@ -790,8 +790,7 @@ public class TssGoodsController extends TssBaseController {
 	@PostMapping("/reg/log/list")
 	@ResponseBody
 	public Collection<GoodsMass> getGoodsRegLogList(@RequestBody GoodsSearch goodsSearch) {
-		//return goodsService.getGoodsRegLogList(goodsSearch);
-		return null;
+		return goodsService.getGoodsRegLogList(goodsSearch);
 	}
 
 	/**

+ 21 - 17
src/main/webapp/WEB-INF/views/goods/GoodsMassRegisterForm.html

@@ -33,11 +33,11 @@
 			<ul class="panelBar">
 				<li class="center">
 					<th:block th:if="${sessionInfo.roleCd == 'G001_E000'}">
-						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF001');">자사상품 등록양식 다운로드</button>
+						<button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF001');">자사상품 등록양식 다운로드</button>
 						<button th:if="${wmsSyncYn == 'Y'}" type="button" class="btn btn-primary btn-lg" id="btnGoodsSelfCreate" >자사상품 등록</button>
 					</th:block>
 					<th:block th:if="${sessionInfo.roleCd == 'G001_B000'}">
-						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF005');">입점상품 등록양식 다운로드</button>
+						<button type="button" class="btn btn-default btn-lg"  onclick="cfnDownloadSampleFile('SF005');">입점상품 등록양식 다운로드</button>
 						<button th:if="${wmsSyncYn == 'Y'}" type="button" class="btn btn-primary btn-lg" id="btnGoodsCreate" >입점상품 등록</button>
 					</th:block>
 					<label class="off"><a href="javascript:void(0);" id="excelList" style="display: none;">엑셀다운로드</a></label>
@@ -46,7 +46,7 @@
 									or sessionInfo.roleCd == 'G001_E000'  
 								}" 
 							th:style="'padding-left:80px;'">
-						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF014');">상품대량수정 등록양식 다운로드</button>
+						<button type="button" class="btn btn-default btn-lg"  onclick="cfnDownloadSampleFile('SF014');">상품대량수정 등록양식 다운로드</button>
 						<button th:if="${wmsSyncYn == 'Y'}" type="button" class="btn btn-primary btn-lg" id="btnGoodsUpdate" >입점상품 등록</button>
 					</span>
 				</li>
@@ -66,7 +66,7 @@
 						<col/>
 					</colgroup>
 					<tr>
-						<th>상품코드<i class="star"></i></th>
+						<th>품번/입점상품<i class="star"></i></th>
 						<td><input type="text" class="w130" name="condition" id="condition" maxlength="50"/></td>
 						<th>등록여부</th>
 						<td>
@@ -82,7 +82,7 @@
 					</tr>
 				</table>
 				<ul class="panelBar">
-					<li>
+					<li class="center">
 						<button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button>
 						<button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>
 					</li>
@@ -149,8 +149,21 @@
 		{headerName: "상품명", field: "goodsNm", width: 150, cellClass: 'text-left'},
 		{headerName: "상품타이틀", field: "goodsTnm", width: 150, cellClass: 'text-left'},
 		{headerName: "검색어", field: "goodsSnm1", width: 150, cellClass: 'text-left'},
-		{headerName: "제조국", field: "makeNm", width: 100, cellClass: 'text-center'},
+		{headerName: "원산지", field: "originCd", width: 100, cellClass: 'text-center'},
 		{headerName: "제조일", field: "makeYmd", 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'},
+		{headerName: "성별", field: "sexGb", width: 80, cellClass: 'text-center'},
+		{headerName: "품번", field: "goodsNum", width: 100, cellClass: 'text-center'},
+		{headerName: "정상가", field: "listPrice", width: 100, cellClass: 'text-center'},
+		{headerName: "판매가", field: "currPrice", width: 100, cellClass: 'text-center'},
+		{headerName: "원가", field: "costPrice", width: 100, cellClass: 'text-center'},
+		{headerName: "공급업체상품코드", field: "supplyGoodsCd", width: 130, cellClass: 'text-center'},
+		{headerName: "정상이월", field: "formalGb", width: 100, cellClass: 'text-center'},
+		{headerName: "상품구분", field: "goodsGb", width: 100, cellClass: 'text-center'},
+		{headerName: "과세구분", field: "taxGb", width: 100, cellClass: 'text-center'},
+		{headerName: "성인용품여부", field: "adultYn", width: 100, cellClass: 'text-center'},
 		{headerName: "고시분류코드", field: "niClsfCd", width: 200, cellClass: 'text-center',
 			cellEditorParams: { values: gagaAgGrid.extractValues(niClsfCdList) },
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(niClsfCdList, params.value); },
@@ -183,20 +196,11 @@
 		{headerName: "고시내용25", field: "niContent25", width: 200, cellClass: 'text-left'},
 		{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: "itemkindCd", width: 100, cellClass: 'text-center'},
-		{headerName: "스타일연도", field: "styleYear", width: 100, cellClass: 'text-center'},
-		{headerName: "시즌", field: "seasonCd", width: 80, cellClass: 'text-center'},
-		{headerName: "성별", field: "sexGb", width: 80, cellClass: 'text-center'},
-		{headerName: "품번", field: "goodsNum", width: 100, cellClass: 'text-center'},
-		{headerName: "정상가", field: "listPrice", width: 100, cellClass: 'text-center'},
-		{headerName: "판매가", field: "currPrice", width: 100, cellClass: 'text-center'},
-		{headerName: "공급업체상품코드", field: "supplyGoodsCd", width: 130, cellClass: 'text-center'},
-		{headerName: "정상이월", field: "formalGb", width: 100, cellClass: 'text-center'},
+		{headerName: "고시내용28", field: "niContent28", width: 200, cellClass: 'text-left'}
 		/* {headerName: "옵션문자열", field: "optStr", width: 200, cellClass: 'text-center'},
 		{headerName: "안전재고문자열", field: "baseStockStr", width: 200, cellClass: 'text-center'},
 		{headerName: "현재고문자열", field: "currStockStr", width: 200, cellClass: 'text-center'}, */
-		{headerName: "매입유형", field: "buyingType", width: 80, cellClass: 'text-center'}
+		
 	];
 
 	// Get GridOptions