package com.huimv.produce.produce.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huimv.common.utils.Result;
import com.huimv.common.utils.ResultCode;
import com.huimv.produce.produce.entity.ProdWorkPlan;
import com.huimv.produce.produce.entity.dto.ProdScreenDto;
import com.huimv.produce.produce.entity.dto.ScreenWorkPlan;
import com.huimv.produce.produce.mapper.ProdWorkPlanMapper;
import com.huimv.produce.produce.service.IProdWorkPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author astupidcoder
 * @since 2021-11-25
 */
@Service
public class ProdWorkPlanServiceImpl extends ServiceImpl<ProdWorkPlanMapper, ProdWorkPlan> implements IProdWorkPlanService {

    @Autowired
    private ProdWorkPlanMapper workPlanMapper;


    @Override
    public Result listLargeScreen(Integer farmId) {
       ProdScreenDto workPlan =  workPlanMapper.listLargeScreen( farmId);
        return new Result(ResultCode.SUCCESS,workPlan);
    }

    @Override
    public Result listScreenWorkPlan(Integer farmId) {
        ScreenWorkPlan screenWorkPlan = workPlanMapper.listScreenWorkPlan( farmId);
        return new Result(ResultCode.SUCCESS,screenWorkPlan);
    }
}
