mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +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());
|
||||
|
||||
@@ -72,7 +72,7 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
||||
private IStationSettingRelationService stationSettingRelationService;
|
||||
|
||||
@Autowired
|
||||
private ICarVinInfoService carVinInfoService;
|
||||
private IMemberPlateNumberRelationService memberPlateNumberRelationService;
|
||||
|
||||
public static void main(String[] args) {
|
||||
// 获取消息体
|
||||
@@ -612,10 +612,10 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
||||
}
|
||||
// 如果是vin启动,将启动锁定状态改为正常
|
||||
if (StringUtils.equals(data.getTransactionIdentifier(), "05")) {
|
||||
CarVinInfo carVinInfo = carVinInfoService.selectVinInfoByVin(data.getVinCode());
|
||||
if (carVinInfo != null && (StringUtils.equals(carVinInfo.getStatus(), "2"))) {
|
||||
carVinInfo.setStatus("1");
|
||||
carVinInfoService.updateCarVinInfo(carVinInfo);
|
||||
MemberPlateNumberRelation plateInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(data.getVinCode());
|
||||
if (plateInfo != null && (StringUtils.equals(plateInfo.getVinStatus(), "1"))) {
|
||||
plateInfo.setVinStatus("0");
|
||||
memberPlateNumberRelationService.updateMemberPlateNumberRelation(plateInfo);
|
||||
}
|
||||
}
|
||||
orderBasicInfoService.updateOrderBasicInfo(orderBasicInfo);
|
||||
|
||||
Reference in New Issue
Block a user