update 电单车协议

This commit is contained in:
Guoqs
2024-09-03 09:39:28 +08:00
parent 7f79763bce
commit 58096b74af
2 changed files with 4 additions and 15 deletions

View File

@@ -12,24 +12,17 @@ import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.*;
import com.jsowell.pile.domain.*;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.service.PileSnGenerateService;
import com.jsowell.pile.service.*;
import com.jsowell.pile.transaction.dto.PileTransactionDTO;
import com.jsowell.pile.transaction.service.TransactionService;
import com.jsowell.pile.vo.base.ConnectorInfoVO;
import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.base.PileInfoVO;
import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
import com.jsowell.pile.vo.uniapp.customer.PersonPileConnectorSumInfoVO;
import com.jsowell.pile.vo.uniapp.customer.PersonPileRealTimeVO;
import com.jsowell.pile.vo.uniapp.customer.PileConnectorDetailVO;
import com.jsowell.pile.vo.uniapp.customer.AppletPileDetailVO;
import com.jsowell.pile.vo.uniapp.customer.*;
import com.jsowell.pile.vo.web.PileDetailVO;
import com.jsowell.pile.vo.web.PileStationVO;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -42,7 +35,6 @@ import java.util.stream.Collectors;
@Service
public class PileService {
private final Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private TransactionService pileTransactionService;

View File

@@ -32,6 +32,7 @@ import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.PageUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.common.util.bean.BeanUtils;
import com.jsowell.common.util.id.IdUtils;
import com.jsowell.common.util.id.SnowflakeIdWorker;
@@ -2985,12 +2986,8 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
if (StringUtils.isBlank(dto.getPileSn()) || StringUtils.isBlank(dto.getConnectorCode())) {
// 从pileConnectorCode解析
String pileConnectorCode = dto.getPileConnectorCode();
if (StringUtils.isNotEmpty(pileConnectorCode) && pileConnectorCode.length() == Constants.PILE_CONNECTOR_CODE_LENGTH) {
dto.setPileSn(StringUtils.substring(pileConnectorCode, 0, pileConnectorCode.length() - 2));
dto.setConnectorCode(StringUtils.substring(pileConnectorCode, pileConnectorCode.length() - 2, pileConnectorCode.length()));
} else {
throw new BusinessException(ReturnCodeEnum.CODE_DATA_LENGTH_ERROR);
}
dto.setPileSn(YKCUtils.getPileSn(pileConnectorCode));
dto.setConnectorCode(YKCUtils.getConnectorCode(pileConnectorCode));
} else {
// 说明pileSn 和 connectorCode前端传了那就校验一下长度
if (dto.getPileSn().length() != Constants.PILE_SN_LENGTH_FOR_EV || dto.getConnectorCode().length() != Constants.CONNECTOR_CODE_LENGTH_FOR_EV