package com.steerinfo.ems.emsprodplanmonth.service.impl;

import com.github.pagehelper.Page;
import com.steerinfo.framework.datasource.DataSourceKey;
import com.steerinfo.framework.datasource.TargetDataSource;
import com.steerinfo.framework.mapper.IBaseMapper;
import com.steerinfo.framework.service.impl.BaseServiceImpl;
import com.steerinfo.ems.emsprodplanmonth.model.EmsProdplanMonth;
import com.steerinfo.ems.emsprodplanmonth.mapper.EmsProdplanMonthMapper;
import com.steerinfo.ems.emsprodplanmonth.service.IEmsProdplanMonthService;
import com.steerinfo.framework.service.pagehelper.PageHelper;
import com.steerinfo.framework.service.pagehelper.PageList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * EmsProdplanMonth服务实现：
 * @author generator
 * @version 1.0-SNAPSHORT 2021-07-02 11:10
 * 类描述
 * 修订历史：
 * 日期：2021-07-02
 * 作者：generator
 * 参考：
 * 描述：EmsProdplanMonth服务实现
 * @see null
 * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
 */
@Service(value = "emsProdplanMonthService")
public class EmsProdplanMonthServiceImpl extends BaseServiceImpl<EmsProdplanMonth, String> implements IEmsProdplanMonthService {

    @Autowired
    private EmsProdplanMonthMapper emsProdplanMonthMapper;

    @Override
    protected IBaseMapper<EmsProdplanMonth, String> getMapper() {
        return emsProdplanMonthMapper;
    }


    public PageList<Map<String, Object>> getDateEditForPage(HashMap<String, Object> parmas, Integer pageNum,
                                                            Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<Map<String, Object>> rows = emsProdplanMonthMapper.getDateEdit(parmas);
        PageList<Map<String, Object>> pageInfo = new PageList<Map<String, Object>>(rows);
        return pageInfo;
    }


    @Override
    public PageList<Map<String, Object>> getDateLc(HashMap<String, Object> parmas, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<Map<String, Object>> dateLc = emsProdplanMonthMapper.getDateLc(parmas);
        PageList<Map<String, Object>> pageInfo = new PageList<Map<String, Object>>(dateLc);
        return pageInfo;
    }

    @Override
    public EmsProdplanMonth getMaxSqno() {
        return emsProdplanMonthMapper.getMaxSqno();
    }


}
