tsit05 4 лет назад
Родитель
Сommit
18e1a223d8

+ 3 - 2
src/main/java/com/style24/admin/biz/web/TsaDeliveryController.java

@@ -20,10 +20,11 @@ import com.style24.admin.biz.service.TsaRendererService;
 import com.style24.admin.biz.service.TsaDeliveryService;
 import com.style24.admin.support.controller.TsaBaseController;
 import com.style24.admin.support.security.session.TsaSession;
+import com.style24.core.support.session.TscSession;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.TscPageRequest;
 import com.style24.persistence.domain.Delivery;
-import com.style24.persistence.domain.DeliveryLoc;
+
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -113,7 +114,7 @@ public class TsaDeliveryController extends TsaBaseController {
 		GagaMap result = new GagaMap();
 		delivery.setPageable(new TscPageRequest(delivery.getPageNo() - 1, delivery.getPageSize()));
 		delivery.getPageable().setTotalCount(deliveryService.getDeliveryListCount(delivery));
-
+		TscSession.setAttribute("maskingYn", TsaSession.getInfo().getMaskingYn());
 
 		if ("N".equals(delivery.getPageingYn())) {
 			delivery.setPageable(null);

+ 22 - 3
src/main/java/com/style24/persistence/domain/Delivery.java

@@ -5,6 +5,9 @@ import java.util.Collection;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.style24.persistence.TscBaseDomain;
 import com.style24.persistence.TscPageRequest;
+import com.style24.core.support.session.TscSession;
+import com.style24.core.support.util.CryptoUtils;
+import com.style24.core.support.util.MaskingUtils;
 
 import lombok.Data;
 
@@ -177,9 +180,25 @@ public class Delivery extends TscBaseDomain {
 	private String delvFeeCdGrp;
 	
 	
-	
-	
-	
+	// Masking
+
+	public String getMaskingOrdNm() {
+		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.name(this.ordNm) : this.ordNm;
+
+	}
+
+	public String getMaskingRecipNm() {
+		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.name(this.recipNm) : this.recipNm;
+
+	}
+
+	public String getMaskingOrdPhnno() {
+		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.phoneNo(this.ordPhnno) : this.ordPhnno;
+	}
+
+	public String getMaskingRecipDtlAddr() {
+		return TscSession.getAttribute("maskingYn").equals("Y") ? MaskingUtils.address(this.recipDtlAddr) : this.recipDtlAddr;
+	}
 
 	
 	

+ 24 - 10
src/main/webapp/WEB-INF/views/delivery/DeliveryListForm.html

@@ -67,7 +67,7 @@
 							</select>
 						</td>
 
-						<th>업체/브랜드<em class="required" title="필수"></em></th>
+						<th>업체/브랜드</th>
 						<td colspan="3">
 								<select name="supplyCompCd" id="supplyCompCd">
 									<option value="">[전체]</option>
@@ -102,9 +102,9 @@
 						</td>
 						<th>주문상세번호</th>
 						<td>
-							<input type="text" class="" name="ordDtlNo" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" placeholder="" maxlength="20"/>
+							<input type="text" class="" name="ordDtlNo" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" placeholder="" maxlength="9"/>
 						</td>
-						<th rowspan="4">키워드<i class="star"></i></th>
+						<th rowspan="4">키워드<em class="required" title="필수"></em><i class="star"></i></th>
 						<td rowspan="4" colspan="5">
 							<select class="w130" name="search" id="search">
 								<option value="searchOrdNo">주문번호</option>
@@ -151,7 +151,7 @@
 						</td>
 					</tr>
 					<tr>
-						<th>기간</th>
+						<th>기간<em class="required" title="필수"></em></th>
 						<td colspan="8">
 							<select name="termGb" id="termGb">
 								<option value="ordDt">주문등록일</option>
@@ -262,17 +262,19 @@
 			}
 		},
 		{headerName: "몰구분", 		field: "mallGbNm", 		width: 70, cellClass: 'text-center'},
-		{headerName: "주문자", 		field: "ordNm", 		width: 100, cellClass: 'text-center',
+		{headerName: "주문자", 		field: "maskingOrdNm", 		width: 100, cellClass: 'text-center',
 			cellRenderer: function (params) {
 				if (roleCd.indexOf("C") < 0 && !gagajf.isNull(params.value) && params.data.mallGb === 'G011_10' && params.data.custNo > 0) {
-					return '<a href="javascript:void(0);" onclick=\"cfnOpenCustDetailPopup(' + params.data.custNo + ');\">' + params.data.ordNm + '</a>';
+					return '<a href="javascript:void(0);" onclick=\"cfnOpenCustDetailPopup(' + params.data.custNo + ');\">' + params.data.maskingOrdNm + '</a>';
 				} else {
-					return params.data.ordNm;
+					return params.data.maskingOrdNm;
 				}
 			}
 		},
-		{headerName: "휴대번호", 		field: "ordPhnno", 		width: 100, cellClass: 'text-center'},
-		{headerName: "수령인", 		field: "recipNm", 		width: 100, cellClass: 'text-center'},
+		{headerName: "휴대번호", 		field: "maskingOrdPhnno", 		width: 100, cellClass: 'text-center',
+			valueGetter: function (params) { return params.data.maskingOrdPhnno; }
+		},
+		{headerName: "수령인", 		field: "maskingRecipNm", 		width: 100, cellClass: 'text-center'},
 		{headerName: "공급업체", 		field: "supplyCompNm", 	width: 150, cellClass: 'text-center'},
 		{headerName: "브랜드", 		field: "supplyCompNm", 	width: 150, cellClass: 'text-center'},
 		{headerName: "상품코드", 		field: "goodsCd", 		width: 120, cellClass: 'text-center',
@@ -352,7 +354,7 @@
 		{headerName: "배송메모", 		field: "delvMemo", 		width: 200, cellClass: 'text-left'},
 		{headerName: "우편번호", 		field: "recipZipcode", 		width: 80, cellClass: 'text-center'},
 		{headerName: "기본주소", 		field: "recipBaseAddr", 	width: 200, cellClass: 'text-left'},
-		{headerName: "상세주소", 		field: "recipDtlAddr", 		width: 200, cellClass: 'text-left'},
+		{headerName: "상세주소", 		field: "maskingRecipDtlAddr", 		width: 200, cellClass: 'text-left'},
 		{headerName: "product_no", 	field: "productNo", 	width: 100, cellClass: 'text-center'},
 		{headerName: "product_code",field: "productCode", 	width: 100, cellClass: 'text-center'}
 		
@@ -421,6 +423,18 @@
 				return;
 			}
 		}
+		
+		if ($('#searchForm input[name=delvDelayDays]').val() != '') {
+			if ($('#stDate').val() == '') {
+				mcxDialog.alert('시작 기간을 입력하세요.');
+				return;
+			}
+
+			if ($('#edDate').val() == '') {
+				mcxDialog.alert('종료 기간을 입력하세요.');
+				return;
+			}
+		}
 
 		gagaPaging.init('searchForm', fnSearchCallBack, 'deliveryListPagination', $('#searchForm').find('#pageSize').val());
 	    gagaPaging.load($("#searchForm input[name=pageNo]").val());