From ecb62f73e50dbc5a444a6927054ee83fa42913f5 Mon Sep 17 00:00:00 2001 From: Lemon Date: Mon, 4 Nov 2024 14:41:59 +0800 Subject: [PATCH] =?UTF-8?q?update=20=20=E5=90=8E=E7=AE=A1sim=E5=8D=A1?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E6=96=B0=E5=A2=9E=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pile/PileSimInfoController.java | 11 ++++ .../jsowell/pile/service/SimCardService.java | 2 +- .../jsowell/pile/vo/web/SimCardInfoVO.java | 6 ++ .../mapper/pile/PileSimInfoMapper.xml | 1 + jsowell-ui/src/api/pile/sim.js | 7 +++ jsowell-ui/src/views/pile/sim/index.vue | 56 ++++++++++++++----- 6 files changed, 68 insertions(+), 15 deletions(-) diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileSimInfoController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileSimInfoController.java index 215beb9bd..0c0eaa02b 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileSimInfoController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileSimInfoController.java @@ -12,6 +12,7 @@ import com.jsowell.pile.dto.SimRenewDTO; import com.jsowell.pile.service.PileSimInfoService; import com.jsowell.pile.service.SimCardService; import com.jsowell.pile.vo.web.SimCardInfoVO; +import com.jsowell.pile.vo.web.SimCardVO; import com.jsowell.pile.vo.web.SimRenewResultVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -75,6 +76,16 @@ public class PileSimInfoController extends BaseController { util.exportExcel(response, list, "充电桩SIM卡信息数据"); } + /** + * 通过iccId查询卡最新数据 + * @param iccId + */ + @PreAuthorize("@ss.hasPermi('pile:sim:list')") + @GetMapping("/getSimCardNewInfoByIccId/{iccId}") + public AjaxResult getSimCardNewInfoByIccId(@PathVariable("iccId") String iccId) { + return AjaxResult.success(simCardService.getSimCardInfoByIccId(iccId)); + } + /** * 获取充电桩SIM卡信息详细信息 */ diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/SimCardService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/SimCardService.java index 6aabb982c..896f48af6 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/SimCardService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/SimCardService.java @@ -125,7 +125,7 @@ public class SimCardService { * @param iccId * @return */ - SimCardVO getSimCardInfoByIccId(String iccId) { + public SimCardVO getSimCardInfoByIccId(String iccId) { PileSimInfo pileSimInfo = pileSimInfoService.getBasicInfoByIccId(iccId); // 调用官方数据接口查询最新sim卡数据 SimCardVO simCardVO = searchOfficialWebsiteSimInfo(iccId); diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/SimCardInfoVO.java b/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/SimCardInfoVO.java index d35c8f4cb..d553495ea 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/SimCardInfoVO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/SimCardInfoVO.java @@ -87,4 +87,10 @@ public class SimCardInfoVO { @Excel(name = "剩余天数") private String remainingDays; + /** + * 上次更新时间 + */ + @Excel(name = "上次更新时间") + private String lastUpdateTime; + } diff --git a/jsowell-pile/src/main/resources/mapper/pile/PileSimInfoMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/PileSimInfoMapper.xml index be2de0fee..805da56c6 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/PileSimInfoMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/PileSimInfoMapper.xml @@ -166,6 +166,7 @@ t1.total_data as totalData, t1.surplus_data as surplusData, t1.expire_time as expireTime, + t1.update_time as lastUpdateTime, t1.operator from pile_sim_info t1 left join pile_basic_info t2 on t1.id = t2.sim_id diff --git a/jsowell-ui/src/api/pile/sim.js b/jsowell-ui/src/api/pile/sim.js index 79194c565..cd63c4be4 100644 --- a/jsowell-ui/src/api/pile/sim.js +++ b/jsowell-ui/src/api/pile/sim.js @@ -59,3 +59,10 @@ export function simRenew(data) { data: data }) } + +export function getSimCardNewInfoByIccId(iccId) { + return request({ + url: '/pile/sim/getSimCardNewInfoByIccId/' + iccId, + method: 'get' + }) +} diff --git a/jsowell-ui/src/views/pile/sim/index.vue b/jsowell-ui/src/views/pile/sim/index.vue index 3672f47e9..a8451a1aa 100644 --- a/jsowell-ui/src/views/pile/sim/index.vue +++ b/jsowell-ui/src/views/pile/sim/index.vue @@ -152,7 +152,7 @@ /> - + + @@ -274,7 +283,16 @@