package com.hotent.project.manager.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hotent.constant.BaseConstant;
import com.hotent.project.model.CostProjectTaskDocument;
import com.hotent.project.dao.CostProjectTaskDocumentDao;
import com.hotent.project.manager.CostProjectTaskDocumentManager;
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-10-09
 */
@Service
public class CostProjectTaskDocumentManagerImpl extends BaseManagerImpl<CostProjectTaskDocumentDao, CostProjectTaskDocument> implements CostProjectTaskDocumentManager {

	@Override
	public CostProjectTaskDocument getDetail(String id) {
    	CostProjectTaskDocument costProjectTaskDocument = this.get(id);
    	

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

	@Override
	public List<CostProjectTaskDocument> getListByProjectId(String projectId) {
		LambdaQueryWrapper<CostProjectTaskDocument> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(CostProjectTaskDocument::getProjectId, projectId);
		queryWrapper.eq(CostProjectTaskDocument::getIsDeleted, BaseConstant.NORMAL_STATUS);
		return this.list(queryWrapper);
	}
}
