package com.hotent.project.manager.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hotent.project.model.CostProjectScenario;
import com.hotent.project.dao.CostProjectScenarioDao;
import com.hotent.project.manager.CostProjectScenarioManager;
import com.hotent.base.manager.impl.BaseManagerImpl;
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-26
 */
@Service
public class CostProjectScenarioManagerImpl extends BaseManagerImpl<CostProjectScenarioDao, CostProjectScenario> implements CostProjectScenarioManager {

	//根据项目id获取详情
	@Override
	public CostProjectScenario getDetail(String id) {

		LambdaQueryWrapper<CostProjectScenario> qw=new LambdaQueryWrapper<>();
		qw.eq(CostProjectScenario::getProjectId,id);
		return this.getOne(qw,false);
	}
	@Override
	@Transactional
	public void createOrUpdate(CostProjectScenario costProjectScenario) {
		//新建或更新
		this.saveOrUpdate(costProjectScenario);
	}
}
