修改任务单任务详情-相似图片列表

pull/1/head
sunchenliang 2 years ago
parent 5b9a213668
commit 92444d64b7

@ -17,6 +17,7 @@ import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService; import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameter;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -24,7 +25,9 @@ import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; 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.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -52,6 +55,7 @@ public class OcrTaskchildPictureController extends BaseController{
private UserTokenService userTokenService; private UserTokenService userTokenService;
@Resource @Resource
private UserService userService; private UserService userService;
/** /**
* jsondto * jsondto
* mail.zhangyong@gmail.com * mail.zhangyong@gmail.com
@ -64,7 +68,8 @@ public class OcrTaskchildPictureController extends BaseController{
OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture(); OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture();
QueryWrapper<OcrTaskchildPicture> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery, 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); return ResultVoUtil.success(page);
} }
@ -147,9 +152,17 @@ public class OcrTaskchildPictureController extends BaseController{
//queryWrapper.eq("PACKAGEID",packageid); //queryWrapper.eq("PACKAGEID",packageid);
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.listByPackageId(taskchildpictureid, paramterPage, queryWrapper, orderbyname, orderbyvalue, packageid, tenantId); IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.listByPackageId(taskchildpictureid, paramterPage, queryWrapper, orderbyname, orderbyvalue, packageid, tenantId);
List collect = page.getRecords().stream().map(p -> JSON.parseObject(JSON.toJSONString(p), Map.class)).collect(Collectors.toList()); List<JSONObject> collect = page.getRecords().stream().map(p -> {
page.setRecords(collect); JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(p));
return ResultVoUtil.success(page); 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);
} }
/** /**
@ -207,8 +220,6 @@ public class OcrTaskchildPictureController extends BaseController{
// //
// return ocrTaskchildPictureService.clearmark(taskchildpictureid,packageid); // return ocrTaskchildPictureService.clearmark(taskchildpictureid,packageid);
// } // }
@ApiOperation(value = "任务清除标记", notes = "任务清除标记") @ApiOperation(value = "任务清除标记", notes = "任务清除标记")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "path", name = "taskchildpictureid", value = "任务主键", required = true), @ApiImplicitParam(paramType = "path", name = "taskchildpictureid", value = "任务主键", required = true),

Loading…
Cancel
Save