|
|
|
@ -107,20 +107,20 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
// String abbreviation = entity.getAbbreviation();//简称
|
|
|
|
|
String code = entity.getCode(); |
|
|
|
|
String code = entity.getWarehouseCode(); |
|
|
|
|
//获得年月日短字符串
|
|
|
|
|
String dateShort = CommonUtil.dateToStringShortYM(new Date()); |
|
|
|
|
// String dateShort = CommonUtil.dateToStringShortYM(new Date());
|
|
|
|
|
|
|
|
|
|
String key = "HT"+":"+code+":"+dateShort; |
|
|
|
|
String key = "HT"+":"+code; |
|
|
|
|
|
|
|
|
|
//获得序号
|
|
|
|
|
Long incr = bladeRedis.incr(key); |
|
|
|
|
if(1 == incr){ |
|
|
|
|
//如果为1就是刚刚才建立,给他一个过期时间
|
|
|
|
|
bladeRedis.expireAt(key,CommonUtil.getMonthDayEnd()); |
|
|
|
|
} |
|
|
|
|
// if(1 == incr){
|
|
|
|
|
// //如果为1就是刚刚才建立,给他一个过期时间
|
|
|
|
|
// bladeRedis.expireAt(key,CommonUtil.getMonthDayEnd());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return "HT"+code+dateShort+CommonUtil.geFourNumber(incr,5); |
|
|
|
|
return "HT"+code+CommonUtil.geFourNumber(incr,6); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|