mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 20:15:06 +08:00
update 修改vin码相关代码逻辑
This commit is contained in:
@@ -13,9 +13,11 @@ import com.jsowell.common.util.BytesUtil;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.netty.factory.YKCOperateFactory;
|
||||
import com.jsowell.pile.domain.MemberPlateNumberRelation;
|
||||
import com.jsowell.pile.domain.PileAuthCard;
|
||||
import com.jsowell.pile.dto.GenerateOrderDTO;
|
||||
import com.jsowell.pile.service.ICarVinInfoService;
|
||||
import com.jsowell.pile.service.IMemberPlateNumberRelationService;
|
||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||
import com.jsowell.pile.service.IPileAuthCardService;
|
||||
import com.jsowell.pile.vo.CarVinInfoVO;
|
||||
@@ -47,6 +49,9 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
||||
@Autowired
|
||||
private ICarVinInfoService carVinInfoService;
|
||||
|
||||
@Autowired
|
||||
private IMemberPlateNumberRelationService memberPlateNumberRelationService;
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
YKCOperateFactory.register(type, this);
|
||||
@@ -154,17 +159,17 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
||||
*/
|
||||
if (StringUtils.equals("03", startMode)) {
|
||||
// 通过vin码查询数据库绑定用户信息
|
||||
CarVinInfoVO memberInfo = carVinInfoService.getMemberInfoByVinCode(vinCode);
|
||||
if (memberInfo == null) {
|
||||
MemberPlateNumberRelation plateInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(vinCode);
|
||||
if (plateInfo == null) {
|
||||
throw new BusinessException("", "");
|
||||
}
|
||||
if (!StringUtils.equals("1", memberInfo.getStatus())) {
|
||||
if (!StringUtils.equals("1", plateInfo.getVinStatus())) {
|
||||
// 1- 正常使用
|
||||
throw new BusinessException("", "");
|
||||
}
|
||||
// vin码生成订单 vin启动充电
|
||||
GenerateOrderDTO dto = new GenerateOrderDTO();
|
||||
dto.setCarVinInfoVO(memberInfo);
|
||||
dto.setMemberPlateNumberRelation(plateInfo);
|
||||
dto.setPileSn(pileSn);
|
||||
dto.setConnectorCode(connectorCode);
|
||||
dto.setStartMode(StartModeEnum.VIN_CODE.getValue());
|
||||
|
||||
Reference in New Issue
Block a user