package com.tofly.xrtygis.custom.service.export.impl;

import com.alibaba.fastjson.JSONObject;
import com.tofly.xrtygis.custom.service.export.CllocrByDmaService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author FlashWJL
 * @date 2021/5/31 18:49
 */
@Service("cllocrByDmaServiceImpl")
public class CllocrByDmaServiceImpl implements CllocrByDmaService {
    @Override
    public List<Map<String, Object>> getExportData(String dto, String templateFlag) {
        //传过来的是json字符串，也是就最后要导出的结果，所以需要进行转换
        List<Map> result = JSONObject.parseArray(dto , Map.class);
        List<Map<String, Object>> returnMap = new ArrayList<>();
        Map<String, Object> parentMap = new HashMap<>();
        parentMap.put("list", result);
        returnMap.add(parentMap);
        return returnMap;
    }

    @Override
    public Boolean excelDataStorage(List<Object> dataList) {
        return null;
    }
}
