package com.patzn.lims.consume.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.patzn.lims.consume.entity.LmsChemicalUserecord;
import com.patzn.lims.consume.vo.LmsChemicalRelDeliveryVO;
import com.patzn.lims.core.web.Account;
import com.patzn.lims.core.web.IBaseService;
import com.patzn.lims.consume.entity.LmsChemicalRelDelivery;

import java.math.BigDecimal;

/**
 * <p>
 * 试验耗材采购关联表 服务类
 * </p>
 *
 * @author wwd
 * @since 2020-03-25
 */
public interface ILmsChemicalRelDeliveryService extends IBaseService<LmsChemicalRelDelivery> {

    Page<LmsChemicalRelDelivery> page(Page<LmsChemicalRelDelivery> page, LmsChemicalRelDelivery lmsChemicalRelDelivery);

    boolean saveOutOrder(LmsChemicalRelDelivery lmsChemicalRelDelivery);

    Page<LmsChemicalRelDeliveryVO> pageTempBySql(Page<LmsChemicalRelDeliveryVO> page, LmsChemicalRelDeliveryVO lmsChemicalRelDelivery);


    Page<LmsChemicalRelDeliveryVO>  getPageByOrderId(Page<LmsChemicalRelDeliveryVO> page, LmsChemicalRelDelivery lmsChemicalRelDelivery);

    int updateOrderStatus(Long orderId, Long uid);

    boolean updateWaitApprovalId(Long id, BigDecimal quantity);


    boolean removeAllStock(Account account, Long orderId, LmsChemicalUserecord userecord);


    boolean finishByOrderId(Long orderId);


    boolean finishById(Account account, Long id, String remark);
}
