This commit is contained in:
Guoqs
2024-12-13 17:12:44 +08:00
parent 9e86ca0003
commit 269d80796f
2 changed files with 7 additions and 5 deletions

View File

@@ -112,15 +112,17 @@ public class PileService {
public int batchCreatePile(BatchCreatePileDTO dto) {
String softwareProtocol = dto.getSoftwareProtocol();
if (StringUtils.isBlank(softwareProtocol)) {
throw new BusinessException(ReturnCodeEnum.valueOf("软件协议不能为空"));
}
// if (StringUtils.isBlank(softwareProtocol)) {
// throw new BusinessException(ReturnCodeEnum.valueOf("软件协议不能为空"));
// }
// 批量生成sn号
List<String> snList = null;
if (StringUtils.equals(SoftwareProtocolEnum.YOU_DIAN.getValue(), softwareProtocol)) {
snList = snUtils.generateEBikeSN(dto.getNum());
} else {
} else if (StringUtils.equals(SoftwareProtocolEnum.YUN_KUAI_CHONG.getValue(), softwareProtocol)){
snList = snUtils.generateEVPileSN(dto.getNum());
} else {
throw new BusinessException(ReturnCodeEnum.valueOf("软件协议不正确"));
}
//

View File

@@ -72,7 +72,7 @@ public class PileSnGenerateService {
increResult = prefix + year + String.format("%1$010d", increNum);
// 保存到字典中
savePileSn2Dict(pileNum);
// savePileSn2Dict(pileNum);
} catch (Exception e) {
logger.error("获取序列号失败", e);
}