vouchernumservice.java

来自「一个关于tlms的一个小程序 看看能否帮助到别人」· Java 代码 · 共 71 行

JAVA
71
字号
/**
 * =============================================
 * Copyright 2006 szmx
 *
 * Change Revision
 * --------------------------------
 *   Date          Author      Remarks
 *   2006-4-14     Allen.Zeng    Create com.szmx.framework.base.service.BaseService.VoucherNumService
 * =============================================
 */

package com.szmx.tlms.finance.service;

import com.szmx.framework.base.service.BaseService;
import com.szmx.tlms.TlmsServiceException;
import com.szmx.tlms.finance.model.CalendarPeriod;

/**
 *
 * @author Allen.Zeng
 * @since 2006-4-14
 */

public interface VoucherNumService extends BaseService {

    /**
     * At the beginning of every period, it veirfy SAP voucher number in order to auto-generate voucher number later.
     *
     * function
     *      1) verify voucher numbers that generated from SAP with two rules.
     *         The two rules are:
     *         a) There must be not a duplicated number
     *         b) There must be not any unused number before one
     *      2) For every company and every voucher type, initiate flow number to zero in TB_VOUCHER_NUM
     *      3) For every company and every voucher type, set max flow number in TB_VOUCHER_NUM
     *         according to current vouchers in order to generate voucher number later
     *      4) Update voucher numbers in TB_VOUCHER_HEADER with the verified ones
     *
     * @param calendarPeriod  persistent or detached calendar period object
     * @param userid  user physical id
     * @throws TlmsServiceException
     */
    public void initPeriodVoucherNum(CalendarPeriod calendarPeriod, Long userid) throws TlmsServiceException;

    /**
     * According to the given companyid, period name & voucher type, it auto-generate a voucher number
     *
     * @param companySysId  company physical id
     * @param calendarPeriod  persistent or detached calendar period objet
     * @param voucherType  voucher type
     * @param userid  user physical id
     * @return  voucher number
     * @throws TlmsServiceException
     */
    public String generateVoucherNum(String companySysId, CalendarPeriod calendarPeriod,
                                     String voucherType, Long userid) throws TlmsServiceException;

    /**
     * This method updates flow number, when a voucher number have been generated and in use.
     * This is in order to auto-genereate correct voucher number
     *
     * @param companySysId  company physical id
     * @param calendarPeriod  persistent or detached calendar period object
     * @param voucherType  voucher type
     * @param userid  user physical id
     * @throws TlmsServiceException
     */
    public void updateFlowNo(String companySysId, CalendarPeriod calendarPeriod,
                             String voucherType, Long userid) throws TlmsServiceException;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?