ReceiptHeaderMapper.java 1.52 KB
package com.huaheng.pc.receipt.receiptHeader.mapper;

import com.huaheng.api.U8.domain.ICSReceiptHeader;
import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

/**
 * 入库单主 数据层
 * 
 * @author huaheng
 * @date 2018-08-19
 */
public interface ReceiptHeaderMapper{

    /**
     *  生成入库单编码
     * @return
     */
    String createCode(String receiptType);

    /**
     *  将 收货单头表转到历史表
     * @param code
     * @return
     */
    int headerToHistory(@Param("code") String code);

    /**
     *  将收货单明细表转到历史表
     * @param code
     * @return
     */
    int detailToHistory(@Param("code") String code);

    Short getLastStatus(Integer receiptId);

    void updateDetailStatus(@Param("receiptDetailId") Integer receiptDetailId, @Param("status") Short status);

    void updateHeaderStatus(@Param("receiptId") Integer receiptId, @Param("firstStatus") Short firstStatus, @Param("lastStatus") Short lastStatus);

    ICSReceiptHeader selectModel(ICSReceiptHeader condition);

    int insertModel(ICSReceiptHeader condition);

    /**
     * 查询最后一条单据
     * @return
     */
    ReceiptHeader selectLastOne();

    ReceiptHeader getReceipt(ReceiptHeader receiptHeader);


    /**
     * 此方法是查询一条没有被钱柜扫描过的单据
     * @return
     */
    ReceiptHeader selectNosScanSSP(String code);

    List<ReceiptHeader> selectListByCreated();
}