package com.dayou.service;
import com.dayou.dto.TakeNumberDTO;
import com.dayou.dto.TaskRecordDTO;
import com.dayou.entity.BusinessNumber;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dayou.enums.ProductionEnum;
import com.dayou.enums.TakeNumberEnum;
import com.dayou.vo.IdNameVO;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 业务号 服务类
 * </p>
 *
 * @author wucl
 * @since 2023-11-06
 */
public interface IBusinessNumberService extends IService<BusinessNumber> {


    /**
     * 取报告号主号(大中型)
     * @param taskRecordDTO
     * @return
     */
    String takeMainNumber(TakeNumberDTO taskRecordDTO);

    /**
     * 取报告号子号(大中型)
     * @param taskRecordDTO
     * @param mainNumber
     * @return
     */
    List<IdNameVO> takeSubNumber(TakeNumberDTO taskRecordDTO,String mainNumber);

    /**
     * 订单号取号：年份4位月份2位序号4位(全局唯一)
     * @return
     */
    String takeOrderNumber();

    /**
     * 取价值意见书主号(大中型)
     * @param orderId
     * @param takeNumberEnum
     * @return
     */
    String takeStatementMainNumber(String orderId, TakeNumberEnum takeNumberEnum);

    /**
     * 取价值意见书子号(大中型)
     * @param orderId
     * @param takeNumberEnum
     * @param mainNumber
     * @param targets
     * @return
     */
    List<IdNameVO> takeStatementSubNumber(String orderId, TakeNumberEnum takeNumberEnum,String mainNumber,List<IdNameVO> targets );

    /**
     * 取复评函主号(大中型)
     * @param orderId
     * @param takeNumberEnum
     * @return
     */
    String takeLetterMainNumber(String orderId, TakeNumberEnum takeNumberEnum);

    /**
     * 取复评函子号(大中型)
     * @param orderId
     * @param takeNumberEnum
     * @param mainNumber
     * @param targets
     * @return
     */
    List<IdNameVO> takeLetterSubNumber(String orderId, TakeNumberEnum takeNumberEnum,String mainNumber,List<IdNameVO> targets,Long businessId );

    /**
     * 取项目编号
     * 资产项目订单号取号：年份4位 + 月份2位 + 序号3位(当月下单量)
     * 如: 2025010001
     * @return String
     */
    String takeAssetsOrderNumber();

    /**
     * 在一个订单中按顺序取复评函号
     * @param businessId
     * @param orderId
     * @param takeNumberEnum
     * @return
     */
    String takeLetterByOrder(Long businessId,String orderId,TakeNumberEnum takeNumberEnum);
}
