From 92444d64b79384fbc0662219f60ca6d95e550a8f Mon Sep 17 00:00:00 2001 From: sunchenliang <2532527871@qq.com> Date: Mon, 18 Mar 2024 16:26:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1=E5=8D=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=AF=A6=E6=83=85-=E7=9B=B8=E4=BC=BC?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OcrTaskchildPictureController.java | 565 +++++++++--------- 1 file changed, 288 insertions(+), 277 deletions(-) diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.java index 8ad94b66..bb4a3167 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.java @@ -17,6 +17,7 @@ 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; @@ -24,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.*; @@ -40,155 +43,165 @@ import com.baomidou.mybatisplus.core.metadata.IPage; @RestController @RequestMapping("/backstage/jifen/ocrtaskchildpicture") -public class OcrTaskchildPictureController extends BaseController{ - - private Logger log = LoggerFactory.getLogger(this.getClass()); - - @Resource - private OcrTaskchildPictureService ocrTaskchildPictureService; - @Resource - private OcrPictureService ocrPictureService; - @Resource - private UserTokenService userTokenService; - @Resource - private UserService userService; - /** - *方法描述:返回json字符串,接受参数,dto名称以及分页信息 - *创建人:mail.zhangyong@gmail.com - *创建时间:2024-01-14 10:27:01 - **/ - @GetMapping("/list") - public ResultVo> listOcrTaskchildPicture(ParamterPage paramterPage, HttpServletRequest request, HttpServletResponse response) throws IOException{ - SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_"); - - OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture(); - - QueryWrapper queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture); - IPage page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage,queryWrapper);; - return ResultVoUtil.success(page); - } - - /** - *方法描述:返回json字符串,接受参数,dto名称以及分页信息 - *创建人:mail.zhangyong@gmail.com - *创建时间:2024-01-14 10:27:01 - **/ - @ApiOperation(value="ocr_任务包下的任务集合", notes="ocr_任务包下的任务集合") - @ApiImplicitParams({ - @ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true), - @ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true) - }) - @GetMapping("/listbypackageid/{packageid}") - public ResultVo> listbypackageid(ParamterPage paramterPage, - HttpServletRequest request, - HttpServletResponse response, - @PathVariable("packageid") String packageid) throws IOException{ - - //租户主键,由前端页面传送 - String tenantId = request.getHeader("X-Tenant-Id"); - if(StringUtils.isBlank(tenantId)){ - return ResultVoUtil.error("租户主键不能为空"); - } - - SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_"); - - OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture(); - QueryWrapper queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture); - - queryWrapper.eq("TENANTID",tenantId); - if(StringUtils.isNotBlank(packageid)){ - queryWrapper.eq("PACKAGEID",packageid); - } - IPage page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage,queryWrapper); - - QueryWrapper queryWrapperNex = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture); - - if(!page.getRecords().isEmpty()){ - OcrTaskchildPicture ocrTaskchildPicture = page.getRecords().get(0); - queryWrapperNex.eq("TENANTID",tenantId); - queryWrapperNex.in("PICTUREID",ocrTaskchildPicture.getOcpictureid().split(",")); - - page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage,queryWrapperNex); - } - - return ResultVoUtil.success(page); - } - - @ApiOperation(value="ocr_任务包下的当前图片比对的集合列表", notes="ocr_任务包下的当前图片比对的集合列表") - @ApiImplicitParams({ - @ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true), - @ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键"), - @ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "当前选中的任务主键", required = true) - }) - @GetMapping("/listbypictureid/{packageid}/{taskchildpictureid}") - public ResultVo> listbypackageidlistbypictureid(ParamterPage paramterPage, - HttpServletRequest request, - HttpServletResponse response, - @PathVariable("packageid") String packageid, - @PathVariable("taskchildpictureid") String taskchildpictureid) throws IOException{ - - //租户主键,由前端页面传送 - String tenantId = request.getHeader("X-Tenant-Id"); - if(StringUtils.isBlank(tenantId)){ - return ResultVoUtil.error("租户主键不能为空"); - } - - //排序方式 - String orderbyname = request.getParameter("orderbyname"); - //排序字段 - String orderbyvalue = request.getParameter("orderbyvalue"); - - SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_"); - - OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture(); - QueryWrapper queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture); - - //queryWrapper.eq("TENANTID",tenantId); - //queryWrapper.eq("PACKAGEID",packageid); - - IPage 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()); - page.setRecords(collect); - return ResultVoUtil.success(page); - } - - /** - * 任务主图真假标记 - * - * @param req - * @return - */ - @ApiOperation(value="任务主图真假标记", notes="任务主图真假标记") - @ApiImplicitParams({ - @ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "任务主键", required = true), - @ApiImplicitParam(paramType = "path",name = "izTrueorfalse", value = "主图片真假0:假,1:真", required = true), - @ApiImplicitParam(paramType = "path",name = "judgeid", value = "主图判真假原因id,从字典表中获得", required = true), - @ApiImplicitParam(paramType = "path",name = "judgedesc", value = "真假其他原因", required = false), - @ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true) - }) - @PostMapping(value = "/ordertrueorfalse") - public ResultVo ordertrueorfalse(@RequestParam(name="taskchildpictureids",required=true) String taskchildpictureids, - @RequestParam(name="iztrueorfalse",required=true) String iztrueorfalse, - @RequestParam(name="judgeid",required=true) String judgeid, - @RequestParam(name="judgedesc",required=false) String judgedesc, - @RequestParam(name="packageid",required=true) String packageid, - HttpServletRequest req) { - //如果是历史图片,不允许进行设置 - //如果是已经审批完成的图片不允许是指 - - OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture(); - - ocrTaskchildPicture.setPackageid(Long.parseLong(packageid)); - - return ocrTaskchildPictureService.trueorfalse(taskchildpictureids,packageid,iztrueorfalse,judgeid,judgedesc); - } - - /** - * 任务清除标记 - * - * @param req - * @return - */ +public class OcrTaskchildPictureController extends BaseController { + + private Logger log = LoggerFactory.getLogger(this.getClass()); + + @Resource + private OcrTaskchildPictureService ocrTaskchildPictureService; + @Resource + private OcrPictureService ocrPictureService; + @Resource + private UserTokenService userTokenService; + @Resource + private UserService userService; + + /** + * 方法描述:返回json字符串,接受参数,dto名称以及分页信息 + * 创建人:mail.zhangyong@gmail.com + * 创建时间:2024-01-14 10:27:01 + **/ + @GetMapping("/list") + public ResultVo> listOcrTaskchildPicture(ParamterPage paramterPage, HttpServletRequest request, HttpServletResponse response) throws IOException { + SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_"); + + OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture(); + + QueryWrapper queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery, ocrtaskchildpicture); + IPage page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage, queryWrapper); + ; + return ResultVoUtil.success(page); + } + + /** + * 方法描述:返回json字符串,接受参数,dto名称以及分页信息 + * 创建人:mail.zhangyong@gmail.com + * 创建时间:2024-01-14 10:27:01 + **/ + @ApiOperation(value = "ocr_任务包下的任务集合", notes = "ocr_任务包下的任务集合") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true), + @ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键", required = true) + }) + @GetMapping("/listbypackageid/{packageid}") + public ResultVo> listbypackageid(ParamterPage paramterPage, + HttpServletRequest request, + HttpServletResponse response, + @PathVariable("packageid") String packageid) throws IOException { + + //租户主键,由前端页面传送 + String tenantId = request.getHeader("X-Tenant-Id"); + if (StringUtils.isBlank(tenantId)) { + return ResultVoUtil.error("租户主键不能为空"); + } + + SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_"); + + OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture(); + QueryWrapper queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery, ocrtaskchildpicture); + + queryWrapper.eq("TENANTID", tenantId); + if (StringUtils.isNotBlank(packageid)) { + queryWrapper.eq("PACKAGEID", packageid); + } + IPage page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage, queryWrapper); + + QueryWrapper queryWrapperNex = SearchQueryFormat.queryStringFormat(searchQuery, ocrtaskchildpicture); + + if (!page.getRecords().isEmpty()) { + OcrTaskchildPicture ocrTaskchildPicture = page.getRecords().get(0); + queryWrapperNex.eq("TENANTID", tenantId); + queryWrapperNex.in("PICTUREID", ocrTaskchildPicture.getOcpictureid().split(",")); + + page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage, queryWrapperNex); + } + + return ResultVoUtil.success(page); + } + + @ApiOperation(value = "ocr_任务包下的当前图片比对的集合列表", notes = "ocr_任务包下的当前图片比对的集合列表") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true), + @ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键"), + @ApiImplicitParam(paramType = "path", name = "taskchildpictureid", value = "当前选中的任务主键", required = true) + }) + @GetMapping("/listbypictureid/{packageid}/{taskchildpictureid}") + public ResultVo> listbypackageidlistbypictureid(ParamterPage paramterPage, + HttpServletRequest request, + HttpServletResponse response, + @PathVariable("packageid") String packageid, + @PathVariable("taskchildpictureid") String taskchildpictureid) throws IOException { + + //租户主键,由前端页面传送 + String tenantId = request.getHeader("X-Tenant-Id"); + if (StringUtils.isBlank(tenantId)) { + return ResultVoUtil.error("租户主键不能为空"); + } + + //排序方式 + String orderbyname = request.getParameter("orderbyname"); + //排序字段 + String orderbyvalue = request.getParameter("orderbyvalue"); + + SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_"); + + OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture(); + QueryWrapper queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery, ocrtaskchildpicture); + + //queryWrapper.eq("TENANTID",tenantId); + //queryWrapper.eq("PACKAGEID",packageid); + + IPage page = this.ocrTaskchildPictureService.listByPackageId(taskchildpictureid, paramterPage, queryWrapper, orderbyname, orderbyvalue, packageid, tenantId); + List 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 objects = new Page<>(); + BeanUtils.copyProperties(page, objects); + objects.setRecords(collect); + return ResultVoUtil.success(objects); + } + + /** + * 任务主图真假标记 + * + * @param req + * @return + */ + @ApiOperation(value = "任务主图真假标记", notes = "任务主图真假标记") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path", name = "taskchildpictureid", value = "任务主键", required = true), + @ApiImplicitParam(paramType = "path", name = "izTrueorfalse", value = "主图片真假0:假,1:真", required = true), + @ApiImplicitParam(paramType = "path", name = "judgeid", value = "主图判真假原因id,从字典表中获得", required = true), + @ApiImplicitParam(paramType = "path", name = "judgedesc", value = "真假其他原因", required = false), + @ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键", required = true) + }) + @PostMapping(value = "/ordertrueorfalse") + public ResultVo ordertrueorfalse(@RequestParam(name = "taskchildpictureids", required = true) String taskchildpictureids, + @RequestParam(name = "iztrueorfalse", required = true) String iztrueorfalse, + @RequestParam(name = "judgeid", required = true) String judgeid, + @RequestParam(name = "judgedesc", required = false) String judgedesc, + @RequestParam(name = "packageid", required = true) String packageid, + HttpServletRequest req) { + //如果是历史图片,不允许进行设置 + //如果是已经审批完成的图片不允许是指 + + OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture(); + + ocrTaskchildPicture.setPackageid(Long.parseLong(packageid)); + + return ocrTaskchildPictureService.trueorfalse(taskchildpictureids, packageid, iztrueorfalse, judgeid, judgedesc); + } + + /** + * 任务清除标记 + * + * @param req + * @return + */ // @ApiOperation(value="任务清除标记", notes="任务清除标记") // @ApiImplicitParams({ // @ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "任务主键", required = true), @@ -207,135 +220,133 @@ public class OcrTaskchildPictureController extends BaseController{ // // return ocrTaskchildPictureService.clearmark(taskchildpictureid,packageid); // } + @ApiOperation(value = "任务清除标记", notes = "任务清除标记") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path", name = "taskchildpictureid", value = "任务主键", required = true), + @ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键", required = true) + }) + @PostMapping(value = "/clearmark") + public ResultVo clearmark(@RequestParam(name = "taskchildpictureid", required = true) String taskchildpictureid, + @RequestParam(name = "packageid", required = true) String packageid, + HttpServletRequest request) { + //租户主键,由前端页面传送 + String tenantId = request.getHeader("X-Tenant-Id"); + if (StringUtils.isBlank(tenantId)) { + return ResultVoUtil.error("租户主键不能为空"); + } + + + return ocrTaskchildPictureService.clearmark(tenantId, taskchildpictureid, packageid); + } + + /** + * 当前任务包智能识别 + * + * @param req + * @return + */ + @ApiOperation(value = "当前任务包智能识别", notes = "当前任务包智能识别") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键", required = true) + }) + @PostMapping(value = "/markpoint") + public ResultVo markpoint(@RequestParam(name = "packageid", required = true) String packageid, + HttpServletRequest req) { + //如果是历史图片,不允许进行设置 + //如果是已经审批完成的图片不允许是指 + + OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture(); + + ocrTaskchildPicture.setPackageid(Long.parseLong(packageid)); + + List list = ocrTaskchildPictureService.markpoint(packageid); + if (null != list && !list.isEmpty()) { + return ResultVoUtil.success(list); + } + return ResultVoUtil.error(); + } + + /** + * 方法描述:通过主键获得对象信息 + * 创建人:mail.zhangyong@gmail.com + * 创建时间:2024-01-14 10:27:01 + **/ + @ApiOperation(value = "ocr_任务包下的当前展示的任务对象", notes = "ocr_任务包下的当前展示的任务对象") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path", name = "id", value = "当前选中的任务主键", required = true), + @ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键,注意不是当前任务关联的packageid,而是当前选中的任务包主键") + }) + @GetMapping("/getdata/{id}/{packageid}") + @ResponseBody + public ResultVo getdateOcrTaskchildPicture(HttpServletResponse response, HttpServletRequest request, + @PathVariable("packageid") Long packageid, + @PathVariable("id") Long id) throws IOException { + OcrTaskchildPicture dto = this.ocrTaskchildPictureService.listPicturePackageId(id.toString(), packageid); + if (null != dto) { + return ResultVoUtil.success(dto); + } else { + return ResultVoUtil.error(); + } + } + + /** + * 方法描述:保存添加数据 + * 创建人:mail.zhangyong@gmail.com + * 创建时间:2024-01-14 10:27:01 + **/ + @PostMapping("/save") + public ResultVo saveOcrTaskchildPicture(HttpServletResponse response, HttpServletRequest request, OcrTaskchildPicture tab) throws IOException { + UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request)); + + this.ocrTaskchildPictureService.save(tab); + return ResultVoUtil.success(); + } + + /** + * 方法描述:根据页面form传来的对象修改数据 + * 创建人:mail.zhangyong@gmail.com + * 创建时间:2024-01-14 10:27:01 + **/ + @PostMapping("/edit") + public ResultVo editOcrTaskchildPicture(HttpServletResponse response, HttpServletRequest request, OcrTaskchildPicture tab) throws IOException { + UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request)); + this.ocrTaskchildPictureService.updateById(tab); + return ResultVoUtil.success(); + } + + /** + * 方法描述:通过主键获得对象信息 + * 创建人:mail.zhangyong@gmail.com + * 创建时间:2024-01-14 10:27:01 + **/ + @ApiOperation(value = "根据任务或者工单主键查询图片对象", notes = "根据任务或者工单主键查询图片对象") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path", name = "id", value = "任务审批中的formid或者id", required = true) + }) + @GetMapping("/pictureinfo") + @ResponseBody + public ResultVo pictureinfo(HttpServletResponse response, HttpServletRequest request) throws IOException { + String id = request.getParameter("id"); + OcrPicture dto = this.ocrTaskchildPictureService.findOcrPictureByTaskchildid(id); + if (null != dto) { + return ResultVoUtil.success(dto); + } else { + return ResultVoUtil.error(); + } + } - @ApiOperation(value="任务清除标记", notes="任务清除标记") - @ApiImplicitParams({ - @ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "任务主键", required = true), - @ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true) - }) - @PostMapping(value = "/clearmark") - public ResultVo clearmark(@RequestParam(name="taskchildpictureid",required=true) String taskchildpictureid, - @RequestParam(name="packageid",required=true) String packageid, - HttpServletRequest request) { - //租户主键,由前端页面传送 - String tenantId = request.getHeader("X-Tenant-Id"); - if(StringUtils.isBlank(tenantId)){ - return ResultVoUtil.error("租户主键不能为空"); - } - - - return ocrTaskchildPictureService.clearmark(tenantId,taskchildpictureid,packageid); - } - - /** - * 当前任务包智能识别 - * - * @param req - * @return - */ - @ApiOperation(value="当前任务包智能识别", notes="当前任务包智能识别") - @ApiImplicitParams({ - @ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true) - }) - @PostMapping(value = "/markpoint") - public ResultVo markpoint(@RequestParam(name="packageid",required=true) String packageid, - HttpServletRequest req) { - //如果是历史图片,不允许进行设置 - //如果是已经审批完成的图片不允许是指 - - OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture(); - - ocrTaskchildPicture.setPackageid(Long.parseLong(packageid)); - - List list = ocrTaskchildPictureService.markpoint(packageid); - if(null != list && !list.isEmpty()){ - return ResultVoUtil.success(list); - } - return ResultVoUtil.error(); - } - - /** - *方法描述:通过主键获得对象信息 - *创建人:mail.zhangyong@gmail.com - *创建时间:2024-01-14 10:27:01 - **/ - @ApiOperation(value="ocr_任务包下的当前展示的任务对象", notes="ocr_任务包下的当前展示的任务对象") - @ApiImplicitParams({ - @ApiImplicitParam(paramType = "path",name = "id", value = "当前选中的任务主键", required = true), - @ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键,注意不是当前任务关联的packageid,而是当前选中的任务包主键") - }) - @GetMapping("/getdata/{id}/{packageid}") - @ResponseBody - public ResultVo getdateOcrTaskchildPicture(HttpServletResponse response,HttpServletRequest request, - @PathVariable("packageid") Long packageid, - @PathVariable("id") Long id) throws IOException{ - OcrTaskchildPicture dto = this.ocrTaskchildPictureService.listPicturePackageId(id.toString(),packageid); - if(null != dto){ - return ResultVoUtil.success(dto); - }else{ - return ResultVoUtil.error(); - } - } - - /** - *方法描述:保存添加数据 - *创建人:mail.zhangyong@gmail.com - *创建时间:2024-01-14 10:27:01 - **/ - @PostMapping("/save") - public ResultVo saveOcrTaskchildPicture(HttpServletResponse response,HttpServletRequest request,OcrTaskchildPicture tab) throws IOException{ - UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request)); - - this.ocrTaskchildPictureService.save(tab); - return ResultVoUtil.success(); - } - - /** - *方法描述:根据页面form传来的对象修改数据 - *创建人:mail.zhangyong@gmail.com - *创建时间:2024-01-14 10:27:01 - **/ - @PostMapping("/edit") - public ResultVo editOcrTaskchildPicture(HttpServletResponse response,HttpServletRequest request,OcrTaskchildPicture tab) throws IOException{ - UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request)); - this.ocrTaskchildPictureService.updateById(tab); - return ResultVoUtil.success(); - } - - - /** - *方法描述:通过主键获得对象信息 - *创建人:mail.zhangyong@gmail.com - *创建时间:2024-01-14 10:27:01 - **/ - @ApiOperation(value="根据任务或者工单主键查询图片对象", notes="根据任务或者工单主键查询图片对象") - @ApiImplicitParams({ - @ApiImplicitParam(paramType = "path",name = "id", value = "任务审批中的formid或者id", required = true) - }) - @GetMapping("/pictureinfo") - @ResponseBody - public ResultVo pictureinfo(HttpServletResponse response,HttpServletRequest request) throws IOException{ - String id = request.getParameter("id"); - OcrPicture dto = this.ocrTaskchildPictureService.findOcrPictureByTaskchildid(id); - if(null != dto){ - return ResultVoUtil.success(dto); - }else{ - return ResultVoUtil.error(); - } - } - - /** - *方法描述:根据id字符串组删除对象方法,例如1,2,3 - *创建人:mail.zhangyong@gmail.com - *创建时间:2024-01-14 10:27:01 - **/ - @GetMapping("/delmore") - @ResponseBody - public ResultVo delMoreOcrTaskchildPicture(HttpServletResponse response,HttpServletRequest request) throws IOException{ - String ids = request.getParameter("id"); - this.ocrTaskchildPictureService.deleteByIdMore(ids); - return ResultVoUtil.success(); - } + /** + * 方法描述:根据id字符串组删除对象方法,例如1,2,3 + * 创建人:mail.zhangyong@gmail.com + * 创建时间:2024-01-14 10:27:01 + **/ + @GetMapping("/delmore") + @ResponseBody + public ResultVo delMoreOcrTaskchildPicture(HttpServletResponse response, HttpServletRequest request) throws IOException { + String ids = request.getParameter("id"); + this.ocrTaskchildPictureService.deleteByIdMore(ids); + return ResultVoUtil.success(); + } }