Compare commits

...

123 Commits

Author SHA1 Message Date
sunchenliang 2743383f17 fix: 修改相似度列表
1 year ago
sunchenliang a71f2d2219 fix: 修改获取任务包主图
1 year ago
sunchenliang c148003504 fix: 修改获取任务包主图
1 year ago
shuliYao 342d5fb8af fix: 修改登录,三方标识查询由公司表,切换至部门表
1 year ago
cuihaojie 0e1438645b Merge pull request 'fix:获取系统筛选项接口恢复成之前的,任务审批ai统计接口复制一份出来' (#104) from fix/Statistical_interface_replication into test
1 year ago
DELL b6bccd82dc fix:获取系统筛选项接口恢复成之前的,任务审批ai统计接口复制一份出来
1 year ago
cuihaojie ab2f08c433 Merge pull request 'fix:小结查重接口-任务表增加小结是否重复字段,ai统计弹窗接口,完善返回值' (#103) from fix/Picture_query_interface into test
1 year ago
DELL 6845d22efb fix:解决合并冲突
1 year ago
DELL b1c92d0ac7 Merge branch 'test' into fix/Picture_query_interface
1 year ago
DELL 198f4e8c33 fix:小结查重接口-任务表增加小结是否重复字段,ai统计弹窗接口,完善返回值
1 year ago
shuliYao 9fa490ff48 fix: 无量云配置动态化,配置文件配置清除
1 year ago
sunchenliang 9ce5c8c3ee Merge remote-tracking branch 'origin/feat/updateflow20240411' into test
1 year ago
sunchenliang f6a7c5b926 fix: 修改任务终审列表
1 year ago
Vincent f2d246565b feat: 前端配置管理
1 year ago
DELL fff35e5280 fix:自定义筛选——>获取ai查询过滤条件回写接口返回值调整
1 year ago
DELL 84e9ea402e fix:自定义筛选——>获取筛选项接口返回值调整
1 year ago
Vincent a6259f9dd3 feat: 前端配置管理
1 year ago
sunchenliang 0cf94d5c4c fix: 修改获取任务包主图
1 year ago
sunchenliang 3a81017d9e fix: 修改任务终审列表
1 year ago
Vincent 4a6f110ea8 fix: 清理所有idea配置
1 year ago
Vincent 7eaaef3ae0 fix: 更新设置时, 实时更新配置
1 year ago
Vincent ddd205321f feat: 前端配置管理
1 year ago
cuihaojie a41baaf03c Merge pull request 'fix:自定义筛选——>获取ai查询过滤条件回写接口返回值调整' (#99) from fix/Gets_system_filter_fixes into test
1 year ago
DELL cd7e5ff546 fix:自定义筛选——>获取ai查询过滤条件回写接口返回值调整
1 year ago
cuihaojie b6e9f84d86 Merge pull request 'fix:自定义筛选——>获取筛选项接口返回值调整' (#98) from fix/Gets_system_filter_fixes into test
1 year ago
DELL 6bf042beb5 fix:自定义筛选——>获取筛选项接口返回值调整
1 year ago
sunchenliang 9f77cb6728 fix: 修改获取任务包主图
1 year ago
sunchenliang 0cc8855a60 fix: 修改任务审批列表
1 year ago
shuliYao 80f007f03d fix: 解决提报日期检索问题
1 year ago
15007173189@163.com 99d9c32d43 反显异常
1 year ago
shuliYao dc0ccfb342 fix: 解决工作流过滤字段错误问题
1 year ago
yaoshuli 1f35f4106b Merge pull request 'fix: 清理所有idea配置' (#97) from feature/frontConf into test
1 year ago
Vincent 85b3c05e65 fix: 清理所有idea配置
1 year ago
yaoshuli ed24ba1d3c Merge pull request 'feat: 前端配置管理' (#96) from feature/frontConf into test
1 year ago
Vincent 9bffacb0a6 fix: 更新设置时, 实时更新配置
1 year ago
Vincent 55b221d442 Merge branch 'test' of https://git.mcnetmart.com/guoxiangbin/ocr into test
1 year ago
Vincent 1994cc35cb feat: 前端配置管理
1 year ago
shuliYao 334659fbcc fix: 解决提报日期检索问题
1 year ago
guanzheng f18f9e74e8 Merge pull request '反显异常' (#95) from feat/QxOcrFieldMg-20240412 into test
1 year ago
15007173189@163.com 1515d90cd9 反显异常
1 year ago
shuliYao 5390be13d7 fix: 解决工作流过滤字段错误问题
1 year ago
sunchenliang 74117f58a8 fix: 修改任务终审列表
1 year ago
zhangyong eff87e6195 Merge pull request 'feature/gitPush_dept' (#94) from feature/gitPush_dept into test
1 year ago
admin 252efdc458 修改公司与工作流的关联
1 year ago
admin 2ad0135114 修改公司与工作流的关联
1 year ago
zhangyong adf86005e7 Merge pull request 'feature/gitPush_dept' (#93) from feature/gitPush_dept into test
1 year ago
admin cfb562160a 修改用户与多公司关系
1 year ago
admin 90341b4643 修改用户与多公司关系
1 year ago
shuliYao 9dbdee21b2 fix: 解决动态列字段接口修改问题
1 year ago
admin 1b564c8c0a 修改用户与多公司关系
1 year ago
guanzheng 0cdf78100e Merge pull request 'feat/QxOcrFieldMg-20240412' (#91) from feat/QxOcrFieldMg-20240412 into test
1 year ago
15007173189@163.com 3b27eca3db init
1 year ago
15007173189@163.com 4f5c813878 Merge remote-tracking branch 'origin/feat/QxOcrFieldMg-20240412' into feat/QxOcrFieldMg-20240412
1 year ago
15007173189@163.com 426733918f feat: 删除token问题修复
1 year ago
15007173189@163.com eded091f82 Merge remote-tracking branch 'origin/feat/QxOcrFieldMg-20240412' into feat/QxOcrFieldMg-20240412
1 year ago
15007173189@163.com b6397cfa4a feat: delete方法修改
1 year ago
15007173189@163.com 08e28750b3 init
1 year ago
15007173189@163.com 89585c8e68 Merge branch 'feat/QxOcrFieldMg-20240412' of https://git.mcnetmart.com/guoxiangbin/ocr into feat/QxOcrFieldMg-20240412
1 year ago
15007173189@163.com 8512f46306 feat: 表单回显问题修复
1 year ago
15007173189@163.com 365fbec76c init
1 year ago
shuliYao a3de7e34ba fix: 解决任务审核查询默认带出筛选条件后,跳转检索不到对应数据问题。
1 year ago
15007173189@163.com 9bda3f27ce 文件修改同步
1 year ago
15007173189@163.com f016d934e0 参数修改
1 year ago
15007173189@163.com 9c4880169a 列表入参初始值修改
1 year ago
15007173189@163.com c4144025f1 请求字段修改
1 year ago
guanzheng 92d3993ef7 init
1 year ago
15007173189@163.com 1fcc0a68a3 字段信息列表增改界面
1 year ago
cuihaojie 50ef5c6534 Merge pull request 'fix:ai统计弹窗-重复图片统计' (#89) from fix/ai_statistics_popup_adds_statistics_of_duplicate_images into test
1 year ago
DELL 3c7b41abae fix:ai统计弹窗-重复图片统计
1 year ago
shuliYao c57e6b1a48 fix: 图片分类相应业务代码提交
1 year ago
cuihaojie 22c003ae36 Merge pull request 'fix:打开全文检索,不输入数据的情况下需要有一个默认展示,展示任务审批和任务终审的待审批状态的最新三条数据' (#88) from fix/Full-text_search into test
1 year ago
DELL 20fc17912e fix:打开全文检索,不输入数据的情况下需要有一个默认展示,展示任务审批和任务终审的待审批状态的最新三条数据
1 year ago
cuihaojie 5291bb5c9f Merge pull request 'fix:解决图检审批创建时间字段获取值的问题,以及任务审批主图加入可疑文件夹后左侧列表还能查询到的问题' (#87) from fix/Picture_check_approval_creation_time into test
1 year ago
DELL e3c4111822 fix:解决图检审批创建时间字段获取值的问题,以及任务审批主图加入可疑文件夹后左侧列表还能查询到的问题
1 year ago
sunchenliang 1b6a1211c7 Merge pull request 'feat/addSynchronizationData-20240409' (#86) from feat/addSynchronizationData-20240409 into test
1 year ago
sunchenliang 9968d626da Merge remote-tracking branch 'origin/feat/addSynchronizationData-20240409' into feat/addSynchronizationData-20240409
1 year ago
sunchenliang 242c4125e7 fix: 修改任务审批列表
1 year ago
sunchenliang 1ee8c6ec57 fix: 修改任务审批列表
1 year ago
sunchenliang 152f6b0efc Merge pull request 'fix: 审批完成通知无量云' (#84) from feat/addSynchronizationData-20240409 into test
1 year ago
sunchenliang 6edc53605a fix: 审批完成通知无量云
1 year ago
cuihaojie 6fbb0796eb Merge pull request 'fix:修改可疑文件夹相似度排序字段名,适配前端,同时修改apifox,新增下载图片监测接口,该接口暂不完善,还需要调整' (#83) from fix/Download_image_interface_added into test
1 year ago
DELL 6f38e0fb8d fix:解决合并冲突
1 year ago
DELL 7cad047448 Merge branch 'test' into fix/Download_image_interface_added
1 year ago
yaoshuli 931bb03211 Merge pull request 'fix: 增加根据无量云获取租户信息接口,修改任务审核时项目筛选条件' (#82) from fix/pullWLYDataProjectIdBug into test
1 year ago
DELL 075e9d515c fix:修改可疑文件夹相似度排序字段名,适配前端,同时修改apifox,新增下载图片监测接口,该接口暂不完善,还需要调整
1 year ago
shuliYao 98c6376623 fix: 增加根据无量云获取租户信息接口,修改任务审核时项目筛选条件
1 year ago
sunchenliang 04fe194c65 Merge pull request 'fix: 审批完成通知无量云' (#81) from feat/addSynchronizationData-20240409 into test
1 year ago
sunchenliang 4231e5d57e fix: 审批完成通知无量云
1 year ago
cuihaojie 5eef5ac101 Merge pull request 'fix:高级检索修复审批状态查询' (#80) from fix/Query_task_approval_status into test
1 year ago
DELL f277767e27 fix:高级检索修复审批状态查询
1 year ago
shuliYao c524d375bb fix: 解决任务审核报错
1 year ago
shuliYao d056ddb054 fix: 关闭自动补齐功能
1 year ago
shuliYao cb3c46e5a3 fix: 解决没有开启获取hash值问题
1 year ago
yaoshuli 294463c6a1 Merge pull request 'fix/checkDuplicateBug' (#79) from fix/checkDuplicateBug into test
1 year ago
shuliYao d76ba019c2 fix: 解决查重入库数据量过大,导致事务崩溃问题
1 year ago
shuliYao d96a911c3f fix: 解决图片本地化,拉取失败增加重试流程,解决查重1.6w条数据导致内存被拉崩。
1 year ago
cuihaojie 352bb37ed9 Merge pull request 'fix:修改pro配置文件' (#78) from fix/Configuration_file_modification into test
1 year ago
DELL 71e97d7bb6 fix:修改pro配置文件
1 year ago
cuihaojie 97afdfa7af Merge pull request 'fix:修改配置文件,新增data-url: https://b-test.prevailcloud.com/pangu/jingwei/thirdclient/command/pb/approval/result' (#77) from fix/Configuration_file_modification into test
1 year ago
DELL 7bef44f278 fix:修改配置文件,新增data-url: https://b-test.prevailcloud.com/pangu/jingwei/thirdclient/command/pb/approval/result
1 year ago
cuihaojie 8ed963d3ce Merge pull request 'fix:显示可疑文件列表新增提报时间排序和阈值排序' (#76) from fix/Suspicious_folder_list_sort into test
1 year ago
DELL 918676fb35 fix:显示可疑文件列表新增提报时间排序和阈值排序
1 year ago
shuliYao 9f94517852 fix: 解决图片下载检测程序问题
1 year ago
cuihaojie 5fc9a02fdb Merge pull request 'fix:新增图片下载监测,对未下载图片重新放入队列' (#75) from fix/Image_download_monitoring into test
1 year ago
DELL f3ee195183 fix:新增图片下载监测,对未下载图片重新放入队列
1 year ago
sunchenliang 4304f535d2 Merge pull request 'fix: 审批完成通知无量云' (#74) from feat/addSynchronizationData-20240407 into test
1 year ago
sunchenliang d779191b0d fix: 审批完成通知无量云
1 year ago
sunchenliang 0e995bf567 Merge pull request 'fix: 审批完成通知无量云' (#73) from feat/addSynchronizationData-20240407 into test
1 year ago
sunchenliang f1a9dc2fb7 fix: 审批完成通知无量云
1 year ago
yaoshuli ab6925a8cf Merge pull request 'fix: 拉取无量云2.0数据下载,数据丢失等问题解决,修改线程逻辑' (#72) from fix/pullWLYImgDataBug into test
1 year ago
shuliYao 4b1d62ac7e fix: 拉取无量云2.0数据下载,数据丢失等问题解决,修改线程逻辑
1 year ago
cuihaojie 32f5a5995b Merge pull request 'fix:解决高级筛选sql查询问题(关于时间区间or的情况),解决无量云批量拉取数据问题' (#71) from fix/Pull_infinite_cloud_data_2945 into test
1 year ago
DELL 3d71a7fca9 fix:解决高级筛选sql查询问题(关于时间区间or的情况),解决无量云批量拉取数据问题
1 year ago
yaoshuli 1ce888607b Merge pull request 'fix: 解决工作流相关,没有token认证问题,目前只是进行排除。' (#70) from fix/flowableAuthenticationBug into test
1 year ago
shuliYao de6fe2efa7 fix: 解决工作流相关,没有token认证问题,目前只是进行排除。
1 year ago
cuihaojie 565f626d0a Merge pull request 'fix:无量云拉取全量数据' (#69) from fix/Pull_infinite_cloud_data_2945 into test
1 year ago
DELL e5b673fcdb fix:无量云拉取全量数据
1 year ago
sunchenliang 9cf5787cba Merge pull request 'fix/Advanced_search_quadratic_2898' (#68) from fix/Advanced_search_quadratic_2898 into test
1 year ago
sunchenliang f6ff5d930c Merge remote-tracking branch 'origin/fix/Advanced_search_quadratic_2898' into fix/Advanced_search_quadratic_2898
1 year ago
DELL 123dd65e97 fix:任务审批高级检索
1 year ago
DELL 5b62e01a1a fix:任务审批高级检索
1 year ago
shuliYao ee43a048ae fix: 一键查重模糊搜索问题
1 year ago
shuliYao a6d17fbdc4 fix: 解决系统排序等各种bug
1 year ago

37
.gitignore vendored

@ -1,5 +1,34 @@
**/target/
**/.idea/
# kdiff3 ignore
*.orig
# maven ignore
target/
# eclipse ignore
.settings/
.project
.classpath
# idea ignore
.idea/
*.ipr
*.iml
rebel.xml
*.log
*.iws
# temp ignore
*.log
*.cache
*.diff
*.patch
*.tmp
tmp/
# system ignore
.DS_Store
Thumbs.db
# package ignore (optional)
# *.jar
#rebel
rebel.xml

8
.idea/.gitignore vendored

@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="jyjz-system-authority" />
<module name="jyjz-system-oa" />
<module name="jyjz-framework-security" />
<module name="jyjz-system-abase" />
<module name="runtest" />
<module name="jyjz-common-mybatisplus" />
<module name="jyjz-common-upload" />
<module name="jyjz-system-admin" />
<module name="jyjz-framework-securityweb" />
<module name="jyjz-common-web" />
<module name="jyjz-system-cms" />
<module name="jyjz-common-redis" />
<module name="jyjz-common-task" />
<module name="jyjz-common-base" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="jyjz-start" target="1.8" />
<module name="ocrproject" target="1.8" />
<module name="runstart" target="1.8" />
</bytecodeTargetLevel>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="jyjz-common" options="" />
<module name="jyjz-common-base" options="-parameters" />
<module name="jyjz-common-mybatisplus" options="-parameters" />
<module name="jyjz-common-redis" options="-parameters" />
<module name="jyjz-common-task" options="-parameters" />
<module name="jyjz-common-upload" options="-parameters" />
<module name="jyjz-common-web" options="-parameters" />
<module name="jyjz-framework" options="" />
<module name="jyjz-framework-security" options="-parameters" />
<module name="jyjz-framework-securityweb" options="-parameters" />
<module name="jyjz-parent" options="" />
<module name="jyjz-system" options="" />
<module name="jyjz-system-abase" options="-parameters" />
<module name="jyjz-system-admin" options="-parameters" />
<module name="jyjz-system-authority" options="-parameters" />
<module name="jyjz-system-cms" options="-parameters" />
<module name="jyjz-system-oa" options="-parameters" />
<module name="runstart" options="-parameters" />
<module name="runtest" options="-parameters" />
</option>
</component>
</project>

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/jyjz-common/jyjz-common-base/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-common/jyjz-common-mybatisplus/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-common/jyjz-common-redis/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-common/jyjz-common-task/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-common/jyjz-common-upload/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-common/jyjz-common-web/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-framework/jyjz-framework-security/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-framework/jyjz-framework-securityweb/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-system/jyjz-system-abase/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-system/jyjz-system-admin/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-system/jyjz-system-cms/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyjz-system/jyjz-system-oa/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/runstart/src/main/java" charset="UTF-8" />
</component>
</project>

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="central" />
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="rdc-releases" />
<option name="name" value="rdc-releases" />
<option name="url" value="https://packages.aliyun.com/maven/repository/2179753-release-2RMtZe/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="alimaven" />
<option name="name" value="alimaven" />
<option name="url" value="https://maven.aliyun.com/repository/public" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="rdc-snapshots" />
<option name="name" value="rdc-snapshots" />
<option name="url" value="https://packages.aliyun.com/maven/repository/2179753-snapshot-eDoLiX/" />
</remote-repository>
<remote-repository>
<option name="id" value="snapshots" />
<option name="name" value="snapshots" />
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public" />
</remote-repository>
</component>
</project>

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/jyjz-parent.iml" filepath="$PROJECT_DIR$/jyjz-parent.iml" />
</modules>
</component>
</project>

@ -1,124 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -1,165 +0,0 @@
ERROR [2024-03-18 00:02:57,290][] cn.jyjz.xiaoyao.admin.service.impl.UserTokenServiceImpl:122 - token=eyJrZXlfdXNlciI6eyJleHBpcmVzQXQiOjE3MTA2ODgwOTIwMTQsImlzc3VlZEF0IjoxNzEwNjg2MjkyMDEzLCJsb2dpbm5hbWUiOiJ5YW5zaGkwMSIsInJlbWVtYmVyIjpmYWxzZSwic2lnblVzZXIiOm51bGwsInRva2VuaWQiOiI0YmNkMTQwODA0ZTY1OGVkM2Y1Y2Y2NmNiNGVhOThkZSIsInRva2VudXVpZCI6IjAzZDk0NzEzMWI0MjRiZTU4NWVlYzQzMDNiNjVkNWE3IiwidXNlckFnZW50IjpudWxsLCJ1c2VyaWQiOiIyNjE4Nzc0ODQ0OTI5NDg2MDciLCJ1c2VybmFtZSI6Iua8lOekuui0puWPtyJ9LCJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJrZXlfamF2YV9qd3QiLCJleHAiOjE3MTA2ODgwOTIsImlhdCI6MTcxMDY4NjI5Mn0.1E_2tro04oFpwePM2w5lDxOulxVlE52oCwlUJzK3z2kgetUserToken-error={}
cn.jyjz.xiaoyao.common.base.exception.MyTokenExpiredException: token失效。
at cn.jyjz.xiaoyao.framework.security.utils.JwtUtils.parseToken(JwtUtils.java:200)
at cn.jyjz.xiaoyao.admin.service.impl.UserTokenServiceImpl.getUserToken(UserTokenServiceImpl.java:120)
at cn.jyjz.xiaoyao.framework.security.authentication.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.java:86)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:218)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
ERROR [2024-03-18 00:02:57,294][] org.apache.juli.logging.DirectJDKLog:175 - Servlet.service() for servlet [dispatcherServlet] in context with path [/foodapi] threw exception
cn.jyjz.xiaoyao.common.base.exception.ServiceException: token失效。
at cn.jyjz.xiaoyao.admin.service.impl.UserTokenServiceImpl.getUserToken(UserTokenServiceImpl.java:124)
at cn.jyjz.xiaoyao.framework.security.authentication.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.java:86)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:218)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
ERROR [2024-03-22 20:46:37,534][] com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread:2912 - create connection SQLException, url: jdbc:mysql://47.93.59.251:3306/ocrnew?useUnicode=true&nullCatalogMeansCurrent=true&characterEncoding=UTF-8&characterSetResults=utf8&serverTimezone=Asia/Shanghai&useSSL=false, errorCode 0, state 08S01
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:118)
at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:232)
at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:112)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1703)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1786)
at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2910)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:519)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:683)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:660)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:137)
at com.mysql.cj.protocol.a.NativeAuthenticationProvider.proceedHandshakeWithPluggableAuthentication(NativeAuthenticationProvider.java:462)
at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:209)
at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1352)
at com.mysql.cj.NativeSession.connect(NativeSession.java:132)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:948)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:818)
... 9 common frames omitted
Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
at com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:67)
at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:63)
at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:45)
at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:513)
... 18 common frames omitted

File diff suppressed because it is too large Load Diff

@ -0,0 +1,237 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>前端配置管理</title>
<#include "/head/headaddedit.html" />
<link href="${ctx}/static/css/plugins/switchery/switchery.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>基本信息</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="OcrConfigurationform" method="post" id="OcrConfigurationform" class="form-horizontal" action="${ctx}/ocr/ocrFrontConf/save">
<input type="hidden" id="id" name="id">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 当前环境:</label>
<div class="col-sm-9">
<input name="env" id="env" class="form-control" disabled placeholder="当前环境" class="form-control" type="text" value="" >
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 无量云域名:</label>
<div class="col-sm-9">
<input name="wlyInterfaceDomain" id="wlyInterfaceDomain" class="form-control" placeholder="无量云域名" class="form-control" type="text" value="" >
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 无量云AccessKey:</label>
<div class="col-sm-9">
<input name="wlyAccessKey" id="wlyAccessKey" class="form-control" placeholder="无量云AccessKey" class="form-control" type="text" value="" >
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 无量云AccessCode:</label>
<div class="col-sm-9">
<input name="wlyAccessCode" id="wlyAccessCode" class="form-control" placeholder="无量云AccessCode" class="form-control" type="text" value="" >
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 无量云连接超时时间:</label>
<div class="col-sm-9">
<input name="wlyConnectTimeout" id="wlyConnectTimeout" class="form-control" placeholder="无量云连接超时时间" class="form-control" type="text" number="true" value="0" >
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 无量云读取超时时间:</label>
<div class="col-sm-9">
<input name="wlyReadTimeout" id="wlyReadTimeout" class="form-control" placeholder="无量云读取超时时间" class="form-control" type="text" number="true" value="100" >
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 无量云本地图片路径:</label>
<div class="col-sm-9">
<input name="wlyLocalImagePath" id="wlyLocalImagePath" class="form-control" placeholder="无量云本地图片路径" class="form-control" type="text" value="" >
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 无量云数据url:</label>
<div class="col-sm-9">
<input name="wlyDataUrl" id="wlyDataUrl" class="form-control" placeholder="无量云数据url" class="form-control" type="text" value="" >
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 图片信息url:</label>
<div class="col-sm-9">
<input name="pictureSourceUrl" id="pictureSourceUrl" class="form-control" placeholder="图片信息url" class="form-control" type="text" value="" >
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 发送图片结果url:</label>
<div class="col-sm-9">
<input name="sendResultUrl" id="sendResultUrl" class="form-control" placeholder="发送图片结果url" class="form-control" type="text" value="" >
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 项目信息url:</label>
<div class="col-sm-9">
<input name="projectSourceUrl" id="projectSourceUrl" class="form-control" placeholder="项目信息url" class="form-control" type="text" value="" >
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 租户信息url:</label>
<div class="col-sm-9">
<input name="tenantSourceUrl" id="tenantSourceUrl" class="form-control" placeholder="租户信息url" class="form-control" type="text" value="" >
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button type="submit" class="btn btn-w-m btn-primary">保存</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<script src="${ctx}/static/js/plugins/switchery/switchery.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var elem = document.querySelector('.js-switch');
var switchery = new Switchery(elem, {
color: '#1AB394'
});
parent.axgetXiaoyao('${ctx}/ocr/ocrFrontConf/get',null,false , function(data){
if(data.code == "OK"){
$("#id").val(data.data.id);
$("#env").val(data.data.env);
$("#wlyInterfaceDomain").val(data.data.wlyInterfaceDomain);
$("#wlyAccessKey").val(data.data.wlyAccessKey);
$("#wlyAccessCode").val(data.data.wlyAccessCode);
$("#wlyConnectTimeout").val(data.data.wlyConnectTimeout);
$("#wlyReadTimeout").val(data.data.wlyReadTimeout);
$("#wlyLocalImagePath").val(data.data.wlyLocalImagePath);
$("#wlyDataUrl").val(data.data.wlyDataUrl);
$("#pictureSourceUrl").val(data.data.pictureSourceUrl);
$("#sendResultUrl").val(data.data.sendResultUrl);
$("#projectSourceUrl").val(data.data.projectSourceUrl);
$("#tenantSourceUrl").val(data.data.tenantSourceUrl);
}else{
parent.toastr.error("非法请求。");
}
});
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
$("#OcrConfigurationform").attr("action","${ctx}/ocr/ocrFrontConf/save");
var form1 = $('#OcrConfigurationform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: ":hidden",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#OcrConfigurationform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
parent.toastr.success(data.message);
}else if(data.code == "ERRORM"){
$.each(data.message,function(name,anArray) {
$.each(anArray,function(n,value){
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr( "id", n + "-error" ).addClass("help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
}else{
parent.toastr.error(data.message);
}
}
});
}
});
});
</script>
</body>
</html>

@ -0,0 +1,277 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>信息字段管理添加</title>
<#include "/head/headaddedit.html" />
<link href="${ctx}/static/js/plugins/jqueryzTree/css/metroStyle/metroStyle.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>信息字段新增</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="Postform" method="post" id="Postform" class="form-horizontal" action="${ctx}/backstage/post/save">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字段名称:</label>
<div class="col-sm-9">
<input name="name" id="name" class="form-control" placeholder="字段名称" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 页面类型:</label>
<div class="col-sm-9">
<select class="form-control" name='reviewType' id='reviewType'>
<option value="0">终审</option>
<option value="1">工单</option>
<option value="2">一审二审</option>
<option value="3">审核填报</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字段描述:</label>
<div class="col-sm-9">
<input name="fieldDesc" id="fieldDesc" class="form-control" placeholder="字段描述" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否必选:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isrequired"> <i></i>启用
</label>
<label>
<input type="radio" value="0" name="isrequired"> <i></i>停用
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 排序字段:</label>
<div class="col-sm-9">
<input name="sort" id="sort" class="form-control" placeholder="排序字段" class="form-control" type="text" maxlength='20' required>
</div>
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否高亮:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isHighlight"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isHighlight"> <i></i>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否可点击:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isTap"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isTap"> <i></i>
</label>
</div>
</div>
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否隐藏:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isHide"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isHide"> <i></i>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button id="savebutton" type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="ajaxDeptTreemodal" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
<h4 class="modal-title">选择机构</h4>
</div>
<div class="modal-body" style=" padding: 15px 50px; ">
<ul id="departZtreeUl" class="ztree"></ul>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-white">取消</button>
<button type="button" onclick="closedept()" class="btn btn-primary">确认</button>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<script src="${ctx}/static/js/plugins/layer/layer.min.js"></script>
<script src="${ctx}/static/js/plugins/jqueryzTree/js/jquery.ztree.all.min.js"></script>
<script type="text/javascript">
var $ajaxDeptTreemodal = $('#ajaxDeptTreemodal');
function selectDeptTree(){
$ajaxDeptTreemodal.modal();
$ajaxDeptTreemodal.css("z-index",(parent.getMaxZIndex() + 1));
}
function closedept(){
$ajaxDeptTreemodal.modal('hide');
}
var _deptTree;
var setting = {
data: {
simpleData: {
enable: true
}
}, callback: {onClick: zTreeOnClick }
};
function zTreeOnClick(event, treeId, treeNode) {
$("#reviewType").val(treeNode.name);
$("#deptid").val(treeNode.id);
closedept();
};
$(document).ready(function () {
if(parent.$("#index_user_issys").val() == 0){
$("#systemAdminUse").hide();
}
parent.axgetXiaoyao("${ctx}/backstage/admin/department/showDeptJsTree",null,false,function (data) {
_deptTree = $.fn.zTree.init($("#departZtreeUl"),setting, data);
_deptTree.expandAll(true);
});
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
$("#Postform").attr("action","${ctx}/ocr/field/saveOrUpdate");
var form1 = $('#Postform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: "",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#savebutton").addClass('disabled');
$("#Postform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data) {
parent.layer.closeAll('loading');
if (data.code == "OK") {
parent.toastr.success(data.message);
rolesback();
} else if (data.code == "ERRORM") {
$.each(data.message, function (name, anArray) {
$.each(anArray, function (n, value) {
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr("id", n + "-error").addClass(
"help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
} else {
$("#savebutton").addClass('removeClass');
parent.toastr.error(data.message);
}
}
});
}
});
});
function rolesback() {
parent.closeItem(window.frameElement.name);
}
</script>
</body>
</html>

@ -0,0 +1,331 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>岗位信息</title>
<#include "/head/headaddedit.html" />
<link href="${ctx}/static/js/plugins/jqueryzTree/css/metroStyle/metroStyle.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>信息字段编辑</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="Postform" method="post" id="Postform" class="form-horizontal" action="${ctx}/backstage/post/edit">
<input type="hidden" id="id" name="id" value="${id}">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字段名称:</label>
<div class="col-sm-9">
<input name="name" id="name" class="form-control" placeholder="字段名称" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 页面类型:</label>
<div class="col-sm-9">
<select class="form-control" name='reviewType' id='reviewType'>
<option value="0">终审</option>
<option value="1">工单</option>
<option value="2">一审二审</option>
<option value="3">审核填报</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字段描述:</label>
<div class="col-sm-9">
<input name="fieldDesc" id="fieldDesc" class="form-control" placeholder="字段描述" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否必选:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isrequired"> <i></i>启用
</label>
<label>
<input type="radio" value="0" name="isrequired"> <i></i>停用
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 排序字段:</label>
<div class="col-sm-9">
<input name="sort" id="sort" class="form-control" placeholder="排序字段" class="form-control" type="text" maxlength='20' required>
</div>
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否高亮:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isHighlight" > <i></i>
</label>
<label>
<input type="radio" value="0" name="isHighlight" > <i></i>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否可点击:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isTap"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isTap"> <i></i>
</label>
</div>
</div>
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否隐藏:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isHide"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isHide"> <i></i>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="ajaxDeptTreemodal" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
<h4 class="modal-title">选择机构</h4>
</div>
<div class="modal-body" style=" padding: 15px 50px; ">
<ul id="departZtreeUl" class="ztree"></ul>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-white">取消</button>
<button type="button" onclick="closedept()" class="btn btn-primary">确认</button>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<script src="${ctx}/static/js/plugins/layer/layer.min.js"></script>
<script src="${ctx}/static/js/plugins/jqueryzTree/js/jquery.ztree.all.min.js"></script>
<script type="text/javascript">
var $ajaxDeptTreemodal = $('#ajaxDeptTreemodal');
function selectDeptTree(){
$ajaxDeptTreemodal.modal();
$ajaxDeptTreemodal.css("z-index",(parent.getMaxZIndex() + 1));
}
function closedept(){
$ajaxDeptTreemodal.modal('hide');
}
var _deptTree;
var setting = {
data: {
simpleData: {
enable: true
}
}, callback: {onClick: zTreeOnClick }
};
function zTreeOnClick(event, treeId, treeNode) {
$("#parentname").val(treeNode.name);
$("#deptid").val(treeNode.id);
closedept();
};
$(document).ready(function () {
if(parent.$("#index_user_issys").val() == 0){
$("#systemAdminUse").hide();
}
$.ajaxSettings.async = false;
parent.axgetXiaoyao("${ctx}/backstage/admin/department/showDeptJsTree",null,false,function (data) {
_deptTree = $.fn.zTree.init($("#departZtreeUl"),setting, data);
_deptTree.expandAll(true);
});
$.ajaxSettings.async = true;
parent.axgetXiaoyao('${ctx}/ocr/field/getData/' + $("#id").val(),null,false , function(data){
if(data.code == "OK"){
$("#id").val(data.data.id);
$("#name").val(data.data.name);
$("#reviewType").val(data.data.reviewType)
// if(data.data.reviewType == '0') {
// $("#reviewType").val('终审');
// }
// else if(data.data.reviewType == '1'){
// $("#reviewType").val('工单');
// }
// else if(data.data.reviewType == '2'){
// $("#reviewType").val('一审二审');
// }
// else if(data.data.reviewType == '3'){
// $("#reviewType").val('审核填报');
// }
$("#fieldDesc").val(data.data.fieldDesc);
$("#sort").val(data.data.sort);
if (data.data.isTap == 1) {
$("input:radio[name='isTap']").eq(0).attr('checked', true);
} else if (data.data.isTap == 0) {
$("input:radio[name='isTap']").eq(1).attr('checked', true);
}
if (data.data.isHide == 1) {
$("input:radio[name='isHide']").eq(0).attr('checked', true);
} else if (data.data.isHide == 0) {
$("input:radio[name='isHide']").eq(1).attr('checked', true);
}
if (data.data.isHighlight == 1) {
$("input:radio[name='isHighlight']").eq(0).attr('checked', true);
} else if (data.data.isHighlight == 0) {
$("input:radio[name='isHighlight']").eq(1).attr('checked', true);
}
if (data.data.isrequired == 1) {
$("input:radio[name='isrequired']").eq(0).attr('checked', true);
} else if (data.data.isrequired == 0) {
$("input:radio[name='isrequired']").eq(1).attr('checked', true);
}
}else{
parent.toastr.error("非法请求。");
}
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
});
$("#Postform").attr("action","${ctx}/ocr/field/saveOrUpdate");
var form1 = $('#Postform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: ":hidden",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#Postform").ajaxSubmit({
headers: {"logintoken": parent.getLoginToken()},
success: function (data) {
parent.layer.closeAll('loading');
if (data.code == "OK") {
parent.toastr.success(data.message);
rolesback();
} else if (data.code == "ERRORM") {
$.each(data.message, function (name, anArray) {
$.each(anArray, function (n, value) {
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr("id", n + "-error").addClass(
"help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
} else {
parent.toastr.error(data.message);
}
}
});
}
});
});
function rolesback() {
parent.closeItem(window.frameElement.name);
}
</script>
</body>
</html>

@ -0,0 +1,232 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>信息字段管理</title>
<#include "/head/headlist.html" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox ">
<div class="ibox-content">
<div class="ibox-content">
<form id="searcheuser" class="form-inline">
<div class="form-group">
<input name='search_name' id='search_name' class='form-control' placeholder='字段名称'/>
</div>
<div class="form-group">
<select class="form-control" name='search_reviewType' id='search_reviewType'>
<option value="0">终审</option>
<option value="1">工单</option>
<option value="2">一审二审</option>
<option value="3">审核填报</option>
</select>
</div>
<div class="form-group">
<a class="btn btn-primary btn-rounded btn-sm" onclick="refreshTable()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$('#searcheuser')[0].reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</div>
</form>
</div>
</div>
</div>
<div class="ibox-content">
<div class="row row-lg">
<div class="col-sm-12">
<div class="container-div">
<div class="btn-group-sm" id="_mybutton" role="group">
</div>
<br/>
</div>
</div>
<div class="col-sm-12 select-table table-striped" >
<table id="Post_list" ></table>
</div>
</div>
</div>
</div>
<#include "/head/footlist.html" />
</body>
</html>
<script type="text/javascript">
var _tableListPost;
var jsptoolbar = '';
var jspOperation = '';
jQuery(document).ready(function($){
parent.axgetXiaoyao("${ctx}/backstage/admin/user/toolsbarOperation?" + "resourceid=${resourceid}",null,true ,
function(data){
if(data.code == "OK"){
jsptoolbar = data.data.Jsptoolbar;
jspOperation = data.data.JspOperation;
$("#_mybutton").empty();
$(jsptoolbar).each(function (i, toolbar) {
if(toolbar.methodid != '104'){
$("#_mybutton").append('<button class="btn sbold ' + toolbar.img + '" onClick="' + toolbar.actionmethod + '(\'${resourceid}' + toolbar.methodid + '\')"> ' + ' <i class="fa ' + toolbar.methodkey + '"></i> ' + toolbar.text + '</button>&nbsp');
}
});
_tableListPost = $('#Post_list').bootstrapTable({
url: '${ctx}/ocr/field/page',
pagination: true, //是否显示分页(*
pageNumber:1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
sidePagination: "server",
pageList: [10, 25, 50],
ajaxOptions:{
headers: {"logintoken": parent.getLoginToken()}
},
queryParams: function queryParams(params) {
return {
sortorder: params.order,
sortname: params.sort,
pagesize: params.limit,
start: (params.offset / params.limit) + 1,
search_name:'{"value":"' + $("#search_name").val() + '","op":"equal","type":"string"}',
search_reviewType:'{"value":"' + $("#search_reviewType").val() + '","op":"equal","type":"string"}',
};
},
responseHandler:function(res){
return{"rows": res.data.records, "total": res.data.total};
},
columns: [
{checkbox: true},
{ width:100,valign: "middle",field:'name',title:'字段名称',sortable:true},
{ width:150,valign: "middle",field:'reviewType',title:'字段类型',sortable:true,
formatter:function(value,oData,index) {
var listOperation = "";
if(oData.reviewType == 0){
listOperation = "终审";
}
else if(oData.reviewType == 1) {
listOperation = "工单";
}
else if(oData.reviewType == 2) {
listOperation = "一审二审";
}
else{
listOperation = "审核填报";
}
return listOperation;
}
},
{ width:150,valign: "middle",field:'fieldDesc',title:'字段描述',sortable:true},
{ width:80,valign: "middle",field:'isrequired',title:'是否必选',sortable:true,
formatter:function(value,oData,index) {
return (oData.isrequired == '1'?'启用':'停用');
}
},
{ width:80,valign: "middle",field:'sort',title:'排序字段',sortable:true},
{
width:200,
field: 'id',
title: '操作',
formatter:function(value,oData,index) {
var listOperation = "";
$(jspOperation).each(function (i, toolbar) {
listOperation = listOperation + "<a href=\"javascript:" + toolbar.actionmethod + "('${resourceid}','" + oData.id + "');\" class=\"btn " + toolbar.img + " btn-xs\")><i class=\"fa " + toolbar.methodkey + "\"></i> " + toolbar.text + " </a>&nbsp;&nbsp;";
});
return listOperation;
}
}
]
});
}
}
);
});
function getIdSelections() {
return $.map(_tableListPost.bootstrapTable('getSelections'), function(row) {
return row.id
});
}
function _useradd(jframeid){
parent._xiaoyaoOpenMenuTab('${ctx}/backstage/oa/ocrfieldconfigurationHtml/toSave',"添加字段信息",jframeid + '_add');
}
function updateData(jframeid,str){
var url = '${ctx}/backstage/oa/ocrfieldconfigurationHtml/toEdit/' + str ;
parent._xiaoyaoOpenMenuTab(url,"修改字段信息",jframeid + '_edit');
}
function _useredit(jframeid){
var str = getIdSelections() + "";
var tempstr = str.split(",");
if(str.length > 0 && tempstr.length > 1){
parent.toastr.error("每次只能修改一条信息。");
}else{
if (str.length > 0) {
updateData(jframeid,str);
} else {
parent.toastr.error("至少选择一条信息操作。");
}
}
}
function t_delete(str){
parent.layer.closeAll('loading');
// $.getJSON('${ctx}/ocr/field/delete?logintoken=' + parent.document.getElementById("logintoken").value, {id:str}, function(data){
parent.axgetXiaoyao('${ctx}/ocr/field/delete' , {id:str},false, function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
swal(data.message, "您已经永久删除了这条信息。", "success");
refreshTable();
}else{
swal(data.message, "遇到未知错误!", "error");
}
});
}
function _deletebu(sourceid){
var str = getIdSelections() + "";
var tempstr = str.split(",");
if (str.length > 0 && tempstr.length > 0) {
swal({
title: "您确定要删除这条信息吗",
text: "删除后将无法恢复,请谨慎操作!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "是的,我要删除!",
cancelButtonText: "让我再考虑一下…",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
if (isConfirm) {
t_delete(str);
} else {
swal("已取消", "您取消了删除操作!", "error");
}
});
} else {
parent.toastr.error("至少选择一条数据操作");
}
}
function _delete(sourceid,str){
swal({
title: "您确定要删除这条信息吗",
text: "删除后将无法恢复,请谨慎操作!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "是的,我要删除!",
cancelButtonText: "让我再考虑一下…",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
if (isConfirm) {
t_delete(str);
} else {
swal("已取消", "您取消了删除操作!", "error");
}
});
}
function refreshTable(sourceid){
_tableListPost.bootstrapTable('refreshOptions',{pageNumber:1});
}
</script>

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>部门主表</title>
<title>公司主表</title>
@ -25,9 +25,9 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 部门名称:</label>
<label class="col-sm-3 control-label is-required">* 公司名称:</label>
<div class="col-sm-9">
<input name="departname" id="departname" class="form-control" placeholder="部门名称" class="form-control" type="text" maxlength='100' required>
<input name="departname" id="departname" class="form-control" placeholder="公司名称" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
@ -45,9 +45,9 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 部门描述:</label>
<label class="col-sm-3 control-label is-required">* 公司描述:</label>
<div class="col-sm-9">
<input name="departdesc" id="departdesc" class="form-control" placeholder="部门描述" class="form-control" type="text" maxlength='100' required>
<input name="departdesc" id="departdesc" class="form-control" placeholder="公司描述" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
@ -81,9 +81,9 @@
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">部门地址:</label>
<label class="col-sm-3 control-label is-required">公司地址:</label>
<div class="col-sm-9">
<input name="departaddress" id="departaddress" class="form-control" placeholder="部门地址" class="form-control" type="text" maxlength='100' required>
<input name="departaddress" id="departaddress" class="form-control" placeholder="公司地址" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
@ -91,20 +91,47 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">机构编号:</label>
<label class="col-sm-3 control-label is-required">业务主体编码:</label>
<div class="col-sm-9">
<input type="text" id="deptno" name="deptno" placeholder="机构编号" data-required="1" class="form-control" required checkENG="true" minlength="2" maxlength="50"/>
<input type="text" id="deptno" name="deptno" placeholder="业务主体编码" data-required="1" class="form-control" required minlength="2" maxlength="50"/>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">企业编码:</label>
<div class="col-sm-9">
<input type="text" id="description" name="description" placeholder="企业编码" data-required="1" class="form-control" required minlength="2" maxlength="50"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">业务主体/租户:</label>
<div class="col-sm-9">
<div class="input-group">
<div class="radio i-checks">
<label>
<input type="radio" id="typedept1" checked="" value="1" name="typedept"> <i></i>业务主体
</label>
<label>
<input type="radio" id="typedept0" value="0" name="typedept"> <i></i>租户
</label>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>部门主表</title>
<title>公司主表</title>
@ -27,9 +27,9 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 部门名称:</label>
<label class="col-sm-3 control-label is-required">* 公司名称:</label>
<div class="col-sm-9">
<input name="departname" id="departname" class="form-control" placeholder="部门名称" class="form-control" type="text" maxlength='100' required>
<input name="departname" id="departname" class="form-control" placeholder="公司名称" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
@ -47,9 +47,9 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 部门描述:</label>
<label class="col-sm-3 control-label is-required">* 公司描述:</label>
<div class="col-sm-9">
<input name="departdesc" id="departdesc" class="form-control" placeholder="部门描述" class="form-control" type="text" maxlength='100' required>
<input name="departdesc" id="departdesc" class="form-control" placeholder="公司描述" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
@ -84,9 +84,9 @@
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">部门地址:</label>
<label class="col-sm-3 control-label is-required">公司地址:</label>
<div class="col-sm-9">
<input name="departaddress" id="departaddress" class="form-control" placeholder="部门地址" class="form-control" type="text" maxlength='100' required>
<input name="departaddress" id="departaddress" class="form-control" placeholder="公司地址" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
@ -94,13 +94,41 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">机构编号:</label>
<label class="col-sm-3 control-label is-required">业务主体编码:</label>
<div class="col-sm-9">
<input type="text" id="deptno" name="deptno" placeholder="机构编号" data-required="1" readonly="readonly" class="form-control" required checkENG="true" minlength="2" maxlength="50"/>
<input type="text" id="deptno" name="deptno" placeholder="业务主体编码" data-required="1" class="form-control" required minlength="2" maxlength="50"/>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">企业编码:</label>
<div class="col-sm-9">
<input type="text" id="description" name="description" placeholder="企业编码" data-required="1" class="form-control" required minlength="2" maxlength="50"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">业务主体/租户:</label>
<div class="col-sm-9">
<div class="input-group">
<div class="radio i-checks">
<label>
<input type="radio" id="typedept1" value="1" name="typedept"> <i></i>业务主体
</label>
<label>
<input type="radio" id="typedept0" value="0" name="typedept"> <i></i>租户
</label>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
@ -180,8 +208,8 @@
$(document).ready(function () {
parent.axgetXiaoyao("${ctx}/backstage/admin/department/showDeptJsTree" ,null,false,function (data) {
_deptTree = $.fn.zTree.init($("#departZtreeUl"),setting, data);
parent.axgetXiaoyao("${ctx}/backstage/admin/department/showDeptJsTree" ,null,false,function (datatree) {
_deptTree = $.fn.zTree.init($("#departZtreeUl"),setting, datatree);
_deptTree.expandAll(true);
@ -194,6 +222,8 @@
$("#departdesc").val(data.data.departdesc);
$("#deptno").val(data.data.deptno);
$("#description").val(data.data.description);
var node = _deptTree.getNodesByParam("id",String(data.data.parentid));
@ -209,6 +239,12 @@
$("input:radio[name='enabled']").eq(1).attr('checked',true);
}
if(data.data.typedept == 1){
$("input:radio[name='typedept']").eq(0).attr('checked',true);
}else if(data.data.typedept == 0){
$("input:radio[name='typedept']").eq(1).attr('checked',true);
}
checkeradio();
$("#sorting").val(data.data.sorting);

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>部门主表</title>
<title>公司主表</title>
@ -53,7 +53,7 @@
<input name='search_parentid' id='search_parentid' type="hidden"/>
<div class="form-group">
<input name='search_departname' id='search_departname' class='form-control' placeholder='部门名称'/>
<input name='search_departname' id='search_departname' class='form-control' placeholder='公司名称'/>
</div>
<div class="form-group">
<select class="form-control input-s-sm inline" name="search_enabled" id="search_enabled">
@ -89,12 +89,43 @@
</div>
</div>
<!-- 展示流程图的 窗口 -->
<div id="modal_flowable_list" class="modal fade" aria-hidden="true">
<div class="modal-dialog" role="document" style="width: auto">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="flowImgModalLabel">部署工作流:<span id="flowName"></span></h4>
</div>
<div class="modal-body">
<form id="candidateUserFrom">
<input type="hidden" name="deptid" id="deptid">
<input type="hidden" name="category" id="category">
<input type="hidden" name="caProcessdefinitionid" id="caProcessdefinitionid">
<div class="form-group">
<table id="flowable_list" ></table>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" onclick="saveUserCandidateForm()" class="btn btn-primary">设置</button>
<button type="button" class="btn btn-default" data-dismiss="modal">关闭窗口</button>
</div>
</div>
</div>
</div>
<#include "/head/footlist.html" />
<script src="${ctx}/static/js/plugins/jqueryzTree/js/jquery.ztree.all.min.js"></script>
</body>
</html>
<script type="text/javascript">
var _tableListDefinition;
var _deptTree;
var setting = {
data: {
@ -123,13 +154,103 @@
$("#collapes_linkopen").show();
});
function isNull(data){
return (data == "" || data == undefined || data == null || data == 'null') ? true : false;
}
function playFlow(processdefinitionid,deptid){
$("#caProcessdefinitionid").val(processdefinitionid);
$("#deptid").val(deptid);
$("#modal_flowable_list").modal();
$("#modal_flowable_list").css("z-index",(parent.getMaxZIndex() + 1));
_tableListDefinition.bootstrapTable('refreshOptions',{pageNumber:1});
}
function saveUserCandidateForm(){
//流程主键
var Processdefinitionid = $("#caProcessdefinitionid").val();
//机构主键
var deptid = $("#deptid").val();
//流程关键,对应流程的”目标命名空间“
var category = $("#category").val();
var _tableListDepartment;
if(isNull(category)){
parent.toastr.error("未选择流程。");
}else{
parent.axpostXiaoyao("${ctx}/backstage/admin/department/updateflowable",{"Processdefinitionid":Processdefinitionid,"deptid":deptid,"category":category},true ,function (data) {
if(data.code == "OK"){
refreshTable();
}
});
}
}
function changeFlowRadio(category,processdefinitionid){
$("#caProcessdefinitionid").val(processdefinitionid);
$("#category").val(category);
}
var _tableListDepartment;
var jsptoolbar = '';
var jspOperation = '';
jQuery(document).ready(function($){
_tableListDefinition = $('#flowable_list').bootstrapTable({
url: '${ctx}/flow/definition/latestList' ,
pagination: true, //是否显示分页(*
pageNumber:1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
sidePagination: "server",
height: "100%", pageList: [10, 25, 50],
ajaxOptions:{
headers: {"logintoken": parent.getLoginToken()}
},
queryParams: function queryParams(params) {
return {
sortorder: params.order,
sortname: params.sort,
pageSize: params.limit,
currPage: (params.offset / params.limit) + 1
};
},
responseHandler:function(res){
return{"rows": res.data.list, "total": res.data.totalCount};
},
onLoadSuccess: function(data) {
$(data.rows).each(function (fli, fldata) {
if (fldata.id == $("#caProcessdefinitionid").val()) {
$("input[type='radio'][value='" + $("#caProcessdefinitionid").val() + "']").prop('checked', true);
$("#category").val(fldata.category);
}
});
},
columns: [
{
width:10,
field: 'radio',
formatter: function(value, row, index) {
return '<input type="radio" name="radioItem" onclick="changeFlowRadio(\'' + row.category + '\',\'' + row.id + '\')" value="' + row.id + '">';
}
},
{ width:150,valign: "middle",field:'id',title:'流程定义ID',sortable:false},
{ width:150,valign: "middle",field:'name',title:'流程名称',sortable:false},
{ width:150,valign: "middle",field:'flowKey',title:'流程key',sortable:false},
{ width:150,valign: "middle",field:'description',title:'流程描述',sortable:false},
{
width:90,
field: 'id',
title: '关联的流程',
formatter:function(value,oData,index) {
var listOperation = '无';
if($("#caProcessdefinitionid").val() == oData.id){
listOperation = '关联';
}
return listOperation;
}
}
]
});
initDepartTree();
parent.axgetXiaoyao("${ctx}/backstage/admin/user/toolsbarOperation?" + "resourceid=${resourceid}",null,true ,
function(data){
@ -168,23 +289,42 @@
},
columns: [
{checkbox: true},
{ width:150,valign: "middle",field:'departname',title:'公司名称',sortable:true},
{ width:150,valign: "middle",field:'enabled',title:'公司类型',sortable:true,
formatter:function (value,oData,index) {
var listOperation = "";
if(oData.typedept == 1){
listOperation = "主体";
}else {
listOperation = "租户";
}
return listOperation;
}
},
{ width:150,valign: "middle",field:'deptno',title:'业务主体编码',sortable:true},
{ width:150,valign: "middle",field:'description',title:'企业编码',sortable:true},
{ width:50,valign: "middle",field:'processdefinitionid',title:'是否关联流程',sortable:false,
{ width:150,valign: "middle",field:'departname',title:'部门名称',sortable:true},
{ width:150,valign: "middle",field:'departdesc',title:'部门描述',sortable:true},
{ width:150,valign: "middle",field:'enabled',title:'是否启用',sortable:true,
formatter:function (value,oData,index) {
var listOperation = "";
formatter:function(value,oData,index) {
var listOperation = oData.processdefinitionid == null ? "否" : "是";
if(oData.enabled == 1){
listOperation = "启用";
}else {
listOperation = "停用";
}
return listOperation;
}
},
{ width:150,valign: "middle",field:'enabled',title:'是否启用',sortable:true,
formatter:function (value,oData,index) {
var listOperation = "";
return listOperation;
if(oData.enabled == 1){
listOperation = "启用";
}else {
listOperation = "停用";
}
},
{ width:150,valign: "middle",field:'sorting',title:'排序',sortable:true},
return listOperation;
}
},
{ width:150,valign: "middle",field:'sorting',title:'排序',sortable:true},
{
width:200,
field: 'id',
@ -196,6 +336,8 @@
$(jspOperation).each(function (i, toolbar) {
listOperation = listOperation + "<a href=\"javascript:" + toolbar.actionmethod + "('${resourceid}','" + tempid + "');\" class=\"btn " + toolbar.img + " btn-xs\")><i class=\"fa " + toolbar.methodkey + "\"></i> " + toolbar.text + " </a>&nbsp;&nbsp;";
});
listOperation = listOperation + "<a href=\"javascript:playFlow('" + oData.processdefinitionid + "','" + oData.id + "');\" class=\"btn btn-success btn-xs\")><i class=\"fa fa-map-signs\"></i>查看流程</a>&nbsp;&nbsp;";
return listOperation;
}
}
@ -222,11 +364,11 @@
});
}
function _useradd(sourceid){
parent._xiaoyaoOpenMenuTab('${ctx}/backstage/admin/departmentHtml/toSave',"添加部门",sourceid);
parent._xiaoyaoOpenMenuTab('${ctx}/backstage/admin/departmentHtml/toSave',"添加公司",sourceid);
}
function updateData(sourceid,str){
var url = '${ctx}/backstage/admin/departmentHtml/toEdit/' + str ;
parent._xiaoyaoOpenMenuTab(url,"修改部门",sourceid + "_edit");
parent._xiaoyaoOpenMenuTab(url,"修改公司",sourceid + "_edit");
}
function _useredit(sourceid){
var str = getIdSelections() + "";

@ -0,0 +1,277 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>信息字段管理添加</title>
<#include "/head/headaddedit.html" />
<link href="${ctx}/static/js/plugins/jqueryzTree/css/metroStyle/metroStyle.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>信息字段新增</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="Postform" method="post" id="Postform" class="form-horizontal" action="${ctx}/backstage/post/save">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字段名称:</label>
<div class="col-sm-9">
<input name="name" id="name" class="form-control" placeholder="字段名称" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 页面类型:</label>
<div class="col-sm-9">
<select class="form-control" name='reviewType' id='reviewType'>
<option value="0">终审</option>
<option value="1">工单</option>
<option value="2">一审二审</option>
<option value="3">审核填报</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字段描述:</label>
<div class="col-sm-9">
<input name="fieldDesc" id="fieldDesc" class="form-control" placeholder="字段描述" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否必选:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isrequired"> <i></i>启用
</label>
<label>
<input type="radio" value="0" name="isrequired"> <i></i>停用
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 排序字段:</label>
<div class="col-sm-9">
<input name="sort" id="sort" class="form-control" placeholder="排序字段" class="form-control" type="text" maxlength='20' required>
</div>
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否高亮:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isHighlight"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isHighlight"> <i></i>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否可点击:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isTap"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isTap"> <i></i>
</label>
</div>
</div>
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否隐藏:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isHide"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isHide"> <i></i>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button id="savebutton" type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="ajaxDeptTreemodal" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
<h4 class="modal-title">选择机构</h4>
</div>
<div class="modal-body" style=" padding: 15px 50px; ">
<ul id="departZtreeUl" class="ztree"></ul>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-white">取消</button>
<button type="button" onclick="closedept()" class="btn btn-primary">确认</button>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<script src="${ctx}/static/js/plugins/layer/layer.min.js"></script>
<script src="${ctx}/static/js/plugins/jqueryzTree/js/jquery.ztree.all.min.js"></script>
<script type="text/javascript">
var $ajaxDeptTreemodal = $('#ajaxDeptTreemodal');
function selectDeptTree(){
$ajaxDeptTreemodal.modal();
$ajaxDeptTreemodal.css("z-index",(parent.getMaxZIndex() + 1));
}
function closedept(){
$ajaxDeptTreemodal.modal('hide');
}
var _deptTree;
var setting = {
data: {
simpleData: {
enable: true
}
}, callback: {onClick: zTreeOnClick }
};
function zTreeOnClick(event, treeId, treeNode) {
$("#reviewType").val(treeNode.name);
$("#deptid").val(treeNode.id);
closedept();
};
$(document).ready(function () {
if(parent.$("#index_user_issys").val() == 0){
$("#systemAdminUse").hide();
}
parent.axgetXiaoyao("${ctx}/backstage/admin/department/showDeptJsTree",null,false,function (data) {
_deptTree = $.fn.zTree.init($("#departZtreeUl"),setting, data);
_deptTree.expandAll(true);
});
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
$("#Postform").attr("action","${ctx}/backstage/ocr/field/add");
var form1 = $('#Postform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: "",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#savebutton").addClass('disabled');
$("#Postform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data) {
parent.layer.closeAll('loading');
if (data.code == "OK") {
parent.toastr.success(data.message);
rolesback();
} else if (data.code == "ERRORM") {
$.each(data.message, function (name, anArray) {
$.each(anArray, function (n, value) {
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr("id", n + "-error").addClass(
"help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
} else {
$("#savebutton").addClass('removeClass');
parent.toastr.error(data.message);
}
}
});
}
});
});
function rolesback() {
parent.closeItem(window.frameElement.name);
}
</script>
</body>
</html>

@ -0,0 +1,317 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>岗位信息</title>
<#include "/head/headaddedit.html" />
<link href="${ctx}/static/js/plugins/jqueryzTree/css/metroStyle/metroStyle.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>信息字段编辑</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="Postform" method="post" id="Postform" class="form-horizontal" action="${ctx}/backstage/post/edit">
<input type="hidden" id="id" name="id" value="${id}">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字段名称:</label>
<div class="col-sm-9">
<input name="name" id="name" class="form-control" placeholder="字段名称" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 页面类型:</label>
<div class="col-sm-9">
<select class="form-control" name='reviewType' id='reviewType'>
<option value="0">终审</option>
<option value="1">工单</option>
<option value="2">一审二审</option>
<option value="3">审核填报</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字段描述:</label>
<div class="col-sm-9">
<input name="fieldDesc" id="fieldDesc" class="form-control" placeholder="字段描述" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否必选:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isrequired"> <i></i>启用
</label>
<label>
<input type="radio" value="0" name="isrequired"> <i></i>停用
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 排序字段:</label>
<div class="col-sm-9">
<input name="sort" id="sort" class="form-control" placeholder="字段描述" class="form-control" type="text" maxlength='20' required>
</div>
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否高亮:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isHighlight"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isHighlight"> <i></i>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否可点击:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isTap"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isTap"> <i></i>
</label>
</div>
</div>
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否隐藏:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="isHide"> <i></i>
</label>
<label>
<input type="radio" value="0" name="isHide"> <i></i>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="ajaxDeptTreemodal" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
<h4 class="modal-title">选择机构</h4>
</div>
<div class="modal-body" style=" padding: 15px 50px; ">
<ul id="departZtreeUl" class="ztree"></ul>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-white">取消</button>
<button type="button" onclick="closedept()" class="btn btn-primary">确认</button>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<script src="${ctx}/static/js/plugins/layer/layer.min.js"></script>
<script src="${ctx}/static/js/plugins/jqueryzTree/js/jquery.ztree.all.min.js"></script>
<script type="text/javascript">
var $ajaxDeptTreemodal = $('#ajaxDeptTreemodal');
function selectDeptTree(){
$ajaxDeptTreemodal.modal();
$ajaxDeptTreemodal.css("z-index",(parent.getMaxZIndex() + 1));
}
function closedept(){
$ajaxDeptTreemodal.modal('hide');
}
var _deptTree;
var setting = {
data: {
simpleData: {
enable: true
}
}, callback: {onClick: zTreeOnClick }
};
function zTreeOnClick(event, treeId, treeNode) {
$("#parentname").val(treeNode.name);
$("#deptid").val(treeNode.id);
closedept();
};
$(document).ready(function () {
if(parent.$("#index_user_issys").val() == 0){
$("#systemAdminUse").hide();
}
$.ajaxSettings.async = false;
parent.axgetXiaoyao("${ctx}/backstage/admin/department/showDeptJsTree",null,false,function (data) {
_deptTree = $.fn.zTree.init($("#departZtreeUl"),setting, data);
_deptTree.expandAll(true);
});
$.ajaxSettings.async = true;
parent.axgetXiaoyao('${ctx}/backstage/admin/post/getdata/' + $("#id").val(),null,false , function(data){
if(data.code == "OK"){
$("#id").val(data.data.id);
$("#postname").val(data.data.postname);
$("#postdesc").val(data.data.postdesc);
var node = _deptTree.getNodesByParam("id",String(data.data.deptid));
console.log("--node--------------" + data.data.deptid)
console.log(node)
if(undefined != node && node.length > 0){
_deptTree.selectNode(node[0]);
$("#parentname").val(node[0].name);
}
$("#sorting").val(data.data.sorting);
if(data.data.enabled == 1){
$("input:radio[name='enabled']").eq(0).attr('checked',true);
}else if(data.data.enabled == 0){
$("input:radio[name='enabled']").eq(1).attr('checked',true);
}
if(data.data.issys == 1){
$("input:radio[name='issys']").eq(0).attr('checked',true);
}else if(data.data.issys == 0){
$("input:radio[name='issys']").eq(1).attr('checked',true);
}
$("#postcode").val(data.data.postcode);
}else{
parent.toastr.error("非法请求。");
}
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
});
$("#Postform").attr("action","${ctx}/backstage/ocr/field/edit");
var form1 = $('#Postform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: ":hidden",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#Postform").ajaxSubmit({
headers: {"logintoken": parent.getLoginToken()},
success: function (data) {
parent.layer.closeAll('loading');
if (data.code == "OK") {
parent.toastr.success(data.message);
rolesback();
} else if (data.code == "ERRORM") {
$.each(data.message, function (name, anArray) {
$.each(anArray, function (n, value) {
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr("id", n + "-error").addClass(
"help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
} else {
parent.toastr.error(data.message);
}
}
});
}
});
});
function rolesback() {
parent.closeItem(window.frameElement.name);
}
</script>
</body>
</html>

@ -0,0 +1,233 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>信息字段管理</title>
<#include "/head/headlist.html" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox ">
<div class="ibox-content">
<div class="ibox-content">
<form id="searcheuser" class="form-inline">
<div class="form-group">
<input name='search_name' id='search_name' class='form-control' placeholder='字段名称'/>
</div>
<div class="form-group">
<select class="form-control" name='search_reviewType' id='search_reviewType'>
<option value="0">终审</option>
<option value="1">工单</option>
<option value="2">一审二审</option>
<option value="3">审核填报</option>
</select>
</div>
<div class="form-group">
<a class="btn btn-primary btn-rounded btn-sm" onclick="refreshTable()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$('#searcheuser')[0].reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</div>
</form>
</div>
</div>
</div>
<div class="ibox-content">
<div class="row row-lg">
<div class="col-sm-12">
<div class="container-div">
<div class="btn-group-sm" id="_mybutton" role="group">
</div>
<br/>
</div>
</div>
<div class="col-sm-12 select-table table-striped" >
<table id="Post_list" ></table>
</div>
</div>
</div>
</div>
<#include "/head/footlist.html" />
</body>
</html>
<script type="text/javascript">
var _tableListPost;
var jsptoolbar = '';
var jspOperation = '';
jQuery(document).ready(function($){
parent.axgetXiaoyao("${ctx}/backstage/admin/user/toolsbarOperation?" + "resourceid=${resourceid}",null,true ,
function(data){
if(data.code == "OK"){
jsptoolbar = data.data.Jsptoolbar;
jspOperation = data.data.JspOperation;
$("#_mybutton").empty();
$(jsptoolbar).each(function (i, toolbar) {
if(toolbar.methodid != '104'){
$("#_mybutton").append('<button class="btn sbold ' + toolbar.img + '" onClick="' + toolbar.actionmethod + '(\'${resourceid}' + toolbar.methodid + '\')"> ' + ' <i class="fa ' + toolbar.methodkey + '"></i> ' + toolbar.text + '</button>&nbsp');
}
});
_tableListPost = $('#Post_list').bootstrapTable({
url: '${ctx}/ocr/field/list',
pagination: true, //是否显示分页(*
pageNumber:1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
sidePagination: "server",
pageList: [10, 25, 50],
ajaxOptions:{
headers: {"logintoken": parent.getLoginToken()}
},
queryParams: function queryParams(params) {
return {
sortorder: params.order,
sortname: params.sort,
pagesize: params.limit,
start: (params.offset / params.limit) + 1,
search_name:'{"value":"' + $("#search_name").val() + '","op":"equal","type":"string"}',
search_reviewType:'{"value":"' + $("#search_reviewType").val() + '","op":"equal","type":"string"}',
};
},
responseHandler:function(res){
return{"rows": res.data.records, "total": res.data.total};
},
columns: [
{checkbox: true},
{ width:100,valign: "middle",field:'name',title:'字段名称',sortable:true},
{ width:150,valign: "middle",field:'reviewType',title:'字段类型',sortable:true,
formatter:function(value,oData,index) {
var listOperation = "";
if(oData.reviewType == 0){
listOperation = "终审";
}
else if(oData.reviewType == 1) {
listOperation = "工单";
}
else if(oData.reviewType == 2) {
listOperation = "一审二审";
}
else{
listOperation = "审核填报";
}
return listOperation;
}
},
{ width:150,valign: "middle",field:'fieldDesc',title:'字段描述',sortable:true},
{ width:80,valign: "middle",field:'isrequired',title:'是否必选',sortable:true,
formatter:function(value,oData,index) {
// var listOperation = "";
return (oData.data.isrequired == '1'?'启用':'停用');
}
},
{ width:80,valign: "middle",field:'sort',title:'排序字段',sortable:true},
{
width:200,
field: 'id',
title: '操作',
formatter:function(value,oData,index) {
var listOperation = "";
$(jspOperation).each(function (i, toolbar) {
listOperation = listOperation + "<a href=\"javascript:" + toolbar.actionmethod + "('${resourceid}','" + oData.id + "');\" class=\"btn " + toolbar.img + " btn-xs\")><i class=\"fa " + toolbar.methodkey + "\"></i> " + toolbar.text + " </a>&nbsp;&nbsp;";
});
return listOperation;
}
}
]
});
}
}
);
});
function getIdSelections() {
return $.map(_tableListPost.bootstrapTable('getSelections'), function(row) {
return row.id
});
}
function _useradd(jframeid){
parent._xiaoyaoOpenMenuTab('${ctx}/backstage/admin/postHtml/toSave',"添加字段信息",jframeid + '_add');
}
function updateData(jframeid,str){
var url = '${ctx}/backstage/admin/postHtml/toEdit/' + str ;
parent._xiaoyaoOpenMenuTab(url,"修改字段信息",jframeid + '_edit');
}
function _useredit(jframeid){
var str = getIdSelections() + "";
var tempstr = str.split(",");
if(str.length > 0 && tempstr.length > 1){
parent.toastr.error("每次只能修改一条信息。");
}else{
if (str.length > 0) {
updateData(jframeid,str);
} else {
parent.toastr.error("至少选择一条信息操作。");
}
}
}
function t_delete(str){
parent.layer.closeAll('loading');
// $.getJSON('${ctx}/backstage/ocr/field/delete?logintoken=' + parent.document.getElementById("logintoken").value, {id:str}, function(data){
parent.axgetXiaoyao('${ctx}/backstage/ocr/field/delete' , {id:str},false, function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
swal(data.message, "您已经永久删除了这条信息。", "success");
refreshTable();
}else{
swal(data.message, "遇到未知错误!", "error");
}
});
}
function _deletebu(sourceid){
var str = getIdSelections() + "";
var tempstr = str.split(",");
if (str.length > 0 && tempstr.length > 0) {
swal({
title: "您确定要删除这条信息吗",
text: "删除后将无法恢复,请谨慎操作!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "是的,我要删除!",
cancelButtonText: "让我再考虑一下…",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
if (isConfirm) {
t_delete(str);
} else {
swal("已取消", "您取消了删除操作!", "error");
}
});
} else {
parent.toastr.error("至少选择一条数据操作");
}
}
function _delete(sourceid,str){
swal({
title: "您确定要删除这条信息吗",
text: "删除后将无法恢复,请谨慎操作!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "是的,我要删除!",
cancelButtonText: "让我再考虑一下…",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
if (isConfirm) {
t_delete(str);
} else {
swal("已取消", "您取消了删除操作!", "error");
}
});
}
function refreshTable(sourceid){
_tableListPost.bootstrapTable('refreshOptions',{pageNumber:1});
}
</script>

@ -121,7 +121,7 @@
<div class="col-sm-9">
<div class="input-group">
<input name="treeDeptName" id="treeDeptName" type="text" placeholder="请选择归属部门" onclick="selectDeptTree()" readonly="true" required class="form-control">
<input name="departmentId" id="departmentId" type="hidden">
<input name="departmentIds" id="departmentIds" type="hidden">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
@ -154,11 +154,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"> 关联公司:</label>
<div class="col-sm-9">
<select data-placeholder="请选择公司" id="tenantselect" name="tenantselect" class="chosen-select" multiple style="width:350px;" tabindex="4">
</select>
</div>
</div>
</div>
@ -294,8 +290,41 @@
simpleData: {
enable: true
}
}, callback: {onClick: zTreeOnClick }
},
check: {
enable: true,
chkStyle: "checkbox",
chkboxType: { "Y": "", "N": "" }
},
callback: {
onCheck: zOnCheck
}
};
// 全局变量
var checks = [];
// 复选框调用
function zOnCheck(event, treeId, treeNode) {
if (treeNode.checked) {//如果是选中节点
checks.push({id: treeNode.id, name: treeNode.name});
} else {//如果是取消选中
removeCheck(treeNode.id);
}
console.log(checks)
}
// 移除元素
function removeCheck(chkid) {
$.each(checks, function (idx, item) {
if (item != undefined && item.id == chkid) {
checks.splice(idx, 1);
}
})
}
function showuserIconModel() {
$userIconModel.modal();
$userIconModel.css("z-index",(parent.getMaxZIndex() + 1));
@ -308,6 +337,22 @@
$modalDeptTree.css("z-index",(parent.getMaxZIndex() + 1));
}
function closedept(){
var tempName = "";
var tempId = "";
$.each(checks,function(name,anArray) {
if(tempName.length > 1){
tempName = tempName + "," + anArray.name;
tempId = tempId + "," + anArray.id;
}else{
tempName = tempName + anArray.name;
tempId = tempId + anArray.id;
}
});
$("#treeDeptName").val(tempName);
$("#departmentIds").val(tempId);
$modalDeptTree.modal('hide');
}
//折叠ibox
@ -323,13 +368,7 @@
$(this).hide();
$("#collapes_linkopen").show();
});
function zTreeOnClick(event, treeId, treeNode) {
$("#treeDeptName").val(treeNode.name);
$("#departmentId").val(treeNode.id);
closedept();
}
var selectConfig = {
'.chosen-select': {},
'.chosen-select-deselect': {
@ -355,16 +394,7 @@
changeRoles(userdepartmentId);
changePost(userdepartmentId);
parent.axgetXiaoyao("${ctx}/backstage/admin/tenant/listall",null,false,function (data) {
if(data.code == "OK"){
console.log(data.data)
$.each(data.data,function(name,anArray) {
console.log(anArray)
$("#tenantselect").append("<option value='" + anArray.id + "'>" + anArray.name + "</option>");
});
}
});
var config = {

@ -123,7 +123,7 @@
<div class="col-sm-9">
<div class="input-group">
<input name="treeDeptName" id="treeDeptName" type="text" placeholder="请选择归属部门" onclick="selectDeptTree()" readonly="true" required class="form-control">
<input name="departmentId" id="departmentId" type="hidden">
<input name="departmentIds" id="departmentIds" type="hidden">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
@ -157,11 +157,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"> 关联公司:</label>
<div class="col-sm-9">
<select data-placeholder="请选择公司" id="tenantselect" name="tenantselect" class="chosen-select" multiple style="width:350px;" tabindex="4">
</select>
</div>
</div>
</div>
@ -286,8 +282,40 @@
simpleData: {
enable: true
}
}, callback: {onClick: zTreeOnClick }
},
check: {
enable: true,
chkStyle: "checkbox",
chkboxType: { "Y": "", "N": "" }
},
callback: {
onCheck: zOnCheck
}
};
// 全局变量
var checks = [];
// 复选框调用
function zOnCheck(event, treeId, treeNode) {
if (treeNode.checked) {//如果是选中节点
checks.push({id: treeNode.id, name: treeNode.name});
} else {//如果是取消选中
removeCheck(treeNode.id);
}
console.log(checks)
}
// 移除元素
function removeCheck(chkid) {
$.each(checks, function (idx, item) {
if (item != undefined && item.id == chkid) {
checks.splice(idx, 1);
}
})
}
var selectConfig = {
'.chosen-select': {},
'.chosen-select-deselect': {
@ -316,6 +344,21 @@
$modalDeptTree.css("z-index",(parent.getMaxZIndex() + 1));
}
function closedept(){
var tempName = "";
var tempId = "";
$.each(checks,function(name,anArray) {
if(tempName.length > 1){
tempName = tempName + "," + anArray.name;
tempId = tempId + "," + anArray.id;
}else{
tempName = tempName + anArray.name;
tempId = tempId + anArray.id;
}
});
$("#treeDeptName").val(tempName);
$("#departmentIds").val(tempId);
$modalDeptTree.modal('hide');
}
//折叠ibox
@ -331,13 +374,7 @@
$(this).hide(); F
$("#collapes_linkopen").show();
});
function zTreeOnClick(event, treeId, treeNode) {
$("#treeDeptName").val(treeNode.name);
$("#departmentId").val(treeNode.id);
closedept();
}
$(document).ready(function () {
@ -347,20 +384,6 @@
changePost(userdepartmentId);
parent.axgetXiaoyao("${ctx}/backstage/admin/tenant/listall",null,false,function (data) {
if(data.code == "OK"){
console.log(data.data)
$.each(data.data,function(name,anArray) {
console.log(anArray)
$("#tenantselect").append("<option value='" + anArray.id + "'>" + anArray.name + "</option>");
});
}
});
parent.axgetXiaoyao("${ctx}/backstage/admin/department/showDeptJsTree",null,false,function (data) {
_deptTree = $.fn.zTree.init($("#departZtreeUl"),setting, data);
_deptTree.expandAll(true);
@ -379,16 +402,23 @@
$("#email").val(usermodel.email);
$("#nationid").val(usermodel.nationid);
var nodeId = usermodel.departmentId;
if(undefined != nodeId && null != nodeId){
var node = _deptTree.getNodeByParam("id",nodeId);
_deptTree.selectNode(node);
}
var tempId = "";
$.each(usermodel.deptlist,function (index,deptDate){
if(null != deptDate){
var node = _deptTree.getNodeByParam("id",deptDate.id);
// _deptTree.selectNode(node);
_deptTree.checkNode(node,true,true,true);
}
if(tempId.length > 1){
tempId = tempId + "," + deptDate.id;
}else{
tempId = tempId + deptDate.id;
}
});
$("#departmentIds").val(tempId);
$("#treeDeptName").val(usermodel.departname);
$("#departmentId").val(usermodel.departmentId);
if(usermodel.enabled == 1){
$("input:radio[name='enabled']").eq(0).attr('checked',true);
@ -402,12 +432,6 @@
$("input:radio[name='usex']").eq(1).attr('checked',true);
}
$.each(usermodel.tenantList,function(name,anArray) {
$("#tenantselect option[value='" + anArray.id + "']").attr("selected",true);
});
}else{
parent.toastr.error("非法请求。");
//rolesback();

@ -124,6 +124,9 @@ public class SearchQuery implements java.io.Serializable{
public void addGreaterEqual(String field,Date value){
addQuery(field,value, SearchQueryConstant.SEARCH_GREATER_EQUAL);
}
public void addGreaterEqual(String field,Long value){
addQuery(field,value, SearchQueryConstant.SEARCH_GREATER_EQUAL);
}
public void addLess(String field,Integer value){
addQuery(field,value, SearchQueryConstant.SEARCH_LESS);
}
@ -155,6 +158,10 @@ public class SearchQuery implements java.io.Serializable{
addQuery(field,value, SearchQueryConstant.SEARCH_LESS_EQUAL);
}
public void addLessEqual(String field,Long value){
addQuery(field,value, SearchQueryConstant.SEARCH_LESS_EQUAL);
}
public void addRulesOp(String field,String rulesOp){
SearchQueryForm searchQueryForm = new SearchQueryForm();
if(query.get(field)!=null){

@ -151,8 +151,9 @@ public class SearchQueryFormat {
if(StringUtils.isNotBlank(searchQueryForm.getOp())
&& searchQueryForm.getOp().equals(SearchQueryConstant.SEARCH_EQUAL)){
queryWrapper.eq(obj.getQueryFiled(entry.getKey().toUpperCase()),searchQueryForm.getValue());
String upperCase = entry.getKey().toUpperCase();
String queryFiled = obj.getQueryFiled(upperCase);
queryWrapper.eq(queryFiled,searchQueryForm.getValue());
}else if(StringUtils.isNotBlank(searchQueryForm.getOp())
&& searchQueryForm.getOp().equals(SearchQueryConstant.SEARCH_LIKE)){

@ -60,7 +60,7 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
String[] excludespath = systemopenurlService.getOpenUrl();
//不需要过滤的url
String[] excludesOther = {"/static","/json",".js",".css",".ico",".jpg",".png",".pcm","/druid","/doc.html","/swagger-ui.html","/swagger-resources","/webjars/**","/v2/api-docs"};
String[] excludesOther = {"/static","/json",".js",".css",".ico",".jpg",".png",".pcm","/druid","/doc.html","/swagger-ui.html","/swagger-resources","/webjars/**","/v2/api-docs","/modeler","/app"};
String[] urls = ArrayUtils.addAll(excludespath, excludesOther);

@ -101,7 +101,36 @@ public class DepartmentController extends BaseController{
this.departmentService.clearDeptCacheById(tab.getId().toString());
return ResultVoUtil.success();
}
/**
*form
*mail.zhangyong@gmail.com
*2021-11-30 18:01:02
**/
@PostMapping("/updateflowable")
public ResultVo updateflowable(HttpServletResponse response,HttpServletRequest request) throws IOException{
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
//流程主键
String processdefinitionid = request.getParameter("Processdefinitionid");
//机构主键
String deptid = request.getParameter("deptid");
//流程关键,对应流程的”目标命名空间“
String category = request.getParameter("category");
Department department = this.departmentService.selectDeptById(deptid);
department.setProcessdefinitionid(processdefinitionid);
department.setCategory(category);
department.setUpdatetime(System.currentTimeMillis());
department.setUpdateuser(userToken.getLoginname());
if(this.departmentService.updateById(department)){
//清理缓存信息
this.departmentService.clearDeptCacheById(department.getId().toString());
return ResultVoUtil.success();
}
return ResultVoUtil.error();
}
/**
*
*mail.zhangyong@gmail.com

@ -196,8 +196,10 @@ public class UserController extends BaseController{
//角色主键数组
String[] rolesid = request.getParameterValues("rolesid");
String departmentIds = request.getParameter("departmentIds");
//保存用户信息
int isok = this.userService.save(tab, rolesid);
int isok = this.userService.save(tab, rolesid,departmentIds);
if (isok > 0) {
String[] tenantselect = request.getParameterValues("tenantselect");
@ -252,8 +254,10 @@ public class UserController extends BaseController{
//角色主键数组
String[] rolesid = request.getParameterValues("rolesid");
String departmentIds = request.getParameter("departmentIds");
//保存用户信息
int isok = this.userService.editUser(tab, rolesid);
int isok = this.userService.editUser(tab, rolesid,departmentIds);
if (isok > 0) {
String[] tenantselect = request.getParameterValues("tenantselect");

@ -52,6 +52,7 @@ public class Department implements BaseDto,java.io.Serializable {
@Schema(description = "上一级部门主键默认为0表示为第一级数据对象非0情况表示为有上一级数据对象")
@TableField(value="PARENTID")
@JsonSerialize(using = ToStringSerializer.class)
private Long parentid;
@Schema(description = "记录根级部门主键用于记录子部门所属根节点主键默认为0只有一层节点记录上一级节点主键")
@ -129,7 +130,38 @@ public class Department implements BaseDto,java.io.Serializable {
@Schema(description = "更新时间")
@TableField(value="UPDATETIME")
private Long updatetime;
@Schema(description = "对应的Service名主要是spring的service名")
@TableField(value="SERVICENAME")
private String servicename;
@Schema(description = "内置表单使用flowable表单0使用本地数据1使用flowable表单3:外置表单4其他自定义表单")
@TableField(value="BUILTFORM")
private Integer builtform;
@Schema(description = "表单地址,用户展示用户表单使用")
@TableField(value="FORMURL")
private String formurl;
@Schema(description = "表单详情")
@TableField(value="FORMDETAIL")
private String formdetail;
@Schema(description = "表单分类")
@TableField(value="FORMTYPE")
private String formtype;
@Schema(description = "流程定义id")
@TableField(value="PROCESSDEFINITIONID")
private String processdefinitionid;
@Schema(description = "公司类型0租户1主体")
@TableField(value="TYPEDEPT")
private Integer typedept;
@Schema(description = "对应的工作流编码,与工作流中的命名空间对应")
@TableField(value="CATEGORY")
private String category;
//子集机构的集合
@TableField(exist = false)
private List<Department> listchilddept;
@ -165,7 +197,15 @@ public class Department implements BaseDto,java.io.Serializable {
new SimpleEntry<>("CREATEUSER","createuser"),
new SimpleEntry<>("CREATEDATE","createdate"),
new SimpleEntry<>("UPDATEUSER","updateuser"),
new SimpleEntry<>("UPDATETIME","updatetime")
new SimpleEntry<>("UPDATETIME","updatetime"),
new SimpleEntry<>("SERVICENAME","servicename"),
new SimpleEntry<>("BUILTFORM","builtform"),
new SimpleEntry<>("FORMURL","formurl"),
new SimpleEntry<>("FORMDETAIL","formdetail"),
new SimpleEntry<>("FORMTYPE","formtype"),
new SimpleEntry<>("PROCESSDEFINITIONID","processdefinitionid"),
new SimpleEntry<>("TYPEDEPT","typedept"),
new SimpleEntry<>("CATEGORY","category")
)
.collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue));
@Override

@ -172,12 +172,12 @@ public class User implements BaseDto,java.io.Serializable {
//用于记录用户对应的顶级机构主键
@TableField(exist = false)
private Long departmentRootId = 0L;
//租户关系
@TableField(exist = false)
List<Tenant> tenantList;
//
// //租户关系
// @TableField(exist = false)
// List<Tenant> tenantList;
//用户对应的部门信息,映射文件中对应的字段信息
@JsonIgnore
@TableField(exist = false)
private List<Department> deptlist = new ArrayList<Department>(0);
@ -215,7 +215,7 @@ public class User implements BaseDto,java.io.Serializable {
Iterator<Department> it = deptlist.iterator();
StringBuffer sb = new StringBuffer();
if (it.hasNext()) {
while (it.hasNext()) {
Department dept = it.next();
if (null != sb && sb.length() > 0) {

@ -32,7 +32,13 @@ public interface DepartmentService extends BaseService<Department> {
* ,false
*/
public List<Department> listDepartByUser(User user, boolean enabled);
/**
*
* @param category
* @return
*/
List<Department> listByDeptNo(String category);
/**
* ,
* @param id

@ -87,7 +87,7 @@ public interface UserService extends BaseService<User> {
* @param rolesid
* @return
*/
int save(User user, String[] rolesid);
int save(User user, String[] rolesid,String departmentIds);
/**
* ,
@ -108,7 +108,7 @@ public interface UserService extends BaseService<User> {
* @param user
* @return
*/
int editUser(User user, String[] rolesid);
int editUser(User user, String[] rolesid,String departmentIds);
/**
* userDefaultPassword123456

@ -205,7 +205,18 @@ public class DepartmentServiceImpl extends BaseServiceImpl<DepartmentMybatisDao,
return list;
}
/**
*
* @param category
* @return
*/
public List<Department> listByDeptNo(String category){
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("CATEGORY",category);
return this.selectSearchList(queryWrapper);
}
/**
*
* @param roleid

@ -171,7 +171,7 @@ public class ResourcesServiceImpl extends BaseServiceImpl<ResourcesMybatisDao,Re
//缓存中获取资源集合
Map<Long,List<Resources>> mapResources = iCacheManager.get(CacheAdminConstants.SYS_RESOURCE_ALL,CacheAdminConstants.SYS_RESOURCE_ALL_KEY);
if(null == mapResources){
// if(null == mapResources){
synchronized (this){
//获取角色集合
@ -205,7 +205,7 @@ public class ResourcesServiceImpl extends BaseServiceImpl<ResourcesMybatisDao,Re
//查询角色和资源对应的方法集合
}
}
// }
return mapResources;
}

@ -105,7 +105,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMybatisDao,User> imple
List<Department> departmentList = this.departmentMybatisDao.selectDeptByUserid(user.getId());
user.formatDeptlist(departmentList);
user.setTenantList(this.userTenantService.listUserTenant(user.getId()));
//user.setTenantList(this.userTenantService.listUserTenant(user.getId()));
//返回用户前端菜单权限列表
List<SFrontmenuT> frontmenuTList1 = isFrontmenuTService.queryUserMenuById(user.getLoginname());
@ -136,7 +136,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMybatisDao,User> imple
List<Department> departmentList = this.departmentMybatisDao.selectDeptByUserid(user.getId());
user.formatDeptlist(departmentList);
user.setTenantList(this.userTenantService.listUserTenant(user.getId()));
//user.setTenantList(this.userTenantService.listUserTenant(user.getId()));
//返回用户前端菜单权限列表
List<SFrontmenuT> frontmenuTList1 = isFrontmenuTService.queryUserMenuById(user.getLoginname());
@ -283,7 +283,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMybatisDao,User> imple
*/
@Override
@Transactional
public int save(User user, String[] rolesid){
public int save(User user, String[] rolesid,String departmentIds){
//spring密码加密啊算法
BCryptPasswordEncoder bcryptPasswordEncoder = new BCryptPasswordEncoder();
@ -299,12 +299,18 @@ public class UserServiceImpl extends BaseServiceImpl<UserMybatisDao,User> imple
isok = this.usermybatisdao.insert(user);
//保存用户是否成功
if(isok > 0){
Userobject uo = new Userobject();
uo.setUserid(user.getId());
uo.setDepartid(user.getDepartmentId());
//保存用户与部门的关系
String[] deptids = departmentIds.split(",");
for(String dids:deptids){
Userobject uo = new Userobject();
uo.setUserid(user.getId());
uo.setDepartid(Long.parseLong(dids));
//保存用户与部门的关系
this.userobjectMybatisDao.insert(uo);
}
this.userobjectMybatisDao.insert(uo);
//判断接收的角色是否为空,如果为空用户角色使用默认角色
if(null != rolesid && rolesid.length > 0){
@ -426,7 +432,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMybatisDao,User> imple
*/
@Override
@Transactional
public int editUser(User user,String[] rolesid){
public int editUser(User user,String[] rolesid,String departmentIds){
//获得数据库中用户信息
User olduser = this.usermybatisdao.selectById(user.getId());
@ -442,17 +448,27 @@ public class UserServiceImpl extends BaseServiceImpl<UserMybatisDao,User> imple
queryWrapper.eq("USERID",user.getId());
//判断修改前用户的机构主键是否一致,如果不一致需要修改
if(!user.getDepartmentId().equals(olduser.getDepartmentId())){
// if(!user.getDepartmentId().equals(olduser.getDepartmentId())){
//删除原有用户与机构的关联关系
this.userobjectMybatisDao.delete(queryWrapper);
Userobject uo = new Userobject();
uo.setUserid(user.getId());
uo.setDepartid(user.getDepartmentId());
//保存用户与部门的关系
this.userobjectMybatisDao.insert(uo);
}
String[] deptids = departmentIds.split(",");
for(String dids:deptids){
Userobject uo = new Userobject();
uo.setUserid(user.getId());
uo.setDepartid(Long.parseLong(dids));
//保存用户与部门的关系
this.userobjectMybatisDao.insert(uo);
}
// Userobject uo = new Userobject();
// uo.setUserid(user.getId());
// uo.setDepartid(user.getDepartmentId());
// //保存用户与部门的关系
// this.userobjectMybatisDao.insert(uo);
// }
//判断接收的角色是否为空
if(null != rolesid && rolesid.length > 0){
@ -616,7 +632,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMybatisDao,User> imple
if(null != user){
List<Department> departmentList = this.departmentMybatisDao.selectDeptByUserid(user.getId());
user.formatDeptlist(departmentList);
user.setTenantList(this.userTenantService.listUserTenant(user.getId()));
//user.setTenantList(this.userTenantService.listUserTenant(user.getId()));
}
return user;

@ -238,7 +238,7 @@ public class UserTokenServiceImpl implements UserTokenService {
Map<String,Object> rolesShowleave = this.rolesService.getRolesConditionMap(user);
SearchQuery searchQueryrolesShowleave = this.rolesService.getRolesCondition(rolesShowleave);
user.setRolesShowleave(rolesShowleave);
user.setTenantList(this.userTenantService.listUserTenant(user.getId()));
//user.setTenantList(this.userTenantService.listUserTenant(user.getId()));
user.setSearchQueryrolesShowleave(searchQueryrolesShowleave);
userVo = BeanUtil.copyProperties(user,User.class);

@ -26,6 +26,14 @@
<result column="CREATEDATE" property="createdate" jdbcType="BIGINT"/>
<result column="UPDATEUSER" property="updateuser" jdbcType="VARCHAR"/>
<result column="UPDATETIME" property="updatetime" jdbcType="BIGINT"/>
<result column="SERVICENAME" property="servicename" jdbcType="VARCHAR"/>
<result column="BUILTFORM" property="builtform" jdbcType="INTEGER"/>
<result column="FORMURL" property="formurl" jdbcType="VARCHAR"/>
<result column="FORMDETAIL" property="formdetail" jdbcType="VARCHAR"/>
<result column="FORMTYPE" property="formtype" jdbcType="VARCHAR"/>
<result column="PROCESSDEFINITIONID" property="processdefinitionid" jdbcType="VARCHAR"/>
<result column="TYPEDEPT" property="typedept" jdbcType="INTEGER"/>
<result column="CATEGORY" property="category" jdbcType="VARCHAR"/>
<collection property="listchilddept" select="selectChildDeptEnabled" javaType="java.util.ArrayList" column="{id=id}"/>
</resultMap>
<resultMap id="BaseResultMap_only" type="cn.jyjz.xiaoyao.admin.dataobject.Department">
@ -53,6 +61,14 @@
<result column="CREATEDATE" property="createdate" jdbcType="BIGINT"/>
<result column="UPDATEUSER" property="updateuser" jdbcType="VARCHAR"/>
<result column="UPDATETIME" property="updatetime" jdbcType="BIGINT"/>
<result column="SERVICENAME" property="servicename" jdbcType="VARCHAR"/>
<result column="BUILTFORM" property="builtform" jdbcType="INTEGER"/>
<result column="FORMURL" property="formurl" jdbcType="VARCHAR"/>
<result column="FORMDETAIL" property="formdetail" jdbcType="VARCHAR"/>
<result column="FORMTYPE" property="formtype" jdbcType="VARCHAR"/>
<result column="PROCESSDEFINITIONID" property="processdefinitionid" jdbcType="VARCHAR"/>
<result column="TYPEDEPT" property="typedept" jdbcType="INTEGER"/>
<result column="CATEGORY" property="category" jdbcType="VARCHAR"/>
<collection property="listchilddept" select="selectChildDeptEnabled" javaType="java.util.ArrayList" column="{id=id}"/>
</resultMap>
<sql id="Base_Column_List">
@ -79,7 +95,15 @@
CREATEUSER AS createuser,
CREATEDATE AS createdate,
UPDATEUSER AS updateuser,
UPDATETIME AS updatetime
UPDATETIME AS updatetime,
SERVICENAME AS servicename,
BUILTFORM AS builtform,
FORMURL AS formurl,
FORMDETAIL AS formdetail,
FORMTYPE AS formtype,
PROCESSDEFINITIONID AS processdefinitionid,
TYPEDEPT AS typedept,
CATEGORY AS category
</sql>
<sql id="Base_Where">
@ -109,6 +133,14 @@
<if test="createdate != null"> and CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend}</if>
<if test="updateuser != null"> and UPDATEUSER ${updateuser.dataOp} ${updateuser.likestar}#{updateuser.value}${updateuser.likeend}</if>
<if test="updatetime != null"> and UPDATETIME ${updatetime.dataOp} ${updatetime.likestar}#{updatetime.value}${updatetime.likeend}</if>
<if test="servicename != null"> and SERVICENAME ${servicename.dataOp} ${servicename.likestar}#{servicename.value}${servicename.likeend}</if>
<if test="builtform != null"> and BUILTFORM ${builtform.dataOp} ${builtform.likestar}#{builtform.value}${builtform.likeend}</if>
<if test="formurl != null"> and FORMURL ${formurl.dataOp} ${formurl.likestar}#{formurl.value}${formurl.likeend}</if>
<if test="formdetail != null"> and FORMDETAIL ${formdetail.dataOp} ${formdetail.likestar}#{formdetail.value}${formdetail.likeend}</if>
<if test="formtype != null"> and FORMTYPE ${formtype.dataOp} ${formtype.likestar}#{formtype.value}${formtype.likeend}</if>
<if test="processdefinitionid != null"> and PROCESSDEFINITIONID ${processdefinitionid.dataOp} ${processdefinitionid.likestar}#{processdefinitionid.value}${processdefinitionid.likeend}</if>
<if test="typedept != null"> and TYPEDEPT ${typedept.dataOp} ${typedept.likestar}#{typedept.value}${typedept.likeend}</if>
<if test="category != null"> and CATEGORY ${category.dataOp} ${category.likestar}#{category.value}${category.likeend}</if>
<if test="userid != null"> and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}</if>
<if test="listdept != null">
and DEPARTID in
@ -187,7 +219,15 @@
d.CREATEUSER AS createuser,
d.CREATEDATE AS createdate,
d.UPDATEUSER AS updateuser,
d.UPDATETIME AS updatetime
d.UPDATETIME AS updatetime,
d.SERVICENAME AS servicename,
d.BUILTFORM AS builtform,
d.FORMURL AS formurl,
d.FORMDETAIL AS formdetail,
d.FORMTYPE AS formtype,
d.PROCESSDEFINITIONID AS processdefinitionid,
d.TYPEDEPT AS typedept,
d.CATEGORY AS category
from S_DEPARTMENT_T d,S_USEROBJECT_T uo where uo.DEPARTID=d.ID and uo.USERID=#{id}
</select>
<!-- 查询机构启用的子集的机构信息 start-->
@ -216,7 +256,15 @@
dm.CREATEUSER AS createuser,
dm.CREATEDATE AS createdate,
dm.UPDATEUSER AS updateuser,
dm.UPDATETIME AS updatetime
dm.UPDATETIME AS updatetime,
dm.SERVICENAME AS servicename,
dm.BUILTFORM AS builtform,
dm.FORMURL AS formurl,
dm.FORMDETAIL AS formdetail,
dm.FORMTYPE AS formtype,
dm.PROCESSDEFINITIONID AS processdefinitionid,
dm.TYPEDEPT AS typedept,
dm.CATEGORY AS category
from S_DEPARTMENT_T dm,S_DEPARTMENTCHILD_T dmc where dm.ID = dmc.CHILDID and dmc.PARENTID = #{id} ORDER BY dm.SORTING DESC
</select>
</mapper>

@ -107,7 +107,7 @@
u.UPDATEUSER AS updateuser,
u.UPDATETIME AS updatetime,
u.PSDUPDATETIME AS psdupdatetime
from S_USER_T u RIGHT JOIN S_USEROBJECT_T uo ON uo.USERID = u.ID
from S_USER_T u
${ew.customSqlSegment}
</select>

@ -42,66 +42,41 @@
</trim>
</where>
<if test="page != null">
<if test="page.sortname != null"> order by ${page.sortname} ${page.sortorder}</if>
<if test="page.sortname != null"> order by ${page.sortname} ${page.sortorder}</if>
limit ${page.start}, ${page.Pagesize}
</if>
</sql>
<select id="listCount" resultType="java.lang.Long" parameterType="java.util.Map">
select
count(ten.ID)
from
S_TENANT_T ten
where
ten.OTHERNO = #{otherno}
and
ten.ID in (
select ue.TENANTID from
S_USER_T us,
S_USER_TENANT_T ue where us.LOGINNAME = #{loginname}
)
select count(u.ID) from s_user_t u
left join s_userobject_t uo on u.id = uo.USERID
left join s_department_t dm on dm.id = uo.DEPARTID
where u.LOGINNAME =#{loginname} and dm.DESCRIPTION = #{otherno}
</select>
<select id="listOthernoCount" resultType="java.lang.Long" parameterType="java.util.Map">
select
count(ten.ID)
count(dm.ID)
from
S_TENANT_T ten
s_department_t dm
where
ten.OTHERNO = #{otherno}
dm.DESCRIPTION = #{otherno}
</select>
<select id="listLoginNameCount" resultType="java.lang.Long" parameterType="java.util.Map">
select
count(ten.ID)
from
S_TENANT_T ten
where
ten.OTHERNO = #{otherno}
and
ten.ID in (
select ue.TENANTID from
S_USER_T us,
S_USER_TENANT_T ue where us.LOGINNAME = #{loginname}
)
select count(u.ID) from s_user_t u
left join s_userobject_t uo on u.id = uo.USERID
left join s_department_t dm on dm.id = uo.DEPARTID
where u.LOGINNAME =#{loginname} and dm.DESCRIPTION = #{otherno}
</select>
<select id="listMobileCount" resultType="java.lang.Long" parameterType="java.util.Map">
select
count(ten.ID)
from
S_TENANT_T ten
where
ten.OTHERNO = #{otherno}
and
ten.ID in (
select ue.TENANTID from
S_USER_T us,
S_USER_TENANT_T ue where us.MOBILE = #{mobile}
)
select count(u.ID) from s_user_t u
left join s_userobject_t uo on u.id = uo.USERID
left join s_department_t dm on dm.id = uo.DEPARTID
where u.MOBILE =#{mobile} and dm.DESCRIPTION = #{otherno}
</select>
</mapper>

@ -1,5 +1,7 @@
package cn.jyjz.flowable.config;
import cn.jyjz.xiaoyao.admin.dataobject.Department;
import cn.jyjz.xiaoyao.admin.service.DepartmentService;
import cn.jyjz.xiaoyao.oa.from.dataobject.Category;
import cn.jyjz.xiaoyao.oa.from.service.CategoryService;
import org.flowable.common.engine.api.delegate.event.FlowableEvent;
@ -21,11 +23,13 @@ public class GlobalEntityInitListener implements FlowableEventListener {
@Autowired
private CategoryService categoryService;
@Autowired
private DepartmentService departmentService;
@Override
public void onEvent(FlowableEvent flowableEvent) {
FlowableEventType type = flowableEvent.getType();
FlowableEntityEventImpl flowableEntityEvent = (FlowableEntityEventImpl) flowableEvent;
Object object = flowableEntityEvent.getEntity();
if(object instanceof ProcessDefinitionEntity){
ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity)object;
@ -37,9 +41,17 @@ public class GlobalEntityInitListener implements FlowableEventListener {
categoryService.updateById(category);
}
}
//更新机构与审批流的关联,使用“业务主体编码”与流程的“目标命名空间”字段保持一致
List<Department> departmentList = departmentService.listByDeptNo(processDefinitionEntity.getCategory());
if(null != departmentList && !departmentList.isEmpty()){
for (Department department:departmentList){
department.setServicename("taskchildPictureService");
department.setProcessdefinitionid(processDefinitionEntity.getId());
departmentService.updateDept(department);
}
}
}
}

@ -310,9 +310,11 @@ public class FlowTaskController extends BaseController {
searchQuery.addLike("fromtaskname", taskName);
}
//获取用户预设检索条件id
String userSearchId = request.getParameter("userSearchId");
//获取用户预设检索条件id,如果存在检索条件,则高级检索失效
String userSearchId = "";
if(StringUtils.isBlank(taskName)){
userSearchId = request.getParameter("userSearchId");
}
User user = this.userService.getSessionUser(request);
if (user.isUserIsSys(xiaoyaoConfig.getWebconfig().getSysLoginUser().split(","))) {
@ -381,10 +383,10 @@ public class FlowTaskController extends BaseController {
@RequestParam(name = "izstatus", defaultValue = "", required = false) String izstatus,
@RequestParam(name = "iztaskrrom", defaultValue = "", required = false) String iztaskrrom,
@RequestParam(name = "izuptime", defaultValue = "", required = false) String izuptime,
@RequestParam(name = "isFail", defaultValue = "false", required = false) String isFail,
HttpServletRequest request) {
SearchQuery searchQuery = new SearchQuery();
if (org.springframework.util.StringUtils.hasText(izupuser)) {
// searchQuery.addEqual("fromuserid",izupuser);
if (izupuser.contains(",")) {
String[] userIds = izupuser.split(",");
List<String> arrayData = Arrays.asList(userIds);
@ -420,17 +422,22 @@ public class FlowTaskController extends BaseController {
if (izstatus.contains(",")) {
String[] statusIds = izstatus.split(","); // 以逗号拆分字符串
List<String> arrayData = Arrays.asList(statusIds);
SearchQueryForm searchQueryForm = new SearchQueryForm();
searchQuery.addIn("states", arrayData);
} else {
searchQuery.addEqual("states", izstatus);
}
}else{
if(Boolean.parseBoolean(isFail)){
searchQuery.addEqual("isFail","1");
searchQuery.addIn("states", Arrays.asList("2","3","5"));
}else{
searchQuery.addIn("states", Arrays.asList("2","3"));
}
}
if (org.springframework.util.StringUtils.hasText(iztaskrrom)) {
if (iztaskrrom.contains(",")) {
String[] taskrromIds = iztaskrrom.split(","); // 以逗号拆分字符串
List<String> arrayData = Arrays.asList(taskrromIds);
SearchQueryForm searchQueryForm = new SearchQueryForm();
searchQuery.addIn("fromsourceid", arrayData);
} else {
searchQuery.addEqual("fromsourceid", iztaskrrom);
@ -451,11 +458,11 @@ public class FlowTaskController extends BaseController {
// 如果开始时间不为空,则将其放入查询条件中
if (startTimeStamp != null) {
searchQuery.addGreater("createdateStart", startTimeStamp);
searchQuery.addGreater("fromuptimeStart", startTimeStamp);
}
// 如果结束时间不为空,则将其放入查询条件中
if (endTimeStamp != null) {
searchQuery.addLess("createdateEnd", endTimeStamp);
searchQuery.addLess("fromuptimeEnd", endTimeStamp);
}
} catch (ParseException e) {
// 处理日期解析异常
@ -472,7 +479,7 @@ public class FlowTaskController extends BaseController {
User user = this.userService.getSessionUser(request);
if (user.isUserIsSys(xiaoyaoConfig.getWebconfig().getSysLoginUser().split(","))) {
} else {
searchQuery.addEqual("thisLoginUserid", user.getId().toString());
searchQuery.addEqual("thisLoginUserid", user.getLoginname());
searchQuery.addEqual("tenantid", tenantId);
}
String searchId = request.getParameter("searchId");

@ -33,15 +33,16 @@ import cn.jyjz.xiaoyao.oa.from.dataobject.Flowablecc;
import cn.jyjz.xiaoyao.oa.from.service.*;
import cn.jyjz.xiaoyao.oa.from.vo.FlowUnionVo;
import cn.jyjz.xiaoyao.oa.from.vo.RepeatedContentVo;
import cn.jyjz.xiaoyao.oa.from.vo.RepeatedTaskVo;
import cn.jyjz.xiaoyao.ocr.dataobject.*;
import cn.jyjz.xiaoyao.ocr.service.*;
import cn.jyjz.xiaoyao.ocr.util.SearchParaFormatting;
import cn.jyjz.xiaoyao.ocr.vo.OcrTaskChildPictureVo;
import cn.jyjz.xiaoyao.ocr.vo.OcrTaskchildPictureApproVo;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
@ -456,9 +457,10 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
variables.put("approvd", approve.getResult());
OcrTaskchildPicture model = ocrTaskchildPictureService.getById(Long.parseLong(flowTaskInfo.getFormId()));
if (approve.getResult()) {
disposeSucceedTask(task, processDefinition, variables, model, flowTaskInfo.getFormId(), userToken);
disposeSucceedTask(task, processDefinition, variables, model, flowTaskInfo.getFormId(), userToken, approve);
} else {
disposeFailureTask(task, flowTaskInfo.getFormId(), variables);
disposeFailureTask(task, flowTaskInfo.getFormId(), variables, approve);
}
userapproveService.save(userToken, approve, task, flowTaskInfo.getFormId());
successCount++;
@ -475,7 +477,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
/**
*
*/
private void disposeSucceedTask(Task task, ProcessDefinition processDefinition, Map<String, Object> variables, OcrTaskchildPicture model, String formId, UserToken userToken) {
private void disposeSucceedTask(Task task, ProcessDefinition processDefinition, Map<String, Object> variables, OcrTaskchildPicture model, String formId, UserToken userToken, FlowApprove approve) throws Exception {
//进入下一个节点
taskService.complete(task.getId(), variables);
updateAssignee(task.getProcessInstanceId(), task.getProcessDefinitionId(), processDefinition);
@ -488,22 +490,25 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
if (null != taskList && !taskList.isEmpty()) {
taskData = taskList.get(0);
}
OcrTaskchildPicture childPicture = ocrTaskchildPictureService.getById(Long.parseLong(formId));
childPicture.setTaskNode(taskData.getDescription());
if (ObjectUtils.isEmpty(taskData)) {
model.setFinishtime(System.currentTimeMillis());
model.setStates(SystemConstantsOa.OA_STATUS_TYPE_END);
ocrTaskchildPictureService.updateById(model);
OcrPicture picture = ocrPictureService.getById(model.getPictureid());
ocrTaskchildPictureService.sendFlowTaskResult(childPicture, picture, approve);
} else {
//判断节点上的描述字段是否伟finale_judgment,如果是,记录到终审表中,如果终审表已经存在,不再重复记录
if (StringUtils.isNotBlank(taskData.getDescription()) && taskData.getDescription().equals(SystemConstantsOa.OA_TASK_COMPLETE_FINALE_FORM)) {
childPicture.setIsFinal(1);
User user = userService.findByLoginname(formData.getAssignee());
userFinalService.save(user.getId().toString(), formId);
}
OcrTaskchildPicture childPicture = ocrTaskchildPictureService.getById(Long.parseLong(formId));
this.sendMsg(childPicture, userToken);
childPicture.setTaskId(taskData.getId());
childPicture.setTaskname(taskData.getName());
ocrTaskchildPictureService.updateById(childPicture);
}
ocrTaskchildPictureService.updateById(childPicture);
//增加未查看记录
userViewApproeService.saveUserViewApproe(formData.getAssignee(), formData.getFormid().toString(), formData.getTenantid().toString());
@ -512,7 +517,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
/**
*
*/
private void disposeFailureTask(Task task, String formId, Map<String, Object> variables) {
private void disposeFailureTask(Task task, String formId, Map<String, Object> variables, FlowApprove approve) throws
Exception {
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).singleResult();
//我这里以 流程定义key(oa_category_t定义的关键字逻辑唯一) + 业务表主键(请假表、调岗表等) + 业务表对应的servicename
String businesskey = processInstance.getBusinessKey();
@ -535,15 +541,17 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
//设置流程结束状态
iFormCustomService.endForm(busskey[1], SystemConstantsOa.OA_STATUS_TYPE_REFUSE, assignee, task.getProcessInstanceId(), task.getName());
}
//1、获取终止节点
List<EndEvent> endNodes = findEndFlowElement(task.getProcessDefinitionId());
//2、执行终止
List<Execution> executions = runtimeService.createExecutionQuery().parentId(task.getProcessInstanceId()).list();
List<String> executionIds = new ArrayList<>();
executions.forEach(execution -> executionIds.add(execution.getId()));
OcrTaskchildPicture taskchildPicture = ocrTaskchildPictureService.getById(Long.parseLong(formId));
taskchildPicture.setFinishtime(System.currentTimeMillis());
taskchildPicture.setIsFinal(1);
ocrTaskchildPictureService.updateById(taskchildPicture);
OcrPicture picture = ocrPictureService.getById(taskchildPicture.getPictureid());
ocrTaskchildPictureService.sendFlowTaskResult(taskchildPicture, picture, approve);
}
//发送消息
@ -559,6 +567,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
jsonObject.put("taskId", model.getFromtaskid());
jsonObject.put("nodeName", model.getTaskname());
jsonObject.put("states", 1);
jsonObject.put("statesName", "待审批");
jsonObject.put("sendUserId", userToken.getUserid());
jsonObject.put("sendUserName", userToken.getUsername());
jsonObject.put("sendTime", System.currentTimeMillis());
@ -578,7 +587,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
*
* @param processDefinition
*/
public void updateAssignee(String processInstanceId, String processDefinitionId, ProcessDefinition processDefinition) {
public void updateAssignee(String processInstanceId, String processDefinitionId, ProcessDefinition
processDefinition) {
//如果是多个候选人或者是候选组,做任务拾取
FlowTaskCompleteVO flowTaskCompleteVO = updateNowTaskAssignee(processInstanceId, processDefinitionId);
@ -976,6 +986,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
ParamterPage paramterPage = new ParamterPage();
paramterPage.setStart((pageUtils.getCurrPage() - 1) * pageUtils.getPageSize());
paramterPage.setPagesize(pageUtils.getPageSize());
Page<OcrTaskchildPicture> page = new Page<>();
if (StringUtils.isNotBlank(pageUtils.getSortname())) {
paramterPage.setSortname(pageUtils.getSortname());
@ -989,97 +1000,96 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
paramterPage.setSortorder("DESC");
}
Long count = ocrTaskchildPictureService.listFinalCount(query);
query.put("page", paramterPage);
Long count = ocrTaskchildPictureService.listFinalCount(query);
List<OcrTaskchildPicture> list = ocrTaskchildPictureService.listFinal(query);
for (OcrTaskchildPicture taskchildPicture : list) {
//查询对应的流程分类
Category category = categoryService.selectDtoById(taskchildPicture.getCategoryid());
taskchildPicture.setCategoryDto(category);
if (StringUtils.isNotBlank(taskchildPicture.getProcessdefinitionid())) {
List<Task> taskList = this.nowRunTask(taskchildPicture.getProcessinstanceid(), taskchildPicture.getProcessdefinitionid());
if (null != taskList && !taskList.isEmpty()) {
taskchildPicture.setTaskId(taskList.get(0).getId());
Task tasknow = taskService.createTaskQuery().taskId(taskchildPicture.getTaskId()).singleResult();
BpmnModel bpmnModel = repositoryService.getBpmnModel(tasknow.getProcessDefinitionId());
// 获取节点定义id
String taskDefinitionKey = tasknow.getTaskDefinitionKey();
// 根据节点定义id获取节点元素
FlowElement flowElement = bpmnModel.getFlowElement(taskDefinitionKey);
if (flowElement instanceof UserTask) {
UserTask userTask = (UserTask) flowElement;
taskchildPicture.setDocumentation(userTask.getDocumentation());
}
}
//查询历史
List<HistoricTaskInstanceDto> historicTaskInstanceDtos = new ArrayList<>();
// 查询当前任务的流转信息
List<HistoricTaskInstance> taskHiInstances = historyService.createHistoricTaskInstanceQuery()
.processInstanceId(taskchildPicture.getProcessinstanceid())
.includeProcessVariables()
.orderByHistoricTaskInstanceStartTime()
.asc()
.list();
for (HistoricTaskInstance taskHiInstance : taskHiInstances) {
HistoricTaskInstanceDto dto = new HistoricTaskInstanceDto();
dto.setTaskId(taskHiInstance.getId());
dto.setTaskName(taskHiInstance.getName());
dto.setFinishTime(taskHiInstance.getEndTime());
if (taskHiInstance.getDurationInMillis() != null) {
dto.setDuration(taskHiInstance.getDurationInMillis() / 1000 + "秒");
}
dto.setTaskDefKey(taskHiInstance.getTaskDefinitionKey());
//Map<String,Object> variables = taskHiInstance.getTaskLocalVariables();
Map<String, Object> variables = taskHiInstance.getProcessVariables();
if (null != variables && null != variables.get("approvd")) {
dto.setState(variables.get("approvd").toString());
}
if (StringUtils.isNotBlank(taskHiInstance.getAssignee())) {
if (SystemConstantsOa.OA_TASK_SKIP_ASSIGINE.equals(taskHiInstance.getAssignee())) {
dto.setAssigneeName(taskHiInstance.getAssignee());
} else {
User user1 = userService.findByLoginname(taskHiInstance.getAssignee());
dto.setAssigneeName(user1.getUsername());
}
}
BpmnModel bpmnModel = repositoryService.getBpmnModel(taskchildPicture.getProcessdefinitionid());
// // 根据节点定义id获取节点元素
FlowElement flowElement = bpmnModel.getFlowElement(taskHiInstance.getTaskDefinitionKey());
if (flowElement instanceof UserTask) {
UserTask userTask = (UserTask) flowElement;
taskchildPicture.setDocumentation(userTask.getDocumentation());
}
// 还需要根据 HistoricTaskInstance 找到对应的 审批意见
List<Comment> processInstanceComments = taskService.getProcessInstanceComments(taskchildPicture.getProcessinstanceid());
for (Comment comment : processInstanceComments) {
if (comment.getTaskId().equals(taskHiInstance.getId())) {
// 审批意见
String fullMessage = comment.getFullMessage();
dto.setComment(fullMessage);
}
}
historicTaskInstanceDtos.add(dto);
}
taskchildPicture.setTransferRecords(historicTaskInstanceDtos);
}
}
// for (OcrTaskchildPicture taskchildPicture : list) {
// //查询对应的流程分类
// Category category = categoryService.selectDtoById(taskchildPicture.getCategoryid());
// taskchildPicture.setCategoryDto(category);
//
// if (StringUtils.isNotBlank(taskchildPicture.getProcessdefinitionid())) {
//
// List<Task> taskList = this.nowRunTask(taskchildPicture.getProcessinstanceid(), taskchildPicture.getProcessdefinitionid());
// if (null != taskList && !taskList.isEmpty()) {
// taskchildPicture.setTaskId(taskList.get(0).getId());
//
// Task tasknow = taskService.createTaskQuery().taskId(taskchildPicture.getTaskId()).singleResult();
// BpmnModel bpmnModel = repositoryService.getBpmnModel(tasknow.getProcessDefinitionId());
// // 获取节点定义id
// String taskDefinitionKey = tasknow.getTaskDefinitionKey();
// // 根据节点定义id获取节点元素
// FlowElement flowElement = bpmnModel.getFlowElement(taskDefinitionKey);
// if (flowElement instanceof UserTask) {
// UserTask userTask = (UserTask) flowElement;
//
// taskchildPicture.setDocumentation(userTask.getDocumentation());
// }
// }
//
// //查询历史
// List<HistoricTaskInstanceDto> historicTaskInstanceDtos = new ArrayList<>();
// // 查询当前任务的流转信息
// List<HistoricTaskInstance> taskHiInstances = historyService.createHistoricTaskInstanceQuery()
// .processInstanceId(taskchildPicture.getProcessinstanceid())
// .includeProcessVariables()
// .orderByHistoricTaskInstanceStartTime()
// .asc()
// .list();
// for (HistoricTaskInstance taskHiInstance : taskHiInstances) {
// HistoricTaskInstanceDto dto = new HistoricTaskInstanceDto();
// dto.setTaskId(taskHiInstance.getId());
// dto.setTaskName(taskHiInstance.getName());
// dto.setFinishTime(taskHiInstance.getEndTime());
// if (taskHiInstance.getDurationInMillis() != null) {
// dto.setDuration(taskHiInstance.getDurationInMillis() / 1000 + "秒");
// }
// dto.setTaskDefKey(taskHiInstance.getTaskDefinitionKey());
//
// //Map<String,Object> variables = taskHiInstance.getTaskLocalVariables();
//
// Map<String, Object> variables = taskHiInstance.getProcessVariables();
//
// if (null != variables && null != variables.get("approvd")) {
// dto.setState(variables.get("approvd").toString());
// }
//
// if (StringUtils.isNotBlank(taskHiInstance.getAssignee())) {
// if (SystemConstantsOa.OA_TASK_SKIP_ASSIGINE.equals(taskHiInstance.getAssignee())) {
// dto.setAssigneeName(taskHiInstance.getAssignee());
// } else {
// User user1 = userService.findByLoginname(taskHiInstance.getAssignee());
//
// dto.setAssigneeName(user1.getUsername());
// }
//
// }
//
// BpmnModel bpmnModel = repositoryService.getBpmnModel(taskchildPicture.getProcessdefinitionid());
//
//// // 根据节点定义id获取节点元素
// FlowElement flowElement = bpmnModel.getFlowElement(taskHiInstance.getTaskDefinitionKey());
// if (flowElement instanceof UserTask) {
// UserTask userTask = (UserTask) flowElement;
//
// taskchildPicture.setDocumentation(userTask.getDocumentation());
// }
// // 还需要根据 HistoricTaskInstance 找到对应的 审批意见
// List<Comment> processInstanceComments = taskService.getProcessInstanceComments(taskchildPicture.getProcessinstanceid());
// for (Comment comment : processInstanceComments) {
//
// if (comment.getTaskId().equals(taskHiInstance.getId())) {
// // 审批意见
// String fullMessage = comment.getFullMessage();
// dto.setComment(fullMessage);
// }
// }
// historicTaskInstanceDtos.add(dto);
// }
// taskchildPicture.setTransferRecords(historicTaskInstanceDtos);
// }
// }
pageUtils.setTotalCount(count.intValue());
pageUtils.setList(list);
@ -1292,7 +1302,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
* @param tenantId
* @param pageUtils
*/
public void getMyProcessInstances(User user, String tenantId, Map<String, Object> searchQuery, PageUtils pageUtils, String userSearchId) {
public void getMyProcessInstances(User user, String tenantId, Map<String, Object> searchQuery, PageUtils
pageUtils, String userSearchId) {
ParamterPage paramterPage = new ParamterPage();
paramterPage.setStart((pageUtils.getCurrPage() - 1) * pageUtils.getPageSize());
paramterPage.setPagesize(pageUtils.getPageSize());
@ -1317,14 +1328,14 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
query.put("searchassignee", user.getLoginname());
query.putAll(searchQuery);
// if (!StringUtils.isBlank(userSearchId)) {
// OcrUsersearch ocrUsersearch = ocrUsersearchService.selectByUserSearchId(userSearchId);
// SearchQuery additionalQuery = new SearchQuery();
// for (OcrUsersearchchild usersearchchild : ocrUsersearch.getOcrUsersearchchildList()) {
// this.formattingSearchChild1(additionalQuery, usersearchchild);
// }
// query.putAll(additionalQuery.getQuery());
// }
if (!StringUtils.isBlank(userSearchId)) {
OcrUsersearch ocrUsersearch = ocrUsersearchService.selectByUserSearchId(userSearchId);
SearchQuery additionalQuery = new SearchQuery();
for (OcrUsersearchchild usersearchchild : ocrUsersearch.getOcrUsersearchchildList()) {
this.formattingSearchChild1(additionalQuery, usersearchchild);
}
query.putAll(additionalQuery.getQuery());
}
Long count = ocrTaskchildPictureService.listmytaskCount(query);
@ -1341,91 +1352,91 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
taskchildPicture.setPicture(ocrPictureOne);
taskchildPicture.setFinishTime(ocrPictureOne.getSubmitDateTimestamp());
}
//查询对应的流程分类
Category category = categoryService.selectDtoById(Long.parseLong(taskchildPicture.getCategoryid()));
taskchildPicture.setCategoryDto(category);
if (StringUtils.isNotBlank(taskchildPicture.getProcessdefinitionid())) {
List<Task> taskList = this.nowRunTask(taskchildPicture.getProcessinstanceid(), taskchildPicture.getProcessdefinitionid());
if (null != taskList && !taskList.isEmpty()) {
taskchildPicture.setTaskId(taskList.get(0).getId());
Task tasknow = taskService.createTaskQuery().taskId(taskchildPicture.getTaskId()).singleResult();
BpmnModel bpmnModel = repositoryService.getBpmnModel(tasknow.getProcessDefinitionId());
// 获取节点定义id
String taskDefinitionKey = tasknow.getTaskDefinitionKey();
// 根据节点定义id获取节点元素
FlowElement flowElement = bpmnModel.getFlowElement(taskDefinitionKey);
if (flowElement instanceof UserTask) {
UserTask userTask = (UserTask) flowElement;
taskchildPicture.setDocumentation(userTask.getDocumentation());
}
}
//查询历史
List<HistoricTaskInstanceDto> historicTaskInstanceDtos = new ArrayList<>();
// 查询当前任务的流转信息
List<HistoricTaskInstance> taskHiInstances = historyService.createHistoricTaskInstanceQuery()
.processInstanceId(taskchildPicture.getProcessinstanceid())
.includeProcessVariables()
.orderByHistoricTaskInstanceStartTime()
.asc()
.list();
for (HistoricTaskInstance taskHiInstance : taskHiInstances) {
HistoricTaskInstanceDto dto = new HistoricTaskInstanceDto();
dto.setTaskId(taskHiInstance.getId());
dto.setTaskName(taskHiInstance.getName());
dto.setFinishTime(taskHiInstance.getEndTime());
if (taskHiInstance.getDurationInMillis() != null) {
dto.setDuration(taskHiInstance.getDurationInMillis() / 1000 + "秒");
}
dto.setTaskDefKey(taskHiInstance.getTaskDefinitionKey());
//Map<String,Object> variables = taskHiInstance.getTaskLocalVariables();
Map<String, Object> variables = taskHiInstance.getProcessVariables();
if (null != variables && null != variables.get("approvd")) {
dto.setState(variables.get("approvd").toString());
}
if (StringUtils.isNotBlank(taskHiInstance.getAssignee())) {
if (SystemConstantsOa.OA_TASK_SKIP_ASSIGINE.equals(taskHiInstance.getAssignee())) {
dto.setAssigneeName(taskHiInstance.getAssignee());
} else {
User user1 = userService.findByLoginname(taskHiInstance.getAssignee());
dto.setAssigneeName(user1.getUsername());
}
}
BpmnModel bpmnModel = repositoryService.getBpmnModel(taskchildPicture.getProcessdefinitionid());
// // 根据节点定义id获取节点元素
FlowElement flowElement = bpmnModel.getFlowElement(taskHiInstance.getTaskDefinitionKey());
if (flowElement instanceof UserTask) {
UserTask userTask = (UserTask) flowElement;
taskchildPicture.setDocumentation(userTask.getDocumentation());
}
// 还需要根据 HistoricTaskInstance 找到对应的 审批意见
List<Comment> processInstanceComments = taskService.getProcessInstanceComments(taskchildPicture.getProcessinstanceid());
for (Comment comment : processInstanceComments) {
if (comment.getTaskId().equals(taskHiInstance.getId())) {
// 审批意见
String fullMessage = comment.getFullMessage();
dto.setComment(fullMessage);
}
}
historicTaskInstanceDtos.add(dto);
}
taskchildPicture.setTransferRecords(historicTaskInstanceDtos);
}
//
// //查询对应的流程分类
// Category category = categoryService.selectDtoById(Long.parseLong(taskchildPicture.getCategoryid()));
// taskchildPicture.setCategoryDto(category);
//
// if (StringUtils.isNotBlank(taskchildPicture.getProcessdefinitionid())) {
//
// List<Task> taskList = this.nowRunTask(taskchildPicture.getProcessinstanceid(), taskchildPicture.getProcessdefinitionid());
// if (null != taskList && !taskList.isEmpty()) {
// taskchildPicture.setTaskId(taskList.get(0).getId());
//
// Task tasknow = taskService.createTaskQuery().taskId(taskchildPicture.getTaskId()).singleResult();
// BpmnModel bpmnModel = repositoryService.getBpmnModel(tasknow.getProcessDefinitionId());
// // 获取节点定义id
// String taskDefinitionKey = tasknow.getTaskDefinitionKey();
// // 根据节点定义id获取节点元素
// FlowElement flowElement = bpmnModel.getFlowElement(taskDefinitionKey);
// if (flowElement instanceof UserTask) {
// UserTask userTask = (UserTask) flowElement;
//
// taskchildPicture.setDocumentation(userTask.getDocumentation());
// }
// }
//
// //查询历史
// List<HistoricTaskInstanceDto> historicTaskInstanceDtos = new ArrayList<>();
// // 查询当前任务的流转信息
// List<HistoricTaskInstance> taskHiInstances = historyService.createHistoricTaskInstanceQuery()
// .processInstanceId(taskchildPicture.getProcessinstanceid())
// .includeProcessVariables()
// .orderByHistoricTaskInstanceStartTime()
// .asc()
// .list();
// for (HistoricTaskInstance taskHiInstance : taskHiInstances) {
// HistoricTaskInstanceDto dto = new HistoricTaskInstanceDto();
// dto.setTaskId(taskHiInstance.getId());
// dto.setTaskName(taskHiInstance.getName());
// dto.setFinishTime(taskHiInstance.getEndTime());
// if (taskHiInstance.getDurationInMillis() != null) {
// dto.setDuration(taskHiInstance.getDurationInMillis() / 1000 + "秒");
// }
// dto.setTaskDefKey(taskHiInstance.getTaskDefinitionKey());
//
// //Map<String,Object> variables = taskHiInstance.getTaskLocalVariables();
//
// Map<String, Object> variables = taskHiInstance.getProcessVariables();
//
// if (null != variables && null != variables.get("approvd")) {
// dto.setState(variables.get("approvd").toString());
// }
//
// if (StringUtils.isNotBlank(taskHiInstance.getAssignee())) {
// if (SystemConstantsOa.OA_TASK_SKIP_ASSIGINE.equals(taskHiInstance.getAssignee())) {
// dto.setAssigneeName(taskHiInstance.getAssignee());
// } else {
// User user1 = userService.findByLoginname(taskHiInstance.getAssignee());
//
// dto.setAssigneeName(user1.getUsername());
// }
//
// }
//
// BpmnModel bpmnModel = repositoryService.getBpmnModel(taskchildPicture.getProcessdefinitionid());
//
//// // 根据节点定义id获取节点元素
// FlowElement flowElement = bpmnModel.getFlowElement(taskHiInstance.getTaskDefinitionKey());
// if (flowElement instanceof UserTask) {
// UserTask userTask = (UserTask) flowElement;
//
// taskchildPicture.setDocumentation(userTask.getDocumentation());
// }
// // 还需要根据 HistoricTaskInstance 找到对应的 审批意见
// List<Comment> processInstanceComments = taskService.getProcessInstanceComments(taskchildPicture.getProcessinstanceid());
// for (Comment comment : processInstanceComments) {
//
// if (comment.getTaskId().equals(taskHiInstance.getId())) {
// // 审批意见
// String fullMessage = comment.getFullMessage();
// dto.setComment(fullMessage);
// }
// }
// historicTaskInstanceDtos.add(dto);
// }
// taskchildPicture.setTransferRecords(historicTaskInstanceDtos);
// }
}
pageUtils.setTotalCount(count.intValue());
@ -1499,7 +1510,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
* @param tenantId
* @param pageUtils
*/
public List<OcrTaskchildPictureAppro> getMyProcessInstancesNew(User user, String tenantId, Map<String, Object> searchQuery, PageUtils pageUtils) {
public List<OcrTaskchildPictureAppro> getMyProcessInstancesNew(User user, String
tenantId, Map<String, Object> searchQuery, PageUtils pageUtils) {
ParamterPage paramterPage = new ParamterPage();
paramterPage.setStart((pageUtils.getCurrPage() - 1) * pageUtils.getPageSize());
paramterPage.setPagesize(pageUtils.getPageSize());
@ -1644,7 +1656,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
*
* @return
*/
public IPage<FlowUnionVo> getMyListCc(Map<String, Object> query, UserToken userToken, ParamterPage paramterPage) {
public IPage<FlowUnionVo> getMyListCc(Map<String, Object> query, UserToken userToken, ParamterPage
paramterPage) {
//查询抄送给当前用户的fromid集合
QueryWrapper queryWrapper = new QueryWrapper();
@ -1816,7 +1829,22 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
@Override
public ResultVo repetitionTask() {
return ResultVoUtil.success(flowableccMybatisDao.repetitionTask());
List<RepeatedContentVo> repeatedContentVoList = flowableccMybatisDao.repetitionTask();
List<String> formIdsToUpdate = new ArrayList<>();
if (repeatedContentVoList.size() > 0 && repeatedContentVoList.get(0).getRepeatedTaskList().size() > 0) {
String formIds = repeatedContentVoList.get(0).getRepeatedTaskList().get(0).getFormId();
String[] formIdsArray = formIds.split(",");
for (String formId : formIdsArray) {
formIdsToUpdate.add(formId.trim()); // 去除字符串首尾的空格并添加到集合中
}
UpdateWrapper<OcrTaskchildPicture> updateWrapper = new UpdateWrapper<>();
updateWrapper.in("PICTUREID", formIdsToUpdate)
.eq("is_repeated_nodules", 0);
OcrTaskchildPicture updateEntity = new OcrTaskchildPicture();
updateEntity.setIsRepeatedNodules(1);
ocrTaskchildPictureService.update(updateEntity, updateWrapper);
}
return ResultVoUtil.success(repeatedContentVoList);
}
@Override
@ -1833,7 +1861,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
* @param usersearchchild
* @return
*/
private QueryWrapper<OcrTaskchildPicture> formattingSearchChild(QueryWrapper<OcrTaskchildPicture> queryWrapper, OcrUsersearchchild usersearchchild) {
private QueryWrapper<OcrTaskchildPicture> formattingSearchChild
(QueryWrapper<OcrTaskchildPicture> queryWrapper, OcrUsersearchchild usersearchchild) {
switch (usersearchchild.getSearchRelationType()) {
case "where":
this.formattingSearchType(queryWrapper, usersearchchild);
@ -1857,7 +1886,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
* @param usersearchchild
* @return
*/
private QueryWrapper<OcrTaskchildPicture> formattingSearchType(QueryWrapper<OcrTaskchildPicture> queryWrapper, OcrUsersearchchild usersearchchild) {
private QueryWrapper<OcrTaskchildPicture> formattingSearchType
(QueryWrapper<OcrTaskchildPicture> queryWrapper, OcrUsersearchchild usersearchchild) {
//查询类型 相等true 不相等fase
boolean queryType = "eq".equals(usersearchchild.getSearchtype());
@ -1953,132 +1983,134 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
return queryWrapper;
}
// private SearchQuery formattingSearchChild1(SearchQuery searchQuery, OcrUsersearchchild usersearchchild) {
// switch (usersearchchild.getSearchRelationType()) {
// case "where":
// // 添加 "where" 查询条件
// this.formattingSearchType1(searchQuery, usersearchchild);
// break;
// case "and":
// // 添加 "and" 查询条件
// searchQuery.addRulesOp(usersearchchild.getSearchfield(),"and");
// SearchQuery andQuery = this.formattingSearchType1(searchQuery, usersearchchild);
// searchQuery.setSearchQuery(andQuery);
// break;
// case "or":
// // 添加 "or" 查询条件
// searchQuery.addRulesOp(usersearchchild.getSearchfield(),"or");
// SearchQuery orQuery = this.formattingSearchType1(searchQuery, usersearchchild);
// searchQuery.setSearchQuery(orQuery);
// break;
// default:
// break;
// }
// return searchQuery;
// }
//
// private SearchQuery formattingSearchType1(SearchQuery searchQuery, 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) {
// searchQuery.addIn(usersearchchild.getSearchfield(), arrayData);
// break;
// }
// //不相等
// searchQuery.addNotIn(usersearchchild.getSearchfield(), arrayData);
// break;
//
// case "section":
// //数字区间查询
// if (sectionInts != null && sectionInts.size() == 2) {
// if (queryType) {
// //相等
// searchQuery.addGreaterEqual(usersearchchild.getSearchfield(), sectionInts.get(0));
// searchQuery.addLessEqual(usersearchchild.getSearchfield(), sectionInts.get(1));
// break;
// }
// //不相等
// searchQuery.addLess(usersearchchild.getSearchfield(), sectionInts.get(0));
// searchQuery.addGreater(usersearchchild.getSearchfield(), sectionInts.get(1));
// break;
// }
//
// //字符串区间查询
// if (queryType) {
// //相等
// searchQuery.addGreaterEqual(usersearchchild.getSearchfield(), sections[0]);
// searchQuery.addLessEqual(usersearchchild.getSearchfield(), sections[1]);
// break;
// }
// //不相等
// searchQuery.addLess(usersearchchild.getSearchfield(), sections[0]);
// searchQuery.addGreater(usersearchchild.getSearchfield(), sections[1]);
// break;
//
//
// case "time":
// //时间区间数据
// //相等
// if (queryType) {
// searchQuery.addGreaterEqual(usersearchchild.getSearchfield(), beginTime);
// searchQuery.addLessEqual(usersearchchild.getSearchfield(), endTime);
// break;
// }
// //不相等
// searchQuery.addLess(usersearchchild.getSearchfield(), beginTime);
// searchQuery.addGreater(usersearchchild.getSearchfield(), endTime);
// break;
//
// default:
// if (queryType) {
// searchQuery.addEqual(usersearchchild.getSearchfield(), usersearchchild.getSearchvalue());
// break;
// }
// searchQuery.addNotEqual(usersearchchild.getSearchfield(), usersearchchild.getSearchvalue());
// }
// return searchQuery;
// }
private SearchQuery formattingSearchChild1(SearchQuery searchQuery, OcrUsersearchchild usersearchchild) {
switch (usersearchchild.getSearchRelationType()) {
case "where":
// 添加 "where" 查询条件
this.formattingSearchType1(searchQuery, usersearchchild);
break;
case "and":
// 添加 "and" 查询条件
searchQuery.addRulesOp(usersearchchild.getSearchfield(), "and");
SearchQuery andQuery = this.formattingSearchType1(searchQuery, usersearchchild);
searchQuery.setSearchQuery(andQuery);
break;
case "or":
// 添加 "or" 查询条件
searchQuery.addRulesOp(usersearchchild.getSearchfield(), "or");
SearchQuery orQuery = this.formattingSearchType1(searchQuery, usersearchchild);
searchQuery.setSearchQuery(orQuery);
break;
default:
break;
}
return searchQuery;
}
private SearchQuery formattingSearchType1(SearchQuery searchQuery, 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] + " 00:00:00", "yyyy/MM/dd HH:mm:ss");
endTime = DateUtil.parse(times[1] + " 23:59:59", "yyyy/MM/dd HH:mm:ss");
break;
default:
}
// 3.根据查询类型 组装查询条件 相等
switch (valueType) {
case "array":
//集合数据
//相等
if (queryType) {
searchQuery.addIn(usersearchchild.getSearchfield(), arrayData);
break;
}
//不相等
searchQuery.addNotIn(usersearchchild.getSearchfield(), arrayData);
break;
case "section":
//数字区间查询
if (sectionInts != null && sectionInts.size() == 2) {
if (queryType) {
//相等
searchQuery.addGreaterEqual(usersearchchild.getSearchfield(), sectionInts.get(0));
searchQuery.addLessEqual(usersearchchild.getSearchfield(), sectionInts.get(1));
break;
}
//不相等
searchQuery.addLess(usersearchchild.getSearchfield(), sectionInts.get(0));
searchQuery.addGreater(usersearchchild.getSearchfield(), sectionInts.get(1));
break;
}
//字符串区间查询
if (queryType) {
//相等
searchQuery.addGreaterEqual(usersearchchild.getSearchfield(), sections[0]);
searchQuery.addLessEqual(usersearchchild.getSearchfield(), sections[1]);
break;
}
//不相等
searchQuery.addLess(usersearchchild.getSearchfield(), sections[0]);
searchQuery.addGreater(usersearchchild.getSearchfield(), sections[1]);
break;
case "time":
//时间区间数据
//相等
if (queryType) {
searchQuery.addGreaterEqual(usersearchchild.getSearchfield() + "Start", beginTime.getTime());
searchQuery.addLessEqual(usersearchchild.getSearchfield() + "End", endTime.getTime());
break;
}
//不相等
searchQuery.addRulesOp(usersearchchild.getSearchfield() + "Start", "or");
searchQuery.addLess(usersearchchild.getSearchfield() + "Start", beginTime.getTime());
searchQuery.addGreater(usersearchchild.getSearchfield() + "End", endTime.getTime());
break;
default:
if (queryType) {
searchQuery.addEqual(usersearchchild.getSearchfield(), usersearchchild.getSearchvalue());
break;
}
searchQuery.addNotEqual(usersearchchild.getSearchfield(), usersearchchild.getSearchvalue());
}
return searchQuery;
}
}

@ -9,6 +9,7 @@ import cn.jyjz.xiaoyao.oa.from.dataobject.Userapprove;
import cn.jyjz.xiaoyao.oa.from.service.UserapproveService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.flowable.task.api.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -29,10 +30,11 @@ public class UserapproveServiceImpl extends BaseServiceImpl<UserapproveMybatisDa
userapprove.setFormid(Long.parseLong(formId));
userapprove.setTaskname(taskd.getName());
userapprove.setTaskcomment(approve.getComment());
userapprove.setTaskindex(StringUtils.isBlank(taskd.getDescription()) ?0:Integer.parseInt(taskd.getDescription()));
userapprove.setCreatedate(System.currentTimeMillis());
userapprove.setUsername(userToken.getUsername());
userapprove.setReason(approve.getFailCauseName());
userapprove.setReason(approve.getDisposeType());
userapprove.setProcessMethod(approve.getDisposeType());
if (approve.getResult()) {
userapprove.setStatshis(2);
} else {

@ -19,4 +19,18 @@ public interface PrevailCloudApi {
* @return
*/
ApiPage<PictureSourceResult> pullPictureSource(PictureSourceParameter pictureSourceParameter) throws Exception;
void sendFlowTaskResult(String tenantId,String data) throws Exception;
/**
* id
* @param tenantNo
*/
void pullAccountInfo(long tenantNo) throws Exception;
/**
*
*/
boolean startImageDownloadMonitoring(String localImagePath) throws Exception;
}

@ -2,17 +2,23 @@ package cn.jyjz.xiaoyao.ocr.api.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONUtil;
import cn.jyjz.xiaoyao.common.base.util.SpringUtils;
import cn.jyjz.xiaoyao.ocr.api.PrevailCloudApi;
import cn.jyjz.xiaoyao.ocr.api.entity.PictureSourceParameter;
import cn.jyjz.xiaoyao.ocr.api.entity.PictureSourceResult;
import cn.jyjz.xiaoyao.ocr.api.utils.*;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.thread.TaskQueue;
import cn.jyjz.xiaoyao.ocr.thread.entity.PictureImgToLocalEntity;
import cn.jyjz.xiaoyao.ocr.util.httputil.HttpClient;
import cn.jyjz.xiaoyao.ocr.util.httputil.HttpMethod;
import cn.jyjz.xiaoyao.ocr.util.httputil.HttpParamers;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import liquibase.pro.packaged.S;
import lombok.SneakyThrows;
import org.apache.commons.collections.SequencedHashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -48,6 +54,11 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
*/
private String pictureSourceUrl = "/pangu/jingwei/ocr/query/pb/task/pageList";
/**
*
*/
private String sendResultUrl = "/pangu/jingwei/thirdclient/command/pb/approval/result";
/**
*
*/
@ -116,4 +127,96 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
return null;
}
@Override
public void sendFlowTaskResult(String tenantId, String data) throws Exception {
ResultData<String> stringResultData = ApiHelper.buildResponse(apiConfig.getAccessCode(), data);
// RequestData requestData = ApiHelper.buildRequest(tenantId, apiConfig.getAccessKey(), apiConfig.getAccessCode(),data);//组装请求参数
String url = apiConfig.getInterfaceDomain()+sendResultUrl;
String requestBodyJson = JSONObject.toJSONString(stringResultData);
//入参
System.out.println("入参数据:"+requestBodyJson);
HttpParamers httpParamers = new HttpParamers(HttpMethod.POST);
httpParamers.setJsonParamer(requestBodyJson);
//发起请求
String responseJsonStr = HttpClient.doPost(url,httpParamers,null,apiConfig.getConnectTimeout(),apiConfig.getReadTimeout());
System.out.println(responseJsonStr);
}
@Override
public void pullAccountInfo(long tenantNo) throws Exception {
Map<String, Object> queryParam = new HashMap<>();
queryParam.put("tenantNo",tenantNo);
String json = JSONObject.toJSONString(queryParam);
RequestData requestData = ApiHelper.buildRequest(tenantNo+"", apiConfig.getAccessKey(), apiConfig.getAccessCode(),json);
String url = apiConfig.getInterfaceDomain()+tenantSourceUrl;
String requestBodyJson = JSONObject.toJSONString(requestData);
//入参
HttpParamers httpParamers = new HttpParamers(HttpMethod.POST);
httpParamers.setJsonParamer(requestBodyJson);
//发起请求
String responseJsonStr = HttpClient.doPost(url,httpParamers,null,apiConfig.getConnectTimeout(),apiConfig.getReadTimeout());
System.out.println(responseJsonStr);
ResultData<String> resultData =JSONUtil.toBean(responseJsonStr,ResultData.class);
if(resultData.getStatus()==100){;
//解析基础数据
String data = ApiHelper.decryptResponse(apiConfig.getAccessCode(), resultData);
ApiPage<String> apiPage = JSONUtil.toBean(data,ApiPage.class);
System.out.println(apiPage);
//解析数据结果为List
// List<PictureSourceResult> listResult = JSONUtil.toList(JSONObject.toJSONString(apiPage.getRecords()),PictureSourceResult.class);
// ApiPage<PictureSourceResult> resultApiPage = new ApiPage<>();
// resultApiPage.setPageNo(apiPage.getPageNo());
// resultApiPage.setPageSize(apiPage.getPageSize());
// resultApiPage.setTotal(apiPage.getTotal());
// resultApiPage.setRecords(listResult);
// return resultApiPage;
}
}
/**
*
*
* @return
*/
@Override
public boolean startImageDownloadMonitoring(String localImagePath) {
Runnable runnable = new Runnable() {
@SneakyThrows
@Override
public void run() {
OcrPictureService ocrPictureService = SpringUtils.getBean("ocrPictureService");
logger.debug("图片下载监测中...");
// 查询数据库中local_picture_url字段为null的图片数据
LambdaQueryWrapper<OcrPicture> ocrPictureLambdaQueryWrapper = new LambdaQueryWrapper<>();
ocrPictureLambdaQueryWrapper.isNull(OcrPicture::getLocalpictrueurl);
List<OcrPicture> ocrPictureList = new ArrayList<>();
ocrPictureList = ocrPictureService.list(ocrPictureLambdaQueryWrapper);
logger.debug("待执行下载图片数量:{}",ocrPictureList.size());
for (OcrPicture pictureOne : ocrPictureList) {
// 创建 PictureImgToLocalEntity 对象并赋值
PictureImgToLocalEntity entity = new PictureImgToLocalEntity();
entity.setPictureId(pictureOne.getId());
entity.setImgUrl(pictureOne.getImgurl());
String imgurl = pictureOne.getImgurl();
entity.setLocalPath(localImagePath + imgurl.substring(imgurl.lastIndexOf("/")));
//本地调试下载地址
// entity.setLocalPath("D:\\server\\data\\images" + imgurl.substring(imgurl.lastIndexOf("/")));
// 将对象添加到下载图片队列中
boolean isAddedToQueue = false;
while (!isAddedToQueue) {
isAddedToQueue =TaskQueue.pictureImgToLocalPushData(entity);
if (!isAddedToQueue) {
logger.info("图片下载监测-添加队列失败,等待五秒后继续进行添加,图片id:{}",entity.getPictureId());
Thread.sleep(5000);
}
}
}
}
};
Thread thread = new Thread(runnable);
thread.start();
return true;
}
}

@ -23,34 +23,31 @@ public class ApiConfig {
/**
*
*/
@Value("${ocr.api.wly.interface-domain}")
private String interfaceDomain;
/**
*
*/
@Value("${ocr.api.wly.accessKey}")
private String accessKey;
/**
*
*/
@Value("${ocr.api.wly.accessCode}")
private String accessCode;
/**
* 5
*/
@Value("${ocr.api.wly.connectTimeout}")
private Integer connectTimeout = 5000;
/**
* 1
*/
@Value("${ocr.api.wly.readTimeout}")
private Integer readTimeout = 60000;
private String localImagePath;
/**
*
* @return

@ -1,18 +1,26 @@
package cn.jyjz.xiaoyao.ocr.controller;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.jyjz.xiaoyao.ocr.api.PrevailCloudApi;
import cn.jyjz.xiaoyao.ocr.api.entity.PictureSourceParameter;
import cn.jyjz.xiaoyao.ocr.api.entity.PictureSourceResult;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiConfig;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiPage;
import cn.jyjz.xiaoyao.ocr.thread.ImageDownloadMonitoring;
import cn.jyjz.xiaoyao.ocr.thread.TaskQueue;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -23,9 +31,14 @@ import java.util.List;
* @version 1.0
* @date 2024/3/14 19:47
*/
@Slf4j
@RestController
@RequestMapping("/test/api")
public class ApiTestController {
@Resource
private ApiConfig apiConfig;
@Autowired
private PrevailCloudApi prevailCloudApi;
@ -71,4 +84,128 @@ public class ApiTestController {
return "处理失败";
}
@GetMapping("pullAccountInfo")
public String pullAccountInfo(HttpServletRequest request){
try {
prevailCloudApi.pullAccountInfo(1714548920583360512L);
return "ok";
} catch (Exception e) {
e.printStackTrace();
}
return "处理失败";
}
@GetMapping("psTest01")
public String psTset01(HttpServletRequest request){
String beginStr = request.getParameter("beginStr");
String endStr = request.getParameter("endStr");
String pageSize = request.getParameter("pageSize");
String pageNo = request.getParameter("pageNo");
PictureSourceParameter pictureSourceParameter = new PictureSourceParameter();
pictureSourceParameter.setPageSize(Integer.parseInt(pageSize));
pictureSourceParameter.setTenantNo(1714548920583360512L);
pictureSourceParameter.setAccountNo(1714887674875514880L);
List<String> notAddedToQueueTaskIds = new ArrayList<>();
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
int totalCount = 0;
int totalLocalCount = 0;
int totalSize = 0;
DateTime startDate = DateUtil.parse(beginStr + " 00:00:00", "yyyy-MM-dd HH:mm:ss");
DateTime endDate = DateUtil.parse(endStr + " 23:59:59", "yyyy-MM-dd HH:mm:ss");
while (startDate.isBefore(endDate) || startDate.compareTo(endDate) == 0) {
int currentPage = Integer.parseInt(pageNo);
boolean hasNextPage = true;
boolean isCountAdded = false;
while (hasNextPage) {
// 设置当天的开始和结束时间
Instant startInstant = startDate.toInstant();
Instant endInstant = startDate.offsetNew(DateField.DAY_OF_YEAR, 1).toInstant();
pictureSourceParameter.setStartTime(Date.from(startInstant));
pictureSourceParameter.setEndTime(Date.from(endInstant));
pictureSourceParameter.setPageNo(currentPage);
ApiPage<PictureSourceResult> apiPage = prevailCloudApi.pullPictureSource(pictureSourceParameter);
List<PictureSourceResult> listResult = apiPage.getRecords();
int count = apiPage.getTotal();
int localCount = listResult.size();
int size = 0;
for (PictureSourceResult pictureSourceResult : listResult) {
int retryCount = 0;
boolean addedToQueue = false;
if (pictureSourceResult.getLivePhoto() != null && !pictureSourceResult.getLivePhoto().isEmpty()) {
size++;
// 尝试将数据加入队列
while (!addedToQueue && retryCount < 5) { // 最多重试5次
addedToQueue = TaskQueue.pictureDisposePushData(pictureSourceResult);
if (!addedToQueue) {
Thread.sleep(60000);
retryCount++;
}
}
if (!addedToQueue) {
log.error("无法将数据添加到队列,开始时间:{}任务ID{}",startDate.toString("yyyy-MM-dd HH:mm:ss"),pictureSourceResult.getTaskId().toString());
notAddedToQueueTaskIds.add(pictureSourceResult.getTaskId().toString());
}
}
}
totalLocalCount += localCount;
totalSize += size;
if (!isCountAdded) {
totalCount += count;
isCountAdded = true; // 标记当天的统计信息已经被累加过了
}
// 输出当前日期范围内的统计信息
log.error("{}图片总数:{}条,本次获取:{}条,可处理数据:{}条",startDate.toString("yyyy-MM-dd"),count,localCount,size);
// 准备处理下一页的数据
currentPage++;
// 检查是否有下一页
if (localCount < Integer.parseInt(pageSize)) {
hasNextPage = false;
}
}
// 准备处理下一天的数据
startDate = startDate.offsetNew(DateField.DAY_OF_YEAR, 1);
}
log.error("未加入队列的任务ID列表{}",notAddedToQueueTaskIds);
log.error("当前区间内图片总数:{}条,本次获取:{}条,可处理数据:{}条",totalCount,totalLocalCount,totalSize);
} catch (Exception e) {
e.printStackTrace();
}
}
});
thread.start();
return "开启入库";
}
@GetMapping("downloadImageMonitor")
public String downloadImageMonitor(HttpServletRequest request) {
String message;
try {
boolean result = prevailCloudApi.startImageDownloadMonitoring(apiConfig.getLocalImagePath());
if (result) {
message = "操作成功";
} else {
message = "操作失败";
}
} catch (Exception e) {
e.printStackTrace();
message = "操作失败,发生异常:" + e.getMessage();
}
return message;
}
}

@ -66,6 +66,28 @@ public class OcrAiApprovalTools {
return toolscount;
}
/**
*
*
* @param request
* @return
*/
@RequestMapping(value = "/toolsTaskApprovalCount", method = RequestMethod.GET)
public ResultVo toolsTaskApprovalCount(HttpServletRequest request) {
String tenantId = request.getHeader("X-Tenant-Id");
if(StringUtils.isBlank(tenantId)){
return ResultVoUtil.error("租户主键不能为空");
}
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
ResultVo toolscount = iocrsearchhistoryservice.toolsTaskApprovalCount(tenantId,userToken.getUserid(),request);
return toolscount;
}
/*
ai
*/

@ -81,7 +81,11 @@ public class OcrCheckDuplicateController {
}
//调用查询参数解析方法解析为queryWrapper
queryWrapper = SearchParaFormatting.searchParaParse(queryWrapper, paraMap);
//提报人模糊搜索
String upUserName = req.getParameter("upUserName");
if(StringUtils.isNotBlank(upUserName)){
queryWrapper.like("upName",upUserName);
}
queryWrapper.eq("tenant_id", tenantId);
queryWrapper.eq("suspiciousfile", "0");
queryWrapper.orderBy(true,true,"submit_date_timestamp");
@ -114,6 +118,9 @@ public class OcrCheckDuplicateController {
OcrCheckDuplicate dto = this.ocrCheckDuplicateService.getCheckDuplicateStatus(checkDuplicateNo);
if (null != dto) {
if(dto.getStatus()==2){
return ResultVoUtil.success("查重任务执行完毕",dto);
}
return ResultVoUtil.success(dto);
} else {
return ResultVoUtil.error();

@ -1,20 +1,43 @@
package cn.jyjz.xiaoyao.ocr.controller;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.jyjz.xiaoyao.admin.dataobject.Post;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.util.RequestBaseUtil;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.common.mybatisplus.util.SearchQueryFormat;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrField;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrUsersearch;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrUsersearchchild;
import cn.jyjz.xiaoyao.ocr.dto.OcrFieldDto;
import cn.jyjz.xiaoyao.ocr.service.OcrFieldService;
import cn.jyjz.xiaoyao.ocr.vo.OcrFieldVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import liquibase.pro.packaged.S;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@RestController
@RequestMapping("/ocr/field")
@ -25,6 +48,10 @@ public class OcrFieldController extends BaseController {
@Autowired
private OcrFieldService ocrFieldService;
@Autowired
private UserService userService;
/**
*
* @return
@ -39,6 +66,32 @@ public class OcrFieldController extends BaseController {
return resultVo;
}
/**
*
* @return
*/
@ApiOperation(value="根据评审类型查询字段列表", notes="根据评审类型查询字段列表")
@GetMapping(value = "/page")
public ResultVo<IPage<OcrField>> page(@RequestParam(name="start", defaultValue="1") Integer start,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest request) {
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
cn.jyjz.xiaoyao.admin.dataobject.User user = this.userService.getSessionUser(request);
OcrField ocrField = new OcrField();
ocrField.setSearchQueryrolesShowleave(user.getSearchQueryrolesShowleave());
QueryWrapper<OcrField> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrField);
ResultVo<IPage<OcrField>> resultVo = new ResultVo<>();
ParamterPage paramterPage = new ParamterPage();
paramterPage.setPagesize(pageSize);
paramterPage.setStart(start);
IPage<OcrField> ocrFieldIPage = ocrFieldService.pageList(paramterPage,queryWrapper);
resultVo.setData(ocrFieldIPage);
resultVo.addOK("查询成功");
return resultVo;
}
/**
*
* @return
@ -59,13 +112,21 @@ public class OcrFieldController extends BaseController {
*/
@ApiOperation(value="删除筛选字段", notes="删除筛选字段")
@GetMapping(value = "/delete")
public ResultVo delete(@RequestParam(name="id") @ApiParam(value = "字段ID", required = true) Long id) {
public ResultVo delete(@RequestParam(name="id") @ApiParam(value = "字段ID", required = true) String ids) {
List<OcrField> ocrFields = ocrFieldService.listByIds(Arrays.asList(ids.split(",")));
List<OcrField> newOcrField = ocrFields.stream().peek(s -> {
s.setUpdateTime(DateUtil.date().toSqlDate());
s.setDel(1);
}).collect(Collectors.toList());
ocrFieldService.updateBatchById(newOcrField);
return ResultVoUtil.success();
}
OcrFieldDto ocrFieldDto = ocrFieldService.delete(id);
if(ocrFieldDto != null){
return ResultVoUtil.success();
}
return ResultVoUtil.error("删除失败");
@ApiOperation(value="详情", notes="详情")
@GetMapping(value = "/getData/{id}")
public ResultVo getData(@PathVariable(name="id") @ApiParam(value = "字段ID", required = true) Long id) {
return ResultVoUtil.success(ocrFieldService.getById(id));
}
/**
@ -74,14 +135,9 @@ public class OcrFieldController extends BaseController {
*/
@ApiOperation(value="字段新增和修改", notes="字段新增和修改")
@PostMapping(value = "/saveOrUpdate")
public ResultVo saveOrUpdate(@ApiParam(value = "字段信息", required = true) @RequestBody OcrFieldVo ocrFieldVo) {
public ResultVo saveOrUpdate(@ApiParam(value = "字段信息", required = true) OcrFieldVo ocrFieldVo) {
try {
OcrField ocrField = new OcrField();
ocrField.setName(ocrFieldVo.getName());
ocrField.setReviewType(ocrFieldVo.getReviewType());
ocrField.setFieldDesc(ocrFieldVo.getFieldDesc());
ocrField.setIsrequired(ocrFieldVo.getIsrequired());
ocrFieldService.saveData(ocrField);
return ocrFieldService.saveData(BeanUtil.copyProperties(ocrFieldVo,OcrField.class));
} catch (BeansException e) {
e.printStackTrace();
}

@ -0,0 +1,57 @@
package cn.jyjz.xiaoyao.ocr.controller;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import cn.jyjz.xiaoyao.ocr.service.OcrConfigurationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("/backstage/oa/ocrfieldconfigurationHtml")
public class OcrFieldHtmlController extends BaseController{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private OcrConfigurationService ocrConfigurationService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private UserService userService;
/**
*
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@GetMapping("/toList")
public String toListOcrConfiguration(HttpServletResponse response,HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
return "/backstage/oa/ocr/information/list";
}
@GetMapping("/toSave")
public String toSave(HttpServletResponse response,HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
return "/backstage/oa/ocr/information/add";
}
@GetMapping("/toEdit/{id}")
public String toEdit(HttpServletResponse response,HttpServletRequest request,@PathVariable("id") String id){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
request.setAttribute("id", id);
return "/backstage/oa/ocr/information/edit";
}
}

@ -0,0 +1,55 @@
package cn.jyjz.xiaoyao.ocr.controller;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiConfig;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrFrontConf;
import cn.jyjz.xiaoyao.ocr.service.OcrFrontConfService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@Api(tags = "ocr-前端配置管理")
@RestController
@RequestMapping("/ocr/ocrFrontConf")
public class OcrFrontConfController {
@Resource
private OcrFrontConfService service;
@Value("${spring.profiles.active}")
private String env;
@Resource
private ApiConfig config;
@PostMapping("/save")
public ResultVo editOcrConfiguration(OcrFrontConf conf) {
conf.setEnv(env);
QueryWrapper<OcrFrontConf> wrapper = new QueryWrapper<>();
wrapper.eq("env", env);
OcrFrontConf ocrFrontConf = this.service.getOne(wrapper);
if (ocrFrontConf != null) {
conf.setId(ocrFrontConf.getId());
}
this.service.saveOrUpdate(conf);
this.service.updateConfig();
return ResultVoUtil.success();
}
@GetMapping("/get")
public ResultVo<OcrFrontConf> get() {
QueryWrapper<OcrFrontConf> wrapper = new QueryWrapper<>();
wrapper.eq("env", env);
return ResultVoUtil.success(this.service.getOne(wrapper));
}
}

@ -0,0 +1,21 @@
package cn.jyjz.xiaoyao.ocr.controller;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("/backstage/oa/frontconf")
public class OcrFrontConfHtmlController extends BaseController {
@GetMapping("/toList")
public String toListOcrConfiguration(HttpServletResponse response, HttpServletRequest request) {
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid", resourceid);
return "/backstage/oa/ocr/frontconf/list";
}
}

@ -3,6 +3,7 @@ package cn.jyjz.xiaoyao.ocr.controller;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -20,6 +21,7 @@ import cn.jyjz.xiaoyao.ocr.util.DataUtil;
import cn.jyjz.xiaoyao.ocr.util.SearchConfigEnum;
import cn.jyjz.xiaoyao.ocr.util.SearchParaFormatting;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@ -265,7 +267,6 @@ public class OcrPictureController extends BaseController {
}
QueryWrapper<OcrPicture> queryWrapper = new QueryWrapper<>();
String search_month = req.getParameter("search_month");
@ -295,8 +296,8 @@ public class OcrPictureController extends BaseController {
//提报人模糊搜索
String upUserName = req.getParameter("upUserName");
if(StringUtils.isNotBlank(upUserName)){
queryWrapper.like("upName",upUserName);
if (StringUtils.isNotBlank(upUserName)) {
queryWrapper.like("upName", upUserName);
}
//根据参数枚举获取检索参数并映射为数据库的字段的key-v map
@ -313,6 +314,34 @@ public class OcrPictureController extends BaseController {
queryWrapper.eq("tenant_id", tenantId);
Page<OcrPicture> page = new Page<OcrPicture>(pageNo, pageSize);
IPage<OcrPicture> pageList = ocrPictureService.page(page, queryWrapper);
List<OcrPicture> ocrPictures = pageList.getRecords();
List<OcrPicture> ocrPicturesNew = new ArrayList<>();
for (OcrPicture ocrPictureOne : ocrPictures) {
LambdaQueryWrapper<OcrTaskchildPicture> ocrTaskchildPictureLambdaQueryWrapper = new LambdaQueryWrapper<>();
ocrTaskchildPictureLambdaQueryWrapper.eq(OcrTaskchildPicture::getId, ocrPictureOne.getTaskchildpictureid());
OcrTaskchildPicture ocrTaskchildPicture = ocrTaskchildPictureService.getOne(ocrTaskchildPictureLambdaQueryWrapper);
if(ocrTaskchildPicture != null && ocrTaskchildPicture.getStates() != null){
switch (ocrTaskchildPicture.getStates()) {
case 1:
ocrPictureOne.setField16("未提交");
break;
case 2:
ocrPictureOne.setField16("审批中");
break;
case 3:
ocrPictureOne.setField16("审批通过");
break;
case 5:
ocrPictureOne.setField16("审批不通过");
break;
default:
ocrPictureOne.setField16("未知状态");
break;
}
}
ocrPicturesNew.add(ocrPictureOne);
}
pageList.setRecords(ocrPicturesNew);
return ResultVoUtil.success(pageList);
}
@ -403,7 +432,7 @@ public class OcrPictureController extends BaseController {
@RequestParam(name = "pictureId", required = false) String pictureId,
HttpServletRequest req) {
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(req));
OcrPicture result = ocrPictureService.getPackagePictureInfo(checkDuplicateId, pictureId,userToken);
OcrPicture result = ocrPictureService.getPackagePictureInfo(checkDuplicateId, pictureId, userToken);
return ResultVoUtil.success(result);
}

@ -0,0 +1,154 @@
package cn.jyjz.xiaoyao.ocr.controller;
import java.io.IOException;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.jyjz.xiaoyao.admin.service.TenantService;
import cn.jyjz.xiaoyao.common.base.util.RequestBaseUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.common.mybatisplus.util.SearchQueryFormat;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureclass;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureclassService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@Api(tags="ocr-分类管理")
@RestController
@RequestMapping("/ocr/ocrPictureclass")
public class OcrPictureclassController extends BaseController{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Resource
private OcrPictureclassService ocrPictureclassService;
@Resource
private TenantService tenantService;
@Resource
private UserTokenService userTokenService;
@Resource
private UserService userService;
/**
*
* @return
*/
//@AutoLog(value = "ocr_pictureclass-分页列表查询")
@ApiOperation(value="分类列表", notes="分类列表,无分页")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true)
})
@GetMapping(value = "/rootList")
public ResultVo<List<OcrPictureclass>> rootList(HttpServletRequest request, HttpServletResponse response) {
//租户主键,由前端页面传送
String tenantId = request.getHeader("X-Tenant-Id");
if(StringUtils.isBlank(tenantId)){
return ResultVoUtil.error("租户主键不能为空");
}
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
OcrPictureclass ocrpictureclass = new OcrPictureclass();
QueryWrapper<OcrPictureclass> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrpictureclass);
queryWrapper.eq("TENANTID",tenantId);
queryWrapper.orderByDesc("REORDER");
List<OcrPictureclass> page = this.ocrPictureclassService.queryListNoPage(queryWrapper);;
return ResultVoUtil.success(page);
}
/**
*jsondto
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@GetMapping("/list")
public ResultVo<IPage<OcrPictureclass>> listOcrPictureclass(ParamterPage paramterPage, HttpServletRequest request, HttpServletResponse response) throws IOException{
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
OcrPictureclass ocrpictureclass = new OcrPictureclass();
QueryWrapper<OcrPictureclass> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrpictureclass);
IPage<OcrPictureclass> page = this.ocrPictureclassService.selectSearchListPage(paramterPage,queryWrapper);
for(OcrPictureclass ocrPictureclass:page.getRecords()){
ocrPictureclass.setTenant(tenantService.selectDtoById(ocrPictureclass.getTenantid()));
}
return ResultVoUtil.success(page);
}
/**
*
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@PostMapping("/save")
public ResultVo saveOcrPictureclass(HttpServletResponse response,HttpServletRequest request,OcrPictureclass tab) throws IOException{
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
tab.setCreateby(userToken.getLoginname());
tab.setCreatetime(System.currentTimeMillis());
this.ocrPictureclassService.save(tab);
return ResultVoUtil.success();
}
/**
*form
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@PostMapping("/edit")
public ResultVo editOcrPictureclass(HttpServletResponse response,HttpServletRequest request,OcrPictureclass tab) throws IOException{
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
tab.setUpdateby(userToken.getLoginname());
tab.setUpdatetime(System.currentTimeMillis());
this.ocrPictureclassService.updateById(tab);
return ResultVoUtil.success();
}
/**
*
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@GetMapping("/getdata/{id}")
@ResponseBody
public ResultVo getdateOcrPictureclass(HttpServletResponse response,HttpServletRequest request,@PathVariable("id") Long id) throws IOException{
OcrPictureclass dto = this.ocrPictureclassService.selectDtoById(id);
if(null != dto){
return ResultVoUtil.success(dto);
}else{
return ResultVoUtil.error();
}
}
/**
*id1,2,3
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@GetMapping("/delmore")
@ResponseBody
public ResultVo delMoreOcrPictureclass(HttpServletResponse response,HttpServletRequest request) throws IOException{
String ids = request.getParameter("id");
this.ocrPictureclassService.deleteByIdMore(ids);
return ResultVoUtil.success();
}
}

@ -0,0 +1,75 @@
package cn.jyjz.xiaoyao.ocr.controller;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureclassService;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@Controller
@RequestMapping("/backstage/oa/ocrpictureclassHtml")
public class OcrPictureclassHtmlController extends BaseController{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private OcrPictureclassService ocrPictureclassService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private UserService userService;
/**
*
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@GetMapping("/toList")
public String toListOcrPictureclass(HttpServletResponse response,HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
return "/backstage/oa/ocr/ocrpictureclass/list";
}
/**
*
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@GetMapping("/toSave")
public String toSaveOcrPictureclass(HttpServletResponse response,HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
return "/backstage/oa/ocr/ocrpictureclass/add";
}
/**
*ID
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@GetMapping("/toEdit/{id}")
public String toEditOcrPictureclass(HttpServletResponse response,HttpServletRequest request,@PathVariable("id") String id){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
request.setAttribute("id", id);
return "/backstage/oa/ocr/ocrpictureclass/edit";
}
}

@ -55,13 +55,14 @@ public class OcrSearchHistoryController {
//执行查询方法
Map<Object, List<Map<String,String>>> selectsearch = ocrSearchHistoryService.selectsearch(search, userToken.getLoginname(),userToken.getUserid(),tenantId);
OcrSearchHistory ocrsearchhistory =new OcrSearchHistory();
ocrsearchhistory.setHistoryname(search);
ocrsearchhistory.setTenantId(Long.valueOf(tenantId));
ocrsearchhistory.setUserid(Long.valueOf(userToken.getUserid()));
ocrsearchhistory.setCreatedate(System.currentTimeMillis());
ocrSearchHistoryService.save(ocrsearchhistory);
if(StringUtils.isNotBlank(search)){
OcrSearchHistory ocrsearchhistory =new OcrSearchHistory();
ocrsearchhistory.setHistoryname(search);
ocrsearchhistory.setTenantId(Long.valueOf(tenantId));
ocrsearchhistory.setUserid(Long.valueOf(userToken.getUserid()));
ocrsearchhistory.setCreatedate(System.currentTimeMillis());
ocrSearchHistoryService.save(ocrsearchhistory);
}
// return new ResponseEntity<Object>(selectsearch, HttpStatus.OK);
return ResultVoUtil.success(selectsearch);

@ -65,9 +65,10 @@ public class OcrTaskchildDubiousFileController {
@ApiOperation(value="可疑文件列表查询", notes="可疑文件列表查询")
@RequestMapping(value = "/dubiousfilelist", method = RequestMethod.GET)
public ResultVo<Page<OcrTaskChildPictureVo>> dubiousfilelist(HttpServletRequest request,
@RequestParam(value = "pageNo", required = false, defaultValue = "0") Integer pageNo,
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize,
@RequestParam(value = "orderbyname", required = true, defaultValue = "asc") String orderbyname) {
@RequestParam(value = "pageNo", required = false, defaultValue = "0") Integer pageNo,
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize,
@RequestParam(value = "orderByUptime",required = false) String orderByUptime,
@RequestParam(value = "orderBySimilarity",required = false) String orderBySimilarity) {
String tenantId = request.getHeader("X-Tenant-Id");
@ -97,7 +98,7 @@ public class OcrTaskchildDubiousFileController {
//
// //IPage<OcrPicture> page = ocrpictureservice.page(iPage, wrapper);
Page<OcrTaskChildPictureVo> page = ocrTaskchildDubiousFileService.dubiousfilelist(pageNo,pageSize,orderbyname,userToken,tenantId);
Page<OcrTaskChildPictureVo> page = ocrTaskchildDubiousFileService.dubiousfilelist(pageNo,pageSize,orderByUptime,orderBySimilarity,userToken,tenantId);
return ResultVoUtil.success(page);
}

@ -401,10 +401,8 @@ public class OcrTaskchildPictureController extends BaseController {
@RequestParam(name = "orderType") String orderType,
@RequestParam(name = "orderName") String orderName,
@RequestParam(name = "checkDuplicateId") String checkDuplicateId,
@RequestParam(name = "pictureId") String pictureId,
HttpServletRequest request) {
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
Page<OcrTaskChildPictureVo> result = ocrTaskchildPictureService.getPackageSimilarityList(pageNo, pageSize, orderType, orderName, checkDuplicateId, pictureId,userToken);
@RequestParam(name = "pictureId") String pictureId) {
Page<OcrTaskChildPictureVo> result = ocrTaskchildPictureService.getPackageSimilarityList(pageNo, pageSize, orderType, orderName, checkDuplicateId, pictureId);
return ResultVoUtil.success(result);
}

@ -0,0 +1,7 @@
package cn.jyjz.xiaoyao.ocr.dataDao;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrFrontConf;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface OcrFrontConfMapper extends BaseMapper<OcrFrontConf> {
}

@ -12,7 +12,5 @@ import java.util.List;
*/
@Mapper
public interface OcrPictureMybatisDao extends BaseMapper<OcrPicture> {
OcrPicture getPackagePictureInfo(@Param("packageId") String packageId, @Param("pictureId") String pictureId, @Param("userNodeType") String userNodeType);
List<OcrPicture> getPictureNodeStatesList(@Param("pictureIds") List<String> pictureIds, @Param("userNodeType") String userNodeType);
OcrPicture getPackagePictureInfo(@Param("packageId") String packageId, @Param("pictureId") String pictureId);
}

@ -0,0 +1,11 @@
package cn.jyjz.xiaoyao.ocr.dataDao;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureclass;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
*
*/
@Mapper
public interface OcrPictureclassMybatisDao extends BaseMapper<OcrPictureclass> {
}

@ -17,14 +17,17 @@ import java.util.Map;
*/
@Mapper
public interface OcrTaskchildPictureMybatisDao extends BaseMapper<OcrTaskchildPicture> {
/**
*
* @param query
* @return
*/
public List<OcrTaskchildPicture> listFinal(Map<String, Object> query);
List<OcrTaskchildPicture> listFinalTask(Map<String, Object> query);
/**
*
* @param query
@ -48,10 +51,13 @@ public interface OcrTaskchildPictureMybatisDao extends BaseMapper<OcrTaskchildPi
String selectocpicture(@Param("tenantid")String tenantid,@Param("packageid")String packageid,@Param("id")String id);
List<OcrTaskChildPictureVo> getPictureHistoryList(@Param("pictureIds") List<String> pictureIds, @Param("taskname") String taskname);
List<OcrTaskChildPictureVo> getPictureHistoryList(@Param("pictureIds") List<String> pictureIds, @Param("pictureId") String pictureId);
List<OcrTaskChildPictureVo> getDubiousfileList(@Param("pictureIds") List<String> pictureIds, @Param("taskname") String taskname);
PictureDetailVo getPictureDetail(String pictureId);
Page<OcrTaskChildPictureVo> getPackageSimilarityList(Page<OcrTaskChildPictureVo> page, @Param("checkDuplicateId") String checkDuplicateId, @Param("pictureId") String pictureId, @Param("oderType") String oderType, @Param("oderName") String oderName, @Param("taskname") String taskname);
Page<OcrTaskChildPictureVo> getPackageSimilarityList(Page<OcrTaskChildPictureVo> page, @Param("checkDuplicateId") String checkDuplicateId, @Param("pictureId") String pictureId, @Param("oderType") String oderType, @Param("oderName") String oderName);
List<OcrTaskChildPictureVo> getSimilarityList(@Param("pictureIds") List<String> pictureIds);
}

@ -41,7 +41,8 @@ public class OcrCheckDuplicateResult implements Serializable {
@ApiModelProperty(value = "图片id")
private Long pictureId;
@ApiModelProperty(value = "当前图片与任务包其他图片比对结果")
@ApiModelProperty(value = "当前图片与任务包其他图片比对结果 (废弃,入库导致数据量过大)")
@TableField(exist = false)
private String compareResultJson;
@ApiModelProperty(value = "查重任务id")
@ -53,4 +54,8 @@ public class OcrCheckDuplicateResult implements Serializable {
@ApiModelProperty(value = "阈值分组排序值,数值越低排序越靠前,")
private Integer similarityGroupOrder;
@ApiModelProperty(value = "是否重复0.不重复 1.重复 (历史比对中阈值存在100的会显示此值)")
@TableField(exist = false)
private Integer isRepeat;
}

@ -2,11 +2,14 @@ package cn.jyjz.xiaoyao.ocr.dataobject;
import cn.jyjz.xiaoyao.admin.dataobject.Tenant;
import cn.jyjz.xiaoyao.common.base.jsonDomain.DateSerializer;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import cn.jyjz.xiaoyao.common.mybatisplus.dto.BaseDto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
@ -17,6 +20,10 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.sql.Date;
import java.util.AbstractMap;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Data
@Builder
@ -24,7 +31,7 @@ import java.sql.Date;
@AllArgsConstructor
@Schema(name = "字段信息", title = "字段信息")
@TableName(value = "ocr_field")
public class OcrField implements Serializable {
public class OcrField implements BaseDto,java.io.Serializable {
private static final long serialVersionUID = 8088861709460050761L;
@Schema(description = "主键")
@TableId(value = "id",type = IdType.AUTO)
@ -80,4 +87,30 @@ public class OcrField implements Serializable {
@Schema(description = "是否可点击,0:否,1是")
@TableField(value="is_tap")
private Integer isTap;
@Schema(description = "是否可隐藏,0:否,1是")
@TableField(value="is_hide")
private Integer isHide;
//保存当前登录用户的数据权限范围的搜索条件
@TableField(exist = false)
@JsonIgnore
private SearchQuery searchQueryrolesShowleave;
@TableField(exist = false)
@JsonIgnore
private final Map<String,String> query = Stream.of(
new AbstractMap.SimpleEntry<>("NAME","name"),
new AbstractMap.SimpleEntry<>("REVIEWTYPE","review_type")
)
.collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue));
@Override
public String getQueryFiled(String filedname){
String obj = null;
if(null != query && query.size() > 0){
obj = query.get(filedname);
}
return obj;
}
}

@ -0,0 +1,61 @@
package cn.jyjz.xiaoyao.ocr.dataobject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "配置管理", title = "配置管理")
@TableName(value = "ocr_front_conf")
public class OcrFrontConf implements java.io.Serializable {
@Schema(description = "主键")
@TableId(value = "id",type = IdType.AUTO)
@TableField(value="id")
private Long id;
private String env;
private String wlyInterfaceDomain;
private String wlyAccessKey;
private String wlyAccessCode;
private Integer wlyConnectTimeout;
private Integer wlyReadTimeout;
private String wlyLocalImagePath;
private String wlyDataUrl;
/**
*
*/
private String pictureSourceUrl;
/**
*
*/
private String sendResultUrl;
/**
*
*/
private String projectSourceUrl;
/**
*
*/
private String tenantSourceUrl;
}

@ -311,6 +311,10 @@ public class OcrPicture implements BaseDto, java.io.Serializable {
@TableField(value = "similarity_score")
private Integer similarityscore;
@ApiModelProperty(value = "下载到本地,失败次数")
@TableField(value = "download_error_count")
private Integer downloadErrorCount;
@ApiModelProperty(value = "图片查重的比对图片集合")
@TableField(exist = false)
private List<OcrPicture> listCom;
@ -342,6 +346,10 @@ public class OcrPicture implements BaseDto, java.io.Serializable {
@TableField(value = "submit_date_timestamp")
private Long submitDateTimestamp;
@ApiModelProperty(value = "是否重复0.不重复 1.重复 (历史比对中阈值存在100的会显示此值)")
@TableField(value = "is_repeat")
private Integer isRepeat;
@ApiModelProperty(value = "任务状态")
@TableField(exist = false)
private Integer states;
@ -357,6 +365,7 @@ public class OcrPicture implements BaseDto, java.io.Serializable {
@ApiModelProperty(value = "拍照时间")
@TableField(value = "photo_date_timestamp")
@JsonSerialize(using = DateSerializer.class)
private Long photoDateTimestamp;
@ApiModelProperty(value = "节点状态")
@ -367,6 +376,9 @@ public class OcrPicture implements BaseDto, java.io.Serializable {
@TableField(exist = false)
private String taskId;
//保存当前登录用户的数据权限范围的搜索条件
@TableField(exist = false)
@JsonIgnore

@ -1,6 +1,7 @@
package cn.jyjz.xiaoyao.ocr.dataobject;
import cn.jyjz.xiaoyao.common.base.jsonDomain.DateNotimeSerializer;
import cn.jyjz.xiaoyao.common.base.jsonDomain.DateSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@ -64,7 +65,8 @@ public class OcrPictureInfo {
*
*/
@TableField(value = "create_time")
@JsonSerialize(using = DateNotimeSerializer.class)
// @JsonSerialize(using = DateNotimeSerializer.class)
@JsonSerialize(using = DateSerializer.class)
private Long createTime;
/**

@ -0,0 +1,115 @@
package cn.jyjz.xiaoyao.ocr.dataobject;
import cn.jyjz.xiaoyao.admin.dataobject.Tenant;
import cn.jyjz.xiaoyao.common.base.jsonDomain.DateNotimeSerializer;
import cn.jyjz.xiaoyao.common.mybatisplus.dto.BaseDto;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Map;
import java.util.AbstractMap.SimpleEntry;
import java.util.stream.Stream;
import java.util.stream.Collectors;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "图片分类表", title = "图片分类表")
@TableName(value = "ocr_pictureclass")
public class OcrPictureclass implements BaseDto,java.io.Serializable {
private static final long serialVersionUID = -2826818582872L;
@Schema(description = "主键")
@TableId(value = "id",type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class)
@TableField(value="ID")
private Long id;
@Schema(description = "创建人")
@TableField(value="CREATEBY")
private String createby;
@Schema(description = "创建时间")
@TableField(value="CREATETIME")
private Long createtime;
@Schema(description = "修改人")
@TableField(value="UPDATEBY")
private String updateby;
@Schema(description = "修改时间")
@TableField(value="UPDATETIME")
private Long updatetime;
@Schema(description = "租户ID")
@JsonSerialize(using = ToStringSerializer.class)
@TableField(value="TENANTID")
private Long tenantid;
@Schema(description = "父节点默认为0表示根")
@JsonSerialize(using = ToStringSerializer.class)
@TableField(value="PID")
private Long pid;
@Schema(description = "是否有子节点")
@TableField(value="HASCHILD")
private String haschild;
@Schema(description = "分类名称")
@TableField(value="CLASSNAME")
private String classname;
@Schema(description = "排序字段")
@TableField(value="REORDER")
private Integer reorder;
//租户对象
@TableField(exist = false)
private Tenant tenant;
//保存当前登录用户的数据权限范围的搜索条件
@TableField(exist = false)
@JsonIgnore
private SearchQuery searchQueryrolesShowleave;
@TableField(exist = false)
@JsonIgnore
private final Map<String,String> query = Stream.of(
new SimpleEntry<>("ID","id"),
new SimpleEntry<>("CREATEBY","createby"),
new SimpleEntry<>("CREATETIME","createtime"),
new SimpleEntry<>("UPDATEBY","updateby"),
new SimpleEntry<>("UPDATETIME","updatetime"),
new SimpleEntry<>("TENANTID","tenantid"),
new SimpleEntry<>("PID","pid"),
new SimpleEntry<>("HASCHILD","haschild"),
new SimpleEntry<>("CLASSNAME","classname"),
new SimpleEntry<>("REORDER","reorder")
)
.collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue));
@Override
public String getQueryFiled(String filedname){
String obj = null;
if(null != query && query.size() > 0){
obj = query.get(filedname);
}
return obj;
}
}

@ -195,6 +195,10 @@ public class OcrTaskchildPicture implements BaseDto, java.io.Serializable {
@TableField(value = "TASKNAME")
private String taskname;
@Schema(description = "当前节点名称")
@TableField(value = "TASKNODE")
private String taskNode;
@Schema(description = "当前节点id")
@TableField(value = "TASKID")
private String taskId;
@ -203,6 +207,14 @@ public class OcrTaskchildPicture implements BaseDto, java.io.Serializable {
@TableField(value = "FINISHTIME")
private Long finishtime;
@Schema(description = "是否终审")
@TableField(value = "ISFINAIL")
private Integer isFinal;
@Schema(description = "是否小结重复,1重复0不重复")
@TableField(value = "is_repeated_nodules")
private Integer isRepeatedNodules;
@ApiModelProperty(value = "项目对象")
@TableField(exist = false)
private Category categoryDto;

@ -142,7 +142,8 @@ public class OcrTaskchildPictureAppro implements java.io.Serializable {
@ApiModelProperty(value = "拜访城市")
private String fromCity;
@ApiModelProperty(value = "是否重复小结")
private Integer isRepeatedNodules;
@ApiModelProperty(value = "所属计划")
private String fromplanid;
@ -195,4 +196,7 @@ public class OcrTaskchildPictureAppro implements java.io.Serializable {
@ApiModelProperty(value = "提交时间")
private Long finishTime;
@ApiModelProperty(value = "是否重复")
private Integer isRepeat;
}

@ -39,4 +39,8 @@ public class OcrFieldDto implements Serializable {
@Schema(description = "是否可点击,0:否,1是")
private Integer isTap;
@Schema(description = "是否可隐藏,0:否,1是")
private Integer isHide;
}

@ -0,0 +1,23 @@
package cn.jyjz.xiaoyao.ocr.dto;
import lombok.Data;
/**
* ClassName ResultDto$.java
* Description:
* Author scl.
* Date 2024/4/7 21:40
*/
@Data
public class ResultDto {
private Integer status;
private String message;
private Long timestamp;
private String signature;
private String data;
}

@ -22,6 +22,8 @@ public interface IOcrSearchHistoryService extends IService<OcrSearchHistory> {
ResultVo toolscount(String tenantid, String userId, HttpServletRequest request);
ResultVo toolsTaskApprovalCount(String tenantid, String userId, HttpServletRequest request);
Map<Object,Object> selectaisp(String userid,String id,Integer nodeType);

@ -17,6 +17,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IOcrTaskchildDubiousFileService extends IService<OcrTaskchildDubiousFile> {
Page<OcrTaskChildPictureVo> dubiousfilelist(Integer pageNo, Integer pageSize, String orderbyname, UserToken userToken, String tenantId);
Page<OcrTaskChildPictureVo> dubiousfilelist(Integer pageNo, Integer pageSize,String orderByUptime,String orderBySimilarity,UserToken userToken, String tenantId);
}

@ -1,9 +1,13 @@
package cn.jyjz.xiaoyao.ocr.service;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseService;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrField;
import cn.jyjz.xiaoyao.ocr.dto.OcrFieldDto;
import cn.jyjz.xiaoyao.ocr.vo.OcrFieldVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
@ -15,6 +19,8 @@ public interface OcrFieldService extends BaseService<OcrField> {
/**
*
*/
IPage<OcrField> pageList(ParamterPage paramterPage, QueryWrapper<OcrField> queryWrapper);
List<OcrFieldDto> list(Integer reviewType);
/**
@ -29,5 +35,5 @@ public interface OcrFieldService extends BaseService<OcrField> {
/**
*
*/
void saveData(OcrField ocrField);
ResultVo saveData(OcrField ocrField);
}

@ -0,0 +1,9 @@
package cn.jyjz.xiaoyao.ocr.service;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseService;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrFrontConf;
public interface OcrFrontConfService extends BaseService<OcrFrontConf> {
void updateConfig();
}

@ -61,6 +61,8 @@ public interface OcrPictureService extends BaseService<OcrPicture> {
*/
int savePictures(List<OcrPicture> ocrPictureList);
void savePicturesInfo(OcrPicture ocrPicture);
ResultVo createPackageTask(List<OcrPicture> pageList, String tenantId, UserToken userToken, String searchMonth, HttpServletRequest req, String buessinessno, Map<String, Object> paramMap);
Map<String,String> getOcrPictureClassifyAndHash(String img);
@ -69,14 +71,6 @@ public interface OcrPictureService extends BaseService<OcrPicture> {
OcrPicture getPackagePictureInfo(String packageId, String pictureId, UserToken userToken);
/**
* id
* @param pictureIds
* @param nodeType
* @return
*/
List<OcrPicture> getPictureNodeStatesList(List<String> pictureIds,Integer nodeType);
// Long getPhotoDateTime(OcrPicture picture);
}

@ -0,0 +1,22 @@
package cn.jyjz.xiaoyao.ocr.service;
import java.util.List;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseService;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureclass;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
*
*/
public interface OcrPictureclassService extends BaseService<OcrPictureclass> {
/**
*
*
* @param queryWrapper
* @return List<OcrPictureclass>
*/
List<OcrPictureclass> queryListNoPage(QueryWrapper<OcrPictureclass> queryWrapper);
}

@ -1,6 +1,5 @@
package cn.jyjz.xiaoyao.ocr.service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -17,6 +16,7 @@ import cn.jyjz.xiaoyao.ocr.vo.PictureDetailVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
/**
*
@ -110,9 +110,11 @@ public interface OcrTaskchildPictureService extends BaseService<OcrTaskchildPict
* @param packageid
*/
public OcrTaskchildPicture create(OcrPicture ocrPicture, String tenantId , UserToken sysUser, Long packageid,String buessinessno);
/**
*
*
* @param page
* @param query
* @return
*/
@ -147,9 +149,9 @@ public interface OcrTaskchildPictureService extends BaseService<OcrTaskchildPict
Page<OcrTaskChildPictureVo> getSimilarityList(Integer pageNo, Integer pageSize, String pictureId, String orderType, String orderValue, UserToken userToken);
Page<OcrTaskChildPictureVo> getPackageSimilarityList(Integer pageNo, Integer pageSize, String oderType, String oderName, String checkDuplicateId, String pictureId, UserToken userToken);
Page<OcrTaskChildPictureVo> getPackageSimilarityList(Integer pageNo, Integer pageSize, String oderType, String oderName, String checkDuplicateId, String pictureId);
void sendFlowTaskResult(OcrTaskchildPicture taskchildPicture, OcrPicture picture, FlowApprove flowApprove);
void sendFlowTaskResult(OcrTaskchildPicture taskchildPicture, OcrPicture picture, FlowApprove flowApprove) throws Exception;
List<OcrTaskChildPictureVo> getDubiousfileList(List<String> pictureIds, String userNodeType);
}

@ -106,6 +106,7 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
//异步调用查重任务
checkDuplicateService.comparePictureResultSave(ocrPictureList, sysUser, id);
checkDuplicate.setStatus(2);
checkDuplicate.setCompletionTime(System.currentTimeMillis());
} catch (Exception e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
@ -115,6 +116,7 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
logger.error("异步执行图片比对异常:", e);
logger.error("异步执行图片比对异常:", e.getMessage());
checkDuplicate.setStatus(3);
checkDuplicate.setCompletionTime(System.currentTimeMillis());
} finally {
checkDuplicateService.updateById(checkDuplicate);
}
@ -176,8 +178,8 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
* 6.ocr_picturesimilarity_score
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void comparePictureResultSave(List<OcrPicture> ocrPictureList, UserToken sysUser, Long checkDuplicateId) throws Exception {
// @Transactional(rollbackFor = Exception.class)
public void comparePictureResultSave(List<OcrPicture> ocrPictureList, UserToken sysUser, Long checkDuplicateId){
List<OcrCheckDuplicateResult> saveList = new ArrayList<>();
//需要创建任务的图片集合
@ -196,10 +198,10 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
if (org.apache.commons.lang3.StringUtils.isBlank(ocrPicture.getImgHash())) {
String url = ocrPicture.getLocalpictrueurl();
if(StringUtils.isBlank(url)){
if(StringUtils.isBlank(ocrPicture.getImgurl())){
continue;
}
url = ocrPicture.getImgurl();
// if(StringUtils.isBlank(ocrPicture.getImgurl())){
// }
// url = ocrPicture.getImgurl();
continue;
}
Map<String, String> map = this.getOcrPictureClassifyAndHash(url);
@ -226,10 +228,11 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
logger.info("图片没有hash值进入分类并获取hash接口:{}",JSONObject.toJSON(ocrPictureNext));
String url = ocrPictureNext.getLocalpictrueurl();
if(StringUtils.isBlank(url)){
if(StringUtils.isBlank(ocrPictureNext.getImgurl())){
continue;
}
url = ocrPictureNext.getImgurl();
// if(StringUtils.isBlank(ocrPictureNext.getImgurl())){
// continue;
// }
// url = ocrPictureNext.getImgurl();
continue;
}
Map<String, String> map = this.getOcrPictureClassifyAndHash(url);
if (map != null) {
@ -283,38 +286,69 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
OcrCheckDuplicateResult ocrCheckDuplicateResult = new OcrCheckDuplicateResult();
ocrCheckDuplicateResult.setPictureId(ocrPicture.getId());
ocrCheckDuplicateResult.setMaxSimilarity(maxSimilarity.doubleValue());
BigDecimal b3 = new BigDecimal("100");
if (maxSimilarity.compareTo(b3)==0) {
ocrCheckDuplicateResult.setIsRepeat(1);
}else {
ocrCheckDuplicateResult.setIsRepeat(0);
}
ocrCheckDuplicateResult.setCompareResultJson(JSONObject.toJSONString(resultMap));
ocrCheckDuplicateResult.setCheckDuplicateId(checkDuplicateId);
if(similarityGroupOrderMap.get(ocrPicture.getId().toString())!=null){
ocrCheckDuplicateResult.setSimilarityGroupOrder(similarityGroupOrderMap.get(ocrPicture.getId().toString()));
}
//1.3开启入库操作,不能进行批量入库,会导致内存被拉崩
saveList.add(ocrCheckDuplicateResult);
List<OcrPicture> pictures = new ArrayList<>();
pictures.add(ocrPicture);
try {
this.saveCheckDuplicateData(checkDuplicateId,saveList,pictures,ocrPictureList.get(0).getTenantId().toString(),sysUser);
} catch (Exception e) {
logger.error("比对结果入库异常! error:{}",e.getMessage());
}
saveList = new ArrayList<>();
}
}
logger.info("查重任务:{},开启创建任务",checkDuplicateId);
if (CollectionUtils.isNotEmpty(ocrPictureList)) {
ocrTaskchildPictureService.createTask(ocrPictureList, ocrPictureList.get(0).getTenantId().toString(), sysUser);
}
logger.info("查重任务:{},结束创建任务",checkDuplicateId);
//批量入库
logger.info("查重任务:{},开启批量入库任务",checkDuplicateId);
}
/**
*
* @return
*/
@Transactional(rollbackFor = Exception.class)
public boolean saveCheckDuplicateData(Long checkDuplicateId,List<OcrCheckDuplicateResult> saveList,List<OcrPicture> ocrPictureList, String tenantId,UserToken sysUser) throws Exception {
//1.批量入库
logger.debug("查重任务:{},开启批量入库任务",checkDuplicateId);
boolean b = checkDuplicateResultService.saveOrUpdateBatch(saveList);
if (!b) {
logger.error("入库比对结果失败,{}",checkDuplicateId);
throw new Exception("批量入库比对结果失败!");
}
logger.info("查重任务:{},结束批量入库任务",checkDuplicateId);
//开始更新图片最高阈值
logger.info("查重任务:{},更新最高阈值",checkDuplicateId);
this.updatePictureSimilarityScore(saveList);
logger.info("查重任务:{},结束更新最高阈值",checkDuplicateId);
//开始更新 图片历史比对数据结果
//2.开始更新图片最高阈值
logger.debug("查重任务:{},更新最高阈值",checkDuplicateId);
b = this.updatePictureSimilarityScore(saveList);
if (!b) {
logger.error("更新最高阈值,{}",checkDuplicateId);
throw new Exception("更新最高阈值失败!");
}
//3.开始更新 图片历史比对数据结果
logger.info("查重任务:{},更新图片历史比对结果",checkDuplicateId);
this.updateCompareToPictureDuplicateHis(saveList);
logger.info("查重任务:{},结束图片历史比对结果",checkDuplicateId);
b = this.updateCompareToPictureDuplicateHis(saveList);
if (!b) {
logger.error("更新图片历史比对结果失败,{}",checkDuplicateId);
throw new Exception("更新图片历史比对结果失败!");
}
//4.开始更新 图片历史比对数据结果
logger.info("查重任务:{},开启创建任务",checkDuplicateId);
if (CollectionUtils.isNotEmpty(ocrPictureList)) {
ocrTaskchildPictureService.createTask(ocrPictureList, ocrPictureList.get(0).getTenantId().toString(), sysUser);
}
return true;
}
@Override
public Boolean removeCheckDuplicate(String checkDuplicateNo, String tenantId) {
QueryWrapper queryWrapper = new QueryWrapper();
@ -342,9 +376,19 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
*/
private boolean updatePictureSimilarityScore(List<OcrCheckDuplicateResult> saveList) throws Exception {
List<OcrPicture> updateList = new ArrayList<>();
List<OcrPicture> updateList1 = new ArrayList<>();
for (OcrCheckDuplicateResult ocrCheckDuplicateResult : saveList) {
OcrPicture picture = pictureService.selectDtoById(ocrCheckDuplicateResult.getPictureId());
OcrPicture ocrPicture = new OcrPicture();
if(ocrCheckDuplicateResult.getIsRepeat()==1){
OcrPicture ocrPicture1 = new OcrPicture();
if(picture.getIsRepeat() == null || picture.getIsRepeat() != 1){
ocrPicture1.setId(picture.getId());
ocrPicture1.setIsRepeat(1);
updateList1.add(ocrPicture1);
}
}
pictureService.updateBatchById(updateList1);
//如果当前图片没有历史阈值,直接更新上阈值
if (picture.getSimilarityscore() == null) {
ocrPicture.setId(picture.getId());
@ -478,8 +522,7 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
Page<OcrPicture> pageVO = new Page<OcrPicture>(pageNo, pageSize);
pageVO.setRecords(collect);
pageVO.setTotal(records.size());
pageVO.setTotal(ocrCheckDuplicateResults.size());
return pageVO;
}

@ -1,19 +1,30 @@
package cn.jyjz.xiaoyao.ocr.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrFieldMybatisDao;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrField;
import cn.jyjz.xiaoyao.ocr.dto.OcrFieldDto;
import cn.jyjz.xiaoyao.ocr.service.OcrFieldService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.sql.Date;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
@ -25,6 +36,7 @@ public class OcrFieldServiceImpl extends BaseServiceImpl<OcrFieldMybatisDao, Ocr
@Autowired
private OcrFieldMybatisDao ocrFieldMybatisDao;
@Override
public List<OcrFieldDto> list(Integer reviewType){
List<OcrFieldDto> ocrFieldDtoList = new ArrayList<>();
@ -57,6 +69,18 @@ public class OcrFieldServiceImpl extends BaseServiceImpl<OcrFieldMybatisDao, Ocr
return ocrFieldDtoList;
}
@Override
public IPage<OcrField> pageList(ParamterPage paramterPage, QueryWrapper<OcrField> queryWrapper){
try {
queryWrapper.eq("del", 0);
queryWrapper.orderByAsc("sort");
return this.selectSearchListPage(paramterPage, queryWrapper);
} catch (BeansException e) {
e.printStackTrace();
}
return null;
}
@Override
public List<OcrFieldDto> listAll(){
List<OcrFieldDto> ocrFieldDtoList = new ArrayList<>();
@ -106,20 +130,26 @@ public class OcrFieldServiceImpl extends BaseServiceImpl<OcrFieldMybatisDao, Ocr
}
@Override
public void saveData(OcrField ocrField){
public ResultVo saveData(OcrField ocrField){
try {
String name = ocrField.getName();
LambdaQueryWrapper<OcrField> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OcrField::getName, name);
OcrField ocrFieldOne = this.getOne(queryWrapper);
if (ocrFieldOne != null) {
ocrField.setId(ocrFieldOne.getId()); // 设置 ID以便更新指定记录
if (Objects.nonNull(ocrField.getId())) {
String name = ocrField.getName();
LambdaQueryWrapper<OcrField> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OcrField::getName, name);
OcrField ocrFieldOne = this.getOne(queryWrapper);
if(Objects.nonNull(ocrFieldOne)&&!ocrFieldOne.getId().equals(ocrField.getId())){
return ResultVoUtil.error(ResultVo.ERROR,"字段名称已存在");
}
ocrField.setUpdateTime(DateUtil.date().toSqlDate());
updateById(ocrField); // 更新记录
} else {
ocrField.setCreateTime(DateUtil.date().toSqlDate());
ocrField.setUpdateTime(DateUtil.date().toSqlDate());
save(ocrField); // 保存记录
}
} catch (Exception e) {
e.printStackTrace();
}
return ResultVoUtil.success();
}
}

@ -0,0 +1,37 @@
package cn.jyjz.xiaoyao.ocr.service.impl;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiConfig;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrFrontConfMapper;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrFrontConf;
import cn.jyjz.xiaoyao.ocr.service.OcrFrontConfService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class OcrFrontConfServiceImpl extends BaseServiceImpl<OcrFrontConfMapper, OcrFrontConf> implements OcrFrontConfService {
@Resource
private ApiConfig apiConfig;
@Value("${spring.profiles.active}")
private String env;
@Override
public void updateConfig() {
QueryWrapper<OcrFrontConf> wrapper = new QueryWrapper<>();
wrapper.eq("env", env);
OcrFrontConf frontConf = this.getOne(wrapper);
if (frontConf != null){
apiConfig.setInterfaceDomain(frontConf.getWlyInterfaceDomain());
apiConfig.setAccessKey(frontConf.getWlyAccessKey());
apiConfig.setAccessCode(frontConf.getWlyAccessCode());
apiConfig.setConnectTimeout(frontConf.getWlyConnectTimeout());
apiConfig.setReadTimeout(frontConf.getWlyReadTimeout());
}
}
}

@ -10,14 +10,29 @@ import cn.jyjz.xiaoyao.common.base.util.RequestBaseUtil;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl;
import cn.jyjz.xiaoyao.oa.from.dataobject.Category;
import cn.jyjz.xiaoyao.oa.from.service.CategoryService;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiConfig;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrPictureMybatisDao;
import cn.jyjz.xiaoyao.ocr.dataobject.*;
import cn.jyjz.xiaoyao.ocr.service.*;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPackagetask;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureInfo;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrUsersearch;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrUsersearchchild;
import cn.jyjz.xiaoyao.ocr.service.OcrPackagetaskService;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureInfoService;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrUsersearchService;
import cn.jyjz.xiaoyao.ocr.thread.TaskQueue;
import cn.jyjz.xiaoyao.ocr.thread.entity.PictureImgToLocalEntity;
import cn.jyjz.xiaoyao.ocr.util.*;
import cn.jyjz.xiaoyao.ocr.util.DataDictionaryUtil;
import cn.jyjz.xiaoyao.ocr.util.HashCompareUtil;
import cn.jyjz.xiaoyao.ocr.util.ImageClassUtil;
import cn.jyjz.xiaoyao.ocr.util.SearchEnum;
import cn.jyjz.xiaoyao.ocr.util.SearchParaFormatting;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -26,23 +41,26 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import java.awt.color.ColorSpace;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@ -52,8 +70,8 @@ import java.util.stream.Collectors;
@Slf4j
public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao, OcrPicture> implements OcrPictureService {
@Value("${ocr.api.wly.localImagePath}")
private String localImagePath;
@Resource
private ApiConfig apiConfig;
@Value("${image.similarityPath}")
private String similarityPath;
@ -75,11 +93,6 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
@Resource
private OcrPictureInfoService ocrPictureInfoService;
private Object lock = new Object();
/**
*
*/
@Value("${ocr.api.wly.interface-domain}")
private String interfaceDomain;
/**
*
*/
@ -315,19 +328,11 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
@Override
public OcrPicture getPackagePictureInfo(String checkDuplicateId, String pictureId, UserToken userToken) {
String userNodeType = ProcessConstant.userNodeType.getOrDefault(userToken.getNodeType(), "一级审批");
return pictureMybatisDao.getPackagePictureInfo(checkDuplicateId,pictureId,userNodeType);
}
@Override
public List<OcrPicture> getPictureNodeStatesList(List<String> pictureIds, Integer nodeType) {
String userNodeType = ProcessConstant.userNodeType.getOrDefault(nodeType, "一级审批");
return pictureMybatisDao.getPictureNodeStatesList(pictureIds,userNodeType);
OcrPicture ocrPicture = pictureMybatisDao.getPackagePictureInfo(checkDuplicateId,pictureId);
ocrPicture.getPictureInfo().setCreateTime(ocrPicture.getPhotoDateTimestamp());
return ocrPicture;
}
// @Override
// public Long getPhotoDateTime(OcrPicture picture) {
// long timestamp = 0L;
@ -665,7 +670,7 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
}
@Override
public int savePictures(List<OcrPicture> ocrPictureList) {
public int savePictures(List<OcrPicture> ocrPictureList){
//1.字典数据 解析入库
boolean b = dataDictionaryUtil.pictureDataDictionarySaveArray(ocrPictureList);
@ -673,16 +678,26 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
//2.调整图片地址,补齐域名
for (OcrPicture picture : ocrPictureList) {
picture.setCreateTime(System.currentTimeMillis()); //获取创建时间戳
// picture.setImgurl(interfaceDomain + picture.getImgurl());
}
boolean saveBatch = this.saveBatch(ocrPictureList);
//3.添加图片信息
if (saveBatch) {
this.savePicturesInfo(ocrPictureList);
this.convertImage(ocrPictureList);
return ocrPictureList.size();
try {
boolean saveBatch = false;
synchronized(lock) {
// 同步的代码块
saveBatch = this.saveBatch(ocrPictureList);
}
//3.添加图片信息
if (saveBatch) {
// this.savePicturesInfo(ocrPictureList);
this.convertImage(ocrPictureList);
return ocrPictureList.size();
}
log.error("存储图片失败:{}",JSONObject.toJSON(ocrPictureList));
}catch (Exception e){
log.error("存储图片异常:{}",e.getMessage());
}
return 0;
}
@ -690,7 +705,7 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
List<OcrPictureInfo> list = new ArrayList<>();
for (OcrPicture ocrPicture : ocrPictureList) {
if (StringUtils.isNotBlank(ocrPicture.getImgurl())) {
OcrPictureInfo imageInfo = getImageInfo(ocrPicture.getImgurl());
OcrPictureInfo imageInfo = getImageInfo(ocrPicture.getImgurl(),true);
if (ObjectUtil.isNotEmpty(imageInfo)) {
imageInfo.setPictureId(ocrPicture.getId());
imageInfo.setImgName(ocrPicture.getImgname());
@ -701,18 +716,49 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
ocrPictureInfoService.saveBatch(list);
}
private OcrPictureInfo getImageInfo(String imageUrl) {
/**
*
* @param ocrPicture
*/
@Override
public void savePicturesInfo(OcrPicture ocrPicture) {
boolean isConnection = true;
String url = ocrPicture.getImgurl();
if(!StringUtils.isEmpty(ocrPicture.getLocalpictrueurl())){
url = ocrPicture.getLocalpictrueurl();
isConnection = false;
}
OcrPictureInfo imageInfo = getImageInfo(url,isConnection);
imageInfo.setPictureId(ocrPicture.getId());
imageInfo.setImgName(ocrPicture.getImgname());
ocrPictureInfoService.save(imageInfo);
}
try {
// 创建URL对象
URL url = new URL(imageUrl);
// 打开连接
URLConnection urlConnection = url.openConnection();
// 获取图片大小
Integer imageSize = urlConnection.getContentLength();
/**
*
* @param imageUrl
* @param isConnection url
* @return
*/
private OcrPictureInfo getImageInfo(String imageUrl,boolean isConnection) {
// 使用ImageIO读取图片
BufferedImage image = ImageIO.read(url);
try {
BufferedImage image = null;
Integer imageSize = 0;
if(isConnection){
// 创建URL对象
URL url = new URL(imageUrl);
// 打开连接
URLConnection urlConnection = url.openConnection();
// 获取图片大小
imageSize = urlConnection.getContentLength();
// 使用ImageIO读取图片
image= ImageIO.read(url);
}else{
File file = new File(imageUrl);
image = ImageIO.read(file);
imageSize =(int)file.length();
}
if (image != null) {
OcrPictureInfo info = new OcrPictureInfo();
@ -751,20 +797,37 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
log.info("Cannot read image from URL.");
return null;
}
} catch (IOException e) {
} catch (Exception e) {
log.error("Error: " + e.getMessage());
}
return null;
}
private void convertImage(List<OcrPicture> list) {
for (OcrPicture ocrPicture : list) {
PictureImgToLocalEntity entity = new PictureImgToLocalEntity();
entity.setPictureId(ocrPicture.getId());
entity.setImgUrl(ocrPicture.getImgurl());
String imgurl = ocrPicture.getImgurl();
entity.setLocalPath(localImagePath + imgurl.substring(imgurl.lastIndexOf("/")));
TaskQueue.pictureImgToLocalPushData(entity);
entity.setLocalPath(apiConfig.getLocalImagePath() + imgurl.substring(imgurl.lastIndexOf("/")));
boolean addedToQueue = false;
int count = 1;
while (!addedToQueue){
try {
addedToQueue = TaskQueue.pictureImgToLocalPushData(entity);
if(addedToQueue) {
break;
}
Thread.sleep(5000);
} catch (InterruptedException e) {
log.error("放入图片下载队列,等待休眠异常:{}",e.getMessage());
}
count++;
}
}
}

@ -0,0 +1,43 @@
package cn.jyjz.xiaoyao.ocr.service.impl;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrPictureclassMybatisDao;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureclass;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrUsersearch;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureclassService;
import cn.jyjz.xiaoyao.ocr.service.OcrUsersearchService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
*
*/
@Service
@Slf4j
public class OcrPictureclassServiceImpl extends BaseServiceImpl<OcrPictureclassMybatisDao, OcrPictureclass> implements OcrPictureclassService {
@Autowired
private OcrPictureclassMybatisDao ocrpictureclassmybatisdao;
@Override
public List<OcrPictureclass> queryListNoPage(QueryWrapper<OcrPictureclass> queryWrapper) {
Long count = ocrpictureclassmybatisdao.selectCount(queryWrapper);
Page<OcrPictureclass> page = new Page(1,count);
page.setMaxLimit(count);
IPage<OcrPictureclass> iPage = this.page(page,queryWrapper);
return iPage.getRecords();
}
}

@ -84,8 +84,10 @@ public class OcrSearchHistoryServiceImpl extends ServiceImpl<OcrSearchHistoryMap
List<SFrontmenuT> frontmenuTList = isFrontmenuTService.queryUserMenuById(assignee);
if(CollUtil.isNotEmpty(frontmenuTList)){
for (SFrontmenuT sFrontmenuT : frontmenuTList) {
if(sFrontmenuT.getResKey().equals(FrontMenuEnum.WORKSHEETMAIN.getResKey())){
strings1 = ocrsearchhistorymapper.selectsearch1(userId,search,tenantId);
if(StringUtils.isNotBlank(search)){
if(sFrontmenuT.getResKey().equals(FrontMenuEnum.WORKSHEETMAIN.getResKey())){
strings1 = ocrsearchhistorymapper.selectsearch1(userId,search,tenantId);
}
}
if(sFrontmenuT.getResKey().equals(FrontMenuEnum.TASKMAIN.getResKey())){
strings2 = ocrsearchhistorymapper.selectsearch2(assignee,search,tenantId);
@ -98,12 +100,13 @@ public class OcrSearchHistoryServiceImpl extends ServiceImpl<OcrSearchHistoryMap
// List<Map<Object,List<Map<String,String>>>> list = new ArrayList<>();
Map<Object,List<Map<String,String>>> map=new HashMap<>();
map.put("ai",strings1);
if(StringUtils.isNotBlank(search)){
map.put("ai",strings1);
}
map.put("preliminary",strings2);
map.put("final",strings3);
// list.add(map);
return map;
}
@ -135,7 +138,82 @@ public class OcrSearchHistoryServiceImpl extends ServiceImpl<OcrSearchHistoryMap
int pendingApprovalCount = 0; // 待审批的数量
int approvedCount = 0; // 通过的数量
int notGoCount = 0; // 不通过的数量
int repeat = 0; // 重复数量
for (OcrTaskchildPictureAppro ocrTaskchildPictureAppro : ocrTaskchildPictureApproList) {
if(ocrTaskchildPictureAppro.getIsRepeat() != null && ocrTaskchildPictureAppro.getIsRepeat() == 1){
repeat++;
}
if (ocrTaskchildPictureAppro.getStatshis() != null) {
switch (ocrTaskchildPictureAppro.getStatshis()) {
case 1:
pendingApprovalCount++;
break;
case 2:
approvedCount++;
break;
case 3:
notGoCount++;
break;
default:
break;
}
} else {
//暂定,后期修改
pendingApprovalCount++;
}
}
Map<String, Integer> counts = new HashMap<>();
counts.put("total", approvedCount + pendingApprovalCount + notGoCount); //任务总数
counts.put("treat", pendingApprovalCount); //待审批
counts.put("approvedCount", approvedCount+notGoCount); //已审批
counts.put("repeat", repeat); //重复图片
resultVo.setCode("OK");
resultVo.setMessage("成功");
resultVo.setData(counts);
} catch (Exception e) {
e.printStackTrace();
}
return resultVo;
}
@Override
public ResultVo toolsTaskApprovalCount(String tenantid, String userId, HttpServletRequest request) {
ResultVo<Map<String, Integer>> resultVo = null;
try {
//系统中记录的ai统计租户id
String counttenantid = iCacheManager.get(CacheConstants.TOOLSCOUNT_TENANTID_MODEL_NAME,tenantid+"_"+userId);
// if(!StringUtils.isBlank(counttenantid)){
// return ResultVoUtil.error("true");
// }
//用户登录信息写入缓存
iCacheManager.put(CacheConstants.TOOLSCOUNT_TENANTID_MODEL_NAME,tenantid+"_"+userId,"true",CacheConstants.TOOLSCOUNT_TENANTID_CACHE_TIME);
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
String taskName = request.getParameter("keyword");
if (StringUtils.isNotBlank(taskName)) {
searchQuery.addLike("fromtaskname", taskName);
}
User user = this.userService.getSessionUser(request);
PageUtils pageUtils = new PageUtils();
pageUtils.setPageSize(9999);
pageUtils.setCurrPage(1);
List<OcrTaskchildPictureAppro> ocrTaskchildPictureApproList = flowTaskService.getMyProcessInstancesNew(user, tenantid, searchQuery.getQuery(), pageUtils);
resultVo = new ResultVo<>();
int pendingApprovalCount = 0; // 待审批的数量
int approvedCount = 0; // 通过的数量
int notGoCount = 0; // 不通过的数量
int repeat = 0; // 重复数量
int repeatedNodulesCount = 0; //重复小结数
for (OcrTaskchildPictureAppro ocrTaskchildPictureAppro : ocrTaskchildPictureApproList) {
if(ocrTaskchildPictureAppro.getIsRepeat() != null && ocrTaskchildPictureAppro.getIsRepeat() == 1){
repeat++;
}
if(ocrTaskchildPictureAppro.getIsRepeatedNodules() !=null && ocrTaskchildPictureAppro.getIsRepeatedNodules() == 1){
repeatedNodulesCount++;
}
if (ocrTaskchildPictureAppro.getStatshis() != null) {
switch (ocrTaskchildPictureAppro.getStatshis()) {
case 1:
@ -157,9 +235,13 @@ public class OcrSearchHistoryServiceImpl extends ServiceImpl<OcrSearchHistoryMap
}
Map<String, Integer> counts = new HashMap<>();
counts.put("total", approvedCount + pendingApprovalCount + notGoCount);
counts.put("treat", pendingApprovalCount);
counts.put("approvedCount", approvedCount+notGoCount);
counts.put("total", approvedCount + pendingApprovalCount + notGoCount); //任务总数
counts.put("treat", pendingApprovalCount); //待审批
counts.put("alreadyApprove", approvedCount+notGoCount); //已审批
counts.put("approvedCount", approvedCount); //已通过
counts.put("notGoCount", notGoCount); //未通过
counts.put("repeat", repeat); //重复图片
counts.put("repeatedNodules", repeatedNodulesCount); //重复小结数
resultVo.setCode("OK");
resultVo.setMessage("成功");
resultVo.setData(counts);
@ -203,8 +285,7 @@ public class OcrSearchHistoryServiceImpl extends ServiceImpl<OcrSearchHistoryMap
List<String> approvedList = new ArrayList<>(); // 存储通过的pictureId集合
List<String> failedList = new ArrayList<>(); // 存储不通过的pictureId集合
if(pictureIds.size()!=0){
String userNodeType = ProcessConstant.userNodeType.getOrDefault(nodeType, "一级审批");
List<OcrTaskChildPictureVo> failedPictureIds = taskchildPictureMybatisDao.getPictureHistoryList(pictureIds, userNodeType);
List<OcrTaskChildPictureVo> failedPictureIds = taskchildPictureMybatisDao.getSimilarityList(pictureIds);
for (OcrTaskChildPictureVo picture : failedPictureIds) {
if (picture.getHistoryStates() == 3) {
failedList.add(picture.getId());

@ -2,6 +2,7 @@ package cn.jyjz.xiaoyao.ocr.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.jyjz.flowable.common.ProcessConstant;
import cn.jyjz.xiaoyao.common.base.util.StringUtils;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrTaskchildDubiousFileMapper;
@ -47,13 +48,14 @@ public class OcrTaskchildDubiousFileServiceImpl extends ServiceImpl<OcrTaskchild
*
* @param pageNo
* @param pageSize
* @param orderbyname
* @param orderByUptime
* @param orderBySimilarity
* @param userToken
* @param tenantId
* @return
*/
@Override
public Page<OcrTaskChildPictureVo> dubiousfilelist(Integer pageNo, Integer pageSize, String orderbyname, UserToken userToken, String tenantId) {
public Page<OcrTaskChildPictureVo> dubiousfilelist(Integer pageNo, Integer pageSize,String orderByUptime,String orderBySimilarity,UserToken userToken, String tenantId) {
Page<OcrTaskChildPictureVo> objectPage = new Page<>(Integer.valueOf(pageNo), Integer.valueOf(pageSize));
@ -74,13 +76,41 @@ public class OcrTaskchildDubiousFileServiceImpl extends ServiceImpl<OcrTaskchild
List<OcrTaskChildPictureVo> taskChildPictures = ocrTaskchildPictureService.getDubiousfileList(new ArrayList<>(pictureIdList), userNodeType);
if (CollUtil.isNotEmpty(taskChildPictures)) {
//按时间字段排序
if ("desc".equals(orderbyname)) {
taskChildPictures.sort(Comparator.comparing(OcrTaskChildPictureVo::getSubmitDateTimestamp).reversed());
} else {
taskChildPictures.sort(Comparator.comparing(OcrTaskChildPictureVo::getSubmitDateTimestamp));
Comparator<OcrTaskChildPictureVo> comparator = null;
// 判断 orderByUptime 是否不为空
if (orderByUptime != null && StringUtils.isNotEmpty(orderByUptime)) {
if ("asc".equals(orderByUptime)) {
comparator = Comparator.comparing(OcrTaskChildPictureVo::getSubmitDateTimestamp);
} else if ("desc".equals(orderByUptime)) {
comparator = Comparator.comparing(OcrTaskChildPictureVo::getSubmitDateTimestamp).reversed();
}
}
// 判断 orderBysimilarity 是否不为空
if (orderBySimilarity != null && StringUtils.isNotEmpty(orderBySimilarity)) {
Comparator<OcrTaskChildPictureVo> similarityComparator = null;
if ("asc".equals(orderBySimilarity)) {
similarityComparator = Comparator.comparing(OcrTaskChildPictureVo::getSimilarityScore);
} else if ("desc".equals(orderBySimilarity)) {
similarityComparator = Comparator.comparing(OcrTaskChildPictureVo::getSimilarityScore).reversed();
}
// 如果 orderByUptime 和 orderBysimilarity 都不为空,则先按照 orderBysimilarity 排序
if (comparator != null) {
comparator = comparator.thenComparing(similarityComparator);
} else {
comparator = similarityComparator;
}
}
// 进行排序
if (comparator != null) {
taskChildPictures.sort(comparator);
}
List<OcrTaskChildPictureVo> records = taskChildPictures.stream().skip((pageNo - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
objectPage.setRecords(records);
objectPage.setTotal(taskChildPictures.size());

@ -1,6 +1,5 @@
package cn.jyjz.xiaoyao.ocr.service.impl;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.util.ObjectUtil;
import cn.jyjz.flowable.common.ProcessConstant;
import cn.jyjz.flowable.common.SystemConstantsOa;
@ -9,19 +8,31 @@ import cn.jyjz.flowable.entity.FlowApprove;
import cn.jyjz.flowable.service.IFlowInstanceService;
import cn.jyjz.flowable.service.IFlowTaskService;
import cn.jyjz.flowable.service.IFormCustomService;
import cn.jyjz.xiaoyao.admin.dataobject.Department;
import cn.jyjz.xiaoyao.admin.service.DepartmentService;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.util.SpringUtils;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl;
import cn.jyjz.xiaoyao.oa.from.dataobject.Category;
import cn.jyjz.xiaoyao.oa.from.dataobject.Userapprove;
import cn.jyjz.xiaoyao.oa.from.service.CategoryService;
import cn.jyjz.xiaoyao.oa.from.service.UserapproveService;
import cn.jyjz.xiaoyao.ocr.api.PrevailCloudApi;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiConfig;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiHelper;
import cn.jyjz.xiaoyao.ocr.api.utils.RequestData;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrTaskchildPictureMybatisDao;
import cn.jyjz.xiaoyao.ocr.dataobject.*;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureDuplicateHis;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureInfo;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro;
import cn.jyjz.xiaoyao.ocr.dto.ApproveNodeDto;
import cn.jyjz.xiaoyao.ocr.dto.FlowResultDto;
import cn.jyjz.xiaoyao.ocr.dto.ResultDto;
import cn.jyjz.xiaoyao.ocr.dto.UserapproveDto;
import cn.jyjz.xiaoyao.ocr.service.IOcrPictureDuplicateHisService;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureInfoService;
@ -29,23 +40,23 @@ import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import cn.jyjz.xiaoyao.ocr.vo.OcrTaskChildPictureVo;
import cn.jyjz.xiaoyao.ocr.vo.PictureDetailVo;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.flowable.bpmn.model.FlowElement;
import org.flowable.bpmn.model.UserTask;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.task.api.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.stereotype.Service;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@ -60,6 +71,7 @@ import java.util.stream.Collectors;
@Service("ocrTaskchildPictureService")
@Slf4j
public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchildPictureMybatisDao, OcrTaskchildPicture> implements OcrTaskchildPictureService {
@Resource
private OcrTaskchildPictureMybatisDao ocrtaskchildpicturemybatisdao;
@ -82,10 +94,13 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
IFlowInstanceService flowInstanceService;
@Resource
private CategoryService categoryService;
private IOcrPictureDuplicateHisService pictureDuplicateHisService;
@Resource
private IOcrPictureDuplicateHisService pictureDuplicateHisService;
private PrevailCloudApi prevailCloudApi;
@Autowired
private DepartmentService departmentService;
/**
*
@ -312,8 +327,8 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
//TODO 没有对应项目,返回提示信息
continue;
}
Category category = categoryService.getById(ocrPicture.getCategoryid());
if (null == category || StringUtils.isBlank(category.getProcessdefinitionid())) {
Department department = departmentService.getOne(new LambdaQueryWrapper<Department>().eq(Department::getDeptno, tenantId));
if (null == department || StringUtils.isBlank(department.getProcessdefinitionid())) {
continue;
}
//创建工单,如果创建成功,增加标志,用于过滤条件使用
@ -323,13 +338,13 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request));
//发起流程
flowInstanceService.startProcessInstanceById(
category.getProcessdefinitionid(),
department.getProcessdefinitionid(),
null,
request,
ocrTaskchildPicture.getId().toString(),
category.getServicename()
department.getServicename()
);
IFormCustomService iFormCustomService = SpringUtils.getBean(category.getServicename());
IFormCustomService iFormCustomService = SpringUtils.getBean(department.getServicename());
FlowModelVO formData = iFormCustomService.getForm(ocrTaskchildPicture.getId().toString());
List<Task> taskList = iFlowTaskService.nowRunTask(formData.getProcessInstanceId(), ocrTaskchildPicture.getProcessdefinitionid());
Task taskData = null;
@ -601,7 +616,7 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
*/
public List<OcrTaskchildPicture> listFinal(Map<String, Object> query) {
return this.ocrtaskchildpicturemybatisdao.listFinal(query);
return this.ocrtaskchildpicturemybatisdao.listFinalTask(query);
}
@ -648,8 +663,8 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
}
@Override
public List<OcrTaskChildPictureVo> getPictureHistoryList(List<String> pictureIds, String taskname) {
return ocrtaskchildpicturemybatisdao.getPictureHistoryList(pictureIds, taskname);
public List<OcrTaskChildPictureVo> getPictureHistoryList(List<String> pictureIds, String pictureId) {
return ocrtaskchildpicturemybatisdao.getPictureHistoryList(pictureIds, pictureId);
}
@Override
@ -672,12 +687,23 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
OcrPictureDuplicateHis duplicateHis = pictureDuplicateHisService.getOne(new LambdaQueryWrapper<OcrPictureDuplicateHis>().eq(OcrPictureDuplicateHis::getPictureId, pictureId));
Page<OcrTaskChildPictureVo> objectPage = new Page<>();
if (ObjectUtils.isNotEmpty(duplicateHis) && org.apache.commons.lang3.StringUtils.isNotBlank(duplicateHis.getCheckDuplicateResultHisJson())) {
String userNodeType = ProcessConstant.userNodeType.getOrDefault(userToken.getNodeType(), "一级审批");
JSONObject jsonObject = JSONObject.parseObject(duplicateHis.getCheckDuplicateResultHisJson());
Set<String> pictureIds = jsonObject.keySet();
List<OcrTaskChildPictureVo> taskChildPictures = this.getPictureHistoryList(new ArrayList<>(pictureIds), userNodeType);
List<OcrTaskChildPictureVo> taskChildPicturesOld = this.getPictureHistoryList(new ArrayList<>(pictureIds), pictureId);
List<OcrTaskChildPictureVo> taskChildPictures = new ArrayList<>();
for (OcrTaskChildPictureVo taskChildPicture : taskChildPicturesOld) {
if(taskChildPicture.getPictureId()!=null){
taskChildPictures.add(taskChildPicture);
}
}
for (OcrTaskChildPictureVo taskChildPicture : taskChildPictures) {
taskChildPicture.setSimilarityScore(Integer.parseInt(jsonObject.getString(taskChildPicture.getPictureId().toString())));
if(jsonObject.getString(taskChildPicture.getPictureId())!=null){
taskChildPicture.setSimilarityScore(Integer.parseInt(jsonObject.getString(taskChildPicture.getPictureId().toString())));
}else{
taskChildPicture.setSimilarityScore(1);
}
}
if (orderValue.equals("similarityScore")) {
if ("desc".equals(orderType)) {
@ -701,22 +727,20 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
}
@Override
public Page<OcrTaskChildPictureVo> getPackageSimilarityList(Integer pageNo, Integer pageSize, String oderType, String oderName, String checkDuplicateId, String pictureId, UserToken userToken) {
public Page<OcrTaskChildPictureVo> getPackageSimilarityList(Integer pageNo, Integer pageSize, String oderType, String oderName, String checkDuplicateId, String pictureId) {
Page<OcrTaskChildPictureVo> page = new Page<>(pageNo, pageSize);
String userNodeType = ProcessConstant.userNodeType.getOrDefault(userToken.getNodeType(), "一级审批");
return ocrtaskchildpicturemybatisdao.getPackageSimilarityList(page, checkDuplicateId, pictureId, oderType, oderName, userNodeType);
return ocrtaskchildpicturemybatisdao.getPackageSimilarityList(page, checkDuplicateId, pictureId, oderType, oderName);
}
@Override
public void sendFlowTaskResult(OcrTaskchildPicture taskchildPicture, OcrPicture picture, FlowApprove flowApprove) {
public void sendFlowTaskResult(OcrTaskchildPicture taskchildPicture, OcrPicture picture, FlowApprove flowApprove) throws Exception {
FlowResultDto flowResultDto = new FlowResultDto();
flowResultDto.setTenantNo(picture.getTenantId());
flowResultDto.setAccountNo(Long.parseLong(picture.getPictureid()));
flowResultDto.setTaskNo(Long.parseLong(picture.getRemark()));
flowResultDto.setPictureMatchDegree(BigDecimal.valueOf(picture.getSimilarityscore()));
flowResultDto.setIsPictureRepeat(Integer.valueOf(picture.getField14()));
flowResultDto.setIsPictureRight(picture.getIztrueorfalse());
flowResultDto.setIsPictureRepeat(picture.getField14()==null?0:Integer.valueOf(picture.getField14()));
flowResultDto.setIsPictureRight(picture.getIztrueorfalse()==null?0:picture.getIztrueorfalse());
Integer resultStatus = Objects.equals(taskchildPicture.getStates(), SystemConstantsOa.OA_STATUS_TYPE_END) ? SystemConstantsOa.OCR_STATUS_SUCCESS : SystemConstantsOa.OCR_STATUS_FAILURE;
flowResultDto.setApproveResult(resultStatus);
flowResultDto.setApproveRemark(flowApprove.getComment());
@ -729,9 +753,10 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
}
}
flowResultDto.setApproveDetailList(nodeList);
prevailCloudApi.sendFlowTaskResult(picture.getTenantId().toString(),JSON.toJSONString(flowResultDto));
}
@Override
public List<OcrTaskChildPictureVo> getDubiousfileList(List<String> pictureIds, String taskname) {
return ocrtaskchildpicturemybatisdao.getDubiousfileList(pictureIds, taskname);

@ -72,7 +72,7 @@ public class OcrUsersearchchildServiceImpl extends BaseServiceImpl<OcrUsersearch
vo.setIzproductname(ocrUsersearchchild.getSearchvalue());
}
if(SearchConfigEnum.FIELD16.getId().equals(searchfield)){
vo.setIztaskstatus(ocrUsersearchchild.getSearchvalue());
vo.setIzstatus(ocrUsersearchchild.getSearchvalue());
}
if(SearchConfigEnum.FIELD17.getId().equals(searchfield)){
vo.setIzprojecttype(ocrUsersearchchild.getSearchvalue());

@ -252,7 +252,6 @@ public class TaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchildPic
//iFlowFormMessageService.sendMsg(user.getLoginname(),model.getUsername() + SystemMessage.SYS_OA_TYPE_LEAVE + SystemMessage.SYS_OA_TO_DO,taskId,processInstanceId,fromid, CacheQyweixinConstants.OA_DISTIONARY_TYPE_MSG_SHENPI,model.getCategoryid().toString());
}
model.setAssigneename(stringBuffer.toString());
return this.ocrTaskchildPictureService.updateById(model);
}
return false;

@ -0,0 +1,79 @@
package cn.jyjz.xiaoyao.ocr.thread;
import cn.jyjz.xiaoyao.common.base.util.SpringUtils;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.thread.entity.PictureImgToLocalEntity;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.*;
@Slf4j
public class ImageDownloadMonitoring {
@Autowired
private OcrPictureService ocrPictureService;
private static Logger logger = LoggerFactory.getLogger(TaskQueue.class);
/**
*
*
* @return
*/
public boolean startImageDownloadMonitoring(String localImagePath) {
Runnable runnable = new Runnable() {
@SneakyThrows
@Override
public void run() {
OcrPictureService ocrPictureService = SpringUtils.getBean("ocrPictureService");
// while (true) {
logger.debug("图片下载监测中...");
// try {
// 查询数据库中local_picture_url字段为null的图片数据
LambdaQueryWrapper<OcrPicture> ocrPictureLambdaQueryWrapper = new LambdaQueryWrapper<>();
ocrPictureLambdaQueryWrapper.isNull(OcrPicture::getLocalpictrueurl);
List<OcrPicture> ocrPictureList = new ArrayList<>();
ocrPictureList = ocrPictureService.list(ocrPictureLambdaQueryWrapper);
logger.debug("待执行下载图片数量:{}",ocrPictureList.size());
for (OcrPicture pictureOne : ocrPictureList) {
// 创建 PictureImgToLocalEntity 对象并赋值
PictureImgToLocalEntity entity = new PictureImgToLocalEntity();
entity.setPictureId(pictureOne.getId());
entity.setImgUrl(pictureOne.getImgurl());
String imgurl = pictureOne.getImgurl();
entity.setLocalPath(localImagePath + imgurl.substring(imgurl.lastIndexOf("/")));
//本地调试下载地址
// entity.setLocalPath("D:\\server\\data\\images" + imgurl.substring(imgurl.lastIndexOf("/")));
// 将对象添加到下载图片队列中
boolean isAddedToQueue = false;
while (!isAddedToQueue) {
isAddedToQueue =TaskQueue.pictureImgToLocalPushData(entity);
if (!isAddedToQueue) {
logger.info("图片下载监测-添加队列失败,等待五秒后继续进行添加,图片id:{}",entity.getPictureId());
Thread.sleep(5000);
}
}
}
// // 等待一段时间再继续检查
// Thread.sleep(60000);
// } catch (Exception e) {
// logger.error("图片下载监测出错{}", e.getMessage());
// Thread.sleep(5000);
// }
// }
}
};
Thread thread = new Thread(runnable);
thread.start();
return true;
}
}

@ -1,5 +1,6 @@
package cn.jyjz.xiaoyao.ocr.thread;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
@ -12,10 +13,13 @@ import org.springframework.stereotype.Component;
*/
@Component
public class TaskRunner implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {
TaskThreadPool taskThreadPool = new TaskThreadPool();
taskThreadPool.startPictureDisposePull();
taskThreadPool.startPictureImgToLocalPull();
// ImageDownloadMonitoring imageDownloadMonitoring = new ImageDownloadMonitoring();
// imageDownloadMonitoring.startImageDownloadMonitoring(localImagePath);
}
}

@ -4,6 +4,7 @@ import cn.jyjz.xiaoyao.ocr.api.entity.PictureSourceResult;
import cn.jyjz.xiaoyao.ocr.thread.entity.PictureImgToLocalEntity;
import cn.jyjz.xiaoyao.ocr.thread.tasks.PictureDisposeTask;
import cn.jyjz.xiaoyao.ocr.thread.tasks.PictureImgToLocalTask;
import liquibase.pro.packaged.E;
import lombok.SneakyThrows;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -21,6 +22,7 @@ public class TaskThreadPool {
private static Logger logger = LoggerFactory.getLogger(TaskQueue.class);
ExecutorService threadPool = null;
ExecutorService threadPoolImg = null;
public TaskThreadPool() {
if (threadPool == null) {
@ -32,6 +34,15 @@ public class TaskThreadPool {
new LinkedBlockingDeque<>(),
Executors.defaultThreadFactory(),
new ThreadPoolExecutor.DiscardOldestPolicy());
threadPoolImg = new ThreadPoolExecutor(
10,
40,
3,
TimeUnit.SECONDS,
new LinkedBlockingDeque<>(),
Executors.defaultThreadFactory(),
new ThreadPoolExecutor.DiscardOldestPolicy());
}
}
@ -45,8 +56,8 @@ public class TaskThreadPool {
@SneakyThrows
@Override
public void run() {
logger.debug("无量云接口数据处理消费线程检测中...");
while (true) {
logger.debug("无量云接口数据处理消费线程检测中...,队列数量:{}",TaskQueue.pictureDisposeQueue.size());
PictureSourceResult pictureSourceResult = TaskQueue.pictureDisposePullData();
if (pictureSourceResult != null) {
threadPool.execute(new PictureDisposeTask(pictureSourceResult));
@ -71,13 +82,12 @@ public class TaskThreadPool {
@SneakyThrows
@Override
public void run() {
logger.debug("图片下载消费线程检测中...");
while (true) {
logger.debug("图片下载消费线程检测中...,队列数量:{}",TaskQueue.pictureImgToLocalQueue.size());
try {
PictureImgToLocalEntity pictureImgToLocalEntity = TaskQueue.pictureImgToLocalPullData();
if (pictureImgToLocalEntity != null) {
threadPool.execute(new PictureImgToLocalTask(pictureImgToLocalEntity));
threadPoolImg.execute(new PictureImgToLocalTask(pictureImgToLocalEntity));
} else {
Thread.sleep(5000);
}

@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.jyjz.xiaoyao.common.base.util.SpringUtils;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.thread.TaskQueue;
import cn.jyjz.xiaoyao.ocr.thread.entity.PictureImgToLocalEntity;
import cn.jyjz.xiaoyao.ocr.util.DownloadImgUtil;
import cn.jyjz.xiaoyao.ocr.util.ImageUtils;
@ -80,7 +81,22 @@ public class PictureImgToLocalTask implements Runnable {
// picture.setPhotoDateTimestamp(timestamp);
// }
ocrPictureService.updateById(picture);
logger.info("图片本地化,回写数据完成!");
logger.info("开启获取图片信息操作!");
ocrPictureService.savePicturesInfo(picture);
logger.info("获取图片信息操作,结束!");
}
}else{
//判断是否是第一次失败!
if(picture.getDownloadErrorCount()==null){
picture.setDownloadErrorCount(0);
}
//判断如果没超过5次则放回队列进行重试
if( picture.getDownloadErrorCount()!=null && picture.getDownloadErrorCount()<5){
TaskQueue.pictureImgToLocalPushData(pictureImgToLocal);
picture.setDownloadErrorCount(picture.getDownloadErrorCount()+1);
}
ocrPictureService.updateById(picture);
}
}

@ -5,6 +5,8 @@ import org.slf4j.LoggerFactory;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URL;
/**
@ -32,8 +34,16 @@ public class DownloadImgUtil {
while ((n = in.read(buffer)) != -1) {
out.write(buffer, 0, n);
}
out.flush();
} catch (Exception e) {
logger.error(e.getMessage());
logger.error("转储异常问题msg:{}",e.getMessage());
logger.error("转储异常问题json:{}",e.getStackTrace());
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
String exceptionDetails = sw.toString();// 包含堆栈跟踪信息的字符串
logger.error("图片本地化,转储图片异常:{}",exceptionDetails);
return false;
}
return true;

@ -21,7 +21,7 @@ public enum SearchConfigEnum {
//任务来源
FIELD4("iztaskrrom","field4"),
//任务状态
FIELD16("iztaskstatus","field16"),
FIELD16("izstatus","field16"),
//拜访省份/直辖市、
PROCINCE("izvisitpro","releaseprovince"),
//厂商

@ -1,6 +1,8 @@
package cn.jyjz.xiaoyao.ocr.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -18,6 +20,9 @@ import java.io.Serializable;
public class OcrFieldVo implements Serializable {
private static final long serialVersionUID = 8088861709460050761L;
@Schema(description = "主键")
private Long id;
@Schema(description = "字段名称",required = true)
private String name;
@ -29,4 +34,16 @@ public class OcrFieldVo implements Serializable {
@Schema(description = "是否必选",required = true)
private Integer isrequired;
@Schema(description = "排序字段")
private Integer sort;
@Schema(description = "是否高亮")
private Integer isHighlight;
@Schema(description = "是否可点击")
private Integer isTap;
@Schema(description = "是否隐藏")
private Integer isHide;
}

@ -30,7 +30,7 @@ public class SearchConditionVO {
private String iztaskrrom;
@ApiModelProperty(value = "任务状态")
private String iztaskstatus;
private String izstatus;
@ApiModelProperty(value = "拜访省份/直辖市、")
private String izvisitpro;

@ -213,7 +213,16 @@
t2.FROMUPTIME fromTime,
t2.UPDATETIME updateTime,
t2.TASKID taskId,
t2.ID formId
(
SELECT GROUP_CONCAT(t4.ID)
FROM ocr_picture t4
WHERE t4.field8 = t1.content
AND t4.ID IN (
SELECT child.PICTUREID
FROM oa_userfinal_t final
LEFT JOIN ocr_taskchild_picture child ON final.FORMID = child.ID
)
) AS formId
from (select count(field8) count, field8 content, ID id, imgUrl
FROM ocr_picture
where ID in (select child.PICTUREID from oa_userfinal_t final left join ocr_taskchild_picture child on final.FORMID = child.ID)

@ -226,30 +226,29 @@
</sql>
<select id="getPackagePictureInfo" resultMap="BaseResultMap">
SELECT t2.*,t3.*,ifnull(t5.STATSHIS, 1) historyStates,t4.STATES,t4.TASKID,t4.ID taskchildId
SELECT t2.*,
t3.*,
t4.STATES,
t4.TASKID,
t4.ID taskchildId,
COALESCE(
(SELECT t5.STATSHIS
FROM oa_userapprove_t t5
WHERE t5.FORMID = t4.ID
ORDER BY t5.CREATEDATE DESC
LIMIT 1),
1) AS historyStates
FROM ocr_check_duplicate_result t1
LEFT JOIN ocr_picture t2 ON t1.picture_id = t2.ID
left join ocr_picture_info t3 on t2.ID=t3.picture_id
left join ocr_taskchild_picture t4 on t2.ID=t4.PICTUREID
left join oa_userapprove_t t5 on t4.ID=t5.FORMID and t5.TASKNAME = '${userNodeType}'
left join ocr_picture_info t3 on t2.ID = t3.picture_id
left join ocr_taskchild_picture t4 on t2.ID = t4.PICTUREID
where t1.check_duplicate_id = #{packageId}
<if test="pictureId != null and pictureId != ''">
and t1.picture_id = #{pictureId}
</if>
ORDER BY t1.max_similarity desc,t1.similarity_group_order asc, t2.submit_date_timestamp DESC
and t2.suspiciousfile = 0
<if test="pictureId != null and pictureId != ''">
and t1.picture_id = #{pictureId}
</if>
ORDER BY t1.max_similarity desc, t1.similarity_group_order asc, t2.submit_date_timestamp asc
LIMIT 1
</select>
<select id="getPictureNodeStatesList" resultType="cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture">
SELECT t1.*,
ifnull(t3.STATSHIS, 1) historyStates
FROM ocr_picture t1
LEFT JOIN ocr_taskchild_picture t2
on t1.ID = t2.PICTUREID
LEFT JOIN oa_userapprove_t t3 on t2.ID = t3.FORMID and t3.TASKNAME = '${userNodeType}'
where t1.ID in
<foreach collection="pictureIds" open="(" close=")" item="item" separator="," index="index">
#{item}
</foreach>
</select>
</mapper>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save