mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
打印日志
This commit is contained in:
@@ -16,11 +16,9 @@ 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.IMemberBasicInfoService;
|
||||
import com.jsowell.pile.service.IMemberPlateNumberRelationService;
|
||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||
import com.jsowell.pile.service.IPileAuthCardService;
|
||||
import com.jsowell.wxpay.service.WxAppletRemoteService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -49,12 +47,6 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
||||
@Autowired
|
||||
private IMemberPlateNumberRelationService memberPlateNumberRelationService;
|
||||
|
||||
@Autowired
|
||||
private WxAppletRemoteService wxAppletRemoteService;
|
||||
|
||||
@Autowired
|
||||
private IMemberBasicInfoService memberBasicInfoService;
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
YKCOperateFactory.register(type, this);
|
||||
@@ -100,7 +92,6 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
||||
length = 8;
|
||||
byte[] cardNumByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
||||
String physicsCard = BytesUtil.binary(cardNumByteArr, 16);
|
||||
log.info("桩号:{}申请充电物理卡号:{}", pileSn, physicsCard);
|
||||
|
||||
// 输入密码 对用户输入的密码进行16 位MD5 加密,采用小写上传
|
||||
startIndex += length;
|
||||
@@ -112,7 +103,6 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
||||
length = 17;
|
||||
byte[] vinCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
||||
String vinCode = BytesUtil.ascii2Str(vinCodeByteArr);
|
||||
log.info("桩号:{}申请充电VIN码:{}", pileSn, vinCode);
|
||||
|
||||
/**
|
||||
* 刷卡启动充电
|
||||
@@ -123,6 +113,7 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
||||
String transactionCode = "";
|
||||
try {
|
||||
if (StringUtils.equals("01", startMode)) {
|
||||
log.info("桩号:{}申请充电物理卡号:{}", pileSn, physicsCard);
|
||||
// 查询卡信息 根据传过来的物理卡号查询数据库中此卡信息
|
||||
PileAuthCard pileAuthCardInfo = pileAuthCardService.selectCardInfoByLogicCard(physicsCard);
|
||||
if (pileAuthCardInfo == null) {
|
||||
@@ -159,15 +150,12 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
||||
transactionCode = Constants.ILLEGAL_TRANSACTION_CODE;
|
||||
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
|
||||
authenticationFlagByteArr = Constants.zeroByteArray;
|
||||
|
||||
log.error("刷卡启动充电鉴权 error:{}, {}", e.getCode(), e.getMessage());
|
||||
}catch (Exception e){
|
||||
} catch (Exception e){
|
||||
transactionCode = Constants.ILLEGAL_TRANSACTION_CODE;
|
||||
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
|
||||
authenticationFlagByteArr = Constants.zeroByteArray;
|
||||
|
||||
log.error("刷卡启动充电鉴权 error", e);
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -175,6 +163,7 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
||||
* VIN码启动充电
|
||||
*/
|
||||
if (StringUtils.equals("03", startMode)) {
|
||||
log.info("桩号:{}申请充电VIN码:{}", pileSn, vinCode);
|
||||
// 通过vin码查询数据库绑定用户信息
|
||||
MemberPlateNumberRelation plateInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(vinCode);
|
||||
if (plateInfo == null) {
|
||||
@@ -259,6 +248,5 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
||||
authenticationFlagByteArr, defeatReasonByteArr);
|
||||
|
||||
return getResult(ykcDataProtocol, msgBodyByteArr);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user