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 @@