SIM卡管理

This commit is contained in:
Guoqs
2024-10-31 16:36:02 +08:00
parent f4216d6275
commit 67f4c80222
3 changed files with 54 additions and 37 deletions

View File

@@ -8,6 +8,7 @@ import com.jsowell.common.core.domain.ykc.LoginRequestData;
import com.jsowell.common.core.domain.ykc.YKCDataProtocol;
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
import com.jsowell.common.util.BytesUtil;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.common.util.spring.SpringUtils;
import com.jsowell.netty.factory.YKCOperateFactory;
@@ -250,17 +251,17 @@ public class LoginRequestHandler extends AbstractYkcHandler {
ykcPushCommandService.pushPublishPileBillingTemplate(command);
}, executor);
// if (StringUtils.equals("00", internetConnection)) {
// CompletableFuture.runAsync(() -> {
// // 充电桩使用的sim卡把信息存库
// try {
// pileBasicInfoService.updatePileSimInfo(pileSn, iccid);
// // pileBasicInfoService.updatePileSimInfoV2(pileSn, iccid);
// } catch (Exception e) {
// log.error("更新充电桩sim卡信息失败pileSn:{}, iccid:{}", pileSn, iccid, e);
// }
// }, executor);
// }
if (StringUtils.equals("00", internetConnection)) {
CompletableFuture.runAsync(() -> {
// 充电桩使用的sim卡把信息存库
try {
pileBasicInfoService.updatePileSimInfo(pileSn, iccid);
// pileBasicInfoService.updatePileSimInfoV2(pileSn, iccid);
} catch (Exception e) {
log.error("更新充电桩sim卡信息失败pileSn:{}, iccid:{}", pileSn, iccid, e);
}
}, executor);
}
}
// 异步保持登录报文

View File

@@ -4,14 +4,12 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.jsowell.common.annotation.Excel;
import com.jsowell.common.core.domain.BaseEntity;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* 充电桩SIM卡信息对象 pile_sim_info
*
*
* @author jsowell
* @date 2022-08-26
*/
@@ -20,47 +18,66 @@ import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class PileSimInfo extends BaseEntity
{
public class PileSimInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
/**
* 主键
*/
private Long id;
/** 套餐名称 */
/**
* 套餐名称
*/
@Excel(name = "套餐名称")
private String name;
/** ICCID */
/**
* ICCID
*/
@Excel(name = "ICCID")
private String iccid;
/** 状态0-正常,1-强制断网,2-客户断网,3-超套停,4-服务结束,5-提请销卡,6-销卡) */
/**
* 状态0-正常,1-强制断网,2-客户断网,3-超套停,4-服务结束,5-提请销卡,6-销卡)
*/
@Excel(name = "状态", readConverterExp = "0=-正常,1-强制断网,2-客户断网,3-超套停,4-服务结束,5-提请销卡,6-销卡")
private String status;
/** sim卡供应商 */
/**
* sim卡供应商
*/
@Excel(name = "sim卡供应商")
private String simSupplier;
/** 套餐总流量 */
/**
* 套餐总流量
*/
@Excel(name = "套餐总流量")
private String totalData;
/** 剩余流量 */
/**
* 剩余流量
*/
@Excel(name = "剩余流量")
private String surplusData;
/** 到期时间 */
/**
* 到期时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "到期时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date expireTime;
/** SIM卡运营商(china_telecom - 中国电信, china_mobile - 中国移动, china_unicom - 中国联通) */
/**
* SIM卡运营商(china_telecom - 中国电信, china_mobile - 中国移动, china_unicom - 中国联通)
*/
@Excel(name = "SIM卡运营商(china_telecom - 中国电信, china_mobile - 中国移动, china_unicom - 中国联通)")
private String operator;
/** 删除标识0-正常1-删除) */
/**
* 删除标识0-正常1-删除)
*/
private String delFlag;
}

View File

@@ -141,17 +141,9 @@
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="id" />-->
<el-table-column label="ICCID" align="center" prop="iccId" width="180px"/>
<el-table-column label="套餐名称" align="center" prop="name" />
<el-table-column label="对应桩号" align="center" prop="pileSn" width="180px"/>
<el-table-column label="所属站点" align="center" prop="stationName" />
<el-table-column label="sim卡商" align="center" prop="simSupplier" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.sim_supplier"
:value="scope.row.simSupplier"
/>
</template>
</el-table-column>
<el-table-column label="套餐名称" align="center" prop="name" />
<el-table-column label="状态" align="center" prop="simCardStatus" >
<template slot-scope="scope">
<dict-tag
@@ -159,7 +151,14 @@
:value="scope.row.simCardStatus"
/>
</template>
</el-table-column>
<el-table-column label="SIM卡供应商" align="center" prop="simSupplier" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.sim_supplier"
:value="scope.row.simSupplier"
/>
</template>
</el-table-column>
<el-table-column label="套餐总流量" align="center" prop="totalData" />
<el-table-column label="剩余流量" align="center" prop="surplusData" />
@@ -175,7 +174,7 @@
<span v-else-if="scope.row.remainingDays > 30 "> {{scope.row.remainingDays}}</span>
</template>
</el-table-column>
<el-table-column label="SIM卡运营商" align="center" prop="operator" >
<el-table-column label="电信运营商" align="center" prop="operator" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.sim_operator"