mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-05 18:40:14 +08:00
update 后管sim卡管理页面新增刷新功能
This commit is contained in:
@@ -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卡信息详细信息
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -87,4 +87,10 @@ public class SimCardInfoVO {
|
||||
@Excel(name = "剩余天数")
|
||||
private String remainingDays;
|
||||
|
||||
/**
|
||||
* 上次更新时间
|
||||
*/
|
||||
@Excel(name = "上次更新时间")
|
||||
private String lastUpdateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -59,3 +59,10 @@ export function simRenew(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSimCardNewInfoByIccId(iccId) {
|
||||
return request({
|
||||
url: '/pile/sim/getSimCardNewInfoByIccId/' + iccId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="SIM卡供应商" align="center" prop="simSupplier" >
|
||||
<el-table-column label="SIM卡供应商" align="center" prop="simSupplier" width="140">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.sim_supplier"
|
||||
@@ -162,7 +162,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="套餐总流量" align="center" prop="totalData" />
|
||||
<el-table-column label="剩余流量" align="center" prop="surplusData" />
|
||||
<el-table-column label="到期时间" align="center" prop="expireTime" width="180">
|
||||
<el-table-column label="到期时间" align="center" prop="expireTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.expireTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
@@ -174,6 +174,7 @@
|
||||
<span v-else-if="scope.row.remainingDays > 30 "> {{scope.row.remainingDays}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上次更新时间" align="center" prop="lastUpdateTime" width="180"/>
|
||||
<el-table-column label="电信运营商" align="center" prop="operator" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
@@ -192,21 +193,29 @@
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-hasPermi="['pile:sim:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleRenewSim(scope.row)"
|
||||
v-hasPermi="['pile:sim:edit']"
|
||||
>续期</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleRenewSim(scope.row)"-->
|
||||
<!-- v-hasPermi="['pile:sim:edit']"-->
|
||||
<!-- >续期</el-button>-->
|
||||
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['pile:sim:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['pile:sim:remove']"
|
||||
>删除</el-button>
|
||||
icon="el-icon-refresh"
|
||||
@click="getNewInfo(scope.row.iccId)"
|
||||
v-hasPermi="['pile:sim:edit']"
|
||||
>获取最新数据</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -274,7 +283,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listSim, getSim, delSim, addSim, updateSim, simRenew, getSimInfo} from "@/api/pile/sim";
|
||||
import {
|
||||
listSim,
|
||||
getSim,
|
||||
delSim,
|
||||
addSim,
|
||||
updateSim,
|
||||
simRenew,
|
||||
getSimInfo,
|
||||
getSimCardNewInfoByIccId
|
||||
} from "@/api/pile/sim";
|
||||
import {listStation} from "@/api/pile/station";
|
||||
|
||||
export default {
|
||||
@@ -436,6 +454,16 @@ export default {
|
||||
this.stationList = response.rows;
|
||||
});
|
||||
},
|
||||
// 获取sim卡最新数据
|
||||
getNewInfo(iccId) {
|
||||
console.log("iccid", iccId)
|
||||
getSimCardNewInfoByIccId(iccId).then((response) => {
|
||||
console.log("getSimCardNewInfoByIccId, result", response)
|
||||
if (response != null) {
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置 续费周期相关
|
||||
resetSimRenewCycleNumber() {
|
||||
console.log("重置 续费周期相关");
|
||||
|
||||
Reference in New Issue
Block a user