mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-27 10:37:58 +08:00
update
This commit is contained in:
@@ -112,15 +112,17 @@ public class PileService {
|
|||||||
|
|
||||||
public int batchCreatePile(BatchCreatePileDTO dto) {
|
public int batchCreatePile(BatchCreatePileDTO dto) {
|
||||||
String softwareProtocol = dto.getSoftwareProtocol();
|
String softwareProtocol = dto.getSoftwareProtocol();
|
||||||
if (StringUtils.isBlank(softwareProtocol)) {
|
// if (StringUtils.isBlank(softwareProtocol)) {
|
||||||
throw new BusinessException(ReturnCodeEnum.valueOf("软件协议不能为空"));
|
// throw new BusinessException(ReturnCodeEnum.valueOf("软件协议不能为空"));
|
||||||
}
|
// }
|
||||||
// 批量生成sn号
|
// 批量生成sn号
|
||||||
List<String> snList = null;
|
List<String> snList = null;
|
||||||
if (StringUtils.equals(SoftwareProtocolEnum.YOU_DIAN.getValue(), softwareProtocol)) {
|
if (StringUtils.equals(SoftwareProtocolEnum.YOU_DIAN.getValue(), softwareProtocol)) {
|
||||||
snList = snUtils.generateEBikeSN(dto.getNum());
|
snList = snUtils.generateEBikeSN(dto.getNum());
|
||||||
} else {
|
} else if (StringUtils.equals(SoftwareProtocolEnum.YUN_KUAI_CHONG.getValue(), softwareProtocol)){
|
||||||
snList = snUtils.generateEVPileSN(dto.getNum());
|
snList = snUtils.generateEVPileSN(dto.getNum());
|
||||||
|
} else {
|
||||||
|
throw new BusinessException(ReturnCodeEnum.valueOf("软件协议不正确"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class PileSnGenerateService {
|
|||||||
increResult = prefix + year + String.format("%1$010d", increNum);
|
increResult = prefix + year + String.format("%1$010d", increNum);
|
||||||
|
|
||||||
// 保存到字典中
|
// 保存到字典中
|
||||||
savePileSn2Dict(pileNum);
|
// savePileSn2Dict(pileNum);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("获取序列号失败", e);
|
logger.error("获取序列号失败", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user