package cn.iocoder.yudao.module.system.dal.mysql.biz;


import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.controller.admin.nursing.vo.HighFrequencyPlanItemVO;
import cn.iocoder.yudao.module.system.controller.admin.nursing.vo.NursingPlanItemRespVO;
import cn.iocoder.yudao.module.system.controller.admin.nursing.vo.NursingPlanItemWithElderVO;
import cn.iocoder.yudao.module.system.dal.dataobject.biz.NursingPlanItemDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;


/**
 * 护理计划配置项 Mapper
 *
 * @author 系统管理员
 */
@Mapper
public interface NursingPlanItemMapper extends BaseMapperX<NursingPlanItemDO> {

    List<NursingPlanItemRespVO> selectNursingPlanItemsWithFrequencyCategory(@Param("nursingPlanId") Long nursingPlanId,
                                                                            @Param("isExtra") Integer isExtra,
                                                                            @Param("isHighFrequencyCategoryType") Integer isHighFrequencyCategoryType);

    List<HighFrequencyPlanItemVO> selectHighFrequencyPlanItems(@Param("tenantId") Long tenantId,
                                                               @Param("today") LocalDate today);

    List<NursingPlanItemWithElderVO> selectPlanItemsWithElderByElderIdsAndFrequencyCategoryType(
            @Param("elderIds") List<Long> elderIds,
            @Param("frequencyCategoryType") Integer frequencyCategoryType,
            @Param("today") LocalDate today,
            @Param("tenantId") Long tenantId);


//    default PageResult<NursingPlanItemDO> selectPage(NursingPlanItemPageReqVO reqVO) {
//        return selectPage(reqVO, new LambdaQueryWrapperX<NursingPlanItemDO>()
//                .eqIfPresent(NursingPlanItemDO::getNursingPlanId, reqVO.getNursingPlanId())
//                .eqIfPresent(NursingPlanItemDO::getNurseItemId, reqVO.getNurseItemId())
//                .likeIfPresent(NursingPlanItemDO::getNurseItemName, reqVO.getNurseItemName())
//                .eqIfPresent(NursingPlanItemDO::getFrequency, reqVO.getFrequency())
//                .eqIfPresent(NursingPlanItemDO::getFrequencyUnit, reqVO.getFrequencyUnit())
//                .eqIfPresent(NursingPlanItemDO::getOperatingMode, reqVO.getOperatingMode())
//                .eqIfPresent(NursingPlanItemDO::getIsDelete, reqVO.getIsDelete())
//                .betweenIfPresent(NursingPlanItemDO::getCreatedTime, reqVO.getCreatedTime())
//                .eqIfPresent(NursingPlanItemDO::getCreatedBy, reqVO.getCreatedBy())
//                .orderByDesc(NursingPlanItemDO::getId));
//    }

}
