|
|
|
@ -2,6 +2,8 @@ package cn.jyjz.xiaoyao.ocr.controller;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
@ -13,7 +15,9 @@ import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.beust.jcommander.Parameter;
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
|
@ -21,7 +25,9 @@ import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
@ -49,6 +55,7 @@ public class OcrTaskchildPictureController extends BaseController{
|
|
|
|
|
private UserTokenService userTokenService;
|
|
|
|
|
@Resource
|
|
|
|
|
private UserService userService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 方法描述:返回json字符串,接受参数,dto名称以及分页信息
|
|
|
|
|
* 创建人:mail.zhangyong@gmail.com
|
|
|
|
@ -61,7 +68,8 @@ public class OcrTaskchildPictureController extends BaseController{
|
|
|
|
|
OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture();
|
|
|
|
|
|
|
|
|
|
QueryWrapper<OcrTaskchildPicture> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery, ocrtaskchildpicture);
|
|
|
|
|
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage,queryWrapper);;
|
|
|
|
|
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage, queryWrapper);
|
|
|
|
|
;
|
|
|
|
|
return ResultVoUtil.success(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -144,7 +152,17 @@ public class OcrTaskchildPictureController extends BaseController{
|
|
|
|
|
//queryWrapper.eq("PACKAGEID",packageid);
|
|
|
|
|
|
|
|
|
|
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.listByPackageId(taskchildpictureid, paramterPage, queryWrapper, orderbyname, orderbyvalue, packageid, tenantId);
|
|
|
|
|
return ResultVoUtil.success(page);
|
|
|
|
|
List<JSONObject> collect = page.getRecords().stream().map(p -> {
|
|
|
|
|
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(p));
|
|
|
|
|
jsonObject.put("id", jsonObject.getOrDefault("id", null).toString());
|
|
|
|
|
jsonObject.put("tenantid", jsonObject.getOrDefault("tenantid", null).toString());
|
|
|
|
|
jsonObject.put("packageid", jsonObject.getOrDefault("packageid", null).toString());
|
|
|
|
|
return jsonObject;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
IPage<JSONObject> objects = new Page<>();
|
|
|
|
|
BeanUtils.copyProperties(page, objects);
|
|
|
|
|
objects.setRecords(collect);
|
|
|
|
|
return ResultVoUtil.success(objects);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -202,8 +220,6 @@ public class OcrTaskchildPictureController extends BaseController{
|
|
|
|
|
//
|
|
|
|
|
// return ocrTaskchildPictureService.clearmark(taskchildpictureid,packageid);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "任务清除标记", notes = "任务清除标记")
|
|
|
|
|
@ApiImplicitParams({
|
|
|
|
|
@ApiImplicitParam(paramType = "path", name = "taskchildpictureid", value = "任务主键", required = true),
|
|
|
|
|