From 2c43f24c1a778b48ac20b07e17f5da38136cafb4 Mon Sep 17 00:00:00 2001 From: kimi42345 <kimi42345@outlook.com> Date: 星期三, 11 三月 2020 13:28:10 +0800 Subject: [PATCH] no message --- src/main/java/com/highdatas/mdm/controller/MaintainController.java | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/highdatas/mdm/controller/MaintainController.java b/src/main/java/com/highdatas/mdm/controller/MaintainController.java index 597fc47..0867cf4 100644 --- a/src/main/java/com/highdatas/mdm/controller/MaintainController.java +++ b/src/main/java/com/highdatas/mdm/controller/MaintainController.java @@ -74,6 +74,23 @@ return maintainService.getUnSubmitData(tableName, pageNo, pageSize, whereSegment); } + @RequestMapping(value = "{tableName}/unflow/{pageNo}", method = RequestMethod.GET) + public Result unflow(@PathVariable String tableName, @PathVariable Integer pageNo, HttpServletRequest request) throws UnsupportedEncodingException { + String pageSize = request.getParameter("pageSize"); + String whereSegment = request.getParameter("whereSegment"); + + if (StringUtils.isEmpty(whereSegment)) { + whereSegment = Constant.WHERE_DEFAULT; + }else { + whereSegment = URLDecoder.decode(whereSegment, "UTF-8"); + } + if (StringUtils.isEmpty(pageSize)) { + return maintainService.getInvalidVerionData(tableName, whereSegment, pageNo, null); + } else { + return maintainService.getInvalidVerionData(tableName, whereSegment, pageNo, Integer.valueOf(pageSize)); + } + } + @RequestMapping(value = "/history/{tableName}", method = RequestMethod.GET) public Result getHistory(@PathVariable String tableName) { @@ -87,8 +104,9 @@ return Result.error(CodeMsg.SELECT_ERROR_NOTFOUND); } - List<String> result = maintainList.stream() - .map(maintain -> maintain.getVersion()) + List<Maintain> result = maintainList.stream() + .filter(maintain -> !StringUtils.isEmpty(maintain.getFlowId())) + .filter(maintain -> flowsService.selectById(maintain.getFlowId()).getStatus().equals(ActivitiStatus.open)) .collect(Collectors.toList()); return Result.success(result); @@ -123,7 +141,7 @@ result = maintainService.selectPage(maintainPage); } else { Wrapper<Maintain> tableNameWrapper = new EntityWrapper<Maintain>().eq("table_name", tableName); - tableNameWrapper.orderBy("version desc"); + tableNameWrapper.orderBy("order_no desc"); result = maintainService.selectPage(maintainPage, tableNameWrapper); } List<Maintain> records = result.getRecords(); -- Gitblit v1.8.0