diff --git a/src/main/java/net/jwsi/jcms/vpp/api/ApiClient.java b/src/main/java/net/jwsi/jcms/vpp/api/ApiClient.java index 74ce786..dd3ea01 100644 --- a/src/main/java/net/jwsi/jcms/vpp/api/ApiClient.java +++ b/src/main/java/net/jwsi/jcms/vpp/api/ApiClient.java @@ -5,8 +5,7 @@ import net.jwsi.jcms.vpp.chgr.ChgrResponseDto; import net.jwsi.jcms.vpp.chgrCurrState.ChgrCurrState; import net.jwsi.jcms.vpp.chgrHist.ChgrHistResponseDto; import net.jwsi.jcms.vpp.provider.ProviderDto; -import net.jwsi.jcms.vpp.rehchgingList.RechgingList; -import net.jwsi.jcms.vpp.rehchgingList.RechgingListDto; +import net.jwsi.jcms.vpp.rechgingList.RechgingListDto; import net.jwsi.jcms.vpp.ratePlan.RatePlanResponseDto; import net.jwsi.jcms.vpp.station.StationDto; import org.springframework.core.ParameterizedTypeReference; diff --git a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingList.java b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingList.java similarity index 97% rename from src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingList.java rename to src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingList.java index 962b40a..c37d933 100644 --- a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingList.java +++ b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingList.java @@ -1,4 +1,4 @@ -package net.jwsi.jcms.vpp.rehchgingList; +package net.jwsi.jcms.vpp.rechgingList; import jakarta.persistence.*; import lombok.Getter; diff --git a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListController.java b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListController.java similarity index 97% rename from src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListController.java rename to src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListController.java index 55a3067..dcc6a2b 100644 --- a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListController.java +++ b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListController.java @@ -1,4 +1,4 @@ -package net.jwsi.jcms.vpp.rehchgingList; +package net.jwsi.jcms.vpp.rechgingList; import lombok.extern.slf4j.Slf4j; import net.jwsi.jcms.base.BaseController; diff --git a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListDto.java b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListDto.java similarity index 97% rename from src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListDto.java rename to src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListDto.java index 6289b9b..ded3c52 100644 --- a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListDto.java +++ b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListDto.java @@ -1,4 +1,4 @@ -package net.jwsi.jcms.vpp.rehchgingList; +package net.jwsi.jcms.vpp.rechgingList; import lombok.*; diff --git a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListRepository.java b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListRepository.java similarity index 83% rename from src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListRepository.java rename to src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListRepository.java index dcdd23b..dc675eb 100644 --- a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListRepository.java +++ b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListRepository.java @@ -1,4 +1,4 @@ -package net.jwsi.jcms.vpp.rehchgingList; +package net.jwsi.jcms.vpp.rechgingList; import net.jwsi.jcms.base.BaseRecStRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListService.java b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListService.java similarity index 73% rename from src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListService.java rename to src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListService.java index d5fa2b7..a0a58a5 100644 --- a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListService.java +++ b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListService.java @@ -1,4 +1,4 @@ -package net.jwsi.jcms.vpp.rehchgingList; +package net.jwsi.jcms.vpp.rechgingList; import jakarta.transaction.Transactional; 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.vpp.api.ApiClient; import net.jwsi.jcms.vpp.api.ApiResponse; -import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Page; import org.springframework.data.jpa.domain.Specification; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; -import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -82,9 +80,19 @@ public class RechgingListService extends BaseService getSpecification(RechgingList srch) { if (srch == null) return null; + Specification 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; + } @Override diff --git a/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListSpecification.java b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListSpecification.java new file mode 100644 index 0000000..c8370c4 --- /dev/null +++ b/src/main/java/net/jwsi/jcms/vpp/rechgingList/RechgingListSpecification.java @@ -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 providerId(String providerId) { + return (root, query, cb) -> cb.like(root.get("providerId"), StrUtil.sqlLikeParam(providerId)); + } + + public static Specification stId(String stId) { + return (root, query, cb) -> cb.like(root.get("stId"), StrUtil.sqlLikeParam(stId)); + } + + public static Specification chgrId(String chgrId) { + return (root, query, cb) -> cb.like(root.get("chgrId"), StrUtil.sqlLikeParam(chgrId)); + } + + public static Specification plugType(String plugType) { + return (root, query, cb) -> cb.like(root.get("plugType"), StrUtil.sqlLikeParam(plugType)); + } + + public static Specification memAuthInputNo(String memAuthInputNo) { + return (root, query, cb) -> cb.like(root.get("memAuthInputNo"), StrUtil.sqlLikeParam(memAuthInputNo)); + } + + public static Specification creditPPayTrxNo(String creditPPayTrxNo) { + return (root, query, cb) -> cb.like(root.get("creditPPayTrxNo"), StrUtil.sqlLikeParam(creditPPayTrxNo)); + } + + public static Specification creditPPayTrxDt(String creditPPayTrxDt) { + return (root, query, cb) -> cb.like(root.get("creditPPayTrxDt"), StrUtil.sqlLikeParam(creditPPayTrxDt)); + } + + public static Specification rechgSdt(String rechgSdt) { + return (root, query, cb) -> cb.like(root.get("rechgSdt"), StrUtil.sqlLikeParam(rechgSdt)); + } + + public static Specification payType(String payType) { + return (root, query, cb) -> cb.like(root.get("payType"), StrUtil.sqlLikeParam(payType)); + } +} diff --git a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListSpecification.java b/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListSpecification.java deleted file mode 100644 index 178572a..0000000 --- a/src/main/java/net/jwsi/jcms/vpp/rehchgingList/RechgingListSpecification.java +++ /dev/null @@ -1,11 +0,0 @@ -package net.jwsi.jcms.vpp.rehchgingList; - -import org.springframework.data.jpa.domain.Specification; - -public class RechgingListSpecification { - - public static Specification rechgingListId(Long rechgingListId) { - return (root, query, criteriaBuilder) -> criteriaBuilder.equal(root.get("rechgingListId"), rechgingListId); - } - -} diff --git a/src/main/resources/templates/system/rechgingList/list.html b/src/main/resources/templates/system/rechgingList/list.html index 74dbfa5..596f733 100644 --- a/src/main/resources/templates/system/rechgingList/list.html +++ b/src/main/resources/templates/system/rechgingList/list.html @@ -6,12 +6,12 @@
-
-
- 요청 일시 - -
-
+ + + + + +
충전사업자 ID @@ -44,14 +44,14 @@
- 선결제 관련 신용카드 승인번호 - + 신용카드 승인번호 +
- 선결제 관련 신용카드 승인일시 - + 신용카드 승인일시 +
@@ -60,12 +60,12 @@
-
-
- 충전 잔여 시간 - -
-
+ + + + + +
결제타입 @@ -123,11 +123,11 @@ order: [[0, 'desc'], [2, 'desc'], [3, 'desc'], [4, 'desc']], columns: [ {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: "ST_ID", data: "stId", 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: "MEM_AUTH_INPUT_NO", data: "memAuthInputNo", 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: "RECHGING_AMT", data: "rechgingAmt", className, orderable: false}, {title: "결제타입", name: "PAY_TYPE", data: "payType", className, orderable: false}, - {title: "적산량", name: "INTEGRATED_WH", data: "integratedWh", className, orderable: false}, - {title: "DC 적산량", name: "DC_POWER_WH", data: "dcPowerWh", className, orderable: false}, - {title: "AC 적산량", name: "AC_POWER_WH", data: "acPowerWh", className, orderable: false}, - {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} + // {title: "기능", orderable:false, width:"110px", + // render: (data, type, row) => { + // return mkRowDataFunctions({rechgingListId: row['rechgingListId'], providerId: row['providerId'], stId: row['stId'], chgrId: row['chgrId']}, row['#####Title'], true, menuRoleModify, menuRoleDel);}} ], allCheck: false, }); @@ -247,22 +235,22 @@ maxLen: 20, }), new ModalInput({ - inputType: ModalInputType.text, + inputType: ModalInputType.textarea, inputId: "creditPPayTrxNo", inputName: "creditPPayTrxNo", - inputLabel: "선결제 관련 신용카드 승인번호", - inputPlaceholder: "선결제 관련 신용카드 승인번호", + inputLabel: "신용카드 승인번호", + inputPlaceholder: "신용카드 승인번호", isReq: false, isEnable: true, minLen: 0, - maxLen: 20, + maxLen: 250, }), new ModalInput({ inputType: ModalInputType.textarea, inputId: "creditPPayTrxDt", inputName: "creditPPayTrxDt", - inputLabel: "선결제 관련 신용카드 승인일시", - inputPlaceholder: "선결제 관련 신용카드 승인일시", + inputLabel: "신용카드 승인일시", + inputPlaceholder: "신용카드 승인일시", isReq: false, isEnable: true, minLen: 0, @@ -368,8 +356,8 @@ inputType: ModalInputType.text, inputId: "currC", inputName: "currC", - inputLabel: "현재 젅류", - inputPlaceholder: "현재 젅류", + inputLabel: "현재 전류", + inputPlaceholder: "현재 전류", isReq: false, isEnable: true, }) @@ -380,7 +368,7 @@ const loadUrl = rootPath+"view.json"; const deleteUrl = rootPath+"delete.json"; const modalWidth = 500; - const labelWidth = '90px'; + const labelWidth = '100px'; if(mode === ModalMode.REGISTER) { 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) {