|
|
|
@ -5,6 +5,7 @@ import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
@ -35,6 +36,7 @@ import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
|
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
|
@ -70,6 +72,9 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
|
|
|
|
|
private ISysDictService sysDictService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private TaskService taskService;
|
|
|
|
|
@Value("${spring.profiles.active}")
|
|
|
|
|
private String profiles;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 分页列表查询
|
|
|
|
|
*
|
|
|
|
@ -153,6 +158,9 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
|
|
|
|
|
// @RequiresPermissions("org.jeecg.modules.ocr:ocr_identify:add")
|
|
|
|
|
@PostMapping(value = "/add")
|
|
|
|
|
public Result<String> add(@RequestBody OcrIdentify ocrIdentify) {
|
|
|
|
|
if (!"test".equals(profiles)) {
|
|
|
|
|
return Result.error("当前环境不支持该功能,请访问测试环境");
|
|
|
|
|
}
|
|
|
|
|
AssertUtils.notEmpty(ocrIdentify.getTaskName(), "[任务名称]-不可为空");
|
|
|
|
|
AssertUtils.notEmpty(ocrIdentify.getIdentifyUrl(), "[识别路径]不可为空");
|
|
|
|
|
AssertUtils.notEmpty(ocrIdentify.getRuleCheck(), "请选择[规则检查配置]");
|
|
|
|
|