package com.nantian.cloud.jly.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nantian.cloud.jly.entity.ConfigureGridding;
import com.nantian.cloud.jly.entity.DictDev;
import com.nantian.cloud.jly.mapper.ConfigureGriddingMapper;
import com.nantian.cloud.jly.mapper.DictDevMapper;
import com.nantian.cloud.jly.service.ConfigureGriddingService;
import com.nantian.cloud.jly.service.DictDevService;
import com.nantian.sc.cloud.common.data.datascope.DataScope;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 *
 * @date 2018-09-27
 */
@Service("ConfigureGriddingService")
public class ConfigureGriddingServiceImpl extends ServiceImpl<ConfigureGriddingMapper, ConfigureGridding> implements ConfigureGriddingService {

    @Resource
    private ConfigureGriddingMapper configureGriddingMapper;

    public IPage getpageGridding(Page page, String areaCodes, String industryCode, String cmpName,String epc){
        String code = "";
        int flag = 0;
        if(areaCodes != null){
            String[] codeList = areaCodes.split(",");
            flag = codeList.length;
            code = codeList[flag-1];
        }
        return configureGriddingMapper.getpageGridding(page,code,flag,industryCode,cmpName,epc,new DataScope());
    }

}

