|
@@ -128,8 +128,10 @@ public class GK309GpsServerHandler extends HexBinaryAcceptanceHandlerAdapter {
|
|
|
// reply(channel, CORRECT_TIME_MSG, "校时包");
|
|
|
replyForTime(channel, ret);
|
|
|
} else if (SIGN_IN_MSG == msgType) {
|
|
|
+ byte[] dataBytes = new byte[6];
|
|
|
+ in.readBytes(dataBytes);
|
|
|
|
|
|
- in.skipBytes(7);
|
|
|
+ in.skipBytes(1);
|
|
|
short terminalReservedWord = in.readShort();
|
|
|
byte[] reservedWorkBytes = short2Bytes(terminalReservedWord);
|
|
|
|
|
@@ -138,16 +140,11 @@ public class GK309GpsServerHandler extends HexBinaryAcceptanceHandlerAdapter {
|
|
|
short serNum = in.readShort();
|
|
|
byte[] serNumBytes = short2Bytes(serNum);
|
|
|
|
|
|
- long currentTimeMillis = System.currentTimeMillis();
|
|
|
- byte[]
|
|
|
-// timeOfSignIn = new BCD8421Operater().string2Bcd(String.valueOf(currentTimeMillis));
|
|
|
- timeOfSignIn = BitOperator.longToBytes(currentTimeMillis, 6);
|
|
|
-
|
|
|
// 状态: 0(失败), 1(成功) 类型: 1(上班), 2(下班)
|
|
|
byte[] signResult = new byte[]{0x01, 0x01};
|
|
|
// 0X0F是长度,固定长度
|
|
|
byte[] contentsOfPackage = mergeByteArray(new byte[]{0X0F, SIGN_IN_MSG},
|
|
|
- timeOfSignIn, signResult, reservedWorkBytes, serNumBytes);
|
|
|
+ dataBytes, signResult, reservedWorkBytes, serNumBytes);
|
|
|
writeToClient(channel, "打卡包", contentsOfPackage);
|
|
|
|
|
|
} else {
|