package com.iailab.module.pms.coalquality.common.utils;
|
|
import com.iailab.framework.common.util.date.DateUtils;
|
import org.apache.commons.lang3.StringUtils;
|
|
import java.util.Date;
|
|
/**
|
* @author Jay
|
*/
|
public class SerialNumUtils {
|
|
public static String getSerialNum(String prefix, Date date, String bc) {
|
StringBuilder sb = new StringBuilder();
|
if (StringUtils.isNotEmpty(prefix)) {
|
sb.append(prefix);
|
}
|
|
if (date != null) {
|
sb.append(DateUtils.format(date, "yyyyMMdd"));
|
}
|
|
if ("bb".equals(bc)) {
|
sb.append("1");
|
} else {
|
sb.append("2");
|
}
|
|
return sb.toString();
|
}
|
}
|