gagamel 5 vuotta sitten
vanhempi
commit
e2c5ae3896
20 muutettua tiedostoa jossa 266 lisäystä ja 67 poistoa
  1. 1 0
      style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaLogin.xml
  2. 6 1
      style24.admin/src/main/webapp/WEB-INF/views/business/SupplyCompanyForm.html
  3. 5 45
      style24.admin/src/main/webapp/WEB-INF/views/common/fragments/gnb.html
  4. 20 17
      style24.admin/src/main/webapp/WEB-INF/views/common/fragments/lnb.html
  5. 5 0
      style24.admin/src/main/webapp/WEB-INF/views/system/CommoncodeForm.html
  6. 5 0
      style24.admin/src/main/webapp/WEB-INF/views/system/MenuForm.html
  7. 5 0
      style24.admin/src/main/webapp/WEB-INF/views/system/UserForm.html
  8. 70 0
      style24.admin/src/main/webapp/ux/js/admin.common.js
  9. BIN
      style24.admin/target/classes/com/style24/admin/biz/dao/TsaBusinessDao.class
  10. BIN
      style24.admin/target/classes/com/style24/admin/biz/service/TsaBusinessService.class
  11. BIN
      style24.admin/target/classes/com/style24/admin/biz/service/TsaSystemService.class
  12. BIN
      style24.admin/target/classes/com/style24/admin/biz/web/TsaBusinessController.class
  13. BIN
      style24.admin/target/classes/com/style24/persistence/domain/Brand.class
  14. BIN
      style24.admin/target/classes/com/style24/persistence/domain/MenuRole.class
  15. BIN
      style24.admin/target/classes/com/style24/persistence/domain/SupplyCompany.class
  16. 141 0
      style24.admin/target/classes/com/style24/persistence/mybatis/shop/TsaBusiness.xml
  17. 1 0
      style24.admin/target/classes/com/style24/persistence/mybatis/shop/TsaLogin.xml
  18. 5 2
      style24.admin/target/classes/com/style24/persistence/mybatis/shop/TsaRenderer.xml
  19. 1 1
      style24.admin/target/classes/com/style24/persistence/mybatis/shop/TsaSystem.xml
  20. 1 1
      style24.admin/target/m2e-wtp/web-resources/META-INF/maven/com.style24.admin/style24.admin/pom.properties

+ 1 - 0
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaLogin.xml

@@ -196,6 +196,7 @@
 		     , MENU_ID                /*메뉴ID*/
 		     , MENU_NM                /*메뉴명*/
 		     , NAVIGATION             /*네비게이션*/
