package cn.estsh.i3plus.core.apiservice.util;

import cn.estsh.i3plus.core.apiservice.serviceimpl.busi.TestBase;
import cn.estsh.i3plus.pojo.platform.bean.SysOrderNoRule;
import org.junit.Test;

/**
 * @Description :
 * @Reference :
 * @Author : yunhao
 * @CreateDate : 2018-11-21 19:45
 * @Modify:
 **/
public class TestOrderNoMakeUtil extends TestBase {

    @Test
    public void TestMakeOrderNo() {
        SysOrderNoRule sysOrderNoRule = new SysOrderNoRule();
        sysOrderNoRule.setName("一号单据");
        sysOrderNoRule.setOrderNoRule("GG-{yyyy}{MM}{dd}{serialNo}");
        sysOrderNoRule.setSerialNoSeed(1L);
        sysOrderNoRule.setSerialNoIncrement(1L);
        sysOrderNoRule.setSerialNoLength(4L);
        sysOrderNoRule.setSerialNo(9999L);
        sysOrderNoRule.setIsCycle(1);

        System.out.println(OrderNoMakeUtil.next(sysOrderNoRule));

//       String d= MessageFormat.format("%0{0}d", 3);
//        System.out.println(d);
    }

}
