确认应答是查询应答吗

This commit is contained in:
ZZ 2021-09-14 18:39:00 +08:00
parent a219a6181b
commit ea10b34005
2 changed files with 7 additions and 5 deletions

View File

@ -20,7 +20,6 @@ import java.lang.reflect.InvocationTargetException;
import java.util.Map;
import static com.xhpc.common.data.redis.StaticBeanUtil.REDIS;
import static com.xhpc.common.data.redis.StaticBeanUtil.seqHex;
import static com.xhpc.pp.utils.security.CacheDataUtils.reflectTranslate;
@Lazy
@ -52,10 +51,7 @@ public class OrderDataLogic implements ServiceLogic {
Map<String, Object> cacheGun = REDIS.getCacheMap(gunkey);
cacheGun.put("orderstoptime", cacheOrderData.getEndTime());
cacheGun.put("orderkey", null);
REDIS.setCacheMap(gunkey, cacheGun);
String skey = gunkey.concat(".seqhex");
String seq = seqHex(skey);
String resultStr = "6815".concat(seq).concat("0040").concat(orderNo).concat(ServiceResult.HEX_00);
String resultStr = "6815".concat(req.get("seq").toString()).concat("0040").concat(orderNo).concat(ServiceResult.HEX_00);
pileOrderService.pileEndOrder(orderNo);
return new ServiceResult(HexUtils.toBytes(resultStr), ServiceResult.OK);
}

View File

@ -213,7 +213,13 @@ public class ChargingPileBinaryHandler implements ClientBinaryHandler {
pos += field.getLen();
}
result.put("hex", toHex(data));
result.put("seq", getSeq(data));
return result;
}
private String getSeq(byte[] data) {
return toHex(ArrayUtils.subarray(data, 3, 5));
}
}