终审列表查询

pull/1/head
DELL 1 year ago
parent ff01c25373
commit 100ea1e7c7

@ -23,6 +23,7 @@ import cn.jyjz.xiaoyao.oa.from.dataobject.Category;
import cn.jyjz.xiaoyao.oa.from.dataobject.Userapprove;
import cn.jyjz.xiaoyao.oa.from.service.UserapproveService;
import cn.jyjz.xiaoyao.oa.from.vo.FlowUnionVo;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import com.alanpoi.common.util.StringUtils;
@ -423,6 +424,37 @@ public class FlowTaskController extends BaseController {
return ResultVoUtil.success(pageUtils);
}
/**
*
* @return
*/
@ApiOperation(value="图片分页列表查询-根据用户预设检索条件查询", notes="")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true),
@ApiImplicitParam(paramType = "path",name = "userSearchId", value = "预设检索条件id", required = true),
})
@GetMapping(value = "/listfinal1")
public ResultVo<IPage<OcrTaskchildPicture>> queryPageByUserSearchId(
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
//租户主键,由前端页面传送
String tenantId = req.getHeader("X-Tenant-Id");
if(org.apache.commons.lang3.StringUtils.isBlank(tenantId)){
return ResultVoUtil.error("租户主键不能为空");
}
//获取用户预设检索条件id
String userSearchId = req.getParameter("userSearchId");
IPage<OcrTaskchildPicture> pageList = flowTaskService.queryPageByUserSearchId(pageNo,pageSize,userSearchId);
return ResultVoUtil.success(pageList);
}
/**
*
*

@ -13,6 +13,7 @@ import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.oa.from.dataobject.Category;
import cn.jyjz.xiaoyao.oa.from.vo.FlowUnionVo;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.flowable.engine.repository.ProcessDefinition;
@ -79,6 +80,17 @@ public interface IFlowTaskService {
*/
public void getFinalProcessInstances(Map<String, Object> query, PageUtils<OcrTaskchildPicture> pageUtils);
/**
* id
* @param pageNo
* @param pageSize
* @param userSearchId
* @return
*/
IPage<OcrTaskchildPicture> queryPageByUserSearchId(Integer pageNo, Integer pageSize, String userSearchId);
/**
*
*

@ -1,5 +1,7 @@
package cn.jyjz.flowable.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.jyjz.flowable.common.SystemConstantsOa;
import cn.jyjz.flowable.config.CustomProcessDiagramGenerator;
import cn.jyjz.flowable.domain.vo.*;
@ -31,9 +33,10 @@ import cn.jyjz.xiaoyao.oa.from.dataobject.UserFinal;
import cn.jyjz.xiaoyao.oa.from.service.*;
import cn.jyjz.xiaoyao.oa.from.vo.FlowUnionVo;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro;
import cn.jyjz.xiaoyao.ocr.dataobject.*;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrUsersearchService;
import cn.jyjz.xiaoyao.ocr.util.SearchParaFormatting;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
@ -100,6 +103,10 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
private IRunFlowableActinstDao runFlowableActinstDao;
@Resource
private IHisFlowableActinstDao hisFlowableActinstDao;
@Resource
private OcrUsersearchService ocrUsersearchService;
@Override
public void myTodoTaskList(PageUtils vo, HttpServletRequest request) {
@ -1048,6 +1055,32 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
pageUtils.setList(list);
}
@Override
public IPage<OcrTaskchildPicture> queryPageByUserSearchId(Integer pageNo, Integer pageSize, String userSearchId) {
OcrUsersearch ocrUsersearch = ocrUsersearchService.selectByUserSearchId(userSearchId);
QueryWrapper<OcrTaskchildPicture> queryWrapper = new QueryWrapper();
for (OcrUsersearchchild usersearchchild : ocrUsersearch.getOcrUsersearchchildList()) {
this.formattingSearchChild(queryWrapper, usersearchchild);
}
//分页查询并组装子集数据
Page<OcrTaskchildPicture> page = new Page<>(pageNo, pageSize);
// IPage<OcrTaskchildPicture> pageList = this.page(page, queryWrapper);
// for (OcrTaskchildPicture ocrPicture1 : pageList.getRecords()) {
// if (org.apache.commons.lang3.StringUtils.isNotBlank(ocrPicture1.getPictureclassid())) {
// OcrPictureclass ocrPictureclass = ocrPictureclassService.getById(ocrPicture1.getPictureclassid());
// ocrPicture1.setOcrPictureclass(ocrPictureclass);
// }
// }
// return pageList;
return null;
}
/**
*
*
@ -1593,4 +1626,132 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
return ResultVoUtil.success(flowableccMybatisDao.repetitionTask());
}
/**
*
*
* @param queryWrapper
* @param usersearchchild
* @return
*/
private QueryWrapper<OcrTaskchildPicture> formattingSearchChild(QueryWrapper<OcrTaskchildPicture> queryWrapper, OcrUsersearchchild usersearchchild) {
switch (usersearchchild.getSearchRelationType()) {
case "where":
this.formattingSearchType(queryWrapper, usersearchchild);
break;
case "and":
queryWrapper.and(wrapper -> this.formattingSearchType(wrapper, usersearchchild));
break;
case "or":
queryWrapper.or(wrapper -> this.formattingSearchType(wrapper, usersearchchild));
break;
default:
return queryWrapper;
}
return queryWrapper;
}
/**
*
*
* @param queryWrapper
* @param usersearchchild
* @return
*/
private QueryWrapper<OcrTaskchildPicture> formattingSearchType(QueryWrapper<OcrTaskchildPicture> queryWrapper, OcrUsersearchchild usersearchchild) {
//查询类型 相等true 不相等fase
boolean queryType = "eq".equals(usersearchchild.getSearchtype());
//1.获取检查数据,确定数据类型
String valueType = SearchParaFormatting.clickSearchValue(usersearchchild.getSearchvalue());
List<String> arrayData = null; //集合型数据
List<Integer> sectionInts = null; //纯数字区间型数据
String[] sections = null; //字符串区间型数据
DateTime beginTime = null; //日期时间区间型数据
DateTime endTime = null; //日期时间区间型数据
//2.根据数据类型,解构数据
switch (valueType) {
case "array":
//处理多文件
String[] datas = usersearchchild.getSearchvalue().split(",");
arrayData = Arrays.asList(datas);
break;
case "section":
//格式化数据,仅在做区间的时候去除空格,其他地方不进行空格去除.
sections = usersearchchild.getSearchvalue().trim().replaceAll("\\s+", "").split("-");
//校验是否纯数字,纯数字的话要转成int,否则比对时会有问题
sectionInts = new ArrayList<>();
for (String data : sections) {
if (data.matches("\\d+")) {
sectionInts.add(Integer.parseInt(data));
}
}
break;
case "time":
//格式化时间数据
String[] times = usersearchchild.getSearchvalue().trim().replaceAll("\\s+", "").split("-");
beginTime = DateUtil.parse(times[0], "yyyy/MM/dd");
endTime = DateUtil.parse(times[1], "yyyy/MM/dd");
break;
default:
}
//3.根据查询类型 组装查询条件 相等
switch (valueType) {
case "array":
//集合数据
//相等
if (queryType) {
queryWrapper.in(usersearchchild.getSearchfield(), arrayData);
break;
}
//不相等
queryWrapper.notIn(usersearchchild.getSearchfield(), arrayData);
break;
case "section":
//数字区间查询
if (sectionInts != null && sectionInts.size() == 2) {
if (queryType) {
//相等
queryWrapper.between(usersearchchild.getSearchfield(), sectionInts.get(0), sectionInts.get(1));
break;
}
//不相等
queryWrapper.notBetween(usersearchchild.getSearchfield(), sectionInts.get(0), sectionInts.get(1));
break;
}
//字符串区间查询
if (queryType) {
//相等
queryWrapper.between(usersearchchild.getSearchfield(), sections[0], sections[1]);
break;
}
//不相等
queryWrapper.notBetween(usersearchchild.getSearchfield(), sections[0], sections[1]);
break;
case "time":
//时间区间数据
//相等
if (queryType) {
queryWrapper.between(usersearchchild.getSearchfield(), beginTime.getTime(), endTime.getTime());
break;
}
//不相等
queryWrapper.notBetween(usersearchchild.getSearchfield(), beginTime.getTime(), endTime.getTime());
break;
default:
if (queryType) {
queryWrapper.eq(usersearchchild.getSearchfield(), usersearchchild.getSearchvalue());
break;
}
queryWrapper.ne(usersearchchild.getSearchfield(), usersearchchild.getSearchvalue());
}
return queryWrapper;
}
}

