ReceiptDetailService.java 2.48 KB
package com.huaheng.pc.receipt.receiptDetail.service;

import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.mobile.receipt.ReceiptBill;
import com.huaheng.pc.config.statusFlow.domain.StatusFlowDetail;
import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
import com.huaheng.pc.task.taskDetail.domain.TaskDetail;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface ReceiptDetailService extends IService<ReceiptDetail>{

    AjaxResult saveReceiptDetaial(ReceiptDetail receiptDetail);

    AjaxResult updateReceiptDetaial(ReceiptDetail receiptDetail);

    /**
     * 根据流程配置更新入库明细下一流程
     * @param receiptDetail
     * @return
     */
    ReceiptDetail queryflow(ReceiptDetail receiptDetail);


    List<StatusFlowDetail> queryflow();

    /**
     * @description 更新头表尾状态
     * 每次明细表更新后调用该方法
     * 当所有明细表到达该状态时,更新头表状态
     * @param id 头表id
     */
    void updateReceiptHeaderLastStatus(Integer id);

    void updateReceiptHeaderLastStatusV2(Set<Integer> receiptHeaderId);

    AjaxResult approval(String ids, Integer approval);

    //获取7天内的入库量
    List<TaskDetail> getReceiptQtyLast7Days();

    //以仓库维度获取入库量
    List<TaskDetail> getWarehouseReceipt();

    //以货主维度获取入库量
    List<TaskDetail> getCompanyReceipt();


    /**
     * 移动端扫描入库单
     * @param code
     * @return
     */
    AjaxResult scanReceiptCode(String code, String type, String companyCode);

    List<Integer> insertTodayReceiptDetail(int headerId, List<ReceiptBill> receiptBills, boolean isCompletedQty, String companyCode);

    AjaxResult  updateReceiptHeader(ReceiptHeader receiptHeader);

    /**
     * 根据入库单头表id查询入库单明细
     * @param id
     * @return
     */
    List<ReceiptDetail> findByReceiptId(Integer id);

    String insertExcelData(List<ReceiptDetail> receiptDetails, boolean updateSupport, String operName) ;
    //获取工作令
    public String getWorkNo(Integer id);

    List<ReceiptDetail> getByHeaderCode(String code);

    List<ReceiptDetail> selectListEntityByLike(ReceiptDetail receiptDetail);
    ReceiptDetail selectFirstEntity(ReceiptDetail receiptDetail);
    List<Map<String, Object>> selectList(String code, String goodsShelfNo);
}