1078-查询区域或线路数据应答...

This commit is contained in:
648540858
2024-05-06 18:00:26 +08:00
parent 364d613ccb
commit 2112fffc26
12 changed files with 162 additions and 62 deletions

View File

@@ -69,32 +69,4 @@ public class BCDUtil {
}
return bbt;
}
/**
* 时间使用按照YY-MM-DD-hh-mm-ss转换为byte数据
*/
public static ByteBuf transform(long time) {
ByteBuf byteBuf = Unpooled.buffer();
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(time);
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH) + 1 ;
int day = calendar.get(Calendar.DAY_OF_MONTH);
int hour = calendar.get(Calendar.HOUR_OF_DAY);
int minute = calendar.get(Calendar.MINUTE);
int second = calendar.get(Calendar.SECOND);
System.out.println("year== " + year);
System.out.println("month== " + month);
System.out.println("day== " + day);
System.out.println("hour== " + hour);
System.out.println("minute== " + minute);
System.out.println("second== " + second);
byteBuf.writeByte(year);
byteBuf.writeByte(month);
byteBuf.writeByte(day);
byteBuf.writeByte(hour);
byteBuf.writeByte(minute);
byteBuf.writeByte(second);
return byteBuf;
}
}