package org.jeecg.modules.ai.service.impl;

import javax.annotation.Resource;

import org.jeecg.modules.ai.entity.YsDirectoryMaterial;
import org.jeecg.modules.ai.mapper.YsDirectoryMaterialMapper;
import org.jeecg.modules.ai.service.IYsDirectoryMaterialService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 资料表
 * @Author: jeecg-boot
 * @Date:   2023-11-25
 * @Version: V1.0
 */
@Service
public class YsDirectoryMaterialServiceImpl extends ServiceImpl<YsDirectoryMaterialMapper, YsDirectoryMaterial> implements IYsDirectoryMaterialService {

	@Resource
	private YsDirectoryMaterialMapper ysDirectoryMaterialMapper;
	
	
	/**
	 * 根据识别结果，判断预审是否通过
	 * @param materialCode
	 * @param ocrResult
	 * @return
	 */
	@Override
	public String getReviewResult(String materialCode,String ocrResult) {
		
		LambdaQueryWrapper<YsDirectoryMaterial> queryWrapper = new LambdaQueryWrapper<YsDirectoryMaterial>();
		queryWrapper.eq(YsDirectoryMaterial::getMaterialCode, materialCode);
		YsDirectoryMaterial ysDirectoryMaterial = ysDirectoryMaterialMapper.selectOne(queryWrapper);
		
		return "通过";
	}
}
