From cac5f79a4029031f9e0e92ad0abd989ea81998fb Mon Sep 17 00:00:00 2001 From: sxxxxxb Date: Fri, 31 Jul 2026 14:57:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=8A=A4=EC=A0=95=EB=A6=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net/jwsi/jcms/vpp/chgr/ChgrService.java | 7 ++- .../jwsi/jcms/vpp/chgr/ChgrSpecification.java | 15 +++++- .../chgrCurrState/ChgrCurrStateService.java | 10 +++- .../ChgrCurrStateSpecification.java | 35 ++++++++++++++ .../jcms/vpp/chgrHist/ChgrHistService.java | 7 ++- .../vpp/chgrHist/ChgrHistSpecification.java | 17 +++++++ .../jcms/vpp/provider/ProviderService.java | 2 +- .../vpp/provider/ProviderSpecification.java | 4 +- .../jcms/vpp/ratePlan/RatePlanService.java | 10 +++- .../vpp/ratePlan/RatePlanSpecification.java | 23 ++++++++++ .../jwsi/jcms/vpp/station/StationService.java | 3 +- .../vpp/station/StationSpecification.java | 7 ++- .../resources/templates/system/chgr/list.html | 30 ------------ .../templates/system/chgrCurrState/list.html | 14 +++--- .../templates/system/chgrHist/list.html | 46 +------------------ .../templates/system/provider/list.html | 28 ----------- .../templates/system/station/list.html | 18 -------- 17 files changed, 138 insertions(+), 138 deletions(-) create mode 100644 src/main/java/net/jwsi/jcms/vpp/chgrCurrState/ChgrCurrStateSpecification.java create mode 100644 src/main/java/net/jwsi/jcms/vpp/chgrHist/ChgrHistSpecification.java create mode 100644 src/main/java/net/jwsi/jcms/vpp/ratePlan/RatePlanSpecification.java diff --git a/src/main/java/net/jwsi/jcms/vpp/chgr/ChgrService.java b/src/main/java/net/jwsi/jcms/vpp/chgr/ChgrService.java index 071fcde..fd48a3b 100644 --- a/src/main/java/net/jwsi/jcms/vpp/chgr/ChgrService.java +++ b/src/main/java/net/jwsi/jcms/vpp/chgr/ChgrService.java @@ -73,7 +73,12 @@ public class ChgrService extends BaseService { @Override protected Specification getSpecification(Chgr chgr) { - return null; + Specification rst = null; + if(chgr == null) return null; + + rst = addWhere(rst, chgr.getChgrId(), ChgrSpecification.getChgrId(chgr.getChgrId())); + rst = addWhere(rst, chgr.getStId(), ChgrSpecification.getStId(chgr.getStId())); + return rst; } @Override diff --git a/src/main/java/net/jwsi/jcms/vpp/chgr/ChgrSpecification.java b/src/main/java/net/jwsi/jcms/vpp/chgr/ChgrSpecification.java index 039cc82..fcf1ec8 100644 --- a/src/main/java/net/jwsi/jcms/vpp/chgr/ChgrSpecification.java +++ b/src/main/java/net/jwsi/jcms/vpp/chgr/ChgrSpecification.java @@ -1,4 +1,17 @@ package net.jwsi.jcms.vpp.chgr; -public class ChgrSpecification { +import net.jwsi.jcms.base.BaseSpecification; +import org.springframework.data.jpa.domain.Specification; + +public class ChgrSpecification extends BaseSpecification { + public static Specification getStId(String stId) { + return (root, query, cb) -> { + return cb.equal(root.get("stId"), stId); + }; + } + public static Specification getChgrId(String chgrId) { + return (root, query, cb) -> { + return cb.equal(root.get("chgrId"), chgrId); + }; + } } diff --git a/src/main/java/net/jwsi/jcms/vpp/chgrCurrState/ChgrCurrStateService.java b/src/main/java/net/jwsi/jcms/vpp/chgrCurrState/ChgrCurrStateService.java index b7170dd..3475105 100644 --- a/src/main/java/net/jwsi/jcms/vpp/chgrCurrState/ChgrCurrStateService.java +++ b/src/main/java/net/jwsi/jcms/vpp/chgrCurrState/ChgrCurrStateService.java @@ -72,7 +72,15 @@ public class ChgrCurrStateService extends BaseService getSpecification(ChgrCurrState chgrCurrState) { - return null; + Specification rst = null; + if(chgrCurrState == null) return null; + rst = addWhere(rst, chgrCurrState.getChgrId(), ChgrCurrStateSpecification.getChgrId(chgrCurrState.getChgrId())); + rst = addWhere(rst, chgrCurrState.getStId(), ChgrCurrStateSpecification.getStId(chgrCurrState.getStId())); + + rst = addWhere(rst, chgrCurrState.getCh1DoorStateCd(), ChgrCurrStateSpecification.getDoorState(chgrCurrState.getCh1DoorStateCd())); + rst = addWhere(rst, chgrCurrState.getCh1PlugStateCd(), ChgrCurrStateSpecification.getPlugState(chgrCurrState.getCh1PlugStateCd())); + rst = addWhere(rst, chgrCurrState.getCh1RechgStateCd(), ChgrCurrStateSpecification.getRechgState(chgrCurrState.getCh1RechgStateCd())); + return rst; } @Override diff --git a/src/main/java/net/jwsi/jcms/vpp/chgrCurrState/ChgrCurrStateSpecification.java b/src/main/java/net/jwsi/jcms/vpp/chgrCurrState/ChgrCurrStateSpecification.java new file mode 100644 index 0000000..3a367c2 --- /dev/null +++ b/src/main/java/net/jwsi/jcms/vpp/chgrCurrState/ChgrCurrStateSpecification.java @@ -0,0 +1,35 @@ +package net.jwsi.jcms.vpp.chgrCurrState; + +import net.jwsi.jcms.base.BaseSpecification; +import org.springframework.data.jpa.domain.Specification; + +public class ChgrCurrStateSpecification extends BaseSpecification { + + public static Specification getStId(String stId) { + return (root, query, cb) -> { + return cb.equal(root.get("stId"), stId); + }; + } + public static Specification getChgrId(String chgrId) { + return (root, query, cb) -> { + return cb.equal(root.get("chgrId"), chgrId); + }; + } + + public static Specification getDoorState(String doorState) { + return (root, query, cb) -> { + return cb.equal(root.get("ch1DoorStateCd"), doorState); + }; + } + public static Specification getPlugState(String plugState) { + return (root, query, cb) -> { + return cb.equal(root.get("ch1PlugStateCd"), plugState); + }; + } + public static Specification getRechgState(String rechgState) { + return (root, query, cb) -> { + return cb.equal(root.get("ch1RechgStateCd"), rechgState); + }; + } + +} \ No newline at end of file diff --git a/src/main/java/net/jwsi/jcms/vpp/chgrHist/ChgrHistService.java b/src/main/java/net/jwsi/jcms/vpp/chgrHist/ChgrHistService.java index 300db22..f39ade6 100644 --- a/src/main/java/net/jwsi/jcms/vpp/chgrHist/ChgrHistService.java +++ b/src/main/java/net/jwsi/jcms/vpp/chgrHist/ChgrHistService.java @@ -86,7 +86,12 @@ public class ChgrHistService extends BaseService getSpecification(ChgrHist chgrHist) { - return null; + Specification rst = null; + if(chgrHist == null) return null; + + rst = addWhere(rst, chgrHist.getChgrId(), ChgrHistSpecification.getChgrId(chgrHist.getChgrId())); + rst = addWhere(rst, chgrHist.getStId(), ChgrHistSpecification.getStId(chgrHist.getStId())); + return rst; } @Override diff --git a/src/main/java/net/jwsi/jcms/vpp/chgrHist/ChgrHistSpecification.java b/src/main/java/net/jwsi/jcms/vpp/chgrHist/ChgrHistSpecification.java new file mode 100644 index 0000000..d89e871 --- /dev/null +++ b/src/main/java/net/jwsi/jcms/vpp/chgrHist/ChgrHistSpecification.java @@ -0,0 +1,17 @@ +package net.jwsi.jcms.vpp.chgrHist; + +import net.jwsi.jcms.base.BaseSpecification; +import org.springframework.data.jpa.domain.Specification; + +public class ChgrHistSpecification extends BaseSpecification { + public static Specification getStId(String stId) { + return (root, query, cb) -> { + return cb.equal(root.get("stId"), stId); + }; + } + public static Specification getChgrId(String chgrId) { + return (root, query, cb) -> { + return cb.equal(root.get("chgrId"), chgrId); + }; + } +} diff --git a/src/main/java/net/jwsi/jcms/vpp/provider/ProviderService.java b/src/main/java/net/jwsi/jcms/vpp/provider/ProviderService.java index 9fe9517..6655b19 100644 --- a/src/main/java/net/jwsi/jcms/vpp/provider/ProviderService.java +++ b/src/main/java/net/jwsi/jcms/vpp/provider/ProviderService.java @@ -80,7 +80,7 @@ public class ProviderService extends BaseService getSpecification(Provider srch) { if (srch == null) return null; Specification rst = null; - rst = addWhere(rst, srch.getProviderId(), ProviderSpecification.providerId(srch.getProviderId())); + rst = addWhere(rst, srch.getProviderNm(), ProviderSpecification.providerNm(srch.getProviderNm())); return rst; } diff --git a/src/main/java/net/jwsi/jcms/vpp/provider/ProviderSpecification.java b/src/main/java/net/jwsi/jcms/vpp/provider/ProviderSpecification.java index 43ee557..605fdbe 100644 --- a/src/main/java/net/jwsi/jcms/vpp/provider/ProviderSpecification.java +++ b/src/main/java/net/jwsi/jcms/vpp/provider/ProviderSpecification.java @@ -4,7 +4,7 @@ import org.springframework.data.jpa.domain.Specification; public class ProviderSpecification { - public static Specification providerId(String providerId) { - return (root, query, criteriaBuilder) -> criteriaBuilder.equal(root.get("providerId"), providerId); + public static Specification providerNm(String providerNm) { + return (root, query, criteriaBuilder) -> criteriaBuilder.like(root.get("providerNm"), "%"+providerNm+"%"); } } diff --git a/src/main/java/net/jwsi/jcms/vpp/ratePlan/RatePlanService.java b/src/main/java/net/jwsi/jcms/vpp/ratePlan/RatePlanService.java index 0cc575a..54e7c70 100644 --- a/src/main/java/net/jwsi/jcms/vpp/ratePlan/RatePlanService.java +++ b/src/main/java/net/jwsi/jcms/vpp/ratePlan/RatePlanService.java @@ -183,9 +183,17 @@ public class RatePlanService extends BaseService getSpecification(RatePlan ratePlan) { - return null; + Specification rst = null; + if(ratePlan == null) return null; + + rst = addWhere(rst, ratePlan.getRatePlanName(), RatePlanSpecification.getRatePlanNm(ratePlan.getRatePlanName())); + rst = addWhere(rst, ratePlan.getApprovalStatus(), RatePlanSpecification.getApprovalStatus(ratePlan.getApprovalStatus())); + rst = addWhere(rst, ratePlan.getIsActive(), RatePlanSpecification.getIsActive(ratePlan.getIsActive())); + return rst; } + + @Override protected Page _selectPage(RatePlan ratePlan) { return null; diff --git a/src/main/java/net/jwsi/jcms/vpp/ratePlan/RatePlanSpecification.java b/src/main/java/net/jwsi/jcms/vpp/ratePlan/RatePlanSpecification.java new file mode 100644 index 0000000..ba7f094 --- /dev/null +++ b/src/main/java/net/jwsi/jcms/vpp/ratePlan/RatePlanSpecification.java @@ -0,0 +1,23 @@ +package net.jwsi.jcms.vpp.ratePlan; + +import net.jwsi.jcms.base.BaseSpecification; +import org.springframework.data.jpa.domain.Specification; + +public class RatePlanSpecification extends BaseSpecification { + public static Specification getRatePlanNm(String ratePlanName) { + return (root, query, cb) -> { + return cb.like(root.get("ratePlanName"), "%"+ratePlanName+"%"); + }; + } + public static Specification getApprovalStatus(String approvalStatus) { + return (root, query, cb) -> { + return cb.equal(root.get("approvalStatus"), approvalStatus); + }; + } + + public static Specification getIsActive(String isActive) { + return (root, query, cb) -> { + return cb.equal(root.get("isActive"), isActive); + }; + } +} diff --git a/src/main/java/net/jwsi/jcms/vpp/station/StationService.java b/src/main/java/net/jwsi/jcms/vpp/station/StationService.java index 772240e..11d36e1 100644 --- a/src/main/java/net/jwsi/jcms/vpp/station/StationService.java +++ b/src/main/java/net/jwsi/jcms/vpp/station/StationService.java @@ -77,7 +77,8 @@ public class StationService extends BaseService getSpecification(Station srch) { if(srch == null) return null; Specification rst = null; - rst = addWhere(rst, srch.getStationId(), StationSpecification.stId(srch.getStationId())); + rst = addWhere(rst, srch.getStNm(), StationSpecification.stNm(srch.getStNm())); + rst = addWhere(rst, srch.getAddrLdM(), StationSpecification.addrLdM(srch.getAddrLdM())); return rst; } diff --git a/src/main/java/net/jwsi/jcms/vpp/station/StationSpecification.java b/src/main/java/net/jwsi/jcms/vpp/station/StationSpecification.java index d9351c0..5704248 100644 --- a/src/main/java/net/jwsi/jcms/vpp/station/StationSpecification.java +++ b/src/main/java/net/jwsi/jcms/vpp/station/StationSpecification.java @@ -5,7 +5,10 @@ import org.springframework.data.jpa.domain.Specification; public class StationSpecification { - public static Specification stId(String stId) { - return (root, query, criteriaBuilder) -> criteriaBuilder.equal(root.get("stId"), stId); + public static Specification stNm(String stNm) { + return (root, query, criteriaBuilder) -> criteriaBuilder.like(root.get("stNm"),"%"+stNm+"%"); + } + public static Specification addrLdM(String addrLdM) { + return (root, query, criteriaBuilder) -> criteriaBuilder.like(root.get("addrLdM"),"%"+addrLdM+"%"); } } diff --git a/src/main/resources/templates/system/chgr/list.html b/src/main/resources/templates/system/chgr/list.html index dc4c4a3..1f9ff0d 100644 --- a/src/main/resources/templates/system/chgr/list.html +++ b/src/main/resources/templates/system/chgr/list.html @@ -6,12 +6,6 @@
-
-
- 충전사업자 ID - -
-
충전소 ID @@ -24,30 +18,6 @@
-
-
- 충전소 명 - -
-
-
-
- 충전기 명 - -
-
-
-
- 충전기속도 - -
-
-
-
- 충전기타입 - -
-
diff --git a/src/main/resources/templates/system/chgrCurrState/list.html b/src/main/resources/templates/system/chgrCurrState/list.html index 4334bd0..96492a8 100644 --- a/src/main/resources/templates/system/chgrCurrState/list.html +++ b/src/main/resources/templates/system/chgrCurrState/list.html @@ -8,31 +8,31 @@
- st_id - + 충전소 아이디 +
- chgr_id - + 충전기 아이디 +
- ch1_rechg_state_cd + 충전상태
- ch1_door_state_cd + 도어상태
- ch1_plug_state_cd + 플러그상태
diff --git a/src/main/resources/templates/system/chgrHist/list.html b/src/main/resources/templates/system/chgrHist/list.html index 4fd67bd..a0acb50 100644 --- a/src/main/resources/templates/system/chgrHist/list.html +++ b/src/main/resources/templates/system/chgrHist/list.html @@ -8,52 +8,16 @@
- 충전소 명 + 충전소 아이디
- 충전기 명 + 충전기 아이디
-
-
- 결제구분 - -
-
-
-
- 충전기타입 코드 - -
-
-
-
- 충전 시작일시 - -
-
-
-
- 충전 종료일시 - -
-
-
-
- 충전시간 - -
-
-
-
- 신용결제완료구분 - -
-
@@ -283,12 +247,6 @@ $("#resetBtn").click(function() { $("#stIdLike").val(""); $("#chgrIdLike").val(""); - $("#payTpLike").val(""); - $("#plugTpLike").val(""); - $("#rechgSDtLike").val(""); - $("#rechgEDtLike").val(""); - $("#rechgTimeLike").val(""); - $("#payFnshLike").val(""); datatable.ajax.reload(); }); diff --git a/src/main/resources/templates/system/provider/list.html b/src/main/resources/templates/system/provider/list.html index f887b43..ea4fadb 100644 --- a/src/main/resources/templates/system/provider/list.html +++ b/src/main/resources/templates/system/provider/list.html @@ -12,30 +12,6 @@
-
-
- 사업자번호 - -
-
-
-
- 대표자 - -
-
-
-
- 전화번호 - -
-
-
-
- 팩스번호 - -
-
@@ -281,10 +257,6 @@ $("#resetBtn").click(function() { $("#providerNmLike").val(""); - $("#bizTaxIdLike").val(""); - $("#ceoLike").val(""); - $("#telLike").val(""); - $("#faxLike").val(""); datatable.ajax.reload(); }); diff --git a/src/main/resources/templates/system/station/list.html b/src/main/resources/templates/system/station/list.html index 6e6ca6e..0275c75 100644 --- a/src/main/resources/templates/system/station/list.html +++ b/src/main/resources/templates/system/station/list.html @@ -18,24 +18,6 @@
-
-
- 법정동 도 명 - -
-
-
-
- 법정동 시 명 - -
-
-
-
- 법정동 읍면동 명 - -
-