mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-07 07:28:03 +08:00
添加程序版本字段
This commit is contained in:
@@ -61,6 +61,12 @@ public class PileBasicInfo extends BaseEntity {
|
||||
@Excel(name = "软件协议", readConverterExp = "yunkuaichongV150--云快充V1.5;yunkuaichongV160--云快充V1.6;yonglianV1--永联;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())
|
||||
|
||||
@@ -65,6 +65,11 @@ public interface PileBasicInfoMapper {
|
||||
*/
|
||||
int updatePileBasicInfo(PileBasicInfo pileBasicInfo);
|
||||
|
||||
/**
|
||||
* 更新充电桩程序版本
|
||||
*/
|
||||
int updateProgramVersion(@Param("pileSn") String pileSn, @Param("programVersion") String programVersion);
|
||||
|
||||
/**
|
||||
* 删除设备管理
|
||||
*
|
||||
|
||||
@@ -65,6 +65,15 @@ public interface PileBasicInfoService {
|
||||
*/
|
||||
int updateSimInfo(PileBasicInfo pileBasicInfo);
|
||||
|
||||
/**
|
||||
* 更新充电桩程序版本
|
||||
*
|
||||
* @param pileSn 充电桩编号
|
||||
* @param programVersion 程序版本
|
||||
* @return 更新行数
|
||||
*/
|
||||
int updateProgramVersion(String pileSn, String programVersion);
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user