package com.ruoyi.common.utils;

import java.util.Date;
import java.util.UUID;

public class UuidUtil {
	public static String get32UUID() {
		String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");
		return uuid;
	}
	public static String getOrderNum(){//订单号
		String time = DateUtils.format(new Date(),"yyMMddHHmmss");
		String randomStr = RandomUtil.generateDigitalString(7);
		return time+randomStr;
	}
	public static String getPlanNum(){//计划单号
		String time = DateUtils.format(new Date(),"MMddHHmmyyyy");
		String randomStr = RandomUtil.generateDigitalString(5);
		return time+randomStr;
	}
	public static String getBillrNum(){//库单号
		String time = DateUtils.format(new Date(),"yy-MMddHHmmss");
		String randomStr = RandomUtil.generateDigitalString(5);
		return time+randomStr;
	}
	public static String getContractNum(String Phone){//合同单号
        String time = DateUtils.format(new Date(), "MMddHHmmss");
		String randomStr = RandomUtil.generateDigitalString(3);
        return Phone + "-" + time + randomStr;
	}
	public static String getTreadeNum(){//结算单号
		String time = DateUtils.format(new Date(),"MMdd-yyyy-HHmmss");
		String randomStr = RandomUtil.generateDigitalString(5);
		return time+randomStr;
	}
	public static String getOrderServiceNum(){//售后服务单号
		String time = DateUtils.format(new Date(),"yyMMddHHmmss");
		String randomStr = RandomUtil.generateDigitalString(7);
		return time+randomStr;
	}
	public static void main(String[] args) {
		System.out.println(get32UUID());
	}
}

