패키지명 rehchgingList(오타)를 rechgingList로 변경 / 충전중 정보조회 검색조건 추가

This commit is contained in:
2026-07-31 13:47:00 +09:00
parent 5feb7845fd
commit 8a6ebcd8eb
9 changed files with 91 additions and 63 deletions
@@ -5,8 +5,7 @@ import net.jwsi.jcms.vpp.chgr.ChgrResponseDto;
import net.jwsi.jcms.vpp.chgrCurrState.ChgrCurrState; import net.jwsi.jcms.vpp.chgrCurrState.ChgrCurrState;
import net.jwsi.jcms.vpp.chgrHist.ChgrHistResponseDto; import net.jwsi.jcms.vpp.chgrHist.ChgrHistResponseDto;
import net.jwsi.jcms.vpp.provider.ProviderDto; import net.jwsi.jcms.vpp.provider.ProviderDto;
import net.jwsi.jcms.vpp.rehchgingList.RechgingList; import net.jwsi.jcms.vpp.rechgingList.RechgingListDto;
import net.jwsi.jcms.vpp.rehchgingList.RechgingListDto;
import net.jwsi.jcms.vpp.ratePlan.RatePlanResponseDto; import net.jwsi.jcms.vpp.ratePlan.RatePlanResponseDto;
import net.jwsi.jcms.vpp.station.StationDto; import net.jwsi.jcms.vpp.station.StationDto;
import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.ParameterizedTypeReference;
@@ -1,4 +1,4 @@
package net.jwsi.jcms.vpp.rehchgingList; package net.jwsi.jcms.vpp.rechgingList;
import jakarta.persistence.*; import jakarta.persistence.*;
import lombok.Getter; import lombok.Getter;
@@ -1,4 +1,4 @@
package net.jwsi.jcms.vpp.rehchgingList; package net.jwsi.jcms.vpp.rechgingList;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.jwsi.jcms.base.BaseController; import net.jwsi.jcms.base.BaseController;
@@ -1,4 +1,4 @@
package net.jwsi.jcms.vpp.rehchgingList; package net.jwsi.jcms.vpp.rechgingList;
import lombok.*; import lombok.*;
@@ -1,4 +1,4 @@
package net.jwsi.jcms.vpp.rehchgingList; package net.jwsi.jcms.vpp.rechgingList;
import net.jwsi.jcms.base.BaseRecStRepository; import net.jwsi.jcms.base.BaseRecStRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@@ -1,4 +1,4 @@
package net.jwsi.jcms.vpp.rehchgingList; package net.jwsi.jcms.vpp.rechgingList;
import jakarta.transaction.Transactional; import jakarta.transaction.Transactional;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@@ -8,13 +8,11 @@ import net.jwsi.jcms.utils.HttpUtil;
import net.jwsi.jcms.utils.LoginUtil; import net.jwsi.jcms.utils.LoginUtil;
import net.jwsi.jcms.vpp.api.ApiClient; import net.jwsi.jcms.vpp.api.ApiClient;
import net.jwsi.jcms.vpp.api.ApiResponse; import net.jwsi.jcms.vpp.api.ApiResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.jpa.domain.Specification; import org.springframework.data.jpa.domain.Specification;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -82,9 +80,19 @@ public class RechgingListService extends BaseService<RechgingList, Long, Rechgin
@Override @Override
protected Specification<RechgingList> getSpecification(RechgingList srch) { protected Specification<RechgingList> getSpecification(RechgingList srch) {
if (srch == null) return null; if (srch == null) return null;
Specification<RechgingList> rst = null; Specification<RechgingList> rst = null;
rst = addWhere(rst, srch.getRechgingListId(), RechgingListSpecification.rechgingListId(srch.getRechgingListId())); rst = addWhere(rst, srch.getProviderId(), RechgingListSpecification.providerId(srch.getProviderId()));
rst = addWhere(rst, srch.getStId(), RechgingListSpecification.stId(srch.getStId()));
rst = addWhere(rst, srch.getChgrId(), RechgingListSpecification.chgrId(srch.getChgrId()));
rst = addWhere(rst, srch.getPlugType(), RechgingListSpecification.plugType(srch.getPlugType()));
rst = addWhere(rst, srch.getMemAuthInputNo(), RechgingListSpecification.memAuthInputNo(srch.getMemAuthInputNo()));
rst = addWhere(rst, srch.getCreditPPayTrxNo(), RechgingListSpecification.creditPPayTrxNo(srch.getCreditPPayTrxNo()));
rst = addWhere(rst, srch.getCreditPPayTrxDt(), RechgingListSpecification.creditPPayTrxDt(srch.getCreditPPayTrxDt()));
rst = addWhere(rst, srch.getRechgSdt(), RechgingListSpecification.rechgSdt(srch.getRechgSdt()));
rst = addWhere(rst, srch.getPayType(), RechgingListSpecification.payType(srch.getPayType()));
return rst; return rst;
} }
@Override @Override
@@ -0,0 +1,44 @@
package net.jwsi.jcms.vpp.rechgingList;
import net.jwsi.jcms.base.BaseSpecification;
import net.jwsi.jcms.utils.StrUtil;
import org.springframework.data.jpa.domain.Specification;
public class RechgingListSpecification extends BaseSpecification {
public static Specification<RechgingList> providerId(String providerId) {
return (root, query, cb) -> cb.like(root.get("providerId"), StrUtil.sqlLikeParam(providerId));
}
public static Specification<RechgingList> stId(String stId) {
return (root, query, cb) -> cb.like(root.get("stId"), StrUtil.sqlLikeParam(stId));
}
public static Specification<RechgingList> chgrId(String chgrId) {
return (root, query, cb) -> cb.like(root.get("chgrId"), StrUtil.sqlLikeParam(chgrId));
}
public static Specification<RechgingList> plugType(String plugType) {
return (root, query, cb) -> cb.like(root.get("plugType"), StrUtil.sqlLikeParam(plugType));
}
public static Specification<RechgingList> memAuthInputNo(String memAuthInputNo) {
return (root, query, cb) -> cb.like(root.get("memAuthInputNo"), StrUtil.sqlLikeParam(memAuthInputNo));
}
public static Specification<RechgingList> creditPPayTrxNo(String creditPPayTrxNo) {
return (root, query, cb) -> cb.like(root.get("creditPPayTrxNo"), StrUtil.sqlLikeParam(creditPPayTrxNo));
}
public static Specification<RechgingList> creditPPayTrxDt(String creditPPayTrxDt) {
return (root, query, cb) -> cb.like(root.get("creditPPayTrxDt"), StrUtil.sqlLikeParam(creditPPayTrxDt));
}
public static Specification<RechgingList> rechgSdt(String rechgSdt) {
return (root, query, cb) -> cb.like(root.get("rechgSdt"), StrUtil.sqlLikeParam(rechgSdt));
}
public static Specification<RechgingList> payType(String payType) {
return (root, query, cb) -> cb.like(root.get("payType"), StrUtil.sqlLikeParam(payType));
}
}
@@ -1,11 +0,0 @@
package net.jwsi.jcms.vpp.rehchgingList;
import org.springframework.data.jpa.domain.Specification;
public class RechgingListSpecification {
public static Specification<RechgingList> rechgingListId(Long rechgingListId) {
return (root, query, criteriaBuilder) -> criteriaBuilder.equal(root.get("rechgingListId"), rechgingListId);
}
}
@@ -6,12 +6,12 @@
<div th:replace="~{common/fragments/searchBox :: SearchBoxFragment(~{ :: #searchBoxContent}, ~{ :: #searchBoxFooter})}"> <div th:replace="~{common/fragments/searchBox :: SearchBoxFragment(~{ :: #searchBoxContent}, ~{ :: #searchBoxFooter})}">
<div id="searchBoxContent"> <div id="searchBoxContent">
<div class="row px-2"> <div class="row px-2">
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1"> <!-- <div class="col-lg-4 col-sm-6 col-xs-12 pb-1">-->
<div class="input-group"> <!-- <div class="input-group">-->
<span class="input-group-text" style="width:300px">요청 일시</span> <!-- <span class="input-group-text" style="width:300px">요청 일시</span>-->
<input type="text" id="searchDtLike" name="searchDtLike" class="form-control" placeholder="요청 일시 입력" maxlength="50"> <!-- <input type="text" id="searchDtLike" name="searchDtLike" class="form-control" placeholder="요청 일시 입력" maxlength="50">-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1"> <div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group"> <div class="input-group">
<span class="input-group-text" style="width:300px">충전사업자 ID</span> <span class="input-group-text" style="width:300px">충전사업자 ID</span>
@@ -44,14 +44,14 @@
</div> </div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1"> <div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group"> <div class="input-group">
<span class="input-group-text" style="width:300px">선결제 관련 신용카드 승인번호</span> <span class="input-group-text" style="width:300px">신용카드 승인번호</span>
<input type="text" id="creditPPayTrxNoLike" name="creditPPayTrxNoLike" class="form-control" placeholder="선결제 관련 신용카드 승인번호 입력" maxlength="50"> <input type="text" id="creditPPayTrxNoLike" name="creditPPayTrxNoLike" class="form-control" placeholder="신용카드 승인번호 입력" maxlength="50">
</div> </div>
</div> </div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1"> <div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group"> <div class="input-group">
<span class="input-group-text" style="width:300px">선결제 관련 신용카드 승인일시</span> <span class="input-group-text" style="width:300px">신용카드 승인일시</span>
<input type="text" id="creditPPayTrxDtLike" name="creditPPayTrxDtLike" class="form-control" placeholder="선결제 관련 신용카드 승인일시 입력" maxlength="50"> <input type="text" id="creditPPayTrxDtLike" name="creditPPayTrxDtLike" class="form-control" placeholder="신용카드 승인일시 입력" maxlength="50">
</div> </div>
</div> </div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1"> <div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
@@ -60,12 +60,12 @@
<input type="text" id="rechgSdtLike" name="rechgSdtLike" class="form-control" placeholder="충전 시작일시 입력" maxlength="50"> <input type="text" id="rechgSdtLike" name="rechgSdtLike" class="form-control" placeholder="충전 시작일시 입력" maxlength="50">
</div> </div>
</div> </div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1"> <!-- <div class="col-lg-4 col-sm-6 col-xs-12 pb-1">-->
<div class="input-group"> <!-- <div class="input-group">-->
<span class="input-group-text" style="width:300px">충전 잔여 시간</span> <!-- <span class="input-group-text" style="width:300px">충전 잔여 시간</span>-->
<input type="text" id="rechgRemainTimeLike" name="rechgRemainTimeLike" class="form-control" placeholder="충전 잔여 시간 입력" maxlength="50"> <!-- <input type="text" id="rechgRemainTimeLike" name="rechgRemainTimeLike" class="form-control" placeholder="충전 잔여 시간 입력" maxlength="50">-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1"> <div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group"> <div class="input-group">
<span class="input-group-text" style="width:300px">결제타입</span> <span class="input-group-text" style="width:300px">결제타입</span>
@@ -123,11 +123,11 @@
order: [[0, 'desc'], [2, 'desc'], [3, 'desc'], [4, 'desc']], order: [[0, 'desc'], [2, 'desc'], [3, 'desc'], [4, 'desc']],
columns: [ columns: [
{title: "충전중 ID", name: "RECHGING_LIST_ID", data: "rechgingListId", className, visible: false}, {title: "충전중 ID", name: "RECHGING_LIST_ID", data: "rechgingListId", className, visible: false},
{title: "요청 일시", name: "SEARCH_DT", data: "searchDt", className, orderable: false}, // {title: "요청 일시", name: "SEARCH_DT", data: "searchDt", className, orderable: false},
{title: "충전사업자 ID", name: "PROVIDER_ID", data: "providerId", className}, {title: "충전사업자 ID", name: "PROVIDER_ID", data: "providerId", className},
{title: "충전소 ID", name: "ST_ID", data: "stId", className}, {title: "충전소 ID", name: "ST_ID", data: "stId", className},
{title: "충전기 ID", name: "CHGR_ID", data: "chgrId", className}, {title: "충전기 ID", name: "CHGR_ID", data: "chgrId", className},
{title: "채널 ID", name: "CH_ID", data: "chId", className, orderable: false}, // {title: "채널 ID", name: "CH_ID", data: "chId", className, orderable: false},
{title: "플러그 타입", name: "PLUG_TYPE", data: "plugType", className, orderable: false}, {title: "플러그 타입", name: "PLUG_TYPE", data: "plugType", className, orderable: false},
{title: "회원카드번호", name: "MEM_AUTH_INPUT_NO", data: "memAuthInputNo", className, orderable: false}, {title: "회원카드번호", name: "MEM_AUTH_INPUT_NO", data: "memAuthInputNo", className, orderable: false},
{title: "신용카드 승인번호", name: "CREDIT_P_PAY_TRX_NO", data: "creditPPayTrxNo", className, orderable: false}, {title: "신용카드 승인번호", name: "CREDIT_P_PAY_TRX_NO", data: "creditPPayTrxNo", className, orderable: false},
@@ -138,21 +138,9 @@
{title: "선결제 금액", name: "RECHG_DEMAND_AMT", data: "rechgDemandAmt", className, orderable: false}, {title: "선결제 금액", name: "RECHG_DEMAND_AMT", data: "rechgDemandAmt", className, orderable: false},
{title: "진행 충전 금액", name: "RECHGING_AMT", data: "rechgingAmt", className, orderable: false}, {title: "진행 충전 금액", name: "RECHGING_AMT", data: "rechgingAmt", className, orderable: false},
{title: "결제타입", name: "PAY_TYPE", data: "payType", className, orderable: false}, {title: "결제타입", name: "PAY_TYPE", data: "payType", className, orderable: false},
{title: "적산량", name: "INTEGRATED_WH", data: "integratedWh", className, orderable: false}, // {title: "기능", orderable:false, width:"110px",
{title: "DC 적산량", name: "DC_POWER_WH", data: "dcPowerWh", className, orderable: false}, // render: (data, type, row) => {
{title: "AC 적산량", name: "AC_POWER_WH", data: "acPowerWh", className, orderable: false}, // return mkRowDataFunctions({rechgingListId: row['rechgingListId'], providerId: row['providerId'], stId: row['stId'], chgrId: row['chgrId']}, row['#####Title'], true, menuRoleModify, menuRoleDel);}}
{title: "현재 전압", name: "CURR_VOLT", data: "currVolt", className, orderable: false},
{title: "현재 전류", name: "CURR_C", data: "currC", className, orderable: false},
{title: "등록인ID", name: "REG_ID", data: "regIdNm", className, orderable: false},
{title: "등록일시", name: "REG_DT", data: "regDt", className, orderable: false,
render: (data, type, row) => dateUtil.toYmd(row["regDt"]) },
{title: "수정인ID", name: "UPD_ID", data: "updIdNm", className, orderable: false},
{title: "수정일시", name: "UPD_DT", data: "updDt", className, orderable: false,
render: (data, type, row) => dateUtil.toYmd(row["updDt"]) },
{title: "삭제인ID", name: "DEL_ID", data: "delIdNm", className, orderable: false},
{title: "삭제일시", name: "DEL_DT", data: "delDt", className, orderable: false,
render: (data, type, row) => dateUtil.toYmd(row["delDt"]) },
{title: "사용상태", name: "REC_ST", data: "recSt", className, orderable: false}
], ],
allCheck: false, allCheck: false,
}); });
@@ -247,22 +235,22 @@
maxLen: 20, maxLen: 20,
}), }),
new ModalInput({ new ModalInput({
inputType: ModalInputType.text, inputType: ModalInputType.textarea,
inputId: "creditPPayTrxNo", inputId: "creditPPayTrxNo",
inputName: "creditPPayTrxNo", inputName: "creditPPayTrxNo",
inputLabel: "선결제 관련 신용카드 승인번호", inputLabel: "신용카드 승인번호",
inputPlaceholder: "선결제 관련 신용카드 승인번호", inputPlaceholder: "신용카드 승인번호",
isReq: false, isReq: false,
isEnable: true, isEnable: true,
minLen: 0, minLen: 0,
maxLen: 20, maxLen: 250,
}), }),
new ModalInput({ new ModalInput({
inputType: ModalInputType.textarea, inputType: ModalInputType.textarea,
inputId: "creditPPayTrxDt", inputId: "creditPPayTrxDt",
inputName: "creditPPayTrxDt", inputName: "creditPPayTrxDt",
inputLabel: "선결제 관련 신용카드 승인일시", inputLabel: "신용카드 승인일시",
inputPlaceholder: "선결제 관련 신용카드 승인일시", inputPlaceholder: "신용카드 승인일시",
isReq: false, isReq: false,
isEnable: true, isEnable: true,
minLen: 0, minLen: 0,
@@ -368,8 +356,8 @@
inputType: ModalInputType.text, inputType: ModalInputType.text,
inputId: "currC", inputId: "currC",
inputName: "currC", inputName: "currC",
inputLabel: "현재 류", inputLabel: "현재 류",
inputPlaceholder: "현재 류", inputPlaceholder: "현재 류",
isReq: false, isReq: false,
isEnable: true, isEnable: true,
}) })
@@ -380,7 +368,7 @@
const loadUrl = rootPath+"view.json"; const loadUrl = rootPath+"view.json";
const deleteUrl = rootPath+"delete.json"; const deleteUrl = rootPath+"delete.json";
const modalWidth = 500; const modalWidth = 500;
const labelWidth = '90px'; const labelWidth = '100px';
if(mode === ModalMode.REGISTER) { if(mode === ModalMode.REGISTER) {
newModal(new ModalInfo({modalTitle: "등록", inputArray: modalInputArray, modalWidth}), mode, 'main', {insertUrl, labelWidth, callBack: () => { defaultCallback(); }}) newModal(new ModalInfo({modalTitle: "등록", inputArray: modalInputArray, modalWidth}), mode, 'main', {insertUrl, labelWidth, callBack: () => { defaultCallback(); }})
} else if(mode===ModalMode.VIEW || mode===ModalMode.VIEW_ONLY || mode===ModalMode.MODIFY) { } else if(mode===ModalMode.VIEW || mode===ModalMode.VIEW_ONLY || mode===ModalMode.MODIFY) {