package com.zt.plat.module.qms.resource.device.service;

import java.util.*;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.qms.resource.device.controller.vo.*;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceCalibrationPlanDO;
import jakarta.validation.*;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceCalibrationDO;
import com.zt.plat.framework.common.pojo.PageResult;

/**
 * 设备-检定校准 Service 接口
 *
 * @author 后台管理-1
 */
public interface DeviceCalibrationService {


    void createListByPlan(DeviceCalibrationPlanDO plan);

    CommonResult<List<DeviceCalibrationVO>> getLastDataCheckList(List<Long> deviceIds, String flowStatus);

    IPage<DeviceCalibrationVO> queryPageList(Page<DeviceCalibrationPageReqVO> page, DeviceCalibrationPageReqVO pageReqVO);

    void updateEffectiveFlag(Long planId, String effectiveFlag);

    List<DeviceCalibrationDO> getListByPlanId(Long planId);

    CommonResult<DeviceCalibrationRespVO> submitApply(DeviceCalibrationSaveReqVO paramVO);

    /**
     * 创建设备-检定校准
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    DeviceCalibrationRespVO createDeviceCalibration(@Valid DeviceCalibrationSaveReqVO createReqVO);

    DeviceCalibrationRespVO createByDeviceId(DeviceCalibrationSaveReqVO createReqVO);

    /**
     * 更新设备-检定校准
     *
     * @param updateReqVO 更新信息
     */
    DeviceCalibrationDO updateDeviceCalibration(@Valid DeviceCalibrationSaveReqVO updateReqVO);

    /**
     * 删除设备-检定校准
     *
     * @param id 编号
     */
    void deleteDeviceCalibration(Long id);

    /**
    * 批量删除设备-检定校准
    *
    * @param ids 编号
    */
    void deleteDeviceCalibrationListByIds(List<Long> ids);

    /**
     * 获得设备-检定校准
     *
     * @param id 编号
     * @return 设备-检定校准
     */
    DeviceCalibrationDO getDeviceCalibration(Long id);
    DeviceCalibrationVO getDeviceCalibrationVO(Long id);
    DeviceCalibrationVO getLastData(JSONObject param);

    /**
     * 获得设备-检定校准分页
     *
     * @param pageReqVO 分页查询
     * @return 设备-检定校准分页
     */
    PageResult<DeviceCalibrationDO> getDeviceCalibrationPage(DeviceCalibrationPageReqVO pageReqVO);

    void updateBatch(List<DeviceCalibrationDO> list);

    void insertBatch(List<DeviceCalibrationDO> list);

}