+		     , MENU_DESC              /*메뉴설명*/
 		     , MENU_URL               /*메뉴URL*/
 		     , MENU_LVL               /*메뉴레벨*/
 		     , CASE WHEN IFNULL((SELECT MAX(MENU_LVL)

+ 6 - 1
style24.admin/src/main/webapp/WEB-INF/views/business/SupplyCompanyForm.html

@@ -20,6 +20,11 @@
 		</div>
 		<!-- //메인타이틀 영역 -->
 		
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<!-- //메뉴 설명 -->
+		
 		<!-- 검색조건 영역 -->
 		<div class="panelStyle">
 			<form id="searchForm" name="searchForm" action="#" th:action="@{'/business/supply/company/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
@@ -69,7 +74,7 @@
 			</ul>
 			<!-- //버튼 배치 영역 -->
 			
-			<div id="gridList" style="width: 100%; height: 370px" class="ag-theme-balham"></div>
+			<div id="gridList" style="width: 100%; height: 470px" class="ag-theme-balham"></div>
 		</div>
 		<!-- //리스트 영역 -->
 		

+ 5 - 45
style24.admin/src/main/webapp/WEB-INF/views/common/fragments/gnb.html

@@ -66,65 +66,25 @@
 	
 <script th:inline="javascript">
 /*<![CDATA[*/
-	var loginMenuList = [[${loginMenuList}]];
-	
 	// Header 메뉴 클릭
 	$('.header-menu > span > a').on('click', function() {
 		// 햄버거 버튼 보이기
 		$('.header-logo').find('.lnbClose').show();
 		
-		var a = $(this);
-		
 		// active/inactive
-		var parentTag = $(a).parent().parent();
+		let a = $(this);
+		let parentTag = $(a).parent().parent();
 		$.each($(parentTag).find('a'), function(idx) {
 			$(this).removeClass('on');
 		});
 		$(a).addClass('on');
 		
-		var gnbMenuId = $(a).data('menuId');
-		
-		var lnbTag = '<li>\n';
-		
-		$.each(loginMenuList, function(idx1, item1) {
-			if (gnbMenuId == item1.pmenuId) {
-				if (item1.leafLvl == 0) {
-					//lnbTag += '	<a class="dep2" attr="data-url=' + item1.menuUrl + '">\n';
-					lnbTag += '	<a class="dep2" href="javascript:void(0);" onclick="fnClickLnb(\'' + item1.menuUrl + '\', \'' + item1.navigation + '\', this);">\n';
-				} else {
-					lnbTag += '	<a class="dep2">\n';
-				}
-				
-				/* lnbTag += '		<i class="fa fa-shopping-cart"></i>\n';
-				lnbTag += '		<span class="nav-label"> ' + item1.menuNm + '</span>\n';
-				lnbTag += '		<i class="mnArrow fa fa-angle-down"></i>\n'; */
-				lnbTag += item1.menuNm + '\n';
-				lnbTag += '	</a>\n';
-				
-				if (item1.leafLvl > 0) {
-					lnbTag += '	<ul class="dep3">\n';
-					
-					$.each(loginMenuList, function(idx2, item2) {
-						if (item1.menuId == item2.pmenuId) {
-							lnbTag += '		<li>\n';
-							//lnbTag += '			<a href="javascript:void(0);" attr="data-url=' + item2.menuUrl + '"><span>' + item2.menuNm + '</span></a>\n';
-							lnbTag += '			<a href="javascript:void(0);" onclick="fnClickLnb(\'' + item2.menuUrl + '\', \'' + item2.navigation + '\', this);"><span>' + item2.menuNm + '</span></a>\n';
-							lnbTag += '		</li>\n';
-						}
-					});
-					
-					lnbTag += '	</ul>\n';
-				}
-			}
-		});
-		
-		lnbTag += '</li>\n';
-		
-		$('#lnb').html(lnbTag);
+		cfnDrawLnbMenu($(a).data('menuId'));
 	});
 	
 	$(document.body).ready(function() {
-		
+		// 로그인메뉴목록 설정
+		cfnSetLoginMenuList([[${loginMenuList}]]);
 	});
 /*]]>*/
 </script>

+ 20 - 17
style24.admin/src/main/webapp/WEB-INF/views/common/fragments/lnb.html

@@ -24,22 +24,18 @@
 <script th:inline="javascript">
 /*<![CDATA[*/
 	// LNB 메뉴 클릭 시
-	var fnClickLnb = function(actionUrl, navigation, obj) {
-		// data-url 속성이 없으면 skip
-		if (gagajf.isNull(actionUrl)) {
+	let fnClickLnb = function(menuId) {
+		let menu = cfnGetMenuInfo(menuId);
+
+		// Menu 정보가 없으면 skip
+		if (typeof(menu) == 'undefined') {
 			return;
 		}
-
-// 		$.each($('#lnb').find('li > a'), function(idx) {
-// 			$(this).removeClass('on');
-// 		});
-
-// 		$(obj).addClass('on');
-
-		$('#content').load(actionUrl, function(){
+		
+		$('#content').load(menu.menuUrl, function() {
 			// Content Main Title
-			var arrNavigation = navigation.split(' > ');
-			var contentTitle = '';
+			let arrNavigation = menu.navigation.split(' > ');
+			let contentTitle = '';
 			contentTitle += '<h1>' + (arrNavigation.length > 2 ? arrNavigation[2] : (arrNavigation.length > 1 ? arrNavigation[1] : arrNavigation[0])) + '</h1>\n';
 			contentTitle += '<ol>\n';
 			contentTitle += '	<li><i class="fa fa-home"></i> <a>' + arrNavigation[0] + '</a></li>\n';
@@ -52,16 +48,23 @@
 			contentTitle += '</ol>\n';
 			$('.main-title').html(contentTitle);
 			
+			if (!gagajf.isNull(menu.menuDesc)) {
+				$('.menu-desc').html(menu.menuDesc);
+				if ($('.menu-desc').length > 0) $('.menu-desc').show();
+			} else {
+				if ($('.menu-desc').length > 0) $('.menu-desc').hide();
+			}
+			
 			$('.schDate').datepicker({
 				changeMonth: true,
 				changeYear: true,
 				defaultDate: $('.schDate').val()
 			});
 
-			var currentYear = (new Date()).getFullYear();
-			var startYear = currentYear - 10;
-			var finalYear = currentYear + 10;
-			var options = {
+			let currentYear = (new Date()).getFullYear();
+			let startYear = currentYear - 10;
+			let finalYear = currentYear + 10;
+			let options = {
 				startYear: startYear,
 				finalYear: finalYear,
 				pattern: 'yyyy-mm',

+ 5 - 0
style24.admin/src/main/webapp/WEB-INF/views/system/CommoncodeForm.html

@@ -20,6 +20,11 @@
 		</div>
 		<!-- //메인타이틀 영역 -->
 		
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<!-- //메뉴 설명 -->
+		
 		<!-- 검색조건 영역 -->
 		<div class="panelStyle">
 			<!-- Search -->

+ 5 - 0
style24.admin/src/main/webapp/WEB-INF/views/system/MenuForm.html

@@ -20,6 +20,11 @@
 		</div>
 		<!-- //메인타이틀 영역 -->
 		
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<!-- //메뉴 설명 -->
+		
 		<!-- 검색조건 영역 -->
 		<div class="panelStyle">
 			<!-- Search -->

+ 5 - 0
style24.admin/src/main/webapp/WEB-INF/views/system/UserForm.html

@@ -20,6 +20,11 @@
 		</div>
 		<!-- //메인타이틀 영역 -->
 		
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<!-- //메뉴 설명 -->
+		
 		<!-- 검색조건 영역 -->
 		<div class="panelStyle">
 			<form id="searchForm" name="searchForm" action="#" th:action="@{'/system/user/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">

+ 70 - 0
style24.admin/src/main/webapp/ux/js/admin.common.js

@@ -8,6 +8,76 @@
  * $Date: 2019-08-06 $
  */
 
+/**
+ * 로그인메뉴목록을 sessionStorage에 담는다.
+ */
+let cfnSetLoginMenuList = function(loginMenuList) {
+	sessionStorage.setItem('loginMenuList', JSON.stringify(loginMenuList));
+}
+
+/**
+ * sessionStorage에 담긴 메뉴정보를 가져온다.
+ */
+let cfnGetMenuInfo = function(menuId) {
+	let loginMenuList = JSON.parse(sessionStorage.loginMenuList);
+	
+	let menu = '';
+
+	loginMenuList.forEach(function(item) {
+		if (menuId == item.menuId) {
+			menu = item;
+			return false;
+		}
+	});
+
+	return menu;
+}
+
+/**
+ * LNB메뉴 그리기
+ */
+let cfnDrawLnbMenu = function(gnbMenuId) {
+	let loginMenuList = JSON.parse(sessionStorage.loginMenuList);
+	
+	let lnbTag = '<li>\n';
+	
+	$.each(loginMenuList, function(idx1, item1) {
+		if (gnbMenuId == item1.pmenuId) {
+			if (item1.leafLvl == 0) {
+				//lnbTag += '	<a class="dep2" attr="data-url=' + item1.menuUrl + '">\n';
+				lnbTag += '	<a class="dep2" href="javascript:void(0);" onclick="fnClickLnb(\'' + item1.menuId + '\');">\n';
+			} else {
+				lnbTag += '	<a class="dep2">\n';
+			}
+			
+			/* lnbTag += '		<i class="fa fa-shopping-cart"></i>\n';
+			lnbTag += '		<span class="nav-label"> ' + item1.menuNm + '</span>\n';
+			lnbTag += '		<i class="mnArrow fa fa-angle-down"></i>\n'; */
+			lnbTag += item1.menuNm + '\n';
+			lnbTag += '	</a>\n';
+			
+			if (item1.leafLvl > 0) {
+				lnbTag += '	<ul class="dep3">\n';
+				
+				$.each(loginMenuList, function(idx2, item2) {
+					if (item1.menuId == item2.pmenuId) {
+						lnbTag += '		<li>\n';
+						//lnbTag += '			<a href="javascript:void(0);" attr="data-url=' + item2.menuUrl + '"><span>' + item2.menuNm + '</span></a>\n';
+						lnbTag += '			<a href="javascript:void(0);" onclick="fnClickLnb(\'' + item2.menuId + '\');"><span>' + item2.menuNm + '</span></a>\n';
+						lnbTag += '		</li>\n';
+					}
+				});
+				
+				lnbTag += '	</ul>\n';
+			}
+		}
+	});
+	
+	lnbTag += '</li>\n';
+	
+	$('#lnb').html(lnbTag);
+}
+
 /**
  * @type   : function
  * @access : public

BIN
style24.admin/target/classes/com/style24/admin/biz/dao/TsaBusinessDao.class


BIN
style24.admin/target/classes/com/style24/admin/biz/service/TsaBusinessService.class


BIN
style24.admin/target/classes/com/style24/admin/biz/service/TsaSystemService.class


BIN
style24.admin/target/classes/com/style24/admin/biz/web/TsaBusinessController.class


BIN
style24.admin/target/classes/com/style24/persistence/domain/Brand.class


BIN
style24.admin/target/classes/com/style24/persistence/domain/MenuRole.class


BIN
style24.admin/target/classes/com/style24/persistence/domain/SupplyCompany.class


+ 141 - 0
style24.admin/target/classes/com/style24/persistence/mybatis/shop/TsaBusiness.xml

@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.style24.admin.biz.dao.TsaBusinessDao">
+
+	<!-- 공급업체 목록 -->
+	<select id="getSupplyCompanyList" parameterType="SupplyCompany" resultType="SupplyCompany">
+		/* TsaBusiness.getSupplyCompanyList */
+		SELECT SUPPLY_COMP_CD   /*공급업체코드*/
+		     , SUPPLY_COMP_NM   /*공급업체명*/
+		     , BIZ_GB           /*사업자구분*/
+		     , BIZ_NO           /*사업자등록번호*/
+		     , BIZ_KIND         /*업종*/
+		     , BIZ_TYPE         /*업태*/
+		     , OWNER_NM         /*대표자명*/
+		     , BIZ_ZIPCODE      /*사업장우편번호*/
+		     , BIZ_BASE_ADDR    /*사업장기본주소*/
+		     , BIZ_DTL_ADDR     /*사업장상세주소*/
+		     , MAIN_TELNO       /*대표전화번호*/
+		     , MAIN_FAXNO       /*대표팩스번호*/
+		     , HOMEPAGE_URL     /*홈페이지URL*/
+		     , DISTRIBUTION_GB  /*유통구분*/
+		     , SUPPLY_STAT      /*입점상태*/
+		     , MIN_ORD_AMT      /*무료배송비최소주문금액*/
+		     , DELV_FEE         /*배송비*/
+		     , SELL_FEE_RATE    /*판매수수료율*/
+		     , SETTLE_DAY       /*정산일*/
+		     , BANK_CD          /*은행코드*/
+		     , ACCOUNT_NO       /*계좌번호*/
+		     , DEPOSITOR_NM     /*예금주명*/
+		     , REMARKS          /*비고*/
+		     , USE_YN           /*사용여부*/
+		FROM   TB_SUPPLY_COMPANY
+		WHERE  1 = 1
+		<if test="supplyStat != null and supplyStat != ''">
+		AND    SUPPLY_STAT = #{supplyStat}
+		</if>
+		<if test="searchTxt != null and searchTxt != ''">
+			<if test='searchGb == "NAME"'>
+			AND    UPPER(SUPPLY_COMP_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
+			</if>
+			<if test='searchGb == "OWNER"'>
+			AND    UPPER(OWNER_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
+			</if>
+		</if>
+	</select>
+	
+	<!-- 공급업체 저장 -->
+	<insert id="saveSupplyCompany" parameterType="SupplyCompany">
+		/* TsaBusiness.saveSupplyCompany */
+		INSERT INTO TB_SUPPLY_COMPANY (
+		       SUPPLY_COMP_CD
+		     , SUPPLY_COMP_NM
+		     , BIZ_GB
+		     , BIZ_NO
+		     , BIZ_KIND
+		     , BIZ_TYPE
+		     , OWNER_NM
+		     , BIZ_ZIPCODE
+		     , BIZ_BASE_ADDR
+		     , BIZ_DTL_ADDR
+		     , MAIN_TELNO
+		     , MAIN_FAXNO
+		     , HOMEPAGE_URL
+		     , DISTRIBUTION_GB
+		     , SUPPLY_STAT
+		     , MIN_ORD_AMT
+		     , DELV_FEE
+		     , SELL_FEE_RATE
+		     , SETTLE_DAY
+		     , BANK_CD
+		     , ACCOUNT_NO
+		     , DEPOSITOR_NM
+		     , REMARKS
+		     , USE_YN
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       (SELECT 'S'||LPAD(SUBSTRING(MAX(SUPPLY_COMP_CD),2) + 1,4,'0')
+		        FROM   TB_SUPPLY_COMPANY
+		        WHERE  SUPPLY_COMP_CD LIKE 'S%'
+		       )
+		     , #{supplyCompNm}
+		     , #{bizGb}
+		     , #{bizNo}
+		     , #{bizKind}
+		     , #{bizType}
+		     , #{ownerNm}
+		     , #{bizZipcode}
+		     , #{bizBaseAddr}
+		     , #{bizDtlAddr}
+		     , #{mainTelno}
+		     , #{mainFaxno}
+		     , #{homepageUrl}
+		     , #{distributionGb}
+		     , #{supplyStat}
+		     , IFNULL(#{minOrdAmt},0)
+		     , IFNULL(#{delvFee},0)
+		     , IFNULL(#{sellFeeRate},0.0)
+		     , #{settleDay}
+		     , #{bankCd}
+		     , #{accountNo}
+		     , #{depositorNm}
+		     , #{remarks}
+		     , #{useYn}
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+		ON DUPLICATE KEY UPDATE
+		       SUPPLY_COMP_NM  = #{supplyCompNm}
+		     , BIZ_GB          = #{bizGb}
+		     , BIZ_NO          = #{bizNo}
+		     , BIZ_KIND        = #{bizKind}
+		     , BIZ_TYPE        = #{bizType}
+		     , OWNER_NM        = #{ownerNm}
+		     , BIZ_ZIPCODE     = #{bizZipcode}
+		     , BIZ_BASE_ADDR   = #{bizBaseAddr}
+		     , BIZ_DTL_ADDR    = #{bizDtlAddr}
+		     , MAIN_TELNO      = #{mainTelno}
+		     , MAIN_FAXNO      = #{mainFaxno}
+		     , HOMEPAGE_URL    = #{homepageUrl}
+		     , DISTRIBUTION_GB = #{distributionGb}
+		     , SUPPLY_STAT     = #{supplyStat}
+		     , MIN_ORD_AMT     = IFNULL(#{minOrdAmt},0)
+		     , DELV_FEE        = IFNULL(#{delvFee},0)
+		     , SELL_FEE_RATE   = IFNULL(#{sellFeeRate},0.0)
+		     , SETTLE_DAY      = #{settleDay}
+		     , BANK_CD         = #{bankCd}
+		     , ACCOUNT_NO      = #{accountNo}
+		     , DEPOSITOR_NM    = #{depositorNm}
+		     , REMARKS         = #{remarks}
+		     , USE_YN          = #{useYn}
+		     , UPD_NO          = #{updNo}
+		     , UPD_DT          = NOW()
+	</insert>
+
+</mapper>

+ 1 - 0
style24.admin/target/classes/com/style24/persistence/mybatis/shop/TsaLogin.xml

@@ -196,6 +196,7 @@
 		     , MENU_ID                /*메뉴ID*/
 		     , MENU_NM                /*메뉴명*/
 		     , NAVIGATION             /*네비게이션*/
+		     , MENU_DESC              /*메뉴설명*/
 		     , MENU_URL               /*메뉴URL*/
 		     , MENU_LVL               /*메뉴레벨*/
 		     , CASE WHEN IFNULL((SELECT MAX(MENU_LVL)

+ 5 - 2
style24.admin/target/classes/com/style24/persistence/mybatis/shop/TsaRenderer.xml

@@ -12,8 +12,11 @@
 		<if test='supplyCompCd != null and supplyCompCd != ""'>
 		AND    SUPPLY_COMP_CD = #{supplyCompCd}
 		</if>
-		<if test='selfYn != null and selfYn != ""'>
-		AND    SELF_YN = #{selfYn}
+		<if test='selfYn == "Y"'>
+		AND    DISTRIBUTION_GB IN ('G065_10','G065_11','G065_12')
+		</if>
+		<if test='selfYn == "N"'>
+		AND    DISTRIBUTION_GB = 'G065_20'
 		</if>
 		ORDER  BY SUPPLY_COMP_NM
 	</select>

+ 1 - 1
style24.admin/target/classes/com/style24/persistence/mybatis/shop/TsaSystem.xml

@@ -225,7 +225,7 @@
 		       NULL
 		     , #{userNo}
 		     , #{chgGb}
-		     , CASE WHEN #{chgGb} = 'G060_20' THEN
+		     , CASE WHEN #{chgGb} = 'G049_20' THEN
 		                CONCAT(FN_GET_CODE_NM('G001',#{orgRoleCd}),' -> ',FN_GET_CODE_NM('G001',#{roleCd}))
 		            ELSE
 		                NULL

+ 1 - 1
style24.admin/target/m2e-wtp/web-resources/META-INF/maven/com.style24.admin/style24.admin/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven Integration for Eclipse
-#Tue Oct 13 10:57:16 KST 2020
+#Thu Oct 15 10:56:52 KST 2020
 version=0.0.1-SNAPSHOT
 groupId=com.style24.admin
 m2e.projectName=style24.admin