package com.hotent.project.manager.impl;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hotent.project.model.CostProjectDeliberate;
import com.hotent.project.dao.CostProjectDeliberateDao;
import com.hotent.project.manager.CostProjectDeliberateManager;
import com.hotent.base.manager.impl.BaseManagerImpl;
import com.hotent.project.req.CostProjectBasePageReq;
import com.hotent.req.PageReq;
import com.hotent.uc.exception.BaseException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.util.List;
import javax.annotation.Resource;
import com.hotent.base.util.BeanUtils;


/**
 * 监审项目集体审议表 服务实现类
 *
 * @company 山西清众科技股份有限公司
 * @author 超级管理员
 * @since 2025-09-27
 */
@Service
public class CostProjectDeliberateManagerImpl extends BaseManagerImpl<CostProjectDeliberateDao, CostProjectDeliberate> implements CostProjectDeliberateManager {

	@Override
	public CostProjectDeliberate getDetail(String id) {
    	CostProjectDeliberate costProjectDeliberate = this.get(id);


		return costProjectDeliberate;
	}
	@Override
	@Transactional
	public void createOrUpdate(CostProjectDeliberate costProjectDeliberate) {
		//新建或更新
		this.saveOrUpdate(costProjectDeliberate);
	}

	@Override
	public IPage<CostProjectDeliberate> pageList(CostProjectBasePageReq req) {
		LambdaQueryWrapper<CostProjectDeliberate> qw=new LambdaQueryWrapper<>();
		qw.eq(CostProjectDeliberate::getTaskId,req.getTaskId());
		IPage<CostProjectDeliberate> page=new Page<>(req.getPageNum(), req.getPageSize());
		return this.page(page,qw);

	}
}