@ -1,3 +1,4 @@
server:
compression:
enabled: true
@ -28,10 +29,10 @@ spring:
password: ysltest2024.
type: com.alibaba.druid.pool.DruidDataSource
slave:
url: jdbc:mysql://127.0.0.1:3306/ocr?useUnicode=true&nullCatalogMeansCurrent=true&characterEncoding=UTF-8&characterSetResults=utf8&serverTimezone=Asia/Shanghai&useSSL=false
url: jdbc:mysql://47.93.59.251:3306/ocrnew?useUnicode=true&nullCatalogMeansCurrent=true&characterEncoding=UTF-8&characterSetResults=utf8&serverTimezone=Asia/Shanghai&useSSL=false
driver-class-name: com.mysql.cj.jdbc.Driver
username: jyjz
password: jyjz
username: ysltest
password: ysltest2024.
type: com.alibaba.druid.pool.DruidDataSource
druid:
# 初始连接数
@ -94,39 +95,9 @@ spring:
session:
store-type: none
cache:
type: ehcache
ehcache:
config: classpath:/myehcache.xml
type: ehcache
# type: redis
# redis:
# #Redis服务器地址
# #host: 192.168.0.198
# host: 127.0.0.1
# # Redis服务器连接端口
# port: 6379
# # 链接超时时间 单位 ms毫秒
# timeout: 20000
# # cluster:
# # nodes:
# # 192.168.0.191:7001,
# # 192.168.0.192:7001,
# # 192.168.0.193:7001,
# # 192.168.0.201:7001,
# # 192.168.0.202:7001,
# # 192.168.0.203:7001
# # #跨集群执行命令时要遵循的最大重定向数量
# # max-redirects: 18
# #lettuce:
# jedis:
# pool:
# #连接池最大连接数(使用负值表示没有限制) 默认 8
# max-active: 20
# #连接池中的最大空闲连接 默认 8
# max-idle: 10
# #连接池中的最小空闲连接 默认 0
# min-idle: 10
# #连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1
# max-wait: 10000
flowable:
modeler:
app:
@ -134,7 +105,7 @@ flowable:
#关闭定时任务JOB
async-executor-activate: false
database-schema-update: false
#
# cache:
# type: redis
# redis:
@ -190,15 +161,15 @@ mybatis-plus:
xiaoyao:
web:
#上传文件路径
uploadPath: D:/ideaWork/jeecg/ocrproject/htmlweb/upload
uploadPath: D:/Code/ocr/htmlweb/upload
#页面根路径
frontPath: D:/ideaWork/jeecg/ocrproject/htmlweb
frontPath: D:/Code/ocr/htmlweb
#js、css、图片存放路径
staticPath: D:/ideaWork/jeecg/ocrproject/htmlweb/static
staticPath: D:/Code/ocr/htmlweb/static
#页面模版路径
webPath: D:/ideaWork/jeecg/ocrproject/htmlweb/web
webPath: D:/Code/ocr/htmlweb/web
#Lucene索引路径
lucenePath: D:/ideaWork/jeecg/ocrproject/htmlweb/lucene/indexDir
lucenePath: D:/Code/ocr/htmlweb/lucene/indexDir
#是否开启flowable
haveFlowable: true
webconfig:
@ -291,7 +262,7 @@ xiaoyao:
#缓存默认名称
managerName: cacheMgrGps
#有效时长(秒)目前登录用户、session使用
tokenExpire: 360000
tokenExpire: 18000
#缓存名称分隔符
cacheNamePrix: "_"
#存放缓存刷新时间是,使用临时缓存名称前缀
@ -302,7 +273,6 @@ springfox:
enabled: true
# 是否启用swagger,postman调试
debugger_tools: true
#无量云api配置信息
ocr:
api:

Loading…
Cancel
Save