package com.hw.dms.service;

import java.util.List;

import com.hw.dms.domain.DmsBillsLubeDetail;
import com.hw.dms.domain.DmsBillsLubeInstance;
import com.hw.dms.domain.DmsPlanLube;
import org.springframework.transaction.annotation.Transactional;

/**
 * 润滑工单Service接口
 *
 * @author Open Platform
 * @date 2024-02-26
 */
public interface IDmsBillsLubeInstanceService
{
    /**
     * 查询润滑工单
     *
     * @param lubeInstanceId 润滑工单主键
     * @return 润滑工单
     */
    public DmsBillsLubeInstance selectDmsBillsLubeInstanceByLubeInstanceId(Long lubeInstanceId);

    /**
     * 查询润滑工单列表
     *
     * @param dmsBillsLubeInstance 润滑工单
     * @return 润滑工单集合
     */
    public List<DmsBillsLubeInstance> selectDmsBillsLubeInstanceList(DmsBillsLubeInstance dmsBillsLubeInstance);


    /**
     * 新增润滑工单
     *
     * @param lubeInstanceCode 润滑计划编号
     * @return 结果
     */
    public int insertDmsBillsLubeInstance(String lubeInstanceCode);



    /**
     * 新增润滑工单
     *
     * @param dmsBillsLubeInstance 润滑工单
     * @return 结果
     */
    public int insertDmsBillsLubeInstance(DmsBillsLubeInstance dmsBillsLubeInstance);

    /**
     * 修改润滑工单
     *
     * @param dmsBillsLubeInstance 润滑工单
     * @return 结果
     */
    public int updateDmsBillsLubeInstance(DmsBillsLubeInstance dmsBillsLubeInstance);

    /**
     * 批量删除润滑工单
     *
     * @param lubeInstanceIds 需要删除的润滑工单主键集合
     * @return 结果
     */
    public int deleteDmsBillsLubeInstanceByLubeInstanceIds(Long[] lubeInstanceIds);

    /**
     * 删除润滑工单信息
     *
     * @param lubeInstanceId 润滑工单主键
     * @return 结果
     */
    public int deleteDmsBillsLubeInstanceByLubeInstanceId(Long lubeInstanceId);

    int insertDmsBillsLubeInstancePDA(DmsBillsLubeInstance dmsBillsLubeInstance);


    /**
     * 获取最新一条未完成的润滑工单
     *
     * @param dmsBillsLubeInstance
     * @return
     */
    public DmsBillsLubeInstance getNewestBillsLubeInstance(DmsBillsLubeInstance dmsBillsLubeInstance);

    /**
     * 开始润滑
     *
     * @param dmsBillsLubeDetail 润滑工单明细
     * @return 结果
     */
    public int startLube(DmsBillsLubeDetail dmsBillsLubeDetail);

    /**
     * 完成润滑
     *
     * @param dmsBillsLubeDetail 润滑工单明细
     * @return 结果
     */
    public int completeLube(DmsBillsLubeDetail dmsBillsLubeDetail);
}
