master
周文涛 2 years ago
parent bc7ecaabe3
commit 1794a5a6f8

@ -16,10 +16,7 @@ import org.jeecg.modules.ocr.service.IOcrRuleCheckService;
import org.jeecg.modules.ocr.vo.OcrRuleCheckVo; import org.jeecg.modules.ocr.vo.OcrRuleCheckVo;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
@ -66,7 +63,7 @@ public class ApiController {
} }
@ApiOperation(value = "获取规则", notes = "获取规则") @ApiOperation(value = "获取规则", notes = "获取规则")
@PostMapping(value = "/getRule") @GetMapping(value = "/getRule")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result<List<JSONObject>> getRule() { public Result<List<JSONObject>> getRule() {
IPage<OcrRuleCheckVo> ocrRuleCheckVoIPage = ocrRuleCheckService.pageVo(new Page<OcrRuleCheck>(1, Integer.MAX_VALUE), new OcrRuleCheck()); IPage<OcrRuleCheckVo> ocrRuleCheckVoIPage = ocrRuleCheckService.pageVo(new Page<OcrRuleCheck>(1, Integer.MAX_VALUE), new OcrRuleCheck());

@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.AssertUtils; import org.jeecg.common.util.AssertUtils;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.ocr.entity.OcrIdentify; import org.jeecg.modules.ocr.entity.OcrIdentify;
import org.jeecg.modules.ocr.entity.OcrMetadataConfig; import org.jeecg.modules.ocr.entity.OcrMetadataConfig;
import org.jeecg.modules.ocr.service.IOcrIdentifyService; import org.jeecg.modules.ocr.service.IOcrIdentifyService;
@ -59,7 +60,8 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
private IOcrMetadataConfigService ocrMetadataConfigService; private IOcrMetadataConfigService ocrMetadataConfigService;
@Autowired @Autowired
private IOcrRuleCheckService ocrRuleCheckService; private IOcrRuleCheckService ocrRuleCheckService;
@Autowired
private RedisUtil redisUtil;
/** /**
* *
* *

@ -123,4 +123,9 @@ public class OcrIdentify implements Serializable {
@Excel(name = "任务类型", width = 15) @Excel(name = "任务类型", width = 15)
@TableField(exist = false) @TableField(exist = false)
private String taskType_dictText; private String taskType_dictText;
/**任务匹配结果*/
@ApiModelProperty(value = "任务匹配结果 0匹配失败,1匹配成功 -1匹配中")
@TableField(exist = false)
private String taskResult="-1";
} }

Loading…
Cancel
Save