|
@@ -56,7 +56,7 @@ public class TicketBoxSerialServiceImpl implements ITicketBoxSerialService {
|
|
|
if (!CollectionUtils.isEmpty(ticketBoxList)) {
|
|
|
String boxNo = ticketBoxList.get(0).getBoxNo();
|
|
|
|
|
|
- int year = Character.codePointAt(boxNo.substring(1, 2), 0) - 50;
|
|
|
+ int year = Character.codePointAt(boxNo.substring(2, 3), 0) - 50;
|
|
|
// 同一年份,做累加
|
|
|
if (year == Integer.valueOf(prefix)) {
|
|
|
start = Integer.valueOf(boxNo.substring(2)) + 1;
|
|
@@ -69,7 +69,9 @@ public class TicketBoxSerialServiceImpl implements ITicketBoxSerialService {
|
|
|
String str = new String(Character.toChars(Integer.parseInt(prefix) + 50));
|
|
|
Object value = redisTemplate.opsForValue().get(prefix);
|
|
|
LogUtil.debug(logger, "生成的年份为{0},序列号为{1}", new Object[]{str, value});
|
|
|
- return "T" + str + String.format("%1$05d", value);
|
|
|
+
|
|
|
+ String type = ticketType == TicketTypeEnum.ONLINE ? "S" : "X";
|
|
|
+ return "T" + type + str + String.format("%1$05d", value);
|
|
|
}
|
|
|
|
|
|
// 获取第二年 1月 1日 00:00的时间
|