Compare commits

..
2 Commits
Author SHA1 Message Date
hyunjaeeun 1de5589ef2 dev의 jdbc-url 수정 / 충전사업자 관리 검색 기능 추가 2026-07-31 15:29:49 +09:00
ChooSeongBin cac5f79a40 소스정리 추가 2026-07-31 14:57:26 +09:00
15 changed files with 135 additions and 135 deletions
@@ -73,7 +73,12 @@ public class ChgrService extends BaseService<Chgr,String,ChgrRepository> {
@Override
protected Specification<Chgr> getSpecification(Chgr chgr) {
return null;
Specification<Chgr> 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
@@ -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<Chgr> getStId(String stId) {
return (root, query, cb) -> {
return cb.equal(root.get("stId"), stId);
};
}
public static Specification<Chgr> getChgrId(String chgrId) {
return (root, query, cb) -> {
return cb.equal(root.get("chgrId"), chgrId);
};
}
}
@@ -72,7 +72,15 @@ public class ChgrCurrStateService extends BaseService<ChgrCurrState,ChgrCurrStat
@Override
protected Specification<ChgrCurrState> getSpecification(ChgrCurrState chgrCurrState) {
return null;
Specification<ChgrCurrState> 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
@@ -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<ChgrCurrState> getStId(String stId) {
return (root, query, cb) -> {
return cb.equal(root.get("stId"), stId);
};
}
public static Specification<ChgrCurrState> getChgrId(String chgrId) {
return (root, query, cb) -> {
return cb.equal(root.get("chgrId"), chgrId);
};
}
public static Specification<ChgrCurrState> getDoorState(String doorState) {
return (root, query, cb) -> {
return cb.equal(root.get("ch1DoorStateCd"), doorState);
};
}
public static Specification<ChgrCurrState> getPlugState(String plugState) {
return (root, query, cb) -> {
return cb.equal(root.get("ch1PlugStateCd"), plugState);
};
}
public static Specification<ChgrCurrState> getRechgState(String rechgState) {
return (root, query, cb) -> {
return cb.equal(root.get("ch1RechgStateCd"), rechgState);
};
}
}
@@ -86,7 +86,12 @@ public class ChgrHistService extends BaseService<ChgrHist, Integer, ChgrHistRepo
@Override
protected Specification<ChgrHist> getSpecification(ChgrHist chgrHist) {
return null;
Specification<ChgrHist> 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
@@ -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<ChgrHist> getStId(String stId) {
return (root, query, cb) -> {
return cb.equal(root.get("stId"), stId);
};
}
public static Specification<ChgrHist> getChgrId(String chgrId) {
return (root, query, cb) -> {
return cb.equal(root.get("chgrId"), chgrId);
};
}
}
@@ -183,9 +183,17 @@ public class RatePlanService extends BaseService<RatePlan, Integer, RatePlanRepo
@Override
protected Specification<RatePlan> getSpecification(RatePlan ratePlan) {
return null;
Specification<RatePlan> 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<RatePlan> _selectPage(RatePlan ratePlan) {
return null;
@@ -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<RatePlan> getRatePlanNm(String ratePlanName) {
return (root, query, cb) -> {
return cb.like(root.get("ratePlanName"), "%"+ratePlanName+"%");
};
}
public static Specification<RatePlan> getApprovalStatus(String approvalStatus) {
return (root, query, cb) -> {
return cb.equal(root.get("approvalStatus"), approvalStatus);
};
}
public static Specification<RatePlan> getIsActive(String isActive) {
return (root, query, cb) -> {
return cb.equal(root.get("isActive"), isActive);
};
}
}
@@ -77,7 +77,8 @@ public class StationService extends BaseService<Station,String,StationRepository
protected Specification<Station> getSpecification(Station srch) {
if(srch == null) return null;
Specification<Station> 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;
}
@@ -5,7 +5,10 @@ import org.springframework.data.jpa.domain.Specification;
public class StationSpecification {
public static Specification<Station> stId(String stId) {
return (root, query, criteriaBuilder) -> criteriaBuilder.equal(root.get("stId"), stId);
public static Specification<Station> stNm(String stNm) {
return (root, query, criteriaBuilder) -> criteriaBuilder.like(root.get("stNm"),"%"+stNm+"%");
}
public static Specification<Station> addrLdM(String addrLdM) {
return (root, query, criteriaBuilder) -> criteriaBuilder.like(root.get("addrLdM"),"%"+addrLdM+"%");
}
}
@@ -6,12 +6,6 @@
<div th:replace="~{common/fragments/searchBox :: SearchBoxFragment(~{ :: #searchBoxContent}, ~{ :: #searchBoxFooter})}">
<div id="searchBoxContent">
<div class="row px-2">
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">충전사업자 ID</span>
<input type="text" id="providerIdLike" name="providerIdLike" class="form-control" placeholder="충전사업자 ID 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">충전소 ID</span>
@@ -24,30 +18,6 @@
<input type="text" id="chgrIdLike" name="chgrIdLike" class="form-control" placeholder="충전기 ID 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">충전소 명</span>
<input type="text" id="stNmLike" name="stNmLike" class="form-control" placeholder="충전소 명 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">충전기 명</span>
<input type="text" id="chgrNmLike" name="chgrNmLike" class="form-control" placeholder="충전기 명 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">충전기속도</span>
<input type="text" id="speedTpLike" name="speedTpLike" class="form-control" placeholder="충전기속도 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">충전기타입</span>
<input type="text" id="chgrTpLike" name="chgrTpLike" class="form-control" placeholder="충전기타입 입력" maxlength="50">
</div>
</div>
</div>
</div>
<div id="searchBoxFooter">
@@ -8,31 +8,31 @@
<div class="row px-2">
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:180px">st_id</span>
<input type="text" id="stIdLike" name="stIdLike" class="form-control" placeholder="st_id 입력" maxlength="50">
<span class="input-group-text" style="width:180px">충전소 아이디</span>
<input type="text" id="stIdLike" name="stIdLike" class="form-control" placeholder="충전소 아이디 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:180px">chgr_id</span>
<input type="text" id="chgrIdLike" name="chgrIdLike" class="form-control" placeholder="chgr_id 입력" maxlength="50">
<span class="input-group-text" style="width:180px">충전기 아이디</span>
<input type="text" id="chgrIdLike" name="chgrIdLike" class="form-control" placeholder="충전기 아이디 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:180px">ch1_rechg_state_cd</span>
<span class="input-group-text" style="width:180px">충전상태</span>
<select id="ch1RechgStateCdLike" name="ch1RechgStateCdLike" class="form-control"></select>
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:180px">ch1_door_state_cd</span>
<span class="input-group-text" style="width:180px">도어상태</span>
<select id="ch1DoorStateCdLike" name="ch1DoorStateCdLike" class="form-control"></select>
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:180px">ch1_plug_state_cd</span>
<span class="input-group-text" style="width:180px">플러그상태</span>
<select id="ch1PlugStateCdLike" name="ch1PlugStateCdLike" class="form-control"></select>
</div>
</div>
@@ -8,52 +8,16 @@
<div class="row px-2">
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:160px">충전소 </span>
<span class="input-group-text" style="width:160px">충전소 아이디</span>
<input type="text" id="stIdLike" name="stIdLike" class="form-control" placeholder="충전소 명 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:160px">충전기 </span>
<span class="input-group-text" style="width:160px">충전기 아이디</span>
<input type="text" id="chgrIdLike" name="chgrIdLike" class="form-control" placeholder="충전기 명 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:160px">결제구분</span>
<input type="text" id="payTpLike" name="payTpLike" class="form-control" placeholder="결제구분 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:160px">충전기타입 코드</span>
<input type="text" id="plugTpLike" name="plugTpLike" class="form-control" placeholder="충전기타입 코드 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:160px">충전 시작일시</span>
<input type="text" id="rechgSDtLike" name="rechgSDtLike" class="form-control" placeholder="충전 시작일시 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:160px">충전 종료일시</span>
<input type="text" id="rechgEDtLike" name="rechgEDtLike" class="form-control" placeholder="충전 종료일시 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:160px">충전시간</span>
<input type="text" id="rechgTimeLike" name="rechgTimeLike" class="form-control" placeholder="충전시간 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:160px">신용결제완료구분</span>
<input type="text" id="payFnshLike" name="payFnshLike" class="form-control" placeholder="신용결제완료구분 입력" maxlength="50">
</div>
</div>
</div>
</div>
<div id="searchBoxFooter">
@@ -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();
});
</script>
@@ -12,30 +12,6 @@
<input type="text" id="providerNmLike" name="providerNmLike" class="form-control" placeholder="충전사업자 명 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">사업자번호</span>
<input type="text" id="bizTaxIdLike" name="bizTaxIdLike" class="form-control" placeholder="사업자번호 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">대표자</span>
<input type="text" id="ceoLike" name="ceoLike" class="form-control" placeholder="대표자 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">전화번호</span>
<input type="text" id="telLike" name="telLike" class="form-control" placeholder="전화번호 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">팩스번호</span>
<input type="text" id="faxLike" name="faxLike" class="form-control" placeholder="팩스번호 입력" maxlength="50">
</div>
</div>
</div>
</div>
<div id="searchBoxFooter">
@@ -281,10 +257,6 @@
$("#resetBtn").click(function() {
$("#providerNmLike").val("");
$("#bizTaxIdLike").val("");
$("#ceoLike").val("");
$("#telLike").val("");
$("#faxLike").val("");
datatable.ajax.reload();
});
</script>
@@ -18,24 +18,6 @@
<input type="text" id="addrLdMLike" name="addrLdMLike" class="form-control" placeholder="주소 지번 메인 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:200px">법정동 도 명</span>
<input type="text" id="pnuDoNmLike" name="pnuDoNmLike" class="form-control" placeholder="법정동 도 명 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:200px">법정동 시 명</span>
<input type="text" id="pnuSiNmLike" name="pnuSiNmLike" class="form-control" placeholder="법정동 시 명 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:200px">법정동 읍면동 명</span>
<input type="text" id="pnuDongNmLike" name="pnuDongNmLike" class="form-control" placeholder="법정동 읍면동 명 입력" maxlength="50">
</div>
</div>
</div>
</div>
<div id="searchBoxFooter">