mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 电单车
This commit is contained in:
@@ -8,6 +8,7 @@ import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.common.core.page.PageResponse;
|
||||
import com.jsowell.common.enums.DelFlagEnum;
|
||||
import com.jsowell.common.enums.SoftwareProtocolEnum;
|
||||
import com.jsowell.common.enums.ykc.*;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.*;
|
||||
@@ -107,8 +108,17 @@ public class PileService {
|
||||
}
|
||||
|
||||
public int batchCreatePile(BatchCreatePileDTO dto) {
|
||||
String softwareProtocol = dto.getSoftwareProtocol();
|
||||
if (StringUtils.isBlank(softwareProtocol)) {
|
||||
throw new BusinessException(ReturnCodeEnum.valueOf("软件协议不能为空"));
|
||||
}
|
||||
// 批量生成sn号
|
||||
List<String> snList = snUtils.generateSN(dto.getNum());
|
||||
List<String> snList = null;
|
||||
if (StringUtils.equals(SoftwareProtocolEnum.YOU_DIAN.getValue(), softwareProtocol)) {
|
||||
snList = snUtils.generateSN(dto.getNum());
|
||||
} else {
|
||||
snList = snUtils.generateSN(dto.getNum());
|
||||
}
|
||||
|
||||
//
|
||||
List<PileBasicInfo> basicInfoList = Lists.newArrayList();
|
||||
@@ -125,7 +135,7 @@ public class PileService {
|
||||
String secretKey = RandomStringUtils.randomAlphanumeric(8).toUpperCase(Locale.ROOT);
|
||||
basicInfo.setSecretKey(secretKey);
|
||||
}
|
||||
basicInfo.setSoftwareProtocol(dto.getSoftwareProtocol()); // 软件协议
|
||||
basicInfo.setSoftwareProtocol(softwareProtocol); // 软件协议
|
||||
basicInfo.setMerchantId(Long.valueOf(dto.getMerchantId())); // 运营商id
|
||||
basicInfo.setStationId(Long.valueOf(dto.getStationId())); // 站点id
|
||||
basicInfo.setModelId(Long.valueOf(dto.getModelId())); // 型号id
|
||||
|
||||
Reference in New Issue
Block a user