package org.springblade.flow.visual.onlinedev.service;

import java.io.IOException;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

import org.springblade.flow.base.ActionResult;
import org.springblade.flow.database.exception.DataException;
import org.springblade.flow.exception.WorkFlowException;
import org.springblade.flow.visual.base.entity.VisualdevEntity;
import org.springblade.flow.visual.onlinedev.entity.VisualdevModelDataEntity;
import org.springblade.flow.visual.onlinedev.model.PaginationModel;
import org.springblade.flow.visual.onlinedev.model.PaginationModelExport;
import org.springblade.flow.visual.onlinedev.model.VisualdevModelDataCrForm;
import org.springblade.flow.visual.onlinedev.model.VisualdevModelDataInfoVO;
import org.springblade.flow.visual.onlinedev.model.VisualdevModelDataUpForm;

import com.baomidou.mybatisplus.extension.service.IService;

/**
 *
 * @version V3.1.0
 * @copyright 引迈信息技术有限公司（https://www.jnpfsoft.com）
 * @author JNPF开发平台组
 * @date 2021/3/16
 */
public interface VisualdevModelDataService extends IService<VisualdevModelDataEntity> {

	List<Map<String, Object>> getListResult(VisualdevEntity visualdevEntity, PaginationModel paginationModel)
			throws IOException, ParseException, DataException, SQLException;

	List<Map<String, Object>> getListResultAll(VisualdevEntity visualdevEntity)
			throws IOException, ParseException, DataException, SQLException;

	List<VisualdevModelDataEntity> getList(String modelId);

	VisualdevModelDataEntity getInfo(String id);

	List<VisualdevModelDataEntity> getModel(String id);

	VisualdevModelDataInfoVO infoDataChange(String id, VisualdevEntity visualdevEntity)
			throws IOException, ParseException, DataException, SQLException;

	VisualdevModelDataInfoVO tableInfo(String id, VisualdevEntity visualdevEntity)
			throws DataException, ParseException, SQLException, IOException;

	ActionResult<String> create(VisualdevEntity visualdevEntity, VisualdevModelDataCrForm visualdevModelDataCrForm)
			throws DataException, SQLException;

	ActionResult<String> update(String id, VisualdevEntity visualdevEntity,
			VisualdevModelDataUpForm visualdevModelDataUpForm) throws DataException, SQLException;

	void delete(VisualdevModelDataEntity entity);

	boolean tableDelete(String id, VisualdevEntity visualdevEntity) throws DataException, SQLException;

	ActionResult<String> tableDeleteMore(List<String> id, VisualdevEntity visualdevEntity)
			throws DataException, SQLException;

	void importData(List<VisualdevModelDataEntity> list);

	List<Map<String, Object>> exportData(String[] keys, PaginationModelExport paginationModelExport,
			VisualdevEntity visualdevEntity) throws IOException, ParseException, SQLException, DataException;

	VisualdevModelDataInfoVO tableInfoDataChange(String id, VisualdevEntity visualdevEntity)
			throws DataException, ParseException, IOException, SQLException;

	ActionResult<String> visualCreate(VisualdevEntity visualdevEntity, Map<String, Object> dataMap,
			VisualdevModelDataCrForm visualdevModelDataCrForm, String mainId) throws WorkFlowException;

	ActionResult<String> visualUpdate(String id, VisualdevEntity visualdevEntity, Map<String, Object> map,
			VisualdevModelDataUpForm visualdevModelDataUpForm) throws WorkFlowException;
}
