package com.njcn.prepare.harmonic.service.mysql.Impl.area;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.harmonic.pojo.po.ROperatingIndexDPO;
import com.njcn.prepare.harmonic.mapper.mysql.area.ROperatingIndexDPOMapper;
import com.njcn.prepare.harmonic.service.mysql.area.ROperatingIndexDPOService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * Description:
 * 接口文档访问地址：http://serverIP:port/swagger-ui.html
 * Date: 2022/11/25  10:01【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
@Service
@Deprecated
public class ROperatingIndexDPOServiceImpl extends MppServiceImpl<ROperatingIndexDPOMapper, ROperatingIndexDPO> implements ROperatingIndexDPOService{


    private @Autowired
    ROperatingIndexDPOMapper rOperatingIndexDPOMapper;
    /**
     * @param orgid
     * @Description: 查询day表一个月的数据数据生成月表数据
     * @Param: [orgid, dataDate]
     * @return: java.util.List<com.njcn.harmonic.pojo.po.ROperatingIndexDPO>
     * @Author: clam
     * @Date: 2022/11/30
     */
    @Override
    public List<ROperatingIndexDPO> queryOneMothData(String orgid,String beginTime, String endTime) {


        QueryWrapper<ROperatingIndexDPO> queryWrapper = new QueryWrapper<> ();
        queryWrapper.eq ("org_no", orgid)
                .ge("data_date",beginTime)
                .le("data_date",endTime);
        List<ROperatingIndexDPO> list = rOperatingIndexDPOMapper.selectList (queryWrapper);



        return list;
    }
}
