package com.hotent.project.manager.impl;

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.CostProjectProccessNodeTemplete;
import com.hotent.project.dao.CostProjectProccessNodeTempleteDao;
import com.hotent.project.manager.CostProjectProccessNodeTempleteManager;
import com.hotent.base.manager.impl.BaseManagerImpl;
import com.hotent.project.req.CostProjectBasePageReq;
import com.hotent.project.req.CostProjectProccessBasePageReq;
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-10-01
 */
@Service
public class CostProjectProccessNodeTempleteManagerImpl extends BaseManagerImpl<CostProjectProccessNodeTempleteDao, CostProjectProccessNodeTemplete> implements CostProjectProccessNodeTempleteManager {

	@Override
	public CostProjectProccessNodeTemplete getDetail(String id) {
    	CostProjectProccessNodeTemplete costProjectProccessNodeTemplete = this.get(id);
    	

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

	@Override
	public IPage<CostProjectProccessNodeTemplete> nodeTempletePageList(CostProjectProccessBasePageReq req) {
		LambdaQueryWrapper<CostProjectProccessNodeTemplete> queryWrapper=new LambdaQueryWrapper<>();
		queryWrapper.eq(CostProjectProccessNodeTemplete::getProcessId,req.getProcessId());
		IPage<CostProjectProccessNodeTemplete> 	page=new Page<>(req.getPageNum(), req.getPageSize());
		return this.page(page,queryWrapper);
	}
}
