diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/flowable/controller/FlowTaskController.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/flowable/controller/FlowTaskController.java index 2e2bed4e..29890f47 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/flowable/controller/FlowTaskController.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/flowable/controller/FlowTaskController.java @@ -39,6 +39,8 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.io.InputStream; +import java.math.BigDecimal; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -295,28 +297,52 @@ public class FlowTaskController extends BaseController { }) @GetMapping("/listfinal") @ResponseBody - public ResultVo listFinalData(PageUtils pageUtils, HttpServletRequest request){ - SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request,"search_"); - + public ResultVo listFinalData(PageUtils pageUtils, + @RequestParam(name="search_fromuserid", defaultValue="",required = false) String searchFromuserid, + @RequestParam(name="search_fromprojectid", defaultValue="",required = false) String searchFromprojectid, + @RequestParam(name="search_fromplanid", defaultValue="",required = false) String searchFromplanid, + @RequestParam(name="search_states", defaultValue="",required = false) String searchStates, + @RequestParam(name="search_fromsourceid", defaultValue="",required = false) String searchFromsourceid, + @RequestParam(name="fromuptime_start", defaultValue="",required = false) BigDecimal fromuptimeStart, + @RequestParam(name="fromuptime_end", defaultValue="",required = false) BigDecimal fromuptimeEnd, + HttpServletRequest request){ + SearchQuery searchQuery = new SearchQuery(); + if(org.springframework.util.StringUtils.hasText(searchFromuserid)){ + searchQuery.addEqual("fromuserid",searchFromuserid); + } + if(org.springframework.util.StringUtils.hasText(searchFromprojectid)){ + searchQuery.addEqual("fromprojectid",searchFromprojectid); + } + if(org.springframework.util.StringUtils.hasText(searchFromplanid)){ + searchQuery.addEqual("fromplanid",searchFromplanid); + } + if(org.springframework.util.StringUtils.hasText(searchStates)){ + searchQuery.addEqual("states",searchStates); + } + if(org.springframework.util.StringUtils.hasText(searchFromsourceid)){ + searchQuery.addEqual("fromsourceid",searchFromsourceid); + } //租户主键,由前端页面传送 String tenantId = request.getHeader("X-Tenant-Id"); if(org.apache.commons.lang3.StringUtils.isBlank(tenantId)){ return ResultVoUtil.error("租户主键不能为空"); } - User user = this.userService.getSessionUser(request); if(user.isUserIsSys(xiaoyaoConfig.getWebconfig().getSysLoginUser().split(","))){ - - flowTaskService.getFinalProcessInstances(searchQuery.getQuery(),pageUtils); }else{ - searchQuery.addEqual("thisLoginUserid",user.getId().toString()); searchQuery.addEqual("tenantid",tenantId); - //TODO 增加终审关联表查询 ,增加排序字段传输 - flowTaskService.getFinalProcessInstances(searchQuery.getQuery(),pageUtils); - } + + Map query = searchQuery.getQuery(); + if(fromuptimeStart != null){ + query.put("fromuptimeStart",fromuptimeStart); + } + if(fromuptimeEnd != null) { + query.put("fromuptimeEnd", fromuptimeEnd); + } + flowTaskService.getFinalProcessInstances(query,pageUtils); return ResultVoUtil.success(pageUtils); } diff --git a/jyjz-system/jyjz-system-oa/src/main/resources/mapper/oa/OcrTaskchildPictureMapper.xml b/jyjz-system/jyjz-system-oa/src/main/resources/mapper/oa/OcrTaskchildPictureMapper.xml index 3c21119f..1b4df022 100644 --- a/jyjz-system/jyjz-system-oa/src/main/resources/mapper/oa/OcrTaskchildPictureMapper.xml +++ b/jyjz-system/jyjz-system-oa/src/main/resources/mapper/oa/OcrTaskchildPictureMapper.xml @@ -179,6 +179,8 @@ select tcp.* from ( + and tcp.fromuptime >= ${fromuptimeStart} + and tcp.fromuptime <= ${fromuptimeEnd} order by tcp.${page.sortname} ${page.sortorder} limit ${page.start}, ${page.Pagesize}