
package org.sky.scientific.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import jakarta.servlet.http.HttpServletResponse;
import org.sky.core.mp.base.BaseService;
import org.sky.scientific.pojo.dto.AssetDTO;
import org.sky.scientific.pojo.dto.CostSummaryDTO;
import org.sky.scientific.pojo.dto.XmAssetCostQueryParam;
import org.sky.scientific.pojo.entity.AssetEntity;
import org.sky.scientific.pojo.vo.AssetVO;
import org.sky.scientific.pojo.vo.CostSummaryVO;
import org.sky.scientific.pojo.vo.XmAssetCostSummary;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 资产表 服务类
 *
 * @author Kd
 * @since 2025-06-29
 */
public interface IAssetService extends BaseService<AssetEntity> {

	/**
	 * 分页
	 * @param page
	 * @param dto
	 * @return
	 */
	IPage<AssetVO> selectAssetPage(IPage<AssetVO> page, AssetDTO dto);

	/**
	 * 保存资产
	 *
	 * @param asset 资产
	 * @return boolean
	 */
	boolean saveAsset(AssetEntity asset);

	/**
	 * 导入
	 * @param file
	 * @param yearAndMonth
	 */
    void importAsset(MultipartFile file, String yearAndMonth);

	/**
	 * 读取上个月资产名单
	 * @param zc
	 * @return
	 */
	boolean fetchLastMonthData(AssetDTO asset);

	/**
	 * 获取资产列表
	 * @return
	 */
	List<AssetEntity> selectAssetList();

	boolean physicalDeleteByIds(List<Long> longList);

	/**
	 * 导出数据
	 *
	 * @param queryWrapper 查询条件
	 * @return List<ZcExcel>
	 */
	void exportAsset(HttpServletResponse response, AssetDTO dto);

	/**
	 * 折旧费用、长期待摊费用、无形资产摊销费用汇总表
	 * @return
	 */
	IPage<XmAssetCostSummary> zjCqdtWxzctxFyHzb(IPage<XmAssetCostSummary> page, XmAssetCostQueryParam dto);

	/**
	 * 研发费用统计-本年各月研发费用汇总表
 	 * @param dto
	 * @return
	 */
	List<CostSummaryVO> costSummary(CostSummaryDTO dto);

	/**
	 * 修改
	 * @param asset
	 * @return
	 */
	boolean updateAsset(AssetEntity asset);

	/**
	 * 修改资产状态
	 * @param asset
	 * @return
	 */
	boolean updateStatus(AssetEntity asset);

	/**
	 * 恢复
	 * @param asset
	 * @return
	 */
	boolean recover(AssetEntity asset);
}
