/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.manager.service;


import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.tool.api.R;
import org.springblade.manager.dto.FormElementDTO;
import org.springblade.manager.dto.WbsFormElementDTO;
import org.springblade.manager.dto.WbsFormElementDTO2;
import org.springblade.manager.entity.WbsFormElement;
import org.springblade.manager.excel.WbsFormElementBatchExcel;
import org.springblade.manager.excel.WbsFormElementExcel;
import org.springblade.manager.vo.WbsFormElementVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * wbs表单元素 服务类
 *
 * @author liuyc
 * @since 2022-04-27
 */
public interface IWbsFormElementService extends BaseService<WbsFormElement> {

    IPage<WbsFormElementVO> selectWbsFormElementPage(IPage<WbsFormElementVO> page, WbsFormElementVO wbsFormElement);

    boolean addFormElement(WbsFormElement wbsFormElement);

    Boolean selectElementsById(List<WbsFormElement> wbsFormElementList);

    Boolean initTable(List<WbsFormElement> elementList, String tableName);

    List<WbsFormElement> selectElementListByFid(String tableId);

    void importElement(List<WbsFormElementExcel> data, Boolean isCovered, String tableId);

    R saveAndSyn(WbsFormElement wbsFormElement, String tableName);

    boolean deleteAndSyn(String ids, String elementName, String tableName);

    String updateAndSyn(List<WbsFormElement> wbsFormElementList, String initTableName);

    List<WbsFormElementDTO2> findWbsTreeTableSameLevel(String parentId);

    boolean wbsTreeTableSort(List<WbsFormElementDTO2> wbsTreeDTO);

    WbsFormElementVO getDetailById(WbsFormElement wbsFormElement);

    void importElement2(List<WbsFormElementBatchExcel> data, Boolean isCovered, String tableId);
}
