IReceiptHeaderService.java 2.42 KB
package com.huaheng.pc.receipt.receiptHeader.service;

import com.huaheng.api.U8.domain.ICSReceiptHeader;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
import java.util.List;
import java.util.Map;

/**
 * 入库单主 服务层
 * 
 * @author huaheng
 * @date 2018-08-19
 */
public interface IReceiptHeaderService {

    List<ReceiptHeader> selectListEntityByLike(ReceiptHeader condition);

    List<ReceiptHeader> selectListEntityByEqual(ReceiptHeader condition);

    ReceiptHeader selectFirstEntity(ReceiptHeader condition);

    ReceiptHeader selectEntityById(Integer id);

    List<Map<String, Object>> selectListMapByEqual(String columnList, ReceiptHeader condition);

    Map<String, Object> selectFirstMap(String columnList, ReceiptHeader condition);

    int insert(ReceiptHeader record);

    int updateByModel(ReceiptHeader record);

    int updateByCondition(ReceiptHeader record, ReceiptHeader condition);

    int deleteById(Integer id);

    int deleteByCondition(ReceiptHeader condition);

    /**
     *  保存入库单头
     * @param receiptHeader
     * @return
     */
    AjaxResult<Boolean> insertHeader(ReceiptHeader receiptHeader) ;

    /**
     * 删除表头和明细
     * @param id
     * @return
     * @
     */
    AjaxResult<Integer> deleteHeaderAndDetail(Integer id) ;

    /**
     *  检查状态
     * @param headerId
     * @param status
     * @return
     */
    AjaxResult<Integer> checkStatus(Integer headerId, Short status);

    /**
     *  检查状态
     * @param receiptCode
     * @param status
     * @return
     * @
     */
    AjaxResult<Integer> checkStatus(String receiptCode, Short status) ;

    void receiptStatusUpdate(Integer receiptId, Short status);

    void updateDetailStatus(Integer receiptDetailId,  Short status);

    AjaxResult updateHeader(ReceiptHeader receiptHeader);

    String createCode(String receiptType);

    /**
    **  获得今日的单头
     */
    Integer createTodayHeader(String companyId, String companyCode);

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

    ReceiptHeader getReceipt(ReceiptHeader receiptHeader);


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

    AjaxResult receive(String code);

    List<ReceiptHeader> selectListByCreated();
}