|
|
|
@ -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<OcrTaskchildPicture> listFinalData(PageUtils<OcrTaskchildPicture> pageUtils, HttpServletRequest request){
|
|
|
|
|
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request,"search_");
|
|
|
|
|
|
|
|
|
|
public ResultVo<OcrTaskchildPicture> listFinalData(PageUtils<OcrTaskchildPicture> 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<String,Object> 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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|