添加程序版本字段

This commit is contained in:
jsowell
2026-06-10 16:40:29 +08:00
parent 6686e2747f
commit 12685f528b
6 changed files with 66 additions and 2 deletions

View File

@@ -61,6 +61,12 @@ public class PileBasicInfo extends BaseEntity {
@Excel(name = "软件协议", readConverterExp = "yunkuaichongV150--云快充V1.5yunkuaichongV160--云快充V1.6yonglianV1--永联youdianV1--友电")
private String softwareProtocol;
/**
* 程序版本
*/
@Excel(name = "程序版本")
private String programVersion;
/**
* 生产日期
*/
@@ -126,6 +132,7 @@ public class PileBasicInfo extends BaseEntity {
.append("businessType", getBusinessType())
.append("secretKey", getSecretKey())
.append("softwareProtocol", getSoftwareProtocol())
.append("programVersion", getProgramVersion())
.append("productionDate", getProductionDate())
.append("licenceId", getLicenceId())
.append("modelId", getModelId())

View File

@@ -65,6 +65,11 @@ public interface PileBasicInfoMapper {
*/
int updatePileBasicInfo(PileBasicInfo pileBasicInfo);
/**
* 更新充电桩程序版本
*/
int updateProgramVersion(@Param("pileSn") String pileSn, @Param("programVersion") String programVersion);
/**
* 删除设备管理
*

View File

@@ -65,6 +65,15 @@ public interface PileBasicInfoService {
*/
int updateSimInfo(PileBasicInfo pileBasicInfo);
/**
* 更新充电桩程序版本
*
* @param pileSn 充电桩编号
* @param programVersion 程序版本
* @return 更新行数
*/
int updateProgramVersion(String pileSn, String programVersion);
/**
* 批量删除设备管理
*

View File

@@ -220,6 +220,32 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
return pileBasicInfoMapper.updatePileBasicInfo(pileBasicInfo);
}
/**
* 更新充电桩程序版本
*
* @param pileSn 充电桩编号
* @param programVersion 程序版本
* @return 更新行数
*/
@Override
public int updateProgramVersion(String pileSn, String programVersion) {
String normalizedProgramVersion = PileProgramVersionUtils.normalize(programVersion);
if (StringUtils.isBlank(pileSn) || StringUtils.isBlank(normalizedProgramVersion)) {
return 0;
}
PileBasicInfo basicInfo = selectPileBasicInfoBySN(pileSn);
if (basicInfo == null || StringUtils.equals(normalizedProgramVersion, basicInfo.getProgramVersion())) {
return 0;
}
int row = pileBasicInfoMapper.updateProgramVersion(pileSn, normalizedProgramVersion);
if (row > 0) {
cleanRedisCache(pileSn);
}
return row;
}
/**
* 批量删除设备管理
*