package com.dev.swms.server.service.sequence;

import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.dev.swms.server.model.base.BillType;
import com.dev.energy.server.service.BaseManager;

/**
 * @author  dev
 */
@Transactional(readOnly=true)
public interface BussinessCodeManager extends BaseManager{
    
    /**
     * 根据全局开关配置自动创建盘点计划流水号
     * @param params
     * @return
     */
    @Transactional
	String generateCountPlanCode(Map params);
    
    /**
     * 根据全局参数自动创建收货单流水号
     * @param params
     * @return
     */
    @Transactional
    String generateReceivingDocCode(Map params);
    
	String generateBussinessBillCode(String isGenerateId,String generatePattenId,String useDefaultId,String defaultPrifex);

	/**
	 * 根据全局开关配置自动创建ASN入库单号
	 * 
	 */
	Map generateASNReceiveGroupCode(String code);
	
	@Transactional
	String generateLP(String warehouseCode);
	@Transactional
	String generateCageInfoCode(String warehouseCode);
	
	/**
	 * 取BOL编号
	 * @param params
	 * @return
	 */
	@Transactional
	String generateBOLCode(Map params);
	
	@Transactional
	String generateMasterBOLCode(Map params);
	
	/**
	 * 生成补货申请单号
	 * */
	String generateInventoryApplyCode(Map params);
	/**
	 * 生成批次号
	 */
	@Transactional
	String generateLot();
	
	/**
	 * 生成Task号
	 */
	@Transactional
	String generateTask();
	
	/**
	 * 生成Package号
	 */
	@Transactional
	String generatePackage();
	
	/**
	 * 生成随机代号-按天
	 */
	@Transactional
	String  generateDayCode(String code,int len);
	
	/**
	 * 根据单据类型生成该单据的CODE
	 */
	@Transactional
	String getCodeByBillType(BillType billType,Long warehouseId);
	
	@Transactional
	String getCodeForYm(String code,int len);
	
	@Transactional
	String getCodeYm(String code,int len);
	
}
