vouchernumdao.java

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

JAVA
112
字号
/**
 * =============================================
 * Copyright 2006 szmx
 *
 * Change Revision
 * --------------------------------
 *   Date          Author      Remarks
 *   2006-4-14     Allen.Zeng    Create com.szmx.tlms.finance.dao.VoucherNumDao
 * =============================================
 */

package com.szmx.tlms.finance.dao;

import com.szmx.tlms.finance.model.VoucherNum;
import com.szmx.tlms.finance.model.CalendarPeriod;
import com.szmx.tlms.supplychain.model.SalesOrg;
import com.szmx.framework.base.dao.BaseDao;

import java.util.Collection;
import java.util.List;

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

public interface VoucherNumDao extends BaseDao {

    /**
     * This method saves or updates a single voucherNum object
     *
     * @param voucherNum  voucher number object
     */
    void saveOrUpdateVoucherNum(VoucherNum voucherNum);

    /**
     * This method saves or updates voucherNum objects in batches
     *
     * @param voucherNums  collection of voucher number objects
     */
    void saveOrUpdateAllVoucherNum(Collection voucherNums);

    /**
     * This methods removes a single voucherNum object
     *
     * @param voucherNum  voucher number object
     */
    void removeVoucherNum(VoucherNum voucherNum);

    /**
     * This method removes voucherNum objects in batches
     *
     * @param voucherNums  collection of voucher numbers
     */
    void removeAllVoucherNum(Collection voucherNums);

    /**
     * This method complete user serach function based on three condition, which are companyId, period and voucher type
     *
     * @param company  sales company
     * @param calendarPeriod  calendar period object
     * @param voucherType  voucher type
     * @return  list of voucher numbers
     */
    List searchVoucherNum(SalesOrg company, CalendarPeriod calendarPeriod, String voucherType);

    /**
     * This method generates voucher number
     *
     * @param company  sales company
     * @param calendarPeriod  calendar period object
     * @param voucherType  voucher type
     * @param userid  user physical id
     * @return  voucher number. If it returns null, caller must throw a exception to notify user that it fail to generate voucher number
     */
    String generateVoucherNum(SalesOrg company, CalendarPeriod calendarPeriod, String voucherType, Long userid);

    /**
     * This method set flow number of every voucher type of a company to zero at the beginning of every period
     *
     * @param company  sales company
     * @param calendarPeriod  calendar period
     * @param voucherType  list of voucher types
     * @param userid  user physical id
     * @return status value. If 0, it's all right. If not 0, there is something wrong
     */
    int setFlowNoZero(SalesOrg company, CalendarPeriod calendarPeriod, List voucherType, Long userid);

    /**
     * This method set flow number of special voucherType to zero
     *
     * @param company  sales company
     * @param calendarPeriod  calendar period
     * @param voucherType  voucher type
     * @param userid  user physical id
     * @return status value. If 0, it's all right. If not 0, there is something wrong
     */
    int setFlowNoZero(SalesOrg company, CalendarPeriod calendarPeriod, String voucherType, Long userid);

    /**
     * This method is used to update flow no
     *
     * @param company  sales company
     * @param calendarPeriod  calendar period object
     * @param voucherType  voucher type
     * @param userid  user physical id
     * @return status value. If 0, okay. If not 0, something wrong
     */
    int updateFlowNo(SalesOrg company, CalendarPeriod calendarPeriod, String voucherType, Long userid);
}

⌨️ 快捷键说明

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