Compare commits

...

256 Commits

Author SHA1 Message Date
733bc67aea 流程发布表单配置,流程配置 2022-07-27 14:31:20 +08:00
c47556076d 提交测试 2022-07-27 14:02:32 +08:00
31f7b89429 提交测试 2022-07-27 14:01:47 +08:00
翟林帆
12f55cc0eb 1.维护字段属性 表单图新增修订内容及理由字段。
2.完善手册代码
2022-07-15 10:18:35 +08:00
chengli
7e108247cf 处理标题中的特殊字符 2022-07-14 01:02:17 +08:00
chengli
dbbd375ed8 制度导入无第一个节点代码 2022-07-13 22:11:36 +08:00
chengli
78abeadb94 流程发布基本代码 2022-07-13 19:28:29 +08:00
chengli
95a4cbbf16 Merge remote-tracking branch 'origin/master' 2022-07-13 15:52:42 +08:00
chengli
f67af816b3 表单解析~添加新的模板 2022-07-13 15:52:01 +08:00
anhc
99c7838dd6 补交小组查询方法 2022-07-13 14:33:28 +08:00
anhc
98efe9831a 小组权限复制功能阶段提交 2022-07-13 11:00:02 +08:00
136b351e97 流程阅览展开缩放功能 2022-07-13 10:04:06 +08:00
deac10facd 相关文件新建部署 2022-07-12 23:26:11 +08:00
anhc
de165cfb98 小组新建更新缓存策略调整 2022-07-12 22:16:26 +08:00
anhc
995e6b23fd 小组旧版本新建更新缓存策略调整 2022-07-12 22:11:32 +08:00
anhc
5b6fe274f1 小组数据库语句补充 2022-07-12 21:57:35 +08:00
mrs_12345@163.com
a2ee0bef49 画布大小取整 2022-07-12 18:54:22 +08:00
202e946f0f 修改制度名称 2022-07-12 18:23:10 +08:00
a8ae0a267c 流程手册部署 2022-07-12 17:38:45 +08:00
chengli
da83bb87f0 流程发布调整 2022-07-12 15:42:49 +08:00
2d7b10e410 部署 2022-07-12 15:13:48 +08:00
7c066649b5 岗位部署 2022-07-12 14:54:33 +08:00
9e29d9a6c2 修复无法插入分类问题 2022-07-12 14:26:36 +08:00
mrs_12345@163.com
a3e61bbe1b 工具栏调整画布大小功能调整 2022-07-12 14:14:46 +08:00
204ba571c2 岗位显示 2022-07-12 14:12:03 +08:00
翟林帆
e2453361ae 1.调整模型新建默认形状大小。 2022-07-12 14:09:24 +08:00
anhc
b5abd4a5a0 小组应用前端vue更新 2022-07-12 14:04:03 +08:00
anhc
393b53b065 小组成员接口返回数据调整 2022-07-12 13:56:57 +08:00
446052889@qq.com
5dc8201a19 流程改为流程制度,通过国际化文件更改 2022-07-12 13:48:11 +08:00
翟林帆
8e495b7d0a 1.修改流程手册BUG。 2022-07-12 13:42:51 +08:00
anhc
13bbd9ecb7 小组权限,新建小组时补充隐藏角色的新建 2022-07-12 13:34:31 +08:00
chengli
03f0114f75 处理制度创建~~自动创建是没有制度图形的情况 2022-07-12 12:00:54 +08:00
anhc
efe58c3b5b 流程导入Word解析方法调整 2022-07-12 10:42:51 +08:00
a680b9f4d1 岗位显示 2022-07-12 10:40:27 +08:00
849792df42 岗位显示部署 2022-07-12 10:31:03 +08:00
qinoy
b0fbe89df9 伊利项目 新增方法根据报告生成器的任务ID查询对应的文件存储路径 2022-07-12 09:55:32 +08:00
chengli
ec140b2efd 增加拟制/修订单位 2022-07-11 22:35:25 +08:00
5dec81dee9 校验部署 2022-07-11 18:34:58 +08:00
anhc
f6052753d9 pal 小组应用 小组权限相关vue页面调整更新 2022-07-11 16:51:37 +08:00
anhc
98b0042c6e pal 小组权限相关vue页面调整更新 2022-07-11 16:50:43 +08:00
mrs_12345@163.com
7bd41d025a 设计器文件属性input框placeholder 2022-07-11 15:14:53 +08:00
anhc
cf06f6d1e4 清除无效引用 2022-07-11 15:04:11 +08:00
anhc
152436d536 小组新版权限新建文件后强制加锁 2022-07-11 14:57:50 +08:00
翟林帆
e0f3bfdcd1 1.字段组织角色 改为组织/角色与职责。 2022-07-11 14:48:54 +08:00
qinoy
1dcf850220 Merge remote-tracking branch 'origin/master' 2022-07-11 13:56:58 +08:00
qinoy
9d535c385e 伊利项目【增加审批中状态】补提文件 2022-07-11 13:55:30 +08:00
chengli
ce9b28c8a3 Merge remote-tracking branch 'origin/master' 2022-07-11 13:53:37 +08:00
chengli
f61f003205 处理异常的jar 2022-07-11 13:53:27 +08:00
anhc
b19c397d6f 小组权限调整,批量删除接口加入小组文件权限判断 2022-07-11 13:52:00 +08:00
anhc
19a02ab05a 用户权限获取方法调整 2022-07-11 12:32:07 +08:00
anhc
be8efc5b2f 小组权限调整,批量创建副本接口加入小组文件权限判断 2022-07-11 12:30:51 +08:00
anhc
0ecb3c124a 小组权限调整,批量移动文件接口加入小组文件权限判断 2022-07-11 11:25:40 +08:00
chengli
9b975719e7 Merge remote-tracking branch 'origin/master' 2022-07-11 11:08:24 +08:00
chengli
1e33f1f4fa 处理异常~ 2022-07-11 11:08:15 +08:00
anhc
d58e4aa2d6 小组版本管理新版权限适配 2022-07-11 10:15:17 +08:00
mrs_12345@163.com
3b319036f0 工具栏调整画布大小icon调整 2022-07-11 09:59:36 +08:00
anhc
7654ce9457 小组批量标志权限修改 2022-07-11 09:58:07 +08:00
b8ca49f1ed 左侧架构下拉逻辑 2022-07-11 00:56:17 +08:00
2c27a53f23 展开代码部署 2022-07-11 00:43:38 +08:00
anhc
a8eb661498 增加文件权限返回值 2022-07-11 00:10:51 +08:00
anhc
b3fc5408d8 增加文件权限返回值 2022-07-11 00:06:05 +08:00
chengli
01339eb388 Merge remote-tracking branch 'origin/master' 2022-07-10 23:17:35 +08:00
chengli
a2494c8f84 提交jar包 2022-07-10 23:17:27 +08:00
d9c107f61a PAL代码部署 2022-07-10 23:08:48 +08:00
chengli
eb9b42af2e 调整参数名 2022-07-10 21:48:42 +08:00
chengli
53607fdd27 Merge remote-tracking branch 'origin/master' 2022-07-10 20:57:27 +08:00
chengli
64dc240b18 调整属性参数 2022-07-10 20:57:19 +08:00
翟林帆
ffbf0b3729 1.流程手册更改。 2022-07-10 19:16:22 +08:00
3816715876 PAL代码部署 2022-07-10 18:43:24 +08:00
翟林帆
57200075b2 1.解决报告生成器不显示类型数据的问题。 2022-07-10 17:43:42 +08:00
446052889@qq.com
5eb5d2b485 提交 2022-07-10 16:54:36 +08:00
503be2e937 PAL代码部署 2022-07-10 16:21:42 +08:00
446052889@qq.com
a7a70d6ed7 建立导入成功清单日志文件 2022-07-10 15:55:00 +08:00
faecdae62b 流程代码 2022-07-10 15:07:59 +08:00
446052889@qq.com
9b54a2b809 提交 2022-07-10 14:59:11 +08:00
b1e77990d5 修改节点名称 2022-07-10 14:58:19 +08:00
a403dfd401 流程代码 2022-07-10 14:46:18 +08:00
d242ead968 组织架构点击跳转链接代码 2022-07-10 14:29:34 +08:00
446052889@qq.com
7b7fac8e51 aris流程导入处理空格问题 asc码160特殊空格 2022-07-10 12:55:46 +08:00
0e02ee1c1b PALvue打包代码 2022-07-10 11:36:35 +08:00
翟林帆
212d897e81 1.属性字段更新完成ARIS流程地址。 2022-07-10 10:48:02 +08:00
willow
9cafe32c36 设计器画布大小工具栏手动调节 2022-07-09 19:58:32 +08:00
chengli
de10bb6856 Merge remote-tracking branch 'origin/master' 2022-07-09 18:36:30 +08:00
chengli
4368743bc9 处理属性未写入的问题 2022-07-09 18:36:22 +08:00
446052889@qq.com
3e24c31c52 批处理缓存定义到上层父应用 2022-07-09 18:18:48 +08:00
446052889@qq.com
1ac4c7cfc6 数据迁移缓存定义到上层父应用 2022-07-09 18:10:51 +08:00
willow
bf7e1bb236 流程发布适应高宽 2022-07-09 16:50:33 +08:00
chengli
dbe84f0e9b 挂载附件~解析word内的制度名称 2022-07-09 15:18:37 +08:00
446052889@qq.com
e794286ed6 Aris流程导入调整匹配规则,增加匹配验证步骤 2022-07-09 15:16:53 +08:00
chengli
f9110c5699 Merge remote-tracking branch 'origin/master' 2022-07-09 14:28:27 +08:00
chengli
7efe804fa8 挂载附件~解析word内的文件名 2022-07-09 14:28:15 +08:00
翟林帆
6264690dd4 1.属性字段更新完成 修改报告生成器错别字。 2022-07-09 11:03:37 +08:00
mrs_12345@163.com
5b418056e8 流程发布自适应画布大小 2022-07-08 19:37:51 +08:00
mrs_12345@163.com
fa0d386fa5 设计器数据属性表格类型多表格显示与保存bug解决 2022-07-08 18:12:46 +08:00
anhc
237b52c8a0 新增小组角色dao方法添加字段 2022-07-08 18:06:52 +08:00
anhc
490025856b 小组权限相关内容调整 2022-07-08 18:05:40 +08:00
qinoy
15183ca29f 伊利项目-增加审批中状态 2022-07-08 17:29:27 +08:00
147f234613 增加图标 2022-07-08 16:40:11 +08:00
chengli
a5baa9f0f4 Merge remote-tracking branch 'origin/master' 2022-07-08 15:25:39 +08:00
chengli
c6e415f77d 挂载附件 2022-07-08 15:25:32 +08:00
mrs_12345@163.com
cd217f11df 流程发布缩略图与页面大小调整 2022-07-08 15:19:22 +08:00
qinoy
3a135d9f69 伊利项目-增加设计中状态 2022-07-08 14:33:13 +08:00
435905235f 回复代码 2022-07-08 13:37:28 +08:00
83226d20bc 修改流程架构 2022-07-08 13:12:18 +08:00
a50b691fe2 Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-08 13:05:44 +08:00
qinoy
5c5b82edeb 伊利项目-批处理应用导入清单扩展制度图与表单图 2022-07-08 12:57:04 +08:00
83b03331e9 Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-08 12:25:55 +08:00
mrs_12345@163.com
4d5b66e0f8 设计器文件属性表格类型字段重复 2022-07-08 11:52:53 +08:00
d74a69fd3b Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-08 11:26:26 +08:00
de8249544a 组织图标显示 2022-07-08 11:22:29 +08:00
chengli
ecac7d4466 Merge remote-tracking branch 'origin/master' 2022-07-08 11:21:39 +08:00
chengli
f89954553f js文件处理 2022-07-08 11:21:09 +08:00
qinoy
67a7951527 伊利项目-增加审批中状态补提文件 2022-07-08 11:10:51 +08:00
qinoy
0902239d1b 伊利项目-增加审批中状态 2022-07-08 10:46:06 +08:00
chengli
747eaccbcc js文件处理 2022-07-08 10:41:03 +08:00
26354aea07 压缩代码 2022-07-08 10:29:47 +08:00
chengli
038810e31e 上传附件按钮 2022-07-07 22:40:54 +08:00
chengli
10fb583051 制度和表单批量~~ 2022-07-07 22:37:23 +08:00
chengli
5e9dad9823 处理制度条款样式 2022-07-07 22:36:38 +08:00
chengli
d01c69fb4d Merge remote-tracking branch 'origin/master' 2022-07-07 21:45:13 +08:00
chengli
eef12a84aa 导入附件制度 2022-07-07 21:43:02 +08:00
446052889@qq.com
4d8384704b 路径空格问题 2022-07-07 21:00:53 +08:00
446052889@qq.com
0d29684ecb 提交 2022-07-07 20:57:17 +08:00
mrs_12345@163.com
b12595875c 设计器表格类型换行显示 2022-07-07 20:24:00 +08:00
54cc4495ae 流程代码 2022-07-07 20:06:06 +08:00
c80ddca95a 多文件上传代码 2022-07-07 20:05:42 +08:00
446052889@qq.com
2af24dff46 形状属性tab切换错误问题 2022-07-07 19:11:04 +08:00
chengli
4d526a3cd2 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/htmltodocx/HtmlToWord.java
2022-07-07 18:21:08 +08:00
chengli
2130075e31 制度导入时 将正文存为富文本 富文本窗口调大 2022-07-07 18:20:20 +08:00
d733d7bd40 流程代码 2022-07-07 17:54:54 +08:00
anhc
b54b65bc53 新版权限小组角色查询方式调整 2022-07-07 17:22:21 +08:00
5c5bfd37b9 质量校验代码 2022-07-07 17:01:08 +08:00
f9554796cf 流程阅览超链接代码 2022-07-07 16:59:03 +08:00
anhc
028be0161a 修复流程导入日志文件名称过长问题 2022-07-07 16:27:11 +08:00
anhc
cb3b5ac448 修复流程导入日志文件名称过长问题 2022-07-07 16:22:32 +08:00
anhc
3a30f17591 补充被merge掉代码 2022-07-07 16:20:49 +08:00
翟林帆
917a801580 1.流程手册更新完成。 2022-07-07 15:42:19 +08:00
翟林帆
6dc3bba68b Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-07 15:34:13 +08:00
6514facb8c 增加图形放大缩小功能,优化新建角色模型代码 2022-07-07 15:32:31 +08:00
翟林帆
c9c5256947 Merge remote-tracking branch 'origin/master' 2022-07-07 15:15:54 +08:00
翟林帆
6d5308528b Merge remote-tracking branch 'origin/master'
# Conflicts:
#	com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/DataMigrationController.java
#	com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/htmltodocx/Test.java
#	com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/readtable/ReadTable.java
#	com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/readtable/WordTableAttrFile.java
2022-07-07 15:15:51 +08:00
3ce583eb42 数据迁移代码 2022-07-07 12:25:33 +08:00
446052889@qq.com
27e5af45a6 角色模型中ext2填充流程id 2022-07-07 11:33:49 +08:00
3596dbf5d7 制度,表单多文件上传 2022-07-07 11:06:53 +08:00
anhc
f2ad3a081d IT系统图导入获取数据属性列表方法修改 2022-07-07 10:39:15 +08:00
anhc
a94b875ddb 批量导入日志完善 2022-07-07 09:35:46 +08:00
anhc
7e7dbfbaca 批量流程导入接口加入日志输出 2022-07-07 00:22:14 +08:00
798b56d6bf 优化质量校验代码 2022-07-06 23:26:18 +08:00
shangguochao
cb34360976 打包部署测试环境 2022-07-06 21:54:51 +08:00
ca23230e06 评论回复代码 2022-07-06 21:40:53 +08:00
chengli
eebb95441c Merge remote-tracking branch 'origin/master' 2022-07-06 21:35:45 +08:00
chengli
b8c92ee62a 处理表单模型生成时 无属性值得情况。 2022-07-06 21:35:32 +08:00
anhc
383c8e71a9 修改获取小组权限方法,改为使用小组权限缓存 2022-07-06 20:45:45 +08:00
anhc
74ff2c8222 method缓存获取小组用户权限数据方法修改 2022-07-06 20:37:43 +08:00
mrs_12345@163.com
60e400e8cc 快捷调整间距(暂停) 2022-07-06 20:35:13 +08:00
mrs_12345@163.com
c41fb2a31b 设计器文件属性时间选择器位置bug修复 2022-07-06 20:15:45 +08:00
shangguochao
ee65540361 Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps
# Conflicts:
#	com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar
2022-07-06 20:03:51 +08:00
shangguochao
8e73127472 测试环境打包 2022-07-06 20:00:16 +08:00
anhc
20f07ce697 method缓存获取小区用户权限数据方法调整 2022-07-06 17:44:45 +08:00
446052889@qq.com
1e5300663a 必填校验逻辑改为后端处理 2022-07-06 17:26:58 +08:00
anhc
c90a483aed 修改小组新增文件接口默认赋值权限 2022-07-06 17:22:31 +08:00
qinoy
ba084184b5 伊利项目-设计器页面版本差异查看 2022-07-06 16:23:21 +08:00
anhc
2261f14fe9 修改流程属性Word导入接口为批量导入 2022-07-06 15:28:12 +08:00
shangguochao
673e9c89bf 删除不必要文件 2022-07-06 15:26:34 +08:00
qinoy
c25b10ca22 word文件导入批量上传前端修改 2022-07-06 15:09:47 +08:00
chengli
0e902ea525 表单属性解析相关代码 2022-07-06 14:27:02 +08:00
翟林帆
b24da3a557 Merge remote-tracking branch 'origin/master' 2022-07-06 10:17:52 +08:00
翟林帆
df6107eb37 Merge branch 'datamigration-word' of https://e.coding.net/yilidev/yilipalkaifa/apps
 Conflicts:
	com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/DataMigrationController.java
	com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/htmltodocx/HtmlUtils.java
	com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/htmltodocx/Test.java
	com.actionsoft.apps.coe.pal.datamigration/web/com.actionsoft.apps.coe.pal.datamigration/action.xml
2022-07-06 10:16:22 +08:00
anhc
0938985027 Word解析工具内容调整 2022-07-06 10:13:54 +08:00
anhc
524cd4a96c 新增文件接口中调整权限赋予位置,用户权限缓存补充对隐藏角色权限 2022-07-06 10:01:21 +08:00
翟林帆
c3d516f7ae 流程手册 制度 表格开发完成。 2022-07-05 23:54:12 +08:00
chengli
d101790c41 富文本编辑第一版代码。 2022-07-05 23:36:19 +08:00
ea50f67f11 定时同步组织代码 2022-07-05 22:52:53 +08:00
ca1d50da37 定时同步组织代码 2022-07-05 22:51:14 +08:00
anhc
db8b5e6f30 打开设计页面接口内容权限控制调整 2022-07-05 21:25:26 +08:00
shangguochao
a620b40a07 Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps
# Conflicts:
#	com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar
2022-07-05 21:20:49 +08:00
shangguochao
b51e0692b1 打包同步测试环境 2022-07-05 21:18:20 +08:00
8dfde64abc 定时同步组织代码 2022-07-05 21:12:55 +08:00
227e2b778e Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-05 20:53:00 +08:00
anhc
6787b98716 针对文件详情接口添加文件控制权限flag 2022-07-05 20:52:37 +08:00
anhc
a8b8bd3ba3 根据pid获取下属子文件接口权限相关内容调整 2022-07-05 20:06:07 +08:00
930e1f83b0 Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-05 19:58:15 +08:00
446052889@qq.com
24947ddcb7 导入模型是角色图形状间距缩小 2022-07-05 18:54:42 +08:00
446052889@qq.com
47beb09f48 Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-05 18:13:22 +08:00
446052889@qq.com
7b4863ca65 aris数据迁移IT系统别名映射调整 2022-07-05 18:13:01 +08:00
fb3a52a499 定时同步组织代码 2022-07-05 18:00:56 +08:00
7c64ee6083 绩效校验 2022-07-05 17:48:47 +08:00
qinoy
d8e065f57e 补提jar包 2022-07-05 17:38:00 +08:00
qinoy
4eb8786fc9 PAL主界面资产文件列表展示版本与状态信息 2022-07-05 17:30:39 +08:00
qinoy
5c90eb3de2 PAL主界面资产文件列表展示版本与状态信息 2022-07-05 17:21:50 +08:00
anhc
095fb8ce5c 修改获取获取小组权限方法,改为使用用户权限缓存 2022-07-05 17:12:08 +08:00
shangguochao
c92421bf9e Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-05 17:04:19 +08:00
shangguochao
32370b8d7f 补充vue文件 2022-07-05 17:04:11 +08:00
anhc
af0d3a1a25 获取header权限方法更换使用用户权限缓存获取app应用权限 2022-07-05 16:54:24 +08:00
446052889@qq.com
a57502c9f0 活动描述导入不显示 2022-07-05 16:21:12 +08:00
anhc
270c4431e6 切换小组用户多角色方法内容还原 2022-07-05 16:13:00 +08:00
anhc
beb06edcc2 切换角色保存配置判断条件修改 2022-07-05 15:49:47 +08:00
anhc
98c638c42d 新增小组接口:获取隐藏角色配置-用户权限 2022-07-05 15:44:57 +08:00
anhc
f7b73da52b 补充被merge掉的代码 2022-07-05 15:42:03 +08:00
anhc
0e15d1696e Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-05 15:37:05 +08:00
shangguochao
c0d983516c Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-05 15:06:17 +08:00
shangguochao
48317b9078 IT系统图新增别名属性 2022-07-05 15:06:10 +08:00
87d534ce79 注释代码 2022-07-05 14:59:17 +08:00
shangguochao
0693b72ca6 Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-05 14:57:29 +08:00
b811007511 补全获取路径代码 2022-07-05 14:56:40 +08:00
6fd8444cf3 Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-05 14:51:53 +08:00
0ead494ffe 定时同步组织代码 2022-07-05 14:43:47 +08:00
shangguochao
90e139546f Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps
# Conflicts:
#	com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar
2022-07-05 14:36:14 +08:00
anhc
ea01c365da Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-05 14:34:34 +08:00
shangguochao
e944e399ff Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps
# Conflicts:
#	com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar
2022-07-05 14:34:25 +08:00
anhc
9932a82b65 小组角色修改保存接口调整 2022-07-05 14:30:31 +08:00
mrs_12345@163.com
d7c9511bce PAL设计器时间类型输入框id修改 2022-07-05 14:09:22 +08:00
2ba17f768b 解决创建默认错误数据问题 2022-07-05 13:56:32 +08:00
anhc
943714276c 小组成员添加补充更新用户权限缓存策略 2022-07-05 13:44:17 +08:00
anhc
bc60e9abcf 小组成员dao添加用户多角色查询方法 2022-07-05 11:28:33 +08:00
anhc
f86368a2e6 查询小组角色接口调整 2022-07-05 11:26:41 +08:00
anhc
01ac0da1f6 小组多角色保存微调,小组成员列表获取处理多角色显示问题 2022-07-05 11:16:20 +08:00
anhc
b364c72041 小组api中添加查询指定roleid的角色信息 2022-07-05 11:12:00 +08:00
shangguochao
e22cee6ac4 Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-05 10:57:50 +08:00
shangguochao
50690d3dae 本地打包升级测试环境 2022-07-05 10:57:45 +08:00
mrs_12345@163.com
51d735e371 快捷调整间距鼠标右键菜单显示 2022-07-05 10:33:11 +08:00
c9830acae5 手动刷新数据代码 2022-07-05 10:23:27 +08:00
mrs_12345@163.com
09f9b2c4fd PAL设计器文件属性时间类型bug修复 2022-07-05 10:19:11 +08:00
anhc
5f017cd828 新版权限用户变更多角色保存调整 2022-07-05 09:28:34 +08:00
e21de7c0fc 组织架构代码 2022-07-04 23:53:43 +08:00
f5d37f0d04 定时同步组织代码 2022-07-04 23:34:35 +08:00
34f9eae515 质量校验代码 2022-07-04 23:03:34 +08:00
anhc
8d953fc8d6 获取角色列表剔除隐藏角色 2022-07-04 22:12:07 +08:00
anhc
ca89f1a428 获取角色列表剔除隐藏角色 2022-07-04 21:42:06 +08:00
anhc
4c910646e5 Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-04 21:32:57 +08:00
chengli
3c606f0981 流程属性相关代码 2022-07-04 21:32:07 +08:00
anhc
ff5c484791 角色dao查询映射添加字段 2022-07-04 21:26:22 +08:00
db668bbb63 组织架构同步代码 2022-07-04 21:24:24 +08:00
78f017178c 组织架构数据初始代码 2022-07-04 21:20:48 +08:00
anhc
94e39a1fc6 添加小组成员隐式添加角色,删除小组成员隐式删除隐式角色 2022-07-04 21:12:12 +08:00
anhc
33aaa3b6b7 批量添加小组成员方法修改,增加删除隐式用户角色api 2022-07-04 21:09:04 +08:00
446052889@qq.com
5afbe8fc3b Aris流程导入停止后删除其缓存 2022-07-04 18:23:19 +08:00
shangguochao
be39fa97fe Merge branch 'master' of https://e.coding.net/yilidev/yilipalkaifa/apps 2022-07-04 18:15:41 +08:00
shangguochao
044300a218 数据迁移校验问题修正 2022-07-04 18:15:04 +08:00
anhc
d0cf8ac517 新版权限小组角色新增与更新前置获取数据方法与保存小组权限接口内容调整 2022-07-04 17:46:53 +08:00
anhc
5b93fc8fa4 小组用户权限缓存更新获取小组下权限文件方法,增加角色下模型数据查询方法 2022-07-04 17:44:05 +08:00
shangguochao
2cabd75966 数据迁移校验图形属性时问题修改 2022-07-04 17:42:56 +08:00
anhc
19b5d9bd07 pal 小组缓存更新方法提交 2022-07-04 16:57:42 +08:00
翟林帆
3a2e463942 同步字段 2022-07-04 16:30:36 +08:00
anhc
1c7dd2743c 小组用户角色表model添加字段isUser 是否为隐藏用户角色 2022-07-04 15:48:50 +08:00
anhc
3d3c42122b 批量修改小组角色权限方法修改 2022-07-04 15:33:59 +08:00
446052889@qq.com
21db306e90 打包 2022-07-04 15:33:42 +08:00
anhc
533eb51700 小组成员添加接口,用户权限修改 2022-07-04 14:44:46 +08:00
anhc
7c79e2c76f 添加pal小组兼容版本参数配置 2022-07-04 14:28:11 +08:00
446052889@qq.com
1847e995ef 数据迁移应用前端调整 2022-07-04 13:38:32 +08:00
446052889@qq.com
668d6104ce Aris流程数据迁移日志记录处理 2022-07-04 12:44:59 +08:00
446052889@qq.com
bdddcbeef2 Aris流程数据迁移日志记录处理 2022-07-04 01:48:15 +08:00
翟林帆
9224351aaa 修改xml字段 2022-07-04 01:17:06 +08:00
efea982355 质量校验代码 2022-07-04 01:02:45 +08:00
翟林帆
8a516fd4d6 完善属性字段及xml解析 2022-07-04 00:21:50 +08:00
446052889@qq.com
a0e9f5354a Aris流程数据迁移日志记录处理 2022-07-03 01:35:37 +08:00
395 changed files with 57123 additions and 38533 deletions

View File

@ -3,7 +3,7 @@
<app xmlns="http://www.actionsoft.com.cn/app">
<name>流程图(EPC)建模方法</name>
<version>1.0</version>
<buildNo>28</buildNo>
<buildNo>29</buildNo>
<developer id="776cca9a287c8b4d63b9cad216aa3859" tablePrefix="ACT" url="http://www.actionsoft.com.cn">北京炎黄盈动科技发展有限责任公司</developer>
<productId>4f3b2bbb813615ff2a9416e0817565c1</productId>
<categoryVisible>false</categoryVisible>

View File

@ -1,37 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<attributes type="customer">
<attribute key="auditor" title="审核人" type="string" value="" ref="" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="reviewer" title="复核人" type="string" value="" ref="" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="approver" title="审批人" type="string" value="" ref="" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="auditor" title="审核人" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true" desc="审核人" isRequired="false"/>
<attribute key="reviewer" title="复核人" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true" desc="复核人" isRequired="false"/>
<attribute key="approver" title="审批人" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true" desc="审批人" isRequired="false"/>
<attribute key="application" title="适用范围" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="file_number" title="文件编码" type="string" value="" ref="" readonly="true" groupPath="process_model" scope="%" isValid="true" desc="文件编码" isRequired="false"/>
<attribute key="file_number" title="文件编码" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true" desc="文件编码" isRequired="false"/>
<attribute key="Process_Architecture_L1" title="流程架构L1" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true" desc="22" isRequired="false"/>
<attribute key="Process_Architecture_L2" title="流程架构L2" type="string" value="" ref="" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="Process_Architecture_L3" title="流程架构L3" type="string" value="" ref="" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="Process_Architecture_L2" title="流程架构L2" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true" desc="流程架构l2" isRequired="false"/>
<attribute key="Process_Architecture_L3" title="流程架构L3" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true" desc="流程架构L3" isRequired="false"/>
<attribute key="Contents_and_reasons_for_revision" title="修订内容及理由" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="ARIS" title="ARIS地址" type="string" value="" ref="" readonly="false" groupPath="organization" scope="%" isValid="true"/>
<attribute key="P_versions" title="版本" type="string" value="" ref="" readonly="true" groupPath="process_model" scope="%" isValid="true" desc="版本" isRequired="true"/>
<attribute key="P_versions" title="版本" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true" desc="版本" isRequired="true"/>
<attribute key="Drafted_and_revised_by" title="拟制/修订人" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="Drafted_and_revised_date" title="拟制/修订日期" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="T_supplementary_articles" title="附则" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="goal" title="目的" type="string" value="" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true" desc="1" isRequired="true"/>
<attribute key="activity_number" title="活动序号" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="Process_performance_metrics" title="流程绩效" type="relation" value="" ref="{&quot;method&quot;:&quot;control.kpi&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false,&quot;value&quot;:&quot;&quot;}" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="activity_description" title="活动描述" type="textarea" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="活动描述" isRequired="true"/>
<attribute key="output" title="输出" type="textarea" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="R_relevant_flies" title="相关文件" type="relation" value="" ref="{&quot;method&quot;:&quot;process&quot;,&quot;type&quot;:&quot;file&quot;,&quot;multiple&quot;:false}" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="support_files" title="支持文件" type="relation" value="" ref="{&quot;method&quot;:&quot;process&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false,&quot;value&quot;:&quot;&quot;}" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="R_relevant_flies" title="相关文件" type="relation" value="" ref="{&quot;method&quot;:&quot;process&quot;,&quot;type&quot;:&quot;file&quot;,&quot;multiple&quot;:true}" readonly="true" groupPath="process_model" scope="%" isValid="true" desc="相关文件" isRequired="false"/>
<attribute key="support_files" title="支持文件" type="relation" value="" ref="{&quot;method&quot;:&quot;process&quot;,&quot;type&quot;:&quot;file&quot;,&quot;multiple&quot;:true}" readonly="true" groupPath="process_model" scope="%" isValid="true" desc="支持文件" isRequired="false"/>
<attribute key="relevant_flies" title="相关知识" type="link" value="" desc="相关知识" isRequired="false" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="Process_owner" title="流程责任人" type="awsorg" value="" desc="流程责任人" isRequired="false" ref="{&quot;scope&quot;:[&quot;user&quot;],&quot;multiple&quot;:false}" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="Issuing_department" title="发布部门" type="awsorg" value="" desc="发布部门" isRequired="false" ref="{&quot;scope&quot;:[&quot;department&quot;],&quot;multiple&quot;:false}" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="effective_date" title="生效日期" type="DateTimePicker" value="" desc="生效日期" isRequired="false" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="input" title="输入" type="textarea" value="" desc="输入" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="relevant_demand" title="相关要求" type="relation" value="" desc="相关要求" isRequired="false" ref="{&quot;method&quot;:&quot;itsystem&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false,&quot;value&quot;:&quot;&quot;}" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="relevant_demand" title="相关要求" type="relation" value="" desc="相关要求" isRequired="false" ref="{&quot;method&quot;:&quot;itsystem&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false,&quot;value&quot;:&quot;&quot;}" readonly="true" groupPath="baseAttribute" scope="*" isValid="false"/>
<attribute key="post" title="岗位" type="relation" value="" desc="岗位" isRequired="false" ref="{&quot;method&quot;:&quot;org.normal&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false,&quot;value&quot;:&quot;&quot;}" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="role" title="角色" type="relation" value="" desc="角色" isRequired="false" ref="{&quot;method&quot;:&quot;org.normal&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false}" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="term" title="术语" type="table" value="" desc="术语" isRequired="false" ref="{&quot;firstColumn&quot;:&quot;Listing1&quot;,&quot;secondColumn&quot;:&quot;Listing2&quot;}" readonly="false" groupPath="process_model" scope="*" isValid="true"/>
<attribute key="Organizational_role" title="组织角色" type="table" value="" desc="组织角色" isRequired="false" ref="{&quot;firstColumn&quot;:&quot;Listing1&quot;,&quot;secondColumn&quot;:&quot;Listing2&quot;}" readonly="false" groupPath="process_model" scope="*" isValid="true"/>
<attribute key="post_text" title="岗位" type="string" value="" desc="岗位" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="information_systems" title="信息系统" type="relation" value="" desc="信息系统" isRequired="false" ref="{&quot;method&quot;:&quot;itsystem.normal&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false,&quot;value&quot;:&quot;&quot;}" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="term" title="术语" type="table" value="" desc="术语" isRequired="false" ref="{&quot;firstColumn&quot;:&quot;术语&quot;,&quot;secondColumn&quot;:&quot;定义&quot;}" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="information_systems" title="信息系统" type="relation" value="" desc="信息系统" isRequired="false" ref="{&quot;method&quot;:&quot;itsystem.normal&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false}" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="Organizational_role" title="组织/角色与职责" type="table" value="" desc="组织/角色与职责" isRequired="false" ref="{&quot;firstColumn&quot;:&quot;名称&quot;,&quot;secondColumn&quot;:&quot;职责&quot;}" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="Drafted_and_revised_date" title="拟制/修订日期" type="DateTimePicker" value="" desc="拟制/修订日期" isRequired="false" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="effective_date" title="生效日期" type="DateTimePicker" value="" desc="生效日期" isRequired="false" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="Issuing_department" title="发布部门" type="awsorg" value="" desc="发布部门" isRequired="false" ref="{&quot;scope&quot;:[&quot;department&quot;],&quot;multiple&quot;:false}" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="Process_owner" title="流程责任人" type="awsorg" value="" desc="流程责任人" isRequired="false" ref="{&quot;scope&quot;:[&quot;user&quot;],&quot;multiple&quot;:false}" readonly="true" groupPath="process_model" scope="%" isValid="true"/>
<attribute key="Whether_issued" title="是否发布" type="string" value="" desc="是否发布" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="%" isValid="true"/>
<attribute key="ARIS_process_name" title="ARIS流程名称" type="string" value="" desc="ARIS流程名称" isRequired="false" ref="" readonly="false" groupPath="process_model" scope="%" isValid="true"/>
</attributes>

View File

@ -236,7 +236,7 @@ Schema.addGlobalCommand("method_script_task", [
{action:"move", x:"100*0.15 - 100*0.055", y:"60*0.24 + 60*0.06"},
{action:"line", x:"100*0.15 + 100*0.05", y:"60*0.24 + 60*0.06"}
]);
/***Event需要配置渐变背景*/Schema.addShape({name:"event", title:"事件", text:"事件", category:"process_epc", props:{w:109, h:50}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{color:"255,255,255"}, textBlock:{x:"Math.min(h/2,w/6)", y:"0", w:"w-Math.min(h/2,w/6)*2", h:"h"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[
/***Event需要配置渐变背景*/Schema.addShape({name:"event", title:"事件", text:"事件", category:"process_epc", props:{w:150, h:66}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{color:"255,255,255"}, textBlock:{x:"Math.min(h/2,w/6)", y:"0", w:"w-Math.min(h/2,w/6)*2", h:"h"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[
{actions:[
{action:"move", x:"0", y:"h*0.5"},
{action:"line", x:"Math.min(h/2,w/6)", y:"0"},
@ -248,7 +248,7 @@ Schema.addGlobalCommand("method_script_task", [
{action:"close"}
]}
]});
/***Method*/Schema.addShape({name:"method_approval_node", title:"线上审批", text:"线上审批",groupName:"features", category:"process_epc", props:{w:110, h:50}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"245,250,255", endColor:"232,242,255", angle:Math.PI * 0.5}, path:[
/***Method*/Schema.addShape({name:"method_approval_node", title:"线上审批", text:"线上审批",groupName:"features", category:"process_epc", props:{w:150, h:66}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"245,250,255", endColor:"232,242,255", angle:Math.PI * 0.5}, path:[
{actions:[
{action:"move", x:"w*0", y:"5"},
{action:"quadraticCurve", x1:"0", y1:"0", x:"5", y:"0"},
@ -284,7 +284,7 @@ Schema.addGlobalCommand("business_rule", [
Schema.addShape({name:"method_service_node", title:"线下审批", text:"线下审批",groupName:"features", category:"process_epc", props:{w:110, h:50}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"245,250,255", endColor:"232,242,255", angle:Math.PI * 0.5}, path:[
Schema.addShape({name:"method_service_node", title:"线下审批", text:"线下审批",groupName:"features", category:"process_epc", props:{w:150, h:66}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"245,250,255", endColor:"232,242,255", angle:Math.PI * 0.5}, path:[
{actions:[
{action:"move", x:"w*0", y:"5"},
{action:"quadraticCurve", x1:"0", y1:"0", x:"5", y:"0"},
@ -304,69 +304,7 @@ Schema.addShape({name:"method_service_node", title:"线下审批", text:"线下
]});
/***Procedure*/Schema.addShape({name:"procedure", title:"流程接口", text:"流程接口", category:"process_epc", props:{w:110, h:60}, lineStyle:{lineWidth:1, lineColor:"197,197,197"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"255,255,255", endColor:"237,237,237", angle:Math.PI * 0.5}, textBlock:{x:"0", y:"0", w:"w*0.8", h:"h*0.8"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[
{actions:[
{action:"move", x:"0", y:"4*0.8"},
{action:"quadraticCurve", x1:"0", y1:"0", x:"4*0.8", y:"0"},
{action:"line", x:"(w-4)*0.8", y:"0"},
{action:"quadraticCurve", x1:"w*0.8", y1:"0", x:"w*0.8", y:"4*0.8"},
{action:"line", x:"w*0.8", y:"(h-4)*0.8"},
{action:"quadraticCurve", x1:"w*0.8", y1:"h*0.8", x:"(w-4)*0.8", y:"h*0.8"},
{action:"line", x:"4*0.8", y:"h*0.8"},
{action:"quadraticCurve", x1:"0", y1:"h*0.8", x:"0", y:"(h-4)*0.8"},
{action:"line", x:"0", y:"4*0.8"},
{action:"move", x:"w*0.8", y:"6"},
{action:"line", x:"w", y:"h*0.5"},
{action:"line", x:"(w-4)*0.8", y:"h"},
{action:"line", x:"w*3/8", y:"h"},
{action:"line", x:"w/4", y:"h*0.8"},
{action:"line", x:"(w-4)*0.8", y:"h*0.8"},
{action:"quadraticCurve", x1:"w*0.8", y1:"h*0.8", x:"w*0.8", y:"(h-4)*0.8"}
]}
]});
/***And*/Schema.addShape({name:"and", title:"与", category:"process_epc", attribute:{editable:false}, props:{w:34, h:34}, fillStyle:{color:"175,210,255"}, path:[
{lineStyle:{lineWidth:0},actions:{ref:"round"}},
{lineStyle:{lineWidth:1,color:"51,62,75"},actions:[
{action:"move", x:"w/2-w*0.15", y:"h/2+h*0.13"},
{action:"line", x:"w*0.5", y:"h/2-h*0.15"},
{action:"line", x:"w/2+w*0.15", y:"h/2+h*0.13"},
{action:"line", x:"w*0.5", y:"h/2-h*0.15"}
]},
{lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"round"}}
]});
/***Or*/Schema.addShape({name:"or", title:"或", category:"process_epc", attribute:{editable:false}, props:{w:34, h:34}, fillStyle:{color:"175,210,255"}, path:[
{lineStyle:{lineWidth:0},actions:{ref:"round"}},
{lineStyle:{lineWidth:1,color:"51,62,75"},actions:[
{action:"move", x:"w/2-w*0.15", y:"h/2-h*0.13"},
{action:"line", x:"w*0.5", y:"h/2+h*0.15"},
{action:"line", x:"w/2+w*0.15", y:"h/2-h*0.13"},
{action:"line", x:"w*0.5", y:"h/2+h*0.15"}
]},
{lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"round"}}
]});
/***Xor*/Schema.addShape({name:"xor", title:"异或", category:"process_epc", attribute:{editable:false}, props:{w:34, h:34}, fillStyle:{color:"175,210,255"}, path:[
{lineStyle:{lineWidth:0},actions:{ref:"round"}},
{lineStyle:{lineWidth:1,color:"51,62,75"},actions:[
{action:"move", x:"w/2-w*0.15", y:"h/2-h*0.15"},
{action:"line", x:"w/2+w*0.15", y:"h/2+h*0.15"},
{action:"move", x:"w/2+w*0.15", y:"h/2-h*0.15"},
{action:"line", x:"w/2-w*0.15", y:"h/2+h*0.15"}
]},
{lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"round"}}
]});
/***Method*/Schema.addShape({name:"method_approval_node3", title:"系统任务", text:"系统任务",groupName:"features3", category:"process_epc", props:{w:110, h:50}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"245,250,255", endColor:"232,242,255", angle:Math.PI * 0.5}, path:[
/***Method*/Schema.addShape({name:"method_approval_node3", title:"系统任务", text:"系统任务",groupName:"features3", category:"process_epc", props:{w:150, h:66}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"245,250,255", endColor:"232,242,255", angle:Math.PI * 0.5}, path:[
{actions:[
{action:"move", x:"w*0", y:"5"},
{action:"quadraticCurve", x1:"0", y1:"0", x:"5", y:"0"},
@ -413,6 +351,70 @@ Schema.addShape({name:"method_service_node4", title:"人工任务", text:"人工
/***Procedure*/Schema.addShape({name:"procedure", title:"流程接口", text:"流程接口", category:"process_epc", props:{w:150, h:66}, lineStyle:{lineWidth:1, lineColor:"197,197,197"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"255,255,255", endColor:"237,237,237", angle:Math.PI * 0.5}, textBlock:{x:"0", y:"0", w:"w*0.8", h:"h*0.8"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[
{actions:[
{action:"move", x:"0", y:"4*0.8"},
{action:"quadraticCurve", x1:"0", y1:"0", x:"4*0.8", y:"0"},
{action:"line", x:"(w-4)*0.8", y:"0"},
{action:"quadraticCurve", x1:"w*0.8", y1:"0", x:"w*0.8", y:"4*0.8"},
{action:"line", x:"w*0.8", y:"(h-4)*0.8"},
{action:"quadraticCurve", x1:"w*0.8", y1:"h*0.8", x:"(w-4)*0.8", y:"h*0.8"},
{action:"line", x:"4*0.8", y:"h*0.8"},
{action:"quadraticCurve", x1:"0", y1:"h*0.8", x:"0", y:"(h-4)*0.8"},
{action:"line", x:"0", y:"4*0.8"},
{action:"move", x:"w*0.8", y:"6"},
{action:"line", x:"w", y:"h*0.5"},
{action:"line", x:"(w-4)*0.8", y:"h"},
{action:"line", x:"w*3/8", y:"h"},
{action:"line", x:"w/4", y:"h*0.8"},
{action:"line", x:"(w-4)*0.8", y:"h*0.8"},
{action:"quadraticCurve", x1:"w*0.8", y1:"h*0.8", x:"w*0.8", y:"(h-4)*0.8"}
]}
]});
/***And*/Schema.addShape({name:"and", title:"与", category:"process_epc", attribute:{editable:false}, props:{w:46, h:46}, fillStyle:{color:"175,210,255"}, path:[
{lineStyle:{lineWidth:0},actions:{ref:"round"}},
{lineStyle:{lineWidth:1,color:"51,62,75"},actions:[
{action:"move", x:"w/2-w*0.15", y:"h/2+h*0.13"},
{action:"line", x:"w*0.5", y:"h/2-h*0.15"},
{action:"line", x:"w/2+w*0.15", y:"h/2+h*0.13"},
{action:"line", x:"w*0.5", y:"h/2-h*0.15"}
]},
{lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"round"}}
]});
/***Or*/Schema.addShape({name:"or", title:"或", category:"process_epc", attribute:{editable:false}, props:{w:46, h:46}, fillStyle:{color:"175,210,255"}, path:[
{lineStyle:{lineWidth:0},actions:{ref:"round"}},
{lineStyle:{lineWidth:1,color:"51,62,75"},actions:[
{action:"move", x:"w/2-w*0.15", y:"h/2-h*0.13"},
{action:"line", x:"w*0.5", y:"h/2+h*0.15"},
{action:"line", x:"w/2+w*0.15", y:"h/2-h*0.13"},
{action:"line", x:"w*0.5", y:"h/2+h*0.15"}
]},
{lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"round"}}
]});
/***Xor*/Schema.addShape({name:"xor", title:"异或", category:"process_epc", attribute:{editable:false}, props:{w:46, h:46}, fillStyle:{color:"175,210,255"}, path:[
{lineStyle:{lineWidth:0},actions:{ref:"round"}},
{lineStyle:{lineWidth:1,color:"51,62,75"},actions:[
{action:"move", x:"w/2-w*0.15", y:"h/2-h*0.15"},
{action:"line", x:"w/2+w*0.15", y:"h/2+h*0.15"},
{action:"move", x:"w/2+w*0.15", y:"h/2-h*0.15"},
{action:"line", x:"w/2-w*0.15", y:"h/2+h*0.15"}
]},
{lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"round"}}
]});
/*泳池/泳道分组*/
Schema.addCategory({name:"lane", text:"泳池/泳道"});
function getPool(a, d) {

View File

@ -3,7 +3,7 @@
<app xmlns="http://www.actionsoft.com.cn/app">
<name>流程库批处理工具</name>
<version>1.0</version>
<buildNo>13</buildNo>
<buildNo>14</buildNo>
<developer id="776cca9a287c8b4d63b9cad216aa3859" tablePrefix="ACT" url="http://www.actionsoft.com.cn">北京炎黄盈动科技发展有限责任公司</developer>
<categoryVisible>true</categoryVisible>
<description><![CDATA[对PAL流程库文件和元素进行批处理操作]]></description>

View File

@ -3,7 +3,6 @@ package com.actionsoft.apps.coe.pal.batch;
import java.util.ArrayList;
import java.util.List;
import com.actionsoft.apps.coe.pal.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.batch.dc.FileProcessor;
import com.actionsoft.apps.listener.PluginListener;
import com.actionsoft.apps.resource.AppContext;
@ -25,8 +24,6 @@ public class Plugins implements PluginListener {
// 注册DC
list.add(new DCPluginProfile("tmp", FileProcessor.class.getName(), "生成下载的Excel模版等临时文件", false));
list.add(new DCPluginProfile("logs", FileProcessor.class.getName(), "批量创建/替换的log日志", false, false));
// 注册cache
list.add(new CachePluginProfile(BatchCache.class));
return list;
}

View File

@ -1,6 +1,5 @@
package com.actionsoft.apps.coe.pal.batch.web;
import com.actionsoft.apps.coe.pal.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.batch.constant.BatchConst;
import com.actionsoft.apps.coe.pal.batch.util.LogUtil;
import com.actionsoft.apps.coe.pal.batch.web.create.process.CreateProcessExcel;
@ -23,6 +22,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.CoeDesignerShapeAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.yili.log.batch.cache.BatchCache;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.commons.htmlframework.HtmlPageTemplate;
import com.actionsoft.bpms.commons.mvc.view.ActionWeb;
@ -225,10 +225,7 @@ public class BatchWeb extends ActionWeb {
}
String define = PALRepositoryQueryAPIManager.getInstance().getProcessDefinition(uc, model.getId());
JSONObject array = JSONObject.parseObject(define);
if (array.containsKey("elements") && array.getJSONObject("elements").size() == 0) {
return false;
}
return true;
return !array.containsKey("elements") || array.getJSONObject("elements").size() != 0;
}

View File

@ -1,6 +1,5 @@
package com.actionsoft.apps.coe.pal.batch.web.create.process;
import com.actionsoft.apps.coe.pal.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.batch.constant.BatchConst;
import com.actionsoft.apps.coe.pal.batch.util.LogUtil;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
@ -12,6 +11,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.Design
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.yili.log.batch.cache.BatchCache;
import com.actionsoft.bpms.commons.security.logging.model.Level;
import com.actionsoft.bpms.org.model.DepartmentModel;
import com.actionsoft.bpms.org.model.RoleModel;

View File

@ -43,6 +43,36 @@ public class ProcessUtil {
}
list.add(I18nRes.findValue(CoEConstant.APP_ID, palMethodModel.getId()));
}
List<PALMethodModel> methodControlModels = PALMethodManager.getInstance().getPALMethodModelListByMethod("control");
Map<String, String> map2 = new HashMap<String, String>();
for (int i = 0; i < size; i++) {
map2.put(listApps.get(i).getId(), listApps.get(i).getRuntimeState());
}
for (int i = 0, methodSize = methodControlModels.size(); i < methodSize; i++) {
PALMethodModel palMethodModel = methodControlModels.get(i);
String appId = palMethodModel.getId();
if (map2.containsKey("com.actionsoft.apps.coe.method." + appId)) {
String methodId1 = map2.get("com.actionsoft.apps.coe.method." + appId);
if (methodId1.equals(AppsConst.RUNTIME_STATE_STOPPED) || methodId1.equals(AppsConst.RUNTIME_STATE_FAILED) || methodId1.equals(AppsConst.RUNTIME_STATE_READY) || methodId1.equals(AppsConst.RUNTIME_STATE_STARTING) || methodId1.equals(AppsConst.RUNTIME_STATE_STOPPING) || methodId1.equals(AppsConst.RUNTIME_STATE_UNINSTALLED) || methodId1.equals(AppsConst.RUNTIME_STATE_UNINSTALLING) || methodId1.equals(AppsConst.RUNTIME_STATE_FAILED))
continue;
}
list.add(I18nRes.findValue(CoEConstant.APP_ID, palMethodModel.getId()));
}
List<PALMethodModel> methodDataModels = PALMethodManager.getInstance().getPALMethodModelListByMethod("data");
Map<String, String> map3 = new HashMap<String, String>();
for (int i = 0; i < size; i++) {
map3.put(listApps.get(i).getId(), listApps.get(i).getRuntimeState());
}
for (int i = 0, methodSize = methodDataModels.size(); i < methodSize; i++) {
PALMethodModel palMethodModel = methodDataModels.get(i);
String appId = palMethodModel.getId();
if (map3.containsKey("com.actionsoft.apps.coe.method." + appId)) {
String methodId1 = map3.get("com.actionsoft.apps.coe.method." + appId);
if (methodId1.equals(AppsConst.RUNTIME_STATE_STOPPED) || methodId1.equals(AppsConst.RUNTIME_STATE_FAILED) || methodId1.equals(AppsConst.RUNTIME_STATE_READY) || methodId1.equals(AppsConst.RUNTIME_STATE_STARTING) || methodId1.equals(AppsConst.RUNTIME_STATE_STOPPING) || methodId1.equals(AppsConst.RUNTIME_STATE_UNINSTALLED) || methodId1.equals(AppsConst.RUNTIME_STATE_UNINSTALLING) || methodId1.equals(AppsConst.RUNTIME_STATE_FAILED))
continue;
}
list.add(I18nRes.findValue(CoEConstant.APP_ID, palMethodModel.getId()));
}
return list;
}
@ -96,6 +126,36 @@ public class ProcessUtil {
}
result.put(I18nRes.findValue(CoEConstant.APP_ID, palMethodModel.getId()), palMethodModel.getId());
}
List<PALMethodModel> methodControlModels = PALMethodManager.getInstance().getPALMethodModelListByMethod("control");
Map<String, String> map2 = new HashMap<String, String>();
for (int i = 0; i < size; i++) {
map2.put(listApps.get(i).getId(), listApps.get(i).getRuntimeState());
}
for (int i = 0, methodSize = methodControlModels.size(); i < methodSize; i++) {
PALMethodModel palMethodModel = methodControlModels.get(i);
String appId = palMethodModel.getId();
if (map2.containsKey("com.actionsoft.apps.coe.method." + appId)) {
String methodId1 = map2.get("com.actionsoft.apps.coe.method." + appId);
if (methodId1.equals(AppsConst.RUNTIME_STATE_STOPPED) || methodId1.equals(AppsConst.RUNTIME_STATE_FAILED) || methodId1.equals(AppsConst.RUNTIME_STATE_READY) || methodId1.equals(AppsConst.RUNTIME_STATE_STARTING) || methodId1.equals(AppsConst.RUNTIME_STATE_STOPPING) || methodId1.equals(AppsConst.RUNTIME_STATE_UNINSTALLED) || methodId1.equals(AppsConst.RUNTIME_STATE_UNINSTALLING) || methodId1.equals(AppsConst.RUNTIME_STATE_FAILED))
continue;
}
result.put(I18nRes.findValue(CoEConstant.APP_ID, palMethodModel.getId()), palMethodModel.getId());
}
List<PALMethodModel> methodDataModels = PALMethodManager.getInstance().getPALMethodModelListByMethod("data");
Map<String, String> map3 = new HashMap<String, String>();
for (int i = 0; i < size; i++) {
map3.put(listApps.get(i).getId(), listApps.get(i).getRuntimeState());
}
for (int i = 0, methodSize = methodDataModels.size(); i < methodSize; i++) {
PALMethodModel palMethodModel = methodDataModels.get(i);
String appId = palMethodModel.getId();
if (map3.containsKey("com.actionsoft.apps.coe.method." + appId)) {
String methodId1 = map3.get("com.actionsoft.apps.coe.method." + appId);
if (methodId1.equals(AppsConst.RUNTIME_STATE_STOPPED) || methodId1.equals(AppsConst.RUNTIME_STATE_FAILED) || methodId1.equals(AppsConst.RUNTIME_STATE_READY) || methodId1.equals(AppsConst.RUNTIME_STATE_STARTING) || methodId1.equals(AppsConst.RUNTIME_STATE_STOPPING) || methodId1.equals(AppsConst.RUNTIME_STATE_UNINSTALLED) || methodId1.equals(AppsConst.RUNTIME_STATE_UNINSTALLING) || methodId1.equals(AppsConst.RUNTIME_STATE_FAILED))
continue;
}
result.put(I18nRes.findValue(CoEConstant.APP_ID, palMethodModel.getId()), palMethodModel.getId());
}
return result;
}

View File

@ -1,6 +1,5 @@
package com.actionsoft.apps.coe.pal.batch.web.create.shape;
import com.actionsoft.apps.coe.pal.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.batch.constant.BatchConst;
import com.actionsoft.apps.coe.pal.batch.util.LogUtil;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
@ -12,6 +11,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.Design
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.yili.log.batch.cache.BatchCache;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
import com.actionsoft.bpms.commons.security.logging.model.Level;
@ -636,7 +636,7 @@ public class ImportShapeExcel {
count++;
if (count % (shapeRowCount+1) == 0) {
count = 1;
initY += 130;
initY += 90;
// 换行
initX = 0;
initX = pageEdge + initX;
@ -649,7 +649,7 @@ public class ImportShapeExcel {
}
shape.put("dataAttributes", dataAttributes);
}
int totalWidth = 240;// 每个节点总宽度空白+节点+空白
int totalWidth = 160;// 每个节点总宽度空白+节点+空白
int totalHeight = 200;// 每个节点总高度空白+节点+空白
int x = 0;
int y = 0;

View File

@ -1,6 +1,5 @@
package com.actionsoft.apps.coe.pal.batch.web.replace;
import com.actionsoft.apps.coe.pal.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.batch.constant.BatchConst;
import com.actionsoft.apps.coe.pal.batch.util.LogUtil;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
@ -22,6 +21,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryShapeAttributeModel;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.yili.log.batch.cache.BatchCache;
import com.actionsoft.bpms.commons.security.logging.model.Level;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.util.DBSql;

View File

@ -1,12 +1,17 @@
package com.actionsoft.apps.coe.pal.cooperation;
import com.actionsoft.apps.coe.pal.components.web.PALRepositoryTreeWeb;
import com.actionsoft.apps.coe.pal.cooperation.cache.CooperationCache;
import com.actionsoft.apps.coe.pal.cooperation.cache.model.TeamInfo;
import com.actionsoft.apps.coe.pal.cooperation.web.CooperationWeb;
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
import com.actionsoft.bpms.org.dao.User;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.server.bind.annotation.Controller;
import com.actionsoft.bpms.server.bind.annotation.Mapping;
import java.util.List;
/**
* @Created by sunlh
* @Date 2020-12-01
@ -202,6 +207,19 @@ public class CooperationController {
return web.queryRoleUpdateData(teamId, roleId);
}
/**
* 隐藏角色配置信息
* @param uc
* @param teamId
* @param userid
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.cooperation_hide_role_update_data_query")
public String queryHideRoleUpdateData(UserContext uc, String teamId, String userid) {
CooperationWeb web = new CooperationWeb(uc);
return web.queryHideRoleUpdateData(teamId, userid);
}
/**
* 获取设置的小组权限范围内的流程树结构
* @param uc
@ -308,4 +326,27 @@ public class CooperationController {
return web.removeCooperationMember(teamId, userIds);
}
/**
* 权限复制
* @param uc
* @param teamId
* @param userid
* @param targetUserid
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.cooperation_manage_team_member_perm_copy")
public String copyCooperationMemberPerm(UserContext uc,String teamId,String userid,String targetUserid){
CooperationWeb web = new CooperationWeb(uc);
return web.copyCooperationMemberPerm(teamId,userid,targetUserid);
}
@Mapping("com.actionsoft.apps.coe.pal.cooperation_test")
public String test(UserContext uc) {
ResponseObject ro = ResponseObject.newOkResponse();
List<TeamInfo> allTeamInfo = CooperationCache.getAllTeamInfo();
ro.put("perms",allTeamInfo);
return ro.toString();
}
}

View File

@ -2,6 +2,9 @@ package com.actionsoft.apps.coe.pal.cooperation.dto;
import org.apache.xpath.operations.Bool;
import java.util.ArrayList;
import java.util.List;
/**
* @Description 小组成员
* @Created by sunlh
@ -21,6 +24,10 @@ public class CooperationManageListTeamMemberDto {
private String roleId;
private String roleName;
private int roleType;
private List<Integer> roleTypes = new ArrayList<>();
private List<String> roleIds = new ArrayList<>();
private boolean isOlderVersion;
private boolean hasUserPerm;
public CooperationManageListTeamMemberDto() {
}
@ -97,8 +104,26 @@ public class CooperationManageListTeamMemberDto {
this.roleName = roleName;
}
public void addRoleName(String roleName) {
this.roleName = this.roleName == null ? roleName : this.roleName + ","+ roleName;
}
public List<Integer> getRoleTypes() {
return roleTypes;
}
public void setRoleTypes(List<Integer> roleTypes) {
this.roleTypes = roleTypes;
}
public int getRoleType() {
return roleType;
int num = 3;
for (Integer roleType : this.roleTypes) {
if (num > roleType){
num = roleType;
}
}
return num;
}
public void setRoleType(int roleType) {
@ -113,4 +138,27 @@ public class CooperationManageListTeamMemberDto {
this.close = close;
}
public List<String> getRoleIds() {
return roleIds;
}
public void setRoleIds(List<String> roleIds) {
this.roleIds = roleIds;
}
public boolean getIsOlderVersion() {
return isOlderVersion;
}
public void setIsOlderVersion(boolean olderVersion) {
isOlderVersion = olderVersion;
}
public boolean getHasUserPerm() {
return hasUserPerm;
}
public void setHasUserPerm(boolean hasUserPerm) {
this.hasUserPerm = hasUserPerm;
}
}

View File

@ -3,6 +3,8 @@ package com.actionsoft.apps.coe.pal.cooperation.web;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.cooperation.CoeCooperationAPIManager;
import com.actionsoft.apps.coe.pal.cooperation.CooperationQueryAPIManager;
import com.actionsoft.apps.coe.pal.cooperation.cache.CooperationCache;
import com.actionsoft.apps.coe.pal.cooperation.cache.model.TeamInfo;
import com.actionsoft.apps.coe.pal.cooperation.constant.CoeCooperationConst;
import com.actionsoft.apps.coe.pal.cooperation.constant.Constant;
import com.actionsoft.apps.coe.pal.cooperation.dao.CoeCooperationMemberDao;
@ -35,10 +37,12 @@ import com.actionsoft.bpms.commons.mvc.view.ActionWeb;
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
import com.actionsoft.bpms.org.cache.DepartmentCache;
import com.actionsoft.bpms.org.cache.RoleCache;
import com.actionsoft.bpms.org.cache.UserCache;
import com.actionsoft.bpms.org.model.CompanyModel;
import com.actionsoft.bpms.org.model.DepartmentModel;
import com.actionsoft.bpms.org.model.RoleModel;
import com.actionsoft.bpms.org.model.UserModel;
import com.actionsoft.bpms.server.Quota;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.util.UUIDGener;
import com.actionsoft.bpms.util.UtilDate;
@ -201,6 +205,8 @@ public class CooperationWeb extends ActionWeb {
// 小组权限信息
JSONArray repositoryVerIds = dataObj.getJSONArray("repositorys");
CoeCooperationAPIManager api = CoeCooperationAPIManager.getInstance();
//新权限标志
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
if (UtilString.isEmpty(teamId)) {// 新建
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
teamId = UUIDGener.getUUID();
@ -212,7 +218,25 @@ public class CooperationWeb extends ActionWeb {
msg = "保存小组信息";
if (isOk) {
// 创建默认角色信息
isOk = api.createCooperationDefaultRole(teamId, _uc.getUID());
if (isOlderVersion){
isOk = api.createCooperationDefaultRole(teamId, _uc.getUID());
}else {
isOk = api.createCooperationDefaultRoleNewPerm(teamId, _uc.getUID());
if (isOk){
//创建默认用户权限
List<CoeCooperationRoleModel> roleList = new ArrayList<>();
Timestamp now = new Timestamp(System.currentTimeMillis());
for (int i = 0; i < adminArr.size(); i++) {
String adminId = adminArr.getString(i);
CoeCooperationRoleModel roleModel = new CoeCooperationRoleModel(UUIDGener.getUUID(), teamId, adminId,
"", 3, "", "", "", _uc.getUID(), now, _uc.getUID(), now,1);
roleList.add(roleModel);
}
//批量插入用户隐藏角色
api.createCooperationRoles(roleList);
}
}
msg = "创建默认角色信息";
if (isOk) {
// 查询管理员角色ID
@ -242,6 +266,8 @@ public class CooperationWeb extends ActionWeb {
if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) {
CoEOpLogAPI.auditOkOp(_uc, CoEOpLogConst.MODULE_CATEGORY_COOPERATION, CoEOpLogConst.OP_CREATE, CoEOpLogConst.INFO_COOPERATION_CREATE);
}
//更新用户权限缓存
CooperationCache.updateTeamInfo(teamId);
return ResponseObject.newOkResponse().toString();
} else {
return ResponseObject.newErrResponse(msg + ",保存失败").toString();
@ -253,6 +279,13 @@ public class CooperationWeb extends ActionWeb {
if (isOk) {
// 删除该管理员角色下的所有成员
api.removeCooperationMemebers(teamId, CoeCooperationConst.ROLE_TYPE_MANAGER);
if (!isOlderVersion){
//删除小组下所有管理员的隐藏角色-用户权限
for (int i = 0; i < adminArr.size(); i++) {
String userId = adminArr.getString(i);
api.removeCooperationMemebersHideRole(teamId,userId);
}
}
// 查询管理员角色ID
CoeCooperationRoleModel role = api.queryCooperationRoleByType(teamId, CoeCooperationConst.ROLE_TYPE_MANAGER).get(0);
// 创建管理员信息
@ -265,6 +298,19 @@ public class CooperationWeb extends ActionWeb {
members.add(member);
}
isOk = api.createCooperationMemebers(members);
if (isOk && !isOlderVersion){
//重新创建默认用户权限
List<CoeCooperationRoleModel> roleList = new ArrayList<>();
Timestamp now = new Timestamp(System.currentTimeMillis());
for (int i = 0; i < adminArr.size(); i++) {
String adminId = adminArr.getString(i);
CoeCooperationRoleModel roleModel = new CoeCooperationRoleModel(UUIDGener.getUUID(), teamId, adminId,
"", 3, "", "", "", _uc.getUID(), now, _uc.getUID(), now,1);
roleList.add(roleModel);
}
//批量插入用户隐藏角色
api.createCooperationRoles(roleList);
}
msg = "更新小组管理员信息";
if (isOk) {
api.removeCooperationTeamPerms(teamId);
@ -287,6 +333,8 @@ public class CooperationWeb extends ActionWeb {
if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) {
CoEOpLogAPI.auditOkOp(_uc, CoEOpLogConst.MODULE_CATEGORY_COOPERATION, CoEOpLogConst.OP_UPDATE, CoEOpLogConst.INFO_COOPERATION_UPDATE);
}
//更新用户权限缓存
CooperationCache.updateTeamInfo(teamId);
return ResponseObject.newOkResponse().toString();
} else {
return ResponseObject.newErrResponse(msg + ",更新失败").toString();
@ -578,11 +626,16 @@ public class CooperationWeb extends ActionWeb {
Map<String, CoeCooperationRoleModel> roleMap = new HashMap<>();
Map<String,CooperationManageListTeamMemberDto> userMap = new HashMap<>();
List<CoeCooperationMemberModel> members = api.queryCooperationTeamMemberList(teamId);
for (CoeCooperationMemberModel member : members) {
UserModel user = SDK.getORGAPI().getUser(member.getUserId());
if (user != null) {
CooperationManageListTeamMemberDto dto = new CooperationManageListTeamMemberDto();
CooperationManageListTeamMemberDto dto = userMap.get(user.getUID());
if (null == dto){
dto = new CooperationManageListTeamMemberDto();
}
dto.setUserName(user.getUserName());
dto.setClose(user.isClosed());
dto.setEmail(user.getEmail());
@ -591,19 +644,25 @@ public class CooperationWeb extends ActionWeb {
dto.setTeamId(teamId);
dto.setTeamName(team.getTeamName());
dto.setUserId(member.getUserId());
//新权限多角色设置
dto.setRoleId(member.getRoleId());
dto.getRoleIds().add(member.getRoleId());
CoeCooperationRoleModel role;
if (roleMap.containsKey(member.getRoleId())) {
role = roleMap.get(member.getRoleId());
} else {
role = api.queryCooperationRoleByUser(teamId, member.getUserId());
role = api.queryCooperationRole(member.getRoleId());
roleMap.put(role.getId(), role);
}
dto.setRoleName(role.getRoleName());
dto.setRoleType(role.getRoleType());
detailDto.getMembers().add(dto);
dto.addRoleName(role.getRoleName());
dto.getRoleTypes().add(role.getRoleType());
dto.setIsOlderVersion(SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true));
dto.setHasUserPerm(new CoeCooperationRoleDao().getCooperationHideRoleByRoleName(teamId,member.getUserId()) != null);
userMap.put(user.getUID(),dto);
}
}
detailDto.getMembers().addAll(userMap.values());
detailDto.getMembers().sort((c1, c2)-> {
int index = c1.getRoleType() - c2.getRoleType();
if (index != 0) {
@ -632,13 +691,16 @@ public class CooperationWeb extends ActionWeb {
JSONArray userArr = JSONArray.parseArray(userIds);
CoeCooperationMemberDao memberDao = new CoeCooperationMemberDao();
for (int i = 0; i < userArr.size(); i++) {
CoeCooperationMemberModel memberModel = memberDao.getModelByTeamUser(teamId, userArr.getString(i));
if (memberModel != null) {
roleIds.add(memberModel.getRoleId());
List<CoeCooperationMemberModel> teamRoles = memberDao.getTeamRolesByUser(teamId, userArr.getString(i));
if (teamRoles != null && !teamRoles.isEmpty()) {
for (CoeCooperationMemberModel teamRole : teamRoles) {
roleIds.add(teamRole.getRoleId());
}
}
}
List<CooperationRoleDto> dtoList = new ArrayList<>();
List<CoeCooperationRoleModel> list = api.queryCooperationRoleList(teamId);
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
for (CoeCooperationRoleModel role : list) {
CooperationRoleDto dto = new CooperationRoleDto();
dto.setRoleId(role.getId());
@ -649,11 +711,16 @@ public class CooperationWeb extends ActionWeb {
"&#xe615;" : role.getRoleType() == CoeCooperationConst.ROLE_TYPE_DESIGNER ?
"&#xe729;" : role.getRoleType() == CoeCooperationConst.ROLE_TYPE_VISITOR ?
"&#xe60e;" : "&#xe625;");
//新版权限隐藏隐式用户角色
if (role.getIsUser() == 1){
continue;
}
dtoList.add(dto);
}
ResponseObject ro = ResponseObject.newOkResponse();
ro.put("roleData", JSON.toJSON(dtoList));
ro.put("roleIds", roleIds);
ro.put("isOlderVersion", isOlderVersion);
return ro.toString();
}
@ -668,33 +735,78 @@ public class CooperationWeb extends ActionWeb {
// 基础信息
String teamId = dataObj.getString("teamId");
JSONArray userIds = dataObj.getJSONArray("userIds");
String roleId = dataObj.getString("roleId");
CoeCooperationAPIManager api = CoeCooperationAPIManager.getInstance();
CoeCooperationTeamModel team = api.queryCooperationTeamById(teamId);
if (team == null) {
return ResponseObject.newErrResponse("保存失败,小组不存在").toString();
}
// 查询当前设置的角色
CoeCooperationRoleDao roleDao = new CoeCooperationRoleDao();
CoeCooperationRoleModel role = roleDao.getInstance(roleId);
// 如果当前设置的角色不是管理员查询其他用户是否有管理员角色小组中必须有至少一位管理员用户
if (role.getRoleType() != CoeCooperationConst.ROLE_TYPE_MANAGER) {
// 查询其他用户的角色是否有管理员
boolean flag = false;
List<String> adminUsers = api.queryCooperationAdminUsers(teamId);
for (String adminUser : adminUsers) {
if (!userIds.contains(adminUser)) {
flag = true;
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
if (isOlderVersion){
// 查询当前设置的角色
String roleId = dataObj.getString("roleId");
CoeCooperationRoleDao roleDao = new CoeCooperationRoleDao();
CoeCooperationRoleModel role = roleDao.getInstance(roleId);
// 如果当前设置的角色不是管理员查询其他用户是否有管理员角色小组中必须有至少一位管理员用户
if (role.getRoleType() != CoeCooperationConst.ROLE_TYPE_MANAGER) {
// 查询其他用户的角色是否有管理员
boolean flag = false;
List<String> adminUsers = api.queryCooperationAdminUsers(teamId);
for (String adminUser : adminUsers) {
if (!userIds.contains(adminUser)) {
flag = true;
break;
}
}
if (!flag) {
return ResponseObject.newErrResponse("不允许修改,小组中必须至少存在一位管理员用户").toString();
}
}
for (int i = 0; i < userIds.size(); i++) {
api.updateCooperationUserRole(teamId, userIds.getString(i), roleId, _uc.getUID());
}
}else {
//设置多角色的校验
JSONArray roleIds = dataObj.getJSONArray("roleId");
CoeCooperationRoleDao roleDao = new CoeCooperationRoleDao();
for (int i = 0; i < roleIds.size(); i++) {
String roleId = roleIds.getString(i);
CoeCooperationRoleModel role = roleDao.getInstance(roleId);
// 如果当前设置的角色不是管理员查询其他用户是否有管理员角色小组中必须有至少一位管理员用户
if (role.getRoleType() != CoeCooperationConst.ROLE_TYPE_MANAGER) {
// 查询其他用户的角色是否有管理员
boolean flag = false;
List<String> adminUsers = api.queryCooperationAdminUsers(teamId);
for (String adminUser : adminUsers) {
if (!userIds.contains(adminUser)) {
flag = true;
break;
}
}
if (!flag) {
return ResponseObject.newErrResponse("不允许修改,小组中必须至少存在一位管理员用户").toString();
}
}else {
break;
}
}
if (!flag) {
return ResponseObject.newErrResponse("不允许修改,小组中必须至少存在一位管理员用户").toString();
//设置多角色
Timestamp now = new Timestamp(System.currentTimeMillis());
List<CoeCooperationMemberModel> memberList = new ArrayList<>();
for (int i = 0; i < userIds.size(); i++) {
//删除原有角色
api.removeCooperationMemeber(teamId,userIds.getString(i));
for (int j = 0; j < roleIds.size(); j++) {
String roleId = roleIds.getString(j);
CoeCooperationMemberModel memberModel = new CoeCooperationMemberModel(UUIDGener.getUUID(),teamId,userIds.getString(i),roleId,_uc.getUID(),now,_uc.getUID(),now);
memberList.add(memberModel);
}
}
//重新添加多角色
api.createCooperationMemebers(memberList);
}
for (int i = 0; i < userIds.size(); i++) {
api.updateCooperationUserRole(teamId, userIds.getString(i), roleId, _uc.getUID());
}
//更新用户权限缓存
CooperationCache.updateTeamInfo(teamId);
return ro.toString();
}
@ -722,6 +834,8 @@ public class CooperationWeb extends ActionWeb {
boolean isAllDataPerm = false;// 是否有全部数据权限
List<String> dataPerm = new ArrayList<>();// 数据权限
Map<String,List<String>> dataActionPerm = new HashMap<>(); //数据操作权限
JSONArray dataActionPermOpts = new JSONArray();// 操作权限选项
List<String> dataPermTextList = new ArrayList<>();// 数据权限文字用于界面显示
boolean isAllAppPerm = false;// 是否有全部应用权限
List<String> appPerm = new ArrayList<>();// 应用权限
@ -736,18 +850,45 @@ public class CooperationWeb extends ActionWeb {
appPermOpts.add(appObj);
}
// 获取操作权限选项
JSONObject actionObj1 = new JSONObject();
actionObj1.put("value", "新增、修改");
actionObj1.put("label", CoeCooperationConst.ACTION_WRITE);
JSONObject actionObj2 = new JSONObject();
actionObj2.put("value", "删除");
actionObj2.put("label", CoeCooperationConst.ACTION_DELETE);
JSONObject actionObj3 = new JSONObject();
actionObj3.put("value", "版本管理");
actionObj3.put("label", CoeCooperationConst.ACTION_VERSION);
actionPermOpts.add(actionObj1);
actionPermOpts.add(actionObj2);
actionPermOpts.add(actionObj3);
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
if (isOlderVersion){
JSONObject actionObj1 = new JSONObject();
actionObj1.put("value", "新增、修改");
actionObj1.put("label", CoeCooperationConst.ACTION_WRITE);
JSONObject actionObj2 = new JSONObject();
actionObj2.put("value", "删除");
actionObj2.put("label", CoeCooperationConst.ACTION_DELETE);
JSONObject actionObj3 = new JSONObject();
actionObj3.put("value", "版本管理");
actionObj3.put("label", CoeCooperationConst.ACTION_VERSION);
actionPermOpts.add(actionObj1);
actionPermOpts.add(actionObj2);
actionPermOpts.add(actionObj3);
}else {
JSONObject actionObj1 = new JSONObject();
actionObj1.put("value", "新建流程");
actionObj1.put("label", CoeCooperationConst.ACTION_CREATE_PROCESS);
JSONObject actionObj2 = new JSONObject();
actionObj2.put("value", "批量创建/替换");
actionObj2.put("label", CoeCooperationConst.ACTION_BATCH);
actionPermOpts.add(actionObj1);
actionPermOpts.add(actionObj2);
JSONObject actionObj3 = new JSONObject();
actionObj3.put("value", "编辑");
actionObj3.put("label", CoeCooperationConst.ACTION_WRITE);
JSONObject actionObj4 = new JSONObject();
actionObj4.put("value", "删除");
actionObj4.put("label", CoeCooperationConst.ACTION_DELETE);
JSONObject actionObj5 = new JSONObject();
actionObj5.put("value", "版本管理");
actionObj5.put("label", CoeCooperationConst.ACTION_VERSION);
dataActionPermOpts.add(actionObj3);
dataActionPermOpts.add(actionObj4);
dataActionPermOpts.add(actionObj5);
}
// 3.修改新建差异数据查询
if (UtilString.isEmpty(roleId)) {
@ -780,6 +921,18 @@ public class CooperationWeb extends ActionWeb {
}
}
}
if (!isOlderVersion){
//新版权限具体文件的操作权限
List<CoeCooperationRolePermModel> rolePermModels = api.queryCooperationRoleDataPermList(teamId, roleId);
for (CoeCooperationRolePermModel rolePermModel : rolePermModels) {
if (rolePermModel.getActionPerm() == null){
dataActionPerm.put(rolePermModel.getPalVersionId(),new ArrayList<>());
continue;
}
dataActionPerm.put(rolePermModel.getPalVersionId(), Arrays.asList(rolePermModel.getActionPerm().split(",").clone()));
}
}
}
// 获取应用权限数据
isAllAppPerm = CoeCooperationConst.PERM_ALL.equalsIgnoreCase(role.getAppPerm());
@ -797,6 +950,7 @@ public class CooperationWeb extends ActionWeb {
}
ro.put("wsId", wsId);
ro.put("isOlderVersion", isOlderVersion);
ro.put("roleName", roleName);
ro.put("roleDesc", roleDesc);
ro.put("roleType", roleType);
@ -805,12 +959,147 @@ public class CooperationWeb extends ActionWeb {
ro.put("isAllDataPerm", isAllDataPerm);
ro.put("isAllAppPerm", isAllAppPerm);
ro.put("dataPerm", dataPerm);
ro.put("dataActionPerm", dataActionPerm);
ro.put("dataActionPermOpts", dataActionPermOpts);
ro.put("appPerm", appPerm);
ro.put("actionPerm", actionPerm);
ro.put("dataPermText", StringUtils.join(dataPermTextList, ","));
return ro.toString();
}
/**
* 查询用户权限信息
* @param teamId
* @param userid
* @return
*/
public String queryHideRoleUpdateData(String teamId,String userid){
ResponseObject ro = ResponseObject.newOkResponse();
CoeCooperationAPIManager api = CoeCooperationAPIManager.getInstance();
CoeCooperationTeamModel team = api.queryCooperationTeamById(teamId);
if (team == null) {
return ResponseObject.newErrResponse("查询失败,小组不存在").toString();
}
// 1.数据定义
String wsId = team.getWsId();// 资产库Id
String roleDesc = "";// 角色描述
int roleType = CoeCooperationConst.ROLE_TYPE_CUSTOM;
List<JSONObject> appPermOpts = new ArrayList<>();// 应用权限选项
JSONArray actionPermOpts = new JSONArray();// 操作权限选项
boolean isAllDataPerm = false;// 是否有全部数据权限
List<String> dataPerm = new ArrayList<>();// 数据权限
Map<String,List<String>> dataActionPerm = new HashMap<>(); //数据操作权限
JSONArray dataActionPermOpts = new JSONArray();// 操作权限选项
List<String> dataPermTextList = new ArrayList<>();// 数据权限文字用于界面显示
boolean isAllAppPerm = false;// 是否有全部应用权限
List<String> appPerm = new ArrayList<>();// 应用权限
List<String> actionPerm = new ArrayList<>();// 操作权限
// 获取应用权限选项范围
List<CooperationAppProfile> appList = CooperationAppManager.getList();
for (CooperationAppProfile profile : appList) {
JSONObject appObj = new JSONObject();
appObj.put("value", profile.getTitle());
appObj.put("label", profile.getId());
appPermOpts.add(appObj);
}
//权限操作权限options
JSONObject actionObj1 = new JSONObject();
actionObj1.put("value", "新建流程");
actionObj1.put("label", CoeCooperationConst.ACTION_CREATE_PROCESS);
JSONObject actionObj2 = new JSONObject();
actionObj2.put("value", "批量创建/替换");
actionObj2.put("label", CoeCooperationConst.ACTION_BATCH);
actionPermOpts.add(actionObj1);
actionPermOpts.add(actionObj2);
//文件数据操作权限option
JSONObject actionObj3 = new JSONObject();
actionObj3.put("value", "编辑");
actionObj3.put("label", CoeCooperationConst.ACTION_WRITE);
JSONObject actionObj4 = new JSONObject();
actionObj4.put("value", "删除");
actionObj4.put("label", CoeCooperationConst.ACTION_DELETE);
JSONObject actionObj5 = new JSONObject();
actionObj5.put("value", "版本管理");
actionObj5.put("label", CoeCooperationConst.ACTION_VERSION);
dataActionPermOpts.add(actionObj3);
dataActionPermOpts.add(actionObj4);
dataActionPermOpts.add(actionObj5);
//查询隐藏角色
CoeCooperationRoleDao roleDao = new CoeCooperationRoleDao();
CoeCooperationRoleModel role = roleDao.getCooperationHideRoleByRoleName(teamId,userid);
if (role == null) {
return ResponseObject.newErrResponse("用户权限不存在").toString();
}
roleDesc = role.getRoleDesc();
roleType = role.getRoleType();
// 获取模型全部数据权限
isAllDataPerm = CoeCooperationConst.PERM_ALL.equalsIgnoreCase(role.getDataPerm());
if (!isAllDataPerm) {
// 获取小组的数据权限
Set<String> teamPermVerIds = CooperationUtil.getPermRepositoryVersionIds(wsId, teamId, null, null);
dataPerm = api.queryCooperationRoleDataPerms(teamId, role.getId());
for (String palVersionId : dataPerm) {
if (teamPermVerIds.contains(palVersionId)) {
List<PALRepositoryModel> palRepositoryModels = PALRepositoryCache.getByVersionId(palVersionId);
if (palRepositoryModels != null) {
for (PALRepositoryModel palModel : palRepositoryModels) {
if (palModel.isUse()) {
dataPermTextList.add(palModel.getName());
}
}
}
}
}
//具体文件的操作权限
List<CoeCooperationRolePermModel> rolePermModels = api.queryCooperationRoleDataPermList(teamId, role.getId());
for (CoeCooperationRolePermModel rolePermModel : rolePermModels) {
if (rolePermModel.getActionPerm() == null){
dataActionPerm.put(rolePermModel.getPalVersionId(),new ArrayList<>());
continue;
}
dataActionPerm.put(rolePermModel.getPalVersionId(), Arrays.asList(rolePermModel.getActionPerm().split(",").clone()));
}
}
// 获取应用权限数据
isAllAppPerm = CoeCooperationConst.PERM_ALL.equalsIgnoreCase(role.getAppPerm());
if (!isAllAppPerm) {
String appPermsStr = role.getAppPerm();
if (UtilString.isNotEmpty(appPermsStr)) {
appPerm = Arrays.asList(appPermsStr.split(","));
}
}
// 获取操作权限数据
String actionPermsStr = role.getActionPerm();
if (UtilString.isNotEmpty(actionPermsStr)) {
actionPerm = Arrays.asList(actionPermsStr.split(","));
}
ro.put("wsId", wsId);
ro.put("roleId", role.getId());
ro.put("userid", userid);
ro.put("isUser", role.getIsUser());
ro.put("roleName", UserCache.getModel(userid).getUserName());
ro.put("roleDesc", roleDesc);
ro.put("roleType", roleType);
ro.put("appPermOpts", appPermOpts);
ro.put("actionPermOpts", actionPermOpts);
ro.put("isAllDataPerm", isAllDataPerm);
ro.put("isAllAppPerm", isAllAppPerm);
ro.put("dataPerm", dataPerm);
ro.put("dataActionPerm", dataActionPerm);
ro.put("dataActionPermOpts", dataActionPermOpts);
ro.put("appPerm", appPerm);
ro.put("actionPerm", actionPerm);
ro.put("dataPermText", StringUtils.join(dataPermTextList, ","));
return ro.toString();
}
/**
* 获取设置的小组权限范围内的流程树结构
* @param wsId
@ -1018,10 +1307,21 @@ public class CooperationWeb extends ActionWeb {
String dataPermStr = "all";
List<CoeCooperationRolePermModel> rolePermList = new ArrayList<>();
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
if (!isAllDataPerm) {
for (int i = 0; i < dataPerm.size(); i++) {
if (dataPerm.getString(i).length() >= 36) {
CoeCooperationRolePermModel model = new CoeCooperationRolePermModel(UUIDGener.getUUID(), teamId, newRoleId, dataPerm.getString(i));
if (isOlderVersion){
for (int i = 0; i < dataPerm.size(); i++) {
if (dataPerm.getString(i).length() >= 36) {
CoeCooperationRolePermModel model = new CoeCooperationRolePermModel(UUIDGener.getUUID(), teamId, newRoleId, dataPerm.getString(i));
rolePermList.add(model);
}
}
}else {
for (int i = 0; i < dataPerm.size(); i++) {
JSONObject dataPermObj = dataPerm.getJSONObject(i);
String versionId = dataPermObj.getString("id");
String perm = dataPermObj.getString("actionPerm");
CoeCooperationRolePermModel model = new CoeCooperationRolePermModel(UUIDGener.getUUID(), teamId, newRoleId, versionId,perm);
rolePermList.add(model);
}
}
@ -1029,7 +1329,8 @@ public class CooperationWeb extends ActionWeb {
}
Timestamp now = new Timestamp(System.currentTimeMillis());
CoeCooperationRoleModel roleModel = new CoeCooperationRoleModel(newRoleId, teamId, roleName, roleDesc, roleType, appPermStr, actionPermStr, dataPermStr, _uc.getUID(), now, _uc.getUID(), now);
CoeCooperationRoleModel roleModel = new CoeCooperationRoleModel(newRoleId, teamId, roleName, roleDesc, roleType, appPermStr, actionPermStr, dataPermStr, _uc.getUID(), now, _uc.getUID(), now,0);
roleModel.setIsUser(0);
boolean isSuccess = false;
if (UtilString.isEmpty(roleId)) {// 新增
isSuccess = api.createCooperationRole(roleModel);
@ -1045,6 +1346,11 @@ public class CooperationWeb extends ActionWeb {
}
if (!isSuccess) {
return ResponseObject.newErrResponse("保存角色数据权限失败").toString();
}else {
if (StringUtils.isNotEmpty(roleId)){
//更新用户角色权限缓存
CooperationCache.updateTeamInfo(teamId);
}
}
} else {
return ResponseObject.newErrResponse("保存角色失败").toString();
@ -1099,6 +1405,7 @@ public class CooperationWeb extends ActionWeb {
roleOpts.add(obj);
}
ro.put("roleOpts", JSON.toJSON(roleOpts));
ro.put("isOlderVersion", SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true));
return ro.toString();
}
@ -1123,10 +1430,14 @@ public class CooperationWeb extends ActionWeb {
return ResponseObject.newErrResponse("角色不存在").toString();
}
JSONArray userArr = object.getJSONArray("userArr");
// 校验管理员是否全部都在pal用户中
String illegalUsers = checkCoeUserValid(userArr);
if (illegalUsers.length() > 0) {
return ResponseObject.newErrResponse("以下用户非PAL用户请重新选择PAL用户进行保存[" + illegalUsers + "]").toString();
//新旧权限版本
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
if (isOlderVersion){
// 校验管理员是否全部都在pal用户中
String illegalUsers = checkCoeUserValid(userArr);
if (illegalUsers.length() > 0) {
return ResponseObject.newErrResponse("以下用户非PAL用户请重新选择PAL用户进行保存[" + illegalUsers + "]").toString();
}
}
// 获取未加入小组的用户
List<CoeCooperationMemberModel> members = api.queryCooperationTeamMemberList(teamId);
@ -1136,16 +1447,54 @@ public class CooperationWeb extends ActionWeb {
}
Timestamp time = new Timestamp(System.currentTimeMillis());
List<CoeCooperationMemberModel> memberModels = new ArrayList<>();
ArrayList<String> awsUsers = new ArrayList<>();
for (int i = 0; i < userArr.size(); i++) {
String userId = userArr.getString(i);
if (!teamMemberSet.contains(userId)) {
CoeCooperationMemberModel member = new CoeCooperationMemberModel(UUIDGener.getUUID(), teamId
, userId, roleId, _uc.getUID(), time, _uc.getUID(), time);
memberModels.add(member);
//新权限
if (!isOlderVersion){
boolean coeUserFlag = new CoeUser().validateIsAccessCOE(userId);
if (!coeUserFlag && null != UserCache.getModel(userId)){
awsUsers.add(userId);
}
}
}
}
if (!isOlderVersion){
//有额外的aws平台用户
if (!awsUsers.isEmpty()){
CoeUser coeUserDao = new CoeUser();
//pal最大用户量许可
int maxUser = Quota.getMaxCoEPALUser();
List<CoeUserModel> coeUsers = coeUserDao.getCoeUsers();
if (maxUser < coeUsers.size() + awsUsers.size()){
//超出最大用户量
return ResponseObject.newWarnResponse("用户数已超过许可总数(许可最大用户数" + maxUser + ")").toString();
}
coeUserDao.batchInsert(awsUsers,false);
// 操作行为日志记录
if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) {
CoEOpLogAPI.auditOkOp(_uc, CoEOpLogConst.MODULE_CATEGORY_COOPERATION, CoEOpLogConst.OP_UPDATE, CoEOpLogConst.INFO_USER_CREATE);
}
}
//添加默认隐藏角色
List<CoeCooperationRoleModel> roleList = new ArrayList<>();
Timestamp now = new Timestamp(System.currentTimeMillis());
for (CoeCooperationMemberModel memberModel : memberModels) {
CoeCooperationRoleModel roleModel = new CoeCooperationRoleModel(UUIDGener.getUUID(), teamId, memberModel.getUserId(),
"", 3, "", "", "", _uc.getUID(), now, _uc.getUID(), now,1);
roleList.add(roleModel);
}
//批量插入用户隐藏角色
api.createCooperationRoles(roleList);
}
// 保存
api.createCooperationMemebers(memberModels);
//更新用户权限缓存
CooperationCache.updateTeamInfo(teamId);
return ro.toString();
}
@ -1177,6 +1526,10 @@ public class CooperationWeb extends ActionWeb {
}
for (int i = 0; i < userIdArr.size(); i++) {
api.removeCooperationMemeber(teamId, userIdArr.getString(i));
if (!SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true)){
//新版权限删除隐式用户角色
api.removeCooperationHideRole(teamId,userIdArr.getString(i));
}
}
return ro.toString();
}
@ -1340,6 +1693,53 @@ public class CooperationWeb extends ActionWeb {
return data;
}
/**
* 权限复制
* @param teamId
* @param userid 待复制用户id
* @param targetUserid 目标用户id
* @return
*/
public String copyCooperationMemberPerm(String teamId,String userid,String targetUserid){
ResponseObject ro = ResponseObject.newOkResponse();
CoeUser coeUser = new CoeUser();
if(userid.equals(targetUserid)){
return ResponseObject.newErrResponse("待复制用户id与目标用户id不能相同").toString();
}
if (!coeUser.validateIsAccessCOE(userid) || !coeUser.validateIsAccessCOE(targetUserid)){
return ResponseObject.newErrResponse("用户id异常").toString();
}
CoeCooperationAPIManager api = CoeCooperationAPIManager.getInstance();
if (CoeCooperationAPIManager.getInstance().queryCooperationRoleByUser(teamId,userid) == null || CoeCooperationAPIManager.getInstance().queryCooperationRoleByUser(teamId,targetUserid) == null){
return ResponseObject.newErrResponse("参与复制的用户必须在对应小组下").toString();
}
//处理小组下成员信息,先删除关系后将target的角色id复制到user上新增
api.removeCooperationMemeber(teamId,userid);
List<CoeCooperationMemberModel> memberModels = api.queryCooperationTeamMembersByUser(teamId, targetUserid);
Timestamp now = new Timestamp(System.currentTimeMillis());
List<CoeCooperationMemberModel> copyUsers = new ArrayList<>();
for (CoeCooperationMemberModel memberModel : memberModels) {
CoeCooperationMemberModel member = new CoeCooperationMemberModel(UUIDGener.getUUID(), teamId, userid, memberModel.getRoleId(), _uc.getUID(), now, _uc.getUID(), now);
copyUsers.add(member);
}
api.createCooperationMemebers(copyUsers);
//处理隐藏角色的权限复制
CoeCooperationRoleModel originHideRole = api.queryCooperationTeamHideRole(teamId, userid);
api.removeCooperationRolePerms(teamId,originHideRole.getId());
CoeCooperationRoleModel targetHideRole = api.queryCooperationTeamHideRole(teamId, targetUserid);
List<CoeCooperationRolePermModel> targetRolePerms = api.queryCooperationRoleDataPermList(teamId, targetHideRole.getId());
List<CoeCooperationRolePermModel> permModelList = new ArrayList<>();
for (CoeCooperationRolePermModel targetRolePerm : targetRolePerms) {
CoeCooperationRolePermModel permModel = new CoeCooperationRolePermModel(UUIDGener.getUUID(), teamId, originHideRole.getId(), targetRolePerm.getPalVersionId(), targetRolePerm.getActionPerm());
permModelList.add(permModel);
}
api.createCooperationRolePerms(permModelList);
return ro.toString();
}
/**
* 获取单位下第一级部门
* @param companyId

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/favicon.ico><title>com.actionsoft.apps.coe.pal.cooperation</title><script src=../commons/awsui/js/icon.array.js></script><script>const settingParam = <#settingParam>;
const axiosBaseUrl = "./";
const production = true;</script><script>var mainPage = "<#mainPage>";
var isManage = <#isManage>;</script><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/css/chunk-37bffcb7.6a10d37d.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/css/chunk-4775123e.ca4e5912.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/css/chunk-d0f49e06.125d1e78.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-2d224ef1.62abc5ed.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-37bffcb7.4bda7995.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-3a9b7577.aa0dfa28.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-4775123e.b82ba153.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-d0f49e06.4e0548ba.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/css/app.4c60f70c.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/app.3a6ebb18.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-vendors.cf4a38d6.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/css/app.4c60f70c.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-vendors.cf4a38d6.js></script><script src=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/app.3a6ebb18.js></script></body></html>
var isManage = <#isManage>;</script><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/css/chunk-0dd2cad3.a8b373f0.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/css/chunk-2066fd0b.b9ca5ce6.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/css/chunk-317b5b43.71aff415.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-0dd2cad3.7e061ba3.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-2066fd0b.5a0e8ae8.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-2d224ef1.6edc6518.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-317b5b43.3d8f6440.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-3a9b7577.1c8372d8.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/css/app.57e8682f.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/app.6f6eb298.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-vendors.54a27270.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.cooperation/main/css/app.57e8682f.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/chunk-vendors.54a27270.js></script><script src=../apps/com.actionsoft.apps.coe.pal.cooperation/main/js/app.6f6eb298.js></script></body></html>

View File

@ -1 +1 @@
#manageMain[data-v-ac2e0a1e] .awsui-dialog__body{padding-top:5px}#manageMain[data-v-ac2e0a1e] .awsui-icon-picker-box1{border-radius:15%}.team-item-div[data-v-ac2e0a1e]{height:46px;padding:6px 0 4px 0}.team-item-icon-div[data-v-ac2e0a1e]{position:relative;top:5px;width:32px;height:32px;line-height:32px;vertical-align:middle;text-align:center;border-radius:15%}.team-item-text-div[data-v-ac2e0a1e]{margin-left:7px;position:relative;top:12px}.team-item-text-div div[data-v-ac2e0a1e]{width:170px}.team-item-text-div div p[data-v-ac2e0a1e]{width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.inline-block[data-v-ac2e0a1e]{display:inline-block}.cursor-pointer[data-v-ac2e0a1e]{cursor:pointer}.general-bgcolor-hover:hover .icon-drag[data-v-ac2e0a1e]{display:inline}.general-bgcolor-hover .icon-drag[data-v-ac2e0a1e]{display:none}.general-bgcolor-hover:hover .operate-icon-display[data-v-ac2e0a1e]{display:inline}.general-bgcolor-hover .operate-icon-display[data-v-ac2e0a1e]{display:none}.general-bgcolor-hover:hover .team-item-text-div p[data-v-ac2e0a1e]{color:#4e7ff9!important}.team-item-div-checked[data-v-ac2e0a1e]{color:#4e7ff9}.icon-team-div[data-v-ac2e0a1e]{position:absolute;right:40px;top:45px;z-index:2;height:70px;width:70px;line-height:70px;display:inline-block}.icon-team[data-v-ac2e0a1e]{color:#fff;font-size:52px}.required-logo[data-v-ac2e0a1e] label{margin-left:10px}#palRepositoryTree[data-v-dbb2ca8e] .el-dialog__body{padding:10px 20px;color:#606266;font-size:14px;word-break:break-all}#palRepositoryTree[data-v-dbb2ca8e] .el-input__inner{border-radius:0}#palRepositoryTree[data-v-dbb2ca8e] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f5f7fa;color:#4e7ff9}#palRepositoryTree[data-v-dbb2ca8e] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content .awsui-iconfont{color:#4e7ff9!important}.tree[data-v-dbb2ca8e]{overflow:auto;width:432px;height:300px}#palRepositoryTree[data-v-dbb2ca8e] .el-tree{min-width:100%;display:inline-block!important}#roleManage[data-v-3a04fef6] .awsui-dialog__body{margin:0 16px}#roleManage[data-v-3a04fef6] .role_data_perm_textarea textarea{cursor:pointer}.text-overflow-hidden[data-v-3a04fef6]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.general-bgcolor-hover:hover .operate-icon-display[data-v-3a04fef6]{display:inline}.general-bgcolor-hover .operate-icon-display[data-v-3a04fef6]{display:none}#manageList[data-v-aa13335e] .awsui-main{padding:0 20px!important}#tableMain[data-v-aa13335e] .hideCheckBoxCell .el-checkbox__input{visibility:hidden}#tableMain[data-v-aa13335e] .el-table__header-wrapper .el-checkbox,#tableMain[data-v-aa13335e] .el-table__row .operate-icon-display{display:none}#tableMain[data-v-aa13335e] .el-table__row:hover .operate-icon-display,.inline-block[data-v-aa13335e]{display:inline-block}.team-icon-div[data-v-aa13335e]{text-align:center;border-radius:15%}.text-overflow-hidden[data-v-aa13335e]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#manage[data-v-eb099fd6] .awsui-aside,#manage[data-v-eb099fd6] .awsui-main{padding:0}
#manageMain[data-v-ac2e0a1e] .awsui-dialog__body{padding-top:5px}#manageMain[data-v-ac2e0a1e] .awsui-icon-picker-box1{border-radius:15%}.team-item-div[data-v-ac2e0a1e]{height:46px;padding:6px 0 4px 0}.team-item-icon-div[data-v-ac2e0a1e]{position:relative;top:5px;width:32px;height:32px;line-height:32px;vertical-align:middle;text-align:center;border-radius:15%}.team-item-text-div[data-v-ac2e0a1e]{margin-left:7px;position:relative;top:12px}.team-item-text-div div[data-v-ac2e0a1e]{width:170px}.team-item-text-div div p[data-v-ac2e0a1e]{width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.inline-block[data-v-ac2e0a1e]{display:inline-block}.cursor-pointer[data-v-ac2e0a1e]{cursor:pointer}.general-bgcolor-hover:hover .icon-drag[data-v-ac2e0a1e]{display:inline}.general-bgcolor-hover .icon-drag[data-v-ac2e0a1e]{display:none}.general-bgcolor-hover:hover .operate-icon-display[data-v-ac2e0a1e]{display:inline}.general-bgcolor-hover .operate-icon-display[data-v-ac2e0a1e]{display:none}.general-bgcolor-hover:hover .team-item-text-div p[data-v-ac2e0a1e]{color:#4e7ff9!important}.team-item-div-checked[data-v-ac2e0a1e]{color:#4e7ff9}.icon-team-div[data-v-ac2e0a1e]{position:absolute;right:40px;top:45px;z-index:2;height:70px;width:70px;line-height:70px;display:inline-block}.icon-team[data-v-ac2e0a1e]{color:#fff;font-size:52px}.required-logo[data-v-ac2e0a1e] label{margin-left:10px}#palRepositoryTree[data-v-dbb2ca8e] .el-dialog__body{padding:10px 20px;color:#606266;font-size:14px;word-break:break-all}#palRepositoryTree[data-v-dbb2ca8e] .el-input__inner{border-radius:0}#palRepositoryTree[data-v-dbb2ca8e] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f5f7fa;color:#4e7ff9}#palRepositoryTree[data-v-dbb2ca8e] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content .awsui-iconfont{color:#4e7ff9!important}.tree[data-v-dbb2ca8e]{overflow:auto;width:432px;height:300px}#palRepositoryTree[data-v-dbb2ca8e] .el-tree{min-width:100%;display:inline-block!important}#roleManage[data-v-5b5b40a9] .awsui-dialog__body{margin:0 16px}#roleManage[data-v-5b5b40a9] .role_data_perm_textarea textarea{cursor:pointer}.text-overflow-hidden[data-v-5b5b40a9]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.general-bgcolor-hover:hover .operate-icon-display[data-v-5b5b40a9]{display:inline}.general-bgcolor-hover .operate-icon-display[data-v-5b5b40a9]{display:none}#manageList[data-v-b98e4e7e] .awsui-main{padding:0 20px!important}#tableMain[data-v-b98e4e7e] .hideCheckBoxCell .el-checkbox__input{visibility:hidden}#tableMain[data-v-b98e4e7e] .el-table__header-wrapper .el-checkbox,#tableMain[data-v-b98e4e7e] .el-table__row .operate-icon-display{display:none}#tableMain[data-v-b98e4e7e] .el-table__row:hover .operate-icon-display,.inline-block[data-v-b98e4e7e]{display:inline-block}.team-icon-div[data-v-b98e4e7e]{text-align:center;border-radius:15%}.text-overflow-hidden[data-v-b98e4e7e]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#manage[data-v-eb099fd6] .awsui-aside,#manage[data-v-eb099fd6] .awsui-main{padding:0}

View File

@ -1 +0,0 @@
#update[data-v-a62d8bf8] .el-step__title{font-size:12px}#update[data-v-a62d8bf8] .awsui-icon-picker-box1{border-radius:15%}.icon-team-div[data-v-a62d8bf8]{height:70px;width:70px;line-height:70px;display:inline-block;position:absolute;z-index:2;right:30px;top:50px}.icon-team[data-v-a62d8bf8]{color:#fff;font-size:52px}

View File

@ -1 +0,0 @@
#update[data-v-a62d8bf8] .el-step__title{font-size:12px}#update[data-v-a62d8bf8] .awsui-icon-picker-box1{border-radius:15%}.icon-team-div[data-v-a62d8bf8]{height:70px;width:70px;line-height:70px;display:inline-block;position:absolute;z-index:2;right:30px;top:50px}.icon-team[data-v-a62d8bf8]{color:#fff;font-size:52px}#update[data-v-79ec4cf2] .el-main{display:block;flex:1;flex-basis:auto;overflow:auto;padding-top:20px;padding-left:20px;padding-right:0;padding-bottom:0}#update[data-v-79ec4cf2] .el-table__row .operate-icon-display{display:none}#update[data-v-79ec4cf2] .el-table__row:hover .operate-icon-display{display:inline-block}#update[data-v-79ec4cf2] .table-row-icon-cloumn .cell{padding-right:0!important}.icon-div-repository[data-v-79ec4cf2]{border-radius:15%;display:inline-block;width:32px;height:32px;text-align:center;line-height:32px;vertical-align:middle}.icon-dynamic-repository[data-v-79ec4cf2]{color:#fff;font-size:18px}

View File

@ -1 +0,0 @@
#manageMain[data-v-66886da4] .awsui-dialog__body{padding-top:5px}#manageMain[data-v-66886da4] .awsui-icon-picker-box1{border-radius:15%}.team-item-div[data-v-66886da4]{height:46px;padding:6px 0 4px 0}.team-item-icon-div[data-v-66886da4]{position:relative;top:5px;width:32px;height:32px;line-height:32px;vertical-align:middle;text-align:center;border-radius:15%}.team-item-text-div[data-v-66886da4]{margin-left:7px;position:relative;top:12px}.team-item-text-div div[data-v-66886da4]{width:170px}.team-item-text-div div p[data-v-66886da4]{width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.inline-block[data-v-66886da4]{display:inline-block}.cursor-pointer[data-v-66886da4]{cursor:pointer}.general-bgcolor-hover:hover .icon-drag[data-v-66886da4]{display:inline}.general-bgcolor-hover .icon-drag[data-v-66886da4]{display:none}.general-bgcolor-hover:hover .operate-icon-display[data-v-66886da4]{display:inline}.general-bgcolor-hover .operate-icon-display[data-v-66886da4]{display:none}.general-bgcolor-hover:hover .team-item-text-div p[data-v-66886da4]{color:#4e7ff9!important}.team-item-div-checked[data-v-66886da4]{color:#4e7ff9}.icon-team-div[data-v-66886da4]{position:absolute;right:40px;top:45px;z-index:2;height:70px;width:70px;line-height:70px;display:inline-block}.icon-team[data-v-66886da4]{color:#fff;font-size:52px}#palRepositoryTree[data-v-dbb2ca8e] .el-dialog__body{padding:10px 20px;color:#606266;font-size:14px;word-break:break-all}#palRepositoryTree[data-v-dbb2ca8e] .el-input__inner{border-radius:0}#palRepositoryTree[data-v-dbb2ca8e] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f5f7fa;color:#4e7ff9}#palRepositoryTree[data-v-dbb2ca8e] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content .awsui-iconfont{color:#4e7ff9!important}.tree[data-v-dbb2ca8e]{overflow:auto;width:432px;height:300px}#palRepositoryTree[data-v-dbb2ca8e] .el-tree{min-width:100%;display:inline-block!important}#roleManage[data-v-3a04fef6] .awsui-dialog__body{margin:0 16px}#roleManage[data-v-3a04fef6] .role_data_perm_textarea textarea{cursor:pointer}.text-overflow-hidden[data-v-3a04fef6]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.general-bgcolor-hover:hover .operate-icon-display[data-v-3a04fef6]{display:inline}.general-bgcolor-hover .operate-icon-display[data-v-3a04fef6]{display:none}#manageList[data-v-aa13335e] .awsui-main{padding:0 20px!important}#tableMain[data-v-aa13335e] .hideCheckBoxCell .el-checkbox__input{visibility:hidden}#tableMain[data-v-aa13335e] .el-table__header-wrapper .el-checkbox,#tableMain[data-v-aa13335e] .el-table__row .operate-icon-display{display:none}#tableMain[data-v-aa13335e] .el-table__row:hover .operate-icon-display,.inline-block[data-v-aa13335e]{display:inline-block}.team-icon-div[data-v-aa13335e]{text-align:center;border-radius:15%}.text-overflow-hidden[data-v-aa13335e]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#manage[data-v-eb099fd6] .awsui-aside,#manage[data-v-eb099fd6] .awsui-main{padding:0}

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d224ef1"],{e1f5:function(e,s,n){"use strict";n.r(s);var t=function(){var e=this,s=e.$createElement,n=e._self._c||s;return n("div",{staticClass:"devGetSession"},[e._v(" 正在获取session ")])},a=[],i=n("a18c"),o=n("0f08"),d=n("4360");o["a"].post({url:"jd",data:{userid:devUserInfo.userid,pwd:devUserInfo.pwd,lang:"cn",cmd:"com.actionsoft.apps.getsession.get",deviceType:"pc"}}).then((function(e){"error"==e.result?alert("获取session错误"+e.msg):(d["a"].commit("edit",{sessionId:e.data.sid}),i["a"].replace("/"+mainPage))}));var c={data:function(){return{dwList:[]}},methods:{},mounted:function(){}},r=c,u=n("2877"),l=Object(u["a"])(r,t,a,!1,null,null,null);s["default"]=l.exports}}]);

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d224ef1"],{e1f5:function(e,s,t){"use strict";t.r(s);var n=function(){var e=this,s=e._self._c;return s("div",{staticClass:"devGetSession"},[e._v(" 正在获取session ")])},a=[],d=t("a18c"),i=t("0f08"),o=t("4360");i["a"].post({url:"jd",data:{userid:devUserInfo.userid,pwd:devUserInfo.pwd,lang:"cn",cmd:"com.actionsoft.apps.getsession.get",deviceType:"pc"}}).then((function(e){"error"==e.result?alert("获取session错误"+e.msg):(o["a"].commit("edit",{sessionId:e.data.sid}),d["a"].replace("/"+mainPage))}));var r={data(){return{dwList:[]}},methods:{},mounted(){}},c=r,u=t("2877"),l=Object(u["a"])(c,n,a,!1,null,null,null);s["default"]=l.exports}}]);

View File

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d224ef1"],{e1f5:function(e,s,n){"use strict";n.r(s);var t=function(){var e=this,s=e.$createElement,n=e._self._c||s;return n("div",{staticClass:"devGetSession"},[e._v(" 正在获取session ")])},a=[],i=n("a18c"),o=n("0f08"),d=n("4360");o["a"].post({url:"jd",data:{userid:devUserInfo.userid,pwd:devUserInfo.pwd,lang:"cn",cmd:"com.actionsoft.apps.getsession.get",deviceType:"pc"}}).then((function(e){"error"==e.result?alert("获取session错误"+e.msg):(d["a"].commit("edit",{sessionId:e.data.sid}),i["a"].replace("/"+mainPage))}));var c={data:function(){return{dwList:[]}},methods:{},mounted:function(){}},r=c,u=n("2877"),l=Object(u["a"])(r,t,a,!1,null,null,null);s["default"]=l.exports}}]);

View File

@ -3,7 +3,7 @@
<app xmlns="http://www.actionsoft.com.cn/app">
<name>PAL数据迁移</name>
<version>1.0</version>
<buildNo>2</buildNo>
<buildNo>24</buildNo>
<developer id="776cca9a287c8b4d63b9cad216aa3859" tablePrefix="ACT" url="http://www.actionsoft.com.cn">北京炎黄盈动科技发展有限责任公司</developer>
<categoryVisible>false</categoryVisible>
<description><![CDATA[数据迁移]]></description>

View File

@ -1,7 +1,13 @@
package com.actionsoft.apps.coe.pal.datamigration;
import com.actionsoft.apps.coe.pal.datamigration.aris.web.ArisXmlImportWeb;
import com.actionsoft.apps.coe.pal.datamigration.util.readtable.ReadTable;
import com.actionsoft.apps.coe.pal.datamigration.util.readword.ReadWordUtil;
import com.actionsoft.apps.coe.pal.datamigration.web.DataMigrationWeb;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb;
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.server.bind.annotation.Controller;
import com.actionsoft.bpms.server.bind.annotation.Mapping;
@ -23,9 +29,17 @@ public class DataMigrationController {
return new DataMigrationWeb(uc).dataMigrate(wsId,groupValue,fileValue,fileName);
}
/**
* 流程属性批量导入
* @param uc
* @param wsId
* @param groupValue
* @param fileValue
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.datamigration_process_attribute_import")
public String processAttributeImport(UserContext uc, String wsId,String groupValue,String fileValue,String fileName){
return new DataMigrationWeb(uc).processAttributeImport(wsId,groupValue,fileValue,fileName);
public String processAttributeImport(UserContext uc, String wsId,String groupValue,String fileValue){
return new DataMigrationWeb(uc).processAttributeImport(wsId,groupValue,fileValue);
}
@Mapping("com.actionsoft.apps.coe.pal.datamigration_IT_attribute_import")
@ -43,13 +57,24 @@ public class DataMigrationController {
*/
@Mapping("com.actionsoft.apps.coe.pal.systemImport_process_attribute_import")
public String processattributeimport(UserContext me,String wsId,String groupValue,String fileValue,String fileName){
new ReadWordUtil().translateDocTDocx(me,wsId,groupValue,fileValue,fileName);
//new ReadWordUtil().translateDocTDocx(me,wsId,groupValue,fileValue,fileName);
Thread thread =new Thread(new Runnable() {
@Override
public void run() {
String[] fileNameArr = fileName.split(",");
for(String name : fileNameArr){
new ReadWordUtil().translateDocTDocx(me,wsId,groupValue,fileValue,name);
}
}
});
thread.setPriority(8);
thread.start();
ResponseObject ro = ResponseObject.newOkResponse();
return ro.toString();
}
/**
* by bzp 表单文件上传之后 解析文件
* by bzp 表单属性文件上传 解析文件
* @param me
* @param wsId
* @param groupValue
@ -59,7 +84,92 @@ public class DataMigrationController {
*/
@Mapping("com.actionsoft.apps.coe.pal.formImport_process_attribute_import")
public String formattributeimport(UserContext me,String wsId,String groupValue,String fileValue,String fileName){
new ReadTable().getTableInfo(me,wsId,groupValue,fileValue,fileName);
//new ReadTable().getTableInfo(me,wsId,groupValue,fileValue,fileName);
Thread thread =new Thread(new Runnable() {
@Override
public void run() {
String[] fileNameArr = fileName.split(",");
for(String name : fileNameArr){
new ReadTable().getTableInfo(me,wsId,groupValue,fileValue,fileName);
}
}
});
thread.setPriority(8);
thread.start();
ResponseObject ro = ResponseObject.newOkResponse();
return ro.toString();
}
/**
* 查询aris流程导入日志
* @param uc
* @param logId
* @param path
* @param timer
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.datamigration_data_migrate_log_query")
public String queryArisXmlImportLog(UserContext uc, String logId, String path, String timer) {
ArisXmlImportWeb web = new ArisXmlImportWeb(uc);
return web.queryArisXmlImportLog(logId, path, timer);
}
/**
* 下载日志
* @param uc
* @param logId
* @param path
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.datamigration_data_migrate_log_download")
public String downloadArisXmlImportLog(UserContext uc, String logId, String path) {
ArisXmlImportWeb web = new ArisXmlImportWeb(uc);
return web.downloadArisXmlImportLog(logId, path);
}
/**
* by bzp
* 富文本保存 并解析
*
* @param me
* @param content
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.saveRichtext")
public String saveRichtext(UserContext me, String content, String pluuid, String shapId) {
DataMigrationWeb web = new DataMigrationWeb(me);
return web.saveRichText(me, content, pluuid, shapId).toString();
}
/**
* by bzp
* 富文本加载时 获取内容
* @param me
* @param pluuid
* @param shapId
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.getRichtext")
public String getRichtext(UserContext me, String pluuid, String shapId) {
DataMigrationWeb web = new DataMigrationWeb(me);
return web.getRichText(me, pluuid, shapId);
}
/**
* 制度表单等工具栏中上传附件保存并生成相应活动节点
* @param ruuid
* @param fileNames
* @return
*/
// @Mapping(value="COE_PAL_PROCESSLEVEL_SHAPE_UPFILE_SAVE")
@Mapping("com.actionsoft.apps.coe.pal.policy_file_upfile_save")
public String COEPALPROCESSLEVELShapeUpfileSave(UserContext me, String appId, String repositoryName, String groupValue, String ruuid, String fileNames, String type) {
PALRepositoryModel plModel = PALRepositoryCache.getCache().get(ruuid);
if (plModel == null) {
return ResponseObject.newErrResponse("找不到该流程").toString();
}
String wsId = plModel.getWsId();
new ReadWordUtil().translateDocTDocx(me,wsId,groupValue,ruuid,fileNames);
ResponseObject ro = ResponseObject.newOkResponse();
return ro.toString();
}

View File

@ -4,13 +4,20 @@ public class ArisConstant {
public final static String REPOSITORY_NAME = "arisXML";// aris xml文件导入dc根目录
public final static String UPFILE = "upfile";// aris xml文件上传根目录在REPOSITORY_NAME之下
public final static String GROUP_VALUE_UPFILE = "upfile";// aris xml文件上传根目录在REPOSITORY_NAME之下
public final static String LOG_GROUP_VALUE = "log";// aris xml文件导入日志根目录在REPOSITORY_NAME之下
public final static String GROUP_VALUE_LOG = "log";// aris xml文件导入日志根目录在REPOSITORY_NAME之下
public final static String GROUP_VALUE_DOWNLOAD = "download";
public final static String IMPORT_LOG_FILE_SIMPLE = "simpleImport.log";// 简要日志展示给前端体现大致的导入内容和进度
public final static String IMPORT_LOG_FILE_FULL = "fullImport.log";// 详细日志包括全量信息内容
public final static String IMPORT_LOG_FILE_WARN = "warnErrImport.log";// 错误&警告日志单独记录错误&警告日志同时详细日志中也有记录
public final static String IMPORT_LOG_FILE_SUCCESS = "successImport.log";// 导入成功日志单独记录只记录pal流程名称与对应的Aris地址客户需要
public final static String IMPORT_LOG_FILE_MATCH_ERR = "matchErrImport.log";// 导入aris流程匹配失败的
public final static String ARIS_ROOT_PATH = "\\伊利集团业务流程管理平台";
}

View File

@ -0,0 +1,33 @@
package com.actionsoft.apps.coe.pal.datamigration.aris.util;
import com.actionsoft.apps.coe.pal.datamigration.aris.model.ModelModel;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class ArisXmlUtil {
/**
* 获取aris文件中的epc模型列表
* @param modelMap 解析出的模型map
* @param sortByPath 是否按照路径进行排序
* @return
*/
public static List<ModelModel> getArisEpcModelList(Map<String, ModelModel> modelMap, boolean sortByPath) {
List<ModelModel> result = new ArrayList<>();
for (Map.Entry<String, ModelModel> entry : modelMap.entrySet()) {
ModelModel arisModel = entry.getValue();
if ("MT_EEPC".equals(arisModel.getType())) {
result.add(arisModel);
}
}
if (sortByPath) {
// 按照路径排序
result.sort((a1, a2)-> {
return a1.getModelPath().compareTo(a2.getModelPath());
});
}
return result;
}
}

View File

@ -4,6 +4,7 @@ import com.actionsoft.apps.coe.pal.datamigration.aris.mapping.ModelMappingAPIMan
import com.actionsoft.apps.coe.pal.datamigration.aris.model.*;
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
import com.actionsoft.apps.coe.pal.datamigration.util.LogUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.StrUtil;
import com.actionsoft.bpms.util.UtilString;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils;
@ -84,7 +85,7 @@ public class ArisXmlHandleWeb {
path.add(groupMap.get(modelParent).getName());
getPath(path, groupMap.get(modelParent).getPid());
}
modelModel.setModelPath(StringUtils.join(path, "\\"));
modelModel.setModelPath(StrUtil.removeAllBlack(StringUtils.join(path, "\\")));
}
}
@ -215,7 +216,7 @@ public class ArisXmlHandleWeb {
String modifyUser = e.attributeValue("LastModifier");
ModelModel modelModel = new ModelModel();
modelModel.setId(id);
modelModel.setName(name);
modelModel.setName(StrUtil.removeAllBlack(name));// 去除两边空白
modelModel.setPid(pid);
modelModel.setType(type);
modelModel.setCreateTime(createTime);

View File

@ -1,11 +1,11 @@
package com.actionsoft.apps.coe.pal.datamigration.aris.web;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.datamigration.aris.constant.ArisConstant;
import com.actionsoft.apps.coe.pal.datamigration.aris.mapping.ModelMappingAPIManager;
import com.actionsoft.apps.coe.pal.datamigration.aris.model.*;
import com.actionsoft.apps.coe.pal.datamigration.aris.util.ArisXmlUtil;
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
import com.actionsoft.apps.coe.pal.datamigration.log.cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.datamigration.log.model.LogRealTimeCountModel;
import com.actionsoft.apps.coe.pal.datamigration.util.LogUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.ProcessUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.ShapeUtil;
@ -27,6 +27,8 @@ import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Model.LogRealTimeCountModel;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.util.UUIDGener;
import com.actionsoft.bpms.util.UtilDate;
@ -39,7 +41,10 @@ import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils;
import java.io.File;
import java.io.IOException;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -53,6 +58,8 @@ public class ArisXmlImportRun {
private File simpleLogFile;
private File fullLogFile;
private File warnLogFile;
private File successLogFile;// 客户特殊需要记录成功日志
private File matchErrImportFile;// 匹配失败记录
private String filePath;
private String fileName;
private long startTime;
@ -70,6 +77,15 @@ public class ArisXmlImportRun {
this.filePath = filePath;
this.fileName = fileName;
this.startTime = startTime;
// 单独创建一个成功日志
successLogFile = new File(fullLogFile.getParentFile().getPath() + File.separator + ArisConstant.IMPORT_LOG_FILE_SUCCESS);
matchErrImportFile = new File(fullLogFile.getParentFile().getPath() + File.separator + ArisConstant.IMPORT_LOG_FILE_MATCH_ERR);
try {
successLogFile.createNewFile();
matchErrImportFile.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
public void execute(ArisXmlHandleWeb handleWeb) {
@ -106,71 +122,89 @@ public class ArisXmlImportRun {
obj.put("plId", itModel.getId());
obj.put("shapeName", shape.getString("text"));
itShapeMap.put(shape.getString("text"), obj);
// 获取属性中其他IT系统
JSONObject attributes = shape.getJSONObject("dataAttributes");
JSONArray attributesJsonArray = attributes.getJSONArray("attributesJsonArray");
for (int i = 0; i < attributesJsonArray.size(); i++) {
JSONObject attrObj = attributesJsonArray.getJSONObject(i);
if (Constant.METHOD_OTHER_NAME.equals(attrObj.getString("id"))) {
String itVal = attrObj.getString("value");
String[] itValList = StringUtils.split(itVal, ",");
for (String val : itValList) {
itShapeMap.put(val, JSONObject.parseObject(obj.toString()));
}
}
}
}
}
String rolefolderId = checkAndCreatePalRoleFolderModel(coeProcessLevel, wsId);// 创建/获取角色文件夹ID作为角色的顶级文件夹
// 获取所有PAL EPC的模型
Map<String, String> palArisPropValMap = getPalRepositoryXmlPathMap(wsId);
Map<String, String> palArisPropValMap = ProcessUtil.getPalRepositoryArisPathMap(wsId);
List<ModelModel> arisEpcModelList = new ArrayList<>();
for (Map.Entry<String, ModelModel> entry : modelMap.entrySet()) {
ModelModel arisModel = entry.getValue();
if ("MT_EEPC".equals(arisModel.getType())) {
arisEpcModelList.add(arisModel);
}
LogUtil.appendLog("\n" + Constant.LOG_START + "开始查询PAL流程清单的所有ARIS地址属性内容", fullLogFile);
for (Map.Entry<String, String> entry : palArisPropValMap.entrySet()) {
LogUtil.appendLog("名称:---" + PALRepositoryCache.getCache().get(entry.getKey()).getName() + "---ARIS地址----" + entry.getValue() + "----", fullLogFile);
}
// 按照路径排序
arisEpcModelList.sort((a1, a2)-> {
return a1.getModelPath().compareTo(a2.getModelPath());
});
String arisRootPath = "\\伊利集团业务流程管理平台";
int totalArisCount = LogRealTimeCountCache.getCache().get(logId).getTotalCount();
LogUtil.appendLog("\n" + Constant.LOG_END + "开始查询PAL流程清单的所有ARIS地址属性内容", fullLogFile);
// 获取所有ARISEPC的模型
List<ModelModel> arisEpcModelList = ArisXmlUtil.getArisEpcModelList(modelMap, true);
int totalCount = LogRealTimeCountCache.getCache().get(logId).getTotalCount();
for (int i = 0; i < arisEpcModelList.size(); i++) {
ModelModel arisModel = arisEpcModelList.get(i);
String arisPath = arisRootPath + arisModel.getModelPath();
String arisPath = ArisConstant.ARIS_ROOT_PATH + arisModel.getModelPath();
int importingCount = i + 1;// 当前是导入的第几个
LogRealTimeCountCache.getCache().get(logId).setImportingCount(importingCount);// 当前记录缓存
// 当前正在导入的流程全部日志记录方便对照
LogUtil.appendLog("-----------------【" + importingCount + "/" + totalArisCount + "】-----------------", simpleLogFile, fullLogFile, warnLogFile);
// LogUtil.appendLog("************-----[" + importingCount + "/" + totalCount + "]************-----", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("\n************[执行进度]当前执行第[" + importingCount + "]条,共["+ totalCount +"]条************", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][流程匹配阶段]PAL过程链图与ARIS流程进行匹配************", simpleLogFile, fullLogFile);
// 校验Aris是否空模型
List<ObjOccModel> objOccModels = modelObjOccMap.get(arisModel.getId());
if (objOccModels == null || objOccModels.size() == 0) {
// 空模型当作警告处理全部记录
LogUtil.appendLog(Constant.LOG_WARNING + "Aris流程" + "" + arisModel.getName() + "】内容为空,导入忽略", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程" + "[" + arisModel.getName() + "]内容为空,忽略导入", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_DESC + "该流程所属路径:" + arisPath);
LogUtil.appendLog("[ARIS流程为空]ARIS流程" + "[" + arisModel.getName() + "]ARIS地址[" + arisPath + "]", matchErrImportFile);
LogRealTimeCountCache.getCache().get(logId).setArisBlankCount(LogRealTimeCountCache.getCache().get(logId).getArisBlankCount() + 1);
continue;
}
// PAL流程与Aris流程进行匹配
// PAL过程链图与ARIS流程进行匹配只进行路径匹配
boolean flag = false;
PALRepositoryModel palModel = null;
for (Map.Entry<String, String> entry : palArisPropValMap.entrySet()) {
if (arisPath.equals(entry.getValue())) {
String palId = entry.getKey();
PALRepositoryModel plModel = PALRepositoryCache.getCache().get(palId);
if (arisModel.getName().trim().equals(plModel.getName().trim())) {
palModel = plModel;
flag = true;
// 匹配成功不记录到警告日志中
LogUtil.appendLog(Constant.LOG_SUCCESS + "Aris流程" + "" + arisModel.getName() + "】与PAL流程" + "" + palModel.getName() + "", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_DESC + "Aris流程所属路径" + arisPath);
LogUtil.appendLog(Constant.LOG_DESC + "PAL流程所属路径" + ProcessUtil.getRepositoryPath(palModel.getId()));
break;
}
palModel = PALRepositoryCache.getCache().get(palId);
flag = true;
// 匹配成功
LogUtil.appendLog(Constant.LOG_END + "ARIS流程" + "[" + arisModel.getName() + "]与PAL过程链图" + "[" + palModel.getName() + "]匹配", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_DESC + "ARIS流程所属路径" + arisPath, simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_DESC + "PAL过程链图所属路径" + ProcessUtil.getRepositoryPath(palModel.getId()), simpleLogFile, fullLogFile);
break;
}
}
// 未匹配成功
if (!flag) {
LogUtil.appendLog(Constant.LOG_WARNING + "Aris流程" + "" + arisModel.getName() + "】未匹配到PAL流程", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_DESC + "Aris流程所属路径" + arisPath, simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程" + "[" + arisModel.getName() + "]未匹配到PAL过程链图", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_DESC + "ARIS流程所属路径" + arisPath, simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("[未匹配到]ARIS流程" + "[" + arisModel.getName() + "]ARIS地址[" + arisPath + "]", matchErrImportFile);
LogRealTimeCountCache.getCache().get(logId).setMatchFieldCount(LogRealTimeCountCache.getCache().get(logId).getMatchFieldCount() + 1);
continue;
}
// 判断计划导入到的PAL流程是否已经存在数据
// 判断计划导入到的PAL过程链图是否已经存在数据
String plId = palModel.getId();
// 模型是否可导入
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(plId, 0);
@ -184,80 +218,183 @@ public class ArisXmlImportRun {
JSONObject definition = JSONObject.parseObject(define);
JSONObject elements = definition.getJSONObject("elements");
if (elements != null && !elements.isEmpty()) {
LogUtil.appendLog(Constant.LOG_WARNING + "匹配到的PAL流程模型已存在数据不允许导入忽略", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "匹配到的PAL过程链图模型已存在数据不允许导入忽略", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_DESC + "ARIS流程所属路径" + arisPath, simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_DESC + "PAL过程链图所属路径" + ProcessUtil.getRepositoryPath(palModel.getId()), simpleLogFile, fullLogFile);
LogUtil.appendLog("[PAL已存在内容]PAL流程["+ palModel.getName() + "]ARIS流程" + "[" + arisModel.getName() + "]ARIS地址[" + arisPath + "]", matchErrImportFile);
LogRealTimeCountCache.getCache().get(logId).setPalExistsCount(LogRealTimeCountCache.getCache().get(logId).getPalExistsCount() + 1);
continue;
}
LogUtil.appendLog(Constant.LOG_START + "导入Aris流程" + "" + arisModel.getName() + "", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][流程匹配阶段]", simpleLogFile, fullLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][调整过程链图基本信息阶段]同步ARIS流程的创建人、创建时间、修改人、修改时间到PAL过程链图************", simpleLogFile, fullLogFile);
String createUser = getBpmUser(arisModel.getCreateUser());
String modifyUser = getBpmUser(arisModel.getModifyUser());
Timestamp createDate = getTimeStampDate("创建时间", arisModel.getCreateTime());
if (createDate == null) {
LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程[" + arisModel.getName() + "][创建时间]转换异常,忽略[创建时间]变更", simpleLogFile, fullLogFile, warnLogFile);
}
Timestamp modifyDate = getTimeStampDate("修改时间", arisModel.getModifyTime());
if (modifyDate == null) {
LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程[" + arisModel.getName() + "][修改时间]转换异常,忽略[修改时间]变更", simpleLogFile, fullLogFile, warnLogFile);
}
int r = coeProcessLevel.updateRepositoryUserAndDate(plId, createUser, modifyUser, createDate, modifyDate);
if (r > 0) {
LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]创建人[" + createUser + "]、创建时间[" + createDate + "]、修改人[" + modifyUser + "]、修改时间["+ modifyDate +"]修改", simpleLogFile, fullLogFile);
} else {
LogUtil.appendLog(Constant.LOG_WARNING + "PAL过程链图[" + arisModel.getName() + "]创建人[" + createUser + "]、创建时间[" + createDate + "]、修改人[" + modifyUser + "]、修改时间["+ modifyDate +"]修改", simpleLogFile, fullLogFile, warnLogFile);
}
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][调整过程链图基本信息阶段]", simpleLogFile, fullLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "导入ARIS流程" + "[" + arisModel.getName() + "]", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][创建角色图阶段]创建PAL角色图和角色元素设置角色的岗位属性内容************", simpleLogFile, fullLogFile);
Map<String, String> arisFunIdRelationPalRoleMap = new HashMap<>();// aris功能模型与aris角色模型的id映射keyaris fun shape idvaluepal role id
Map<String, String> palRoleIdRelationNameMap = new HashMap<>();// key pal role shape id ,value:pal role shape text
// 创建角色模型和角色元素并且获取aris角色与pal角色映射关系
String roleMdoelId = createRoleModelAndElements(coeProcessLevel, rolefolderId, wsId, palModel, arisModel, modelObjOccMap, objDefMap, objOccMap, cxnOccMap, objDefLinkerMap, arisFunIdRelationPalRoleMap, methodAttrsMap, palRoleIdRelationNameMap);
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][创建角色图阶段]", simpleLogFile, fullLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][创建" + I18nRes.findValue(CoEConstant.APP_ID, Constant.PROCESS_EPC) + "阶段]创建"+ I18nRes.findValue(CoEConstant.APP_ID, Constant.PROCESS_EPC) + "形状及连线,并设置编号、描述属性内容************", simpleLogFile, fullLogFile);
// 存储当前模型下ARIS图形ID与PAL图形ID映射关系
Map<String, String> idRelationMap = new HashMap<>();
Map<String, String> palShapeIdRelationArisOccIdMap = new HashMap<>();
// 创建形状和连线
JSONObject newElements = createShapeElement(wsId, idRelationMap, palModel, arisModel, modelObjOccMap, objDefMap, objOccMap, cxnOccMap, palShapeIdRelationArisOccIdMap);
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][创建" + I18nRes.findValue(CoEConstant.APP_ID, Constant.PROCESS_EPC) + "阶段]", simpleLogFile, fullLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][设置活动输入输出属性内容阶段]删除过程链图中的输入输出形状及相关连线,并设置输入、输出文本属性内容************", simpleLogFile, fullLogFile);
// 处理输入输出活动属性
this.handleShapeInputOutAttr(palModel, newElements);
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][设置活动输入输出属性内容阶段]", simpleLogFile, fullLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][设置活动角色属性内容阶段]删除过程链图中的角色形状及相关连线,并设置角色关联属性内容************", simpleLogFile, fullLogFile);
// 处理角色属性与流程相应的活动节点关联
this.handleProcessAttrRoleRelation(wsId, palModel.getId(), arisFunIdRelationPalRoleMap, palShapeIdRelationArisOccIdMap, newElements, arisModel, modelObjOccMap, objDefMap, roleMdoelId, palRoleIdRelationNameMap);
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][设置活动角色属性内容阶段]", simpleLogFile, fullLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][设置活动信息系统属性内容阶段]设置信息系统关联属性内容************", simpleLogFile, fullLogFile);
// 处理流程关联属性IT系统
this.handleProcessAttrItSystemRelation(wsId, idRelationMap, palModel.getId(), newElements, arisModel, modelObjOccMap, objDefMap, objDefLinkerMap, itShapeMap);
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][设置活动信息系统属性内容阶段]", simpleLogFile, fullLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][设置前后置属性内容阶段]设置过程链图前置流程、后置流程关联属性内容************", simpleLogFile, fullLogFile);
// 前后置流程处理
this.handleProcessAttrLeadOrRearProcess(wsId, idRelationMap, palModel.getId(), newElements, arisModel, modelObjOccMap, objDefMap);
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][设置前后置属性内容阶段]", simpleLogFile, fullLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][完善过程链图形状的默认属性阶段]完善过程链图所有形状的已配置属性************", simpleLogFile, fullLogFile);
// 增加其他默认的属性值默认为空 by孙连辉 20220626
this.handleShapeDefaultAttr(wsId, palModel, newElements, methodAttrsMap);
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][完善过程链图形状的默认属性阶段]", simpleLogFile, fullLogFile);
definition.put("elements", newElements);
// 设置画布大小
setDiagramHeightWidth(definition, newElements);
defineModel.setDefinition(definition.toString());
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][保存过程链图形状/连线]保存过程链图所有形状和连线************", simpleLogFile, fullLogFile);
// 保存文件
CoeDesignerAPIManager.getInstance().storeDefinition(defineModel);// dao操作
// 记录结束日志
endTime = System.currentTimeMillis();
Timestamp endDate = new Timestamp(System.currentTimeMillis());
// 记录流程导入结束日志
LogRealTimeCountCache.getCache().get(logId).setSuccessCount(LogRealTimeCountCache.getCache().get(logId).getSuccessCount() + 1);
LogUtil.appendLog(Constant.LOG_END + "保存PAL过程链图[" + palModel.getName() + "]的形状和连线", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][保存过程链图形状/连线]", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "保存PAL流程【" + palModel.getName() + "】的形状和连线", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "导入Aris流程" + "" + arisModel.getName() + "", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("\n" + Constant.LOG_END + "导入ARIS流程" + "[" + arisModel.getName() + "]", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_END + "导入成功的PAL流程" + "[" + palModel.getName() + "]ARIS地址[ " + palArisPropValMap.get(palModel.getId()) + " ]", successLogFile);
}
Timestamp endDate = new Timestamp(System.currentTimeMillis());
endTime = System.currentTimeMillis();
Timestamp endDate = new Timestamp(endTime);
LogRealTimeCountModel model = LogRealTimeCountCache.getCache().get(logId);
String takeTimeText = takeTime(endTime, startTime);
String resultMsg = "导入完成,总耗时【" + takeTimeText + "ArisXML流程总共【" + model.getTotalCount() + "】,导入成功【" + model.getSuccessCount() + "】条,导入失败【" + (model.getTotalCount() - model.getSuccessCount())
+ "】条PAL已存在的数据【" + model.getPalExistsCount() + "】条Aris流程为空模型的数据【" + model.getArisBlankCount() + "】条Aris与PAL匹配失败的数据【" + model.getMatchFieldCount() + "】条)";
LogUtil.appendLog(Constant.LOG_END + "" + resultMsg, simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("Aris XML流程导入 End " + UtilDate.datetimeFormat(endDate), simpleLogFile, fullLogFile, warnLogFile);
String resultMsg = "导入完成,总耗时" + takeTimeText + "ArisXML流程总共[" + model.getTotalCount() + "],导入成功[" + model.getSuccessCount() + "]条,导入失败[" + (model.getTotalCount() - model.getSuccessCount())
+ "]条PAL已存在的数据[" + model.getPalExistsCount() + "]条ARIS流程为空模型的数据[" + model.getArisBlankCount() + "]条Aris与PAL匹配失败的数据[" + model.getMatchFieldCount() + "]条)";
LogUtil.updateLog(logId, endDate, Constant.LOG_RESULT_StATUS_SUCCESS, resultMsg);
LogUtil.appendLog("\n" + Constant.LOG_END + resultMsg, simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("\n" + "Aris XML流程导入 End " + UtilDate.datetimeFormat(endDate), simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("--------------------------------", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.END_LOG, simpleLogFile, fullLogFile, warnLogFile);
LogRealTimeCountCache.getCache().remove(logId);
} catch (Exception e) {
e.printStackTrace();
// 记录结束日志
endTime = System.currentTimeMillis();
Timestamp endDate = new Timestamp(System.currentTimeMillis());
Timestamp endDate = new Timestamp(endTime);
LogRealTimeCountModel model = LogRealTimeCountCache.getCache().get(logId);
String takeTimeText = takeTime(endTime, startTime);
String resultMsg = "导入失败,报错信息:" + e.getMessage() + ",总耗时" + takeTimeText + "】,导入成功【" + model.getSuccessCount() + "】条,导入失败【" + (model.getTotalCount() - model.getSuccessCount())
+ "】条PAL已存在的数据【" + model.getPalExistsCount() + "】条Aris流程为空模型的数据【" + model.getArisBlankCount() + "】条Aris与PAL匹配失败的数据【" + model.getMatchFieldCount() + "条)";
String resultMsg = "导入失败,报错信息:" + e.getMessage() + ",总耗时" + takeTimeText + ",导入成功[" + model.getSuccessCount() + "]条,导入失败[" + (model.getTotalCount() - model.getSuccessCount())
+ "]条PAL已存在的数据[" + model.getPalExistsCount() + "]条ARIS流程为空模型的数据[" + model.getArisBlankCount() + "]条Aris与PAL匹配失败的数据[" + model.getMatchFieldCount() + "]条)";
LogUtil.updateLog(logId, endDate, Constant.LOG_RESULT_StATUS_ERROR, resultMsg);
LogUtil.appendLog(Constant.LOG_ERROR + "" + resultMsg, simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_ERROR + resultMsg, simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.END_LOG, simpleLogFile, fullLogFile, warnLogFile);
LogRealTimeCountCache.getCache().remove(logId);
}
}
/**
* 时间转换
* @param type
* @param timeStr
* @return
*/
private Timestamp getTimeStampDate(String type, String timeStr) {
timeStr = timeStr.replaceAll(".000;", ";");
DateFormat format = new SimpleDateFormat("HH:mm:ss;MM/dd/yyyy");
try {
Timestamp time = new Timestamp(format.parse(timeStr).getTime());
return time;
} catch (ParseException e) {
e.printStackTrace();
LogUtil.appendLog(Constant.LOG_WARNING + "[" + type + "]转换异常,异常信息" + e.getMessage(), simpleLogFile, fullLogFile, warnLogFile);
}
return null;
}
/**
* 用户转换
* @param createUser
* @return
*/
private String getBpmUser(String createUser) {
if ("system".equalsIgnoreCase(createUser)) {
return "admin";
}
if (SDK.getORGAPI().getUser(createUser) == null) {
return "admin";
}
return createUser;
}
/**
* 计算使用时间
* @param endTime
@ -268,47 +405,15 @@ public class ArisXmlImportRun {
long time = endTime - startTime;
String timeMsg = "";
if (time > 1000 * 60) {
timeMsg = "" + (time / 1000 / 60) + "分钟";
timeMsg = "[" + (time / 1000 / 60) + "]分钟";
} else if (time > 1000) {
timeMsg = "" + (time / 1000) + "";
timeMsg = "[" + (time / 1000) + "]";
} else {
timeMsg = "" + time + "毫秒";
timeMsg = "[" + time + "]毫秒";
}
return timeMsg;
}
/**
* 获取所有epc模型,key:epc-id,value:arisUrl
* @return
*/
private Map<String, String> getPalRepositoryXmlPathMap(String wsId) {
Map<String, String> propValMap = new HashMap<>();
Iterator<PALRepositoryModel> iterator = PALRepositoryCache.getByWsId(wsId);
List<PALRepositoryModel> list = new ArrayList<>();
while (iterator.hasNext()) {
// 无多版本情况不考虑
PALRepositoryModel model = iterator.next();
if (Constant.PROCESS_EPC.equals(model.getMethodId())) {
list.add(model);
}
}
PALRepositoryPropertyDao dao = new PALRepositoryPropertyDao();
List<PALRepositoryPropertyModel> propertyModels = dao.queryByWsId(wsId);
propertyModels = propertyModels.stream().filter(item -> Constant.METHOD_ARIS_URL.equals(item.getPropertyId())).collect(Collectors.toList());
Map<String, String> map = new HashMap<>();
for (PALRepositoryPropertyModel prop : propertyModels) {
map.put(prop.getPlId(), prop.getPropertyValue());
}
for (PALRepositoryModel model : list) {
if (map.containsKey(model.getId())) {
propValMap.put(model.getId(), map.get(model.getId()));
}
}
return propValMap;
}
/**
* 校验和创建角色模型文件夹
* @param coeProcessLevel
@ -316,7 +421,7 @@ public class ArisXmlImportRun {
* @return 已经存在的或新创建的角色模型ID
*/
private String checkAndCreatePalRoleFolderModel(PALRepository coeProcessLevel, String wsId) {
// 组织下创建角色模型文件夹
// 组织下创建[角色模型]文件夹
List<PALRepositoryModel> defaultModels = PALRepositoryQueryAPIManager.getInstance().getPalRepositoryModelsByWsIdAndMethodId(wsId, "org");
defaultModels = defaultModels.stream()
.filter(model -> "default".equals(model.getMethodId()))
@ -331,7 +436,7 @@ public class ArisXmlImportRun {
null, null, null, null, null, -1);
coeProcessLevel.insert(defaultModel);
defaultModels.add(defaultModel);
LogUtil.appendLog(Constant.LOG_SUCCESS + "角色模型文件夹创建", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "角色模型文件夹创建", simpleLogFile, fullLogFile);
return defaultModel.getId();
} else {
LogUtil.appendLog(Constant.LOG_WARNING + "角色模型文件夹已存在,不再重复创建", simpleLogFile, fullLogFile, warnLogFile);
@ -347,7 +452,7 @@ public class ArisXmlImportRun {
* @param methodAttrsMap
*/
private void handleShapeDefaultAttr(String wsId, PALRepositoryModel palModel, JSONObject elements, Map<String, Map<String, JSONObject>> methodAttrsMap) {
LogUtil.appendLog(Constant.LOG_START + "PAL" + I18nRes.findValue(CoEConstant.APP_ID, palModel.getMethodId()) + "" + palModel.getName() + "中形状属性按照属性配置进行属性完善", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_START + "PAL" + I18nRes.findValue(CoEConstant.APP_ID, palModel.getMethodId()) + "[" + palModel.getName() + "]中形状属性按照属性配置进行属性完善", simpleLogFile, fullLogFile);
for (String key : elements.keySet()) {
JSONObject shape = elements.getJSONObject(key);
if ("linker".equals(shape.getString("name"))) {
@ -383,7 +488,7 @@ public class ArisXmlImportRun {
for (String attrId : attrs.keySet()) {
if (!attrIds.contains(attrId)) {
JSONObject eleAttrObj = getDefaultAttrObj(attrs.getJSONObject(attrId));
LogUtil.appendLog(Constant.LOG_END + "PAL" + I18nRes.findValue(CoEConstant.APP_ID, palModel.getMethodId()) + "" + palModel.getName() + "】中形状【" + shape.getString("text") + "】完善【" + eleAttrObj.getString("name") + "】属性配置", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL" + I18nRes.findValue(CoEConstant.APP_ID, palModel.getMethodId()) + "[" + palModel.getName() + "]中形状[" + shape.getString("title") + "][" + shape.getString("text") + "]完善[" + eleAttrObj.getString("name") + "]属性配置", fullLogFile);
attributesJsonArray.add(eleAttrObj);
}
}
@ -391,7 +496,7 @@ public class ArisXmlImportRun {
}
}
}
LogUtil.appendLog(Constant.LOG_END + "PAL" + I18nRes.findValue(CoEConstant.APP_ID, palModel.getMethodId()) + "" + palModel.getName() + "中形状属性按照属性配置进行属性完善", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL" + I18nRes.findValue(CoEConstant.APP_ID, palModel.getMethodId()) + "[" + palModel.getName() + "]中形状属性按照属性配置进行属性完善", simpleLogFile, fullLogFile);
}
/**
@ -404,7 +509,7 @@ public class ArisXmlImportRun {
* @return
*/
private JSONObject createShapeElement(String wsId, Map<String, String> idRelationMap, PALRepositoryModel palModel, ModelModel arisModel, Map<String, List<ObjOccModel>> modelObjOccMap, Map<String, ObjDefModel> objDefMap, Map<String, ObjOccModel> objOccMap, Map<String, List<CxnOccModel>> cxnOccMap, Map<String, String> palShapeIdRelationArisOccIdMap) {
LogUtil.appendLog(Constant.LOG_START + "创建PAL流程【" + arisModel.getName() + "】相关形状", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_START + "创建PAL过程链图[" + arisModel.getName() + "]相关形状/连线", simpleLogFile, fullLogFile);
// aris中该模型所有形状
List<ObjOccModel> objOccModels = modelObjOccMap.get(arisModel.getId());
int zindex = 1;
@ -443,14 +548,14 @@ public class ArisXmlImportRun {
// 定义位置大小
if (shape == null) {
// pal形状不存在记录日志
LogUtil.appendLog(Constant.LOG_WARNING + "Aris流程" + "" + arisModel.getName() + " 】的形状【 " + objDefModel.getName() + "形状类型在PAL中缺失忽略导入该形状", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程" + "[" + arisModel.getName() + "]的形状[" + objDefModel.getName() + "]形状类型在PAL中缺失忽略导入该形状", simpleLogFile, fullLogFile, warnLogFile);
continue;
}
String shapeId = UUIDGener.getObjectId();
palShapeIdRelationArisOccIdMap.put(shapeId, objOccModel.getId());
idRelationMap.put(objOccModel.getId(), shapeId);// 记录形状aris形状id与pal形状id
shape.put("id", shapeId);
// 处理当前图形节点的关联属性编号问题
// 处理当前图形节点的关联属性[编号]问题
if (objDefModel.getAttrData().containsKey("AT_PROC_CODE")) {
List<PALMethodAttributeModel> attributeModels = CoeDesignerShapeAPIManager.getInstance().getValidAttributeModels(wsId, objDefMappingModel.getShapeMethod(), shapeName, objDefMappingModel.getShapeMethod());
attributeModels = attributeModels.stream().filter(item -> Constant.METHOD_NUMBER.equals(item.getKey())).collect(Collectors.toList());
@ -478,7 +583,7 @@ public class ArisXmlImportRun {
}
}
}
LogUtil.appendLog(Constant.LOG_END + "创建PAL流程【" + palModel.getName() + "】的形状【" + shape.getString("text") + "】的编号属性内容【" + objDefModel.getAttrData().getString("AT_PROC_CODE") + "", fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "创建PAL过程链图[" + palModel.getName() + "]的形状[" + shape.getString("text") + "]的编号属性内容[" + objDefModel.getAttrData().getString("AT_PROC_CODE") + "]", fullLogFile);
}
// 处理活动节点描述 --by shang
@ -504,18 +609,12 @@ public class ArisXmlImportRun {
for (Object attribute : dataAttributes) {
JSONObject obj = (JSONObject) attribute;
if (obj.containsKey("attributesJsonArray")) {
List<PALMethodAttributeModel> usedAttributeModels = CoeDesignerShapeAPIManager.getInstance().getValidAndUseAttributeModels(wsId, objDefMappingModel.getShapeMethod(), shapeName, objDefMappingModel.getShapeMethod());
usedAttributeModels.forEach(item -> {
attrDescObj.put("id", item.getKey());
attrDescObj.put("value","");
});
obj.getJSONArray("attributesJsonArray").add(attrDescObj);
break;
}
}
}
LogUtil.appendLog(Constant.LOG_START + "创建PAL流程【" + palModel.getName() + "】的形状【" + shape.getString("text") + "】的描述属性内容【" + objDefModel.getAttrData().getString("AT_DESC") + "", fullLogFile);
LogUtil.appendLog(Constant.LOG_START + "创建PAL过程链图[" + palModel.getName() + "]的形状[" + shape.getString("text") + "]的描述属性内容[" + objDefModel.getAttrData().getString("AT_DESC") + "]", fullLogFile);
}
@ -533,10 +632,10 @@ public class ArisXmlImportRun {
props.put("w", objOccModel.getW());
props.put("h", objOccModel.getH());
elements.put(shapeId, shape);
LogUtil.appendLog(Constant.LOG_END + "创建PAL流程" + "" + palModel.getName() + " 】的形状【 " + shape.getString("text") + "", fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "创建PAL过程链图" + "[" + palModel.getName() + "]的形状[" + shape.getString("text") + "]", fullLogFile);
} else {
// pal缺少对应的形状
LogUtil.appendLog(Constant.LOG_WARNING + "Aris流程" + "" + arisModel.getName() + " 】的形状【" + objDefModel.getName() + "在PAL中缺失忽略导入该形状", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程" + "[" + arisModel.getName() + "]的形状[" + objDefModel.getName() + "]在PAL中缺失忽略导入该形状", simpleLogFile, fullLogFile, warnLogFile);
}
}
// 形状连线处理
@ -569,14 +668,14 @@ public class ArisXmlImportRun {
String fromName = UtilString.isEmpty(elements.getJSONObject(from.getString("id")).getString("text")) ? elements.getJSONObject(from.getString("id")).getString("title") : elements.getJSONObject(from.getString("id")).getString("text");
String toName = UtilString.isEmpty(elements.getJSONObject(to.getString("id")).getString("text")) ? elements.getJSONObject(to.getString("id")).getString("title") : elements.getJSONObject(to.getString("id")).getString("text");
LogUtil.appendLog(Constant.LOG_END + "创建PAL流程" + "" + arisModel.getName() + " 】的形状连线,从【 " + fromName + " 】到【 " + toName + "", fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "创建PAL过程链图" + "[" + arisModel.getName() + "]的形状连线,从[" + fromName + "]到[" + toName + "]", fullLogFile);
} else {
// 不包含的连线
}
}
}
}
LogUtil.appendLog(Constant.LOG_END + "创建PAL流程【" + arisModel.getName() + "相关形状/连线", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "创建PAL过程链图[" + arisModel.getName() + "]相关形状/连线", simpleLogFile, fullLogFile);
return elements;
}
@ -584,7 +683,7 @@ public class ArisXmlImportRun {
* 在现有输出的图形结构上转化输入 输出活动属性并将图上输入输出及连线删除
*/
private void handleShapeInputOutAttr(PALRepositoryModel palModel, JSONObject elements) {
LogUtil.appendLog(Constant.LOG_START + "创建PAL流程【" + palModel.getName() + "】相关形状的输入输出属性", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_START + "创建PAL过程链图[" + palModel.getName() + "]相关形状的[输入][输出]属性", simpleLogFile, fullLogFile);
// 存放待删除图形的KEY
List<String> removeKey = new ArrayList<>();
@ -673,7 +772,7 @@ public class ArisXmlImportRun {
}
// 删除画布上的输入输出和其连线
removeKey.stream().forEach(key -> elements.remove(key));
LogUtil.appendLog(Constant.LOG_END + "删除PAL流程【" + palModel.getName() + "相关输入输出形状和其连线", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "删除PAL过程链图[" + palModel.getName() + "]相关输入输出形状和其连线", simpleLogFile, fullLogFile);
Map<String, JSONObject> attrMap = new HashMap<>();
JSONObject attrs1 = ShapeUtil.getProcessUseShapeMethodAttrByShapeName(palModel.getWsId(), palModel.getMethodId(), palModel.getMethodId(), "method_service_node");
attrMap.put("method_service_node", attrs1);
@ -703,12 +802,12 @@ public class ArisXmlImportRun {
if (obj.containsKey("attributesJsonArray")) {
JSONArray attributesJsonArray = obj.getJSONArray("attributesJsonArray");
attributesJsonArray.add(attrObj);
LogUtil.appendLog(Constant.LOG_END + "PAL流程【" + palModel.getName() + "】形状【" + shapeObj.getString("text") + "】的输入属性内容是【" + attrObj.getString("value") + "", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + palModel.getName() + "]形状[" + shapeObj.getString("text") + "]的[输入]属性属性值为[" + attrObj.getString("value") + "]", simpleLogFile, fullLogFile);
}
}
}
} else {
LogUtil.appendLog(Constant.LOG_END + "PAL流程【" + palModel.getName() + "】形状【" + shapeObj.getString("text") + "】没有配置输入属性,忽略输入属性赋值", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "PAL过程链图[" + palModel.getName() + "]形状[" + shapeObj.getString("text") + "]没有配置[输入]属性,忽略输入属性赋值", simpleLogFile, fullLogFile, warnLogFile);
}
}
if (shapeOutMap.containsKey(key)) {// 有输出属性
@ -725,23 +824,24 @@ public class ArisXmlImportRun {
if (obj.containsKey("attributesJsonArray")) {
JSONArray attributesJsonArray = obj.getJSONArray("attributesJsonArray");
attributesJsonArray.add(attrObj);
LogUtil.appendLog(Constant.LOG_END + "PAL流程【" + palModel.getName() + "】形状【" + shapeObj.getString("text") + "】没有配置输出属性,忽略输出属性赋值", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + palModel.getName() + "]形状[" + shapeObj.getString("text") + "]的[输出]属性内容是[" + attrObj.getString("value") + "]", simpleLogFile, fullLogFile);
}
}
}
} else {
LogUtil.appendLog(Constant.LOG_END + "PAL流程【" + palModel.getName() + "】形状【" + shapeObj.getString("text") + "】没有配置输出属性,忽略输出属性赋值", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "PAL过程链图[" + palModel.getName() + "]形状[" + shapeObj.getString("text") + "]没有配置[输出]属性,忽略输出属性赋值", simpleLogFile, fullLogFile, warnLogFile);
}
}
}
}
}
LogUtil.appendLog(Constant.LOG_END + "创建PAL流程【" + palModel.getName() + "】相关形状的输入输出属性", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "创建PAL过程链图[" + palModel.getName() + "]相关形状的[输入][输出]属性", simpleLogFile, fullLogFile);
}
/**
* 处理流程属性前后置流程
* 测试不通过需要梳理+重构 todo
*
* @param wsId
* @param idRelationMap
@ -753,7 +853,7 @@ public class ArisXmlImportRun {
*/
private void handleProcessAttrLeadOrRearProcess(String wsId, Map<String, String> idRelationMap, String repositoryModelId, JSONObject elements, ModelModel arisModel,
Map<String, List<ObjOccModel>> modelObjOccMap, Map<String, ObjDefModel> objDefMap) {
LogUtil.appendLog(Constant.LOG_START + "PAL流程【" + arisModel.getName() + "相关前置流程/后置流程进行处理关联", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_START + "PAL过程链图[" + arisModel.getName() + "]相关前置流程/后置流程进行处理关联", simpleLogFile, fullLogFile);
// 如果当前流程下无图形信息 直接返回
List<ObjOccModel> objOccModels = modelObjOccMap.get(arisModel.getId());
// 获取ARIS图形定义与PAL图形定义关系
@ -805,7 +905,7 @@ public class ArisXmlImportRun {
propertyDao.insert(propertyModel);
removeKey.add(key);
removeKey.add(shapeId);
LogUtil.appendLog(Constant.LOG_END + "PAL流程【" + arisModel.getName() + "】相关前置流程进行处理关联,前置属性内容【" + repositoryModels.get(0).getName() + "", fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]相关前置流程进行处理关联,前置属性内容[" + leadOrRearObj.getString("text") + "]", fullLogFile);
break;
} else if (tempShapeObj.getJSONObject("to").getString("id").equals(shapeId)) {
// rear_process
@ -834,7 +934,7 @@ public class ArisXmlImportRun {
propertyDao.insert(propertyModel);
removeKey.add(key);
removeKey.add(shapeId);
LogUtil.appendLog(Constant.LOG_END + "PAL流程【" + arisModel.getName() + "】相关后置流程进行处理关联,后置属性内容【" + repositoryModels.get(0).getName() + "", fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]相关后置流程进行处理关联,后置属性内容[" + leadOrRearObj.getString("text") + "]", fullLogFile);
break;
} else {
continue;
@ -844,7 +944,7 @@ public class ArisXmlImportRun {
}
}
removeKey.stream().forEach(key -> elements.remove(key));
LogUtil.appendLog(Constant.LOG_END + "PAL流程【" + arisModel.getName() + "相关前置流程/后置流程进行处理关联", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]相关前置流程/后置流程进行处理关联", simpleLogFile, fullLogFile);
}
/**
@ -862,7 +962,7 @@ public class ArisXmlImportRun {
private void handleProcessAttrItSystemRelation(String wsId, Map<String, String> idRelationMap, String repositoryModelId, JSONObject elements, ModelModel arisModel,
Map<String, List<ObjOccModel>> modelObjOccMap,
Map<String, ObjDefModel> objDefMap, Map<String, Set<String>> objDefLinkerMap, Map<String, JSONObject> itShapeMap) {
LogUtil.appendLog(Constant.LOG_START + "PAL流程【" + arisModel.getName() + "】相关信息系统与形状进行关联", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_START + "PAL过程链图[" + arisModel.getName() + "]相关形状与信息系统进行关联", simpleLogFile, fullLogFile);
// 获取ARIS图形定义与PAL图形定义关系
Map<String, ObjDefMappingModel> objDefMappingMap = ModelMappingAPIManager.getInstance().getObjDefMappingMap();
ObjDefMappingModel objDefMappingModel = objDefMappingMap.get("OT_APPL_SYS_TYPE-ST_APPL_SYS_TYPE");
@ -907,21 +1007,21 @@ public class ArisXmlImportRun {
relationList.add(m);
} else {
LogUtil.appendLog(Constant.LOG_WARNING + "流程【" + arisModel.getName() + "】中的活动节点【" + elements.getJSONObject(shapeId).getString("text") + "】未找到IT系统【" + itShapeName + "", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "PAL过程链图[" + arisModel.getName() + "]中的活动节点[" + elements.getJSONObject(shapeId).getString("text") + "]未找到IT系统[" + itShapeName + "]", simpleLogFile, fullLogFile, warnLogFile);
}
}
}
// 保存关联关系
if (relationList.size() > 0) {
DesignerShapeRelationDao relationDao = new DesignerShapeRelationDao();
relationList.stream().forEach(item -> LogUtil.appendLog(Constant.LOG_END + "流程【" + arisModel.getName() + "】中的活动节点【" + item.getShapeText() + "】关联IT系统【" + item.getRelationShapeText() + "", simpleLogFile, fullLogFile));
relationList.stream().forEach(item -> LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]中的活动节点[" + item.getShapeText() + "]关联IT系统[" + item.getRelationShapeText() + "]", simpleLogFile, fullLogFile));
relationDao.barchInsert(relationList);
LogUtil.appendLog(Constant.LOG_END + "PAL流程【" + arisModel.getName() + "】相关信息系统与形状进行关联", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]相关形状与信息系统进行关联", simpleLogFile, fullLogFile);
}
}
/**
* 处理关联属性角色与流程关联
* 处理关联属性[角色]与流程关联
* @param wsId
* @param repositoryModelId
* @param arisFunIdRelationPalRoleMap
@ -937,7 +1037,7 @@ public class ArisXmlImportRun {
private void handleProcessAttrRoleRelation(String wsId, String repositoryModelId, Map<String, String> arisFunIdRelationPalRoleMap, Map<String, String> palShapeIdRelationArisOccIdMap, JSONObject elements, ModelModel arisModel,
Map<String, List<ObjOccModel>> modelObjOccMap, Map<String, ObjDefModel> objDefMap, String roleMdoelId, Map<String, String> palRoleIdRelationNameMap) throws AWSException {
LogUtil.appendLog(Constant.LOG_START + "PAL流程【" + arisModel.getName() + "相关角色与形状进行关联,并删除流程图上多余的角色和连线", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_START + "PAL过程链图[" + arisModel.getName() + "]相关角色与形状进行关联,并删除流程图上多余的角色和连线", simpleLogFile, fullLogFile);
// 获取ARIS图形定义与PAL图形定义关系
Map<String, ObjDefMappingModel> objDefMappingMap = ModelMappingAPIManager.getInstance().getObjDefMappingMap();
ObjDefMappingModel objDefMappingModel = objDefMappingMap.get("OT_PERS_TYPE-ST_EMPL_TYPE");
@ -983,13 +1083,15 @@ public class ArisXmlImportRun {
// 删除图形与连线
removeKey.add(key);
removeKey.add(tempShapeObj.getJSONObject("from").getString("id"));
LogUtil.appendLog(Constant.LOG_END + "删除PAL过程链图[" + arisModel.getName() + "]" + "角色形状[" +text + "]和其连线", fullLogFile);
} else if (roleIdSet.contains(tempShapeObj.getJSONObject("to").getString("id"))) {
text = elements.getJSONObject(tempShapeObj.getJSONObject("to").getString("id")).getString("text");
// 删除图形与连线
// 删除图形与连线x
removeKey.add(key);
removeKey.add(tempShapeObj.getJSONObject("to").getString("id"));
LogUtil.appendLog(Constant.LOG_END + "删除PAL过程链图[" + arisModel.getName() + "]" + "角色形状[" +text + "]和其连线", fullLogFile);
}
LogUtil.appendLog(Constant.LOG_END + "删除PAL流程【" + arisModel.getName() + "" + "角色形状【" +text + "】和其连线", fullLogFile);
}
}
@ -998,19 +1100,19 @@ public class ArisXmlImportRun {
JSONObject tempShapeObj = elements.getJSONObject(key);
if ("role".equals(tempShapeObj.getString("name")) && !removeKey.contains(tempShapeObj.getString("id"))) {
removeKey.add(key);
LogUtil.appendLog(Constant.LOG_END + "删除PAL流程【" + arisModel.getName() + "" + "角色形状【" + tempShapeObj.getString("text") + ",该角色无连线连接到活动(角色图中已包含该角色图标)", fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "删除PAL过程链图[" + arisModel.getName() + "]" + "角色形状[" + tempShapeObj.getString("text") + "],该角色无连线连接到活动(角色图中已包含该角色图标)", fullLogFile);
}
}
// 保存关联关系
if (relationList.size() > 0) {
DesignerShapeRelationDao relationDao = new DesignerShapeRelationDao();
relationList.stream().forEach(item -> LogUtil.appendLog(Constant.LOG_END + "保存PAL流程【" + arisModel.getName() + "】中的活动节点【" + item.getShapeText() + "】关联当前流程下角色【" + item.getRelationShapeText() + ""));
relationList.stream().forEach(item -> LogUtil.appendLog(Constant.LOG_END + "保存PAL过程链图[" + arisModel.getName() + "]中的活动节点[" + item.getShapeText() + "]关联当前流程下角色[" + item.getRelationShapeText() + "]"));
relationDao.barchInsert(relationList);
}
removeKey.stream().forEach(key -> elements.remove(key));
LogUtil.appendLog(Constant.LOG_END + "删除PAL流程【" + arisModel.getName() + "的相关角色形状和其连线", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL流程【" + arisModel.getName() + "相关角色与形状进行关联,并删除流程图上多余的角色和连线", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "删除PAL过程链图[" + arisModel.getName() + "]的相关角色形状和其连线", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]相关角色与形状进行关联,并删除流程图上多余的角色和连线", simpleLogFile, fullLogFile);
}
/**
@ -1076,9 +1178,9 @@ public class ArisXmlImportRun {
for (int i = 0; i < elements.size(); i++) {
JSONObject shape = elements.getJSONObject(i);
count++;
if (count % (shapeRowCount + 1) == 0) {
if (count % (shapeRowCount+1) == 0) {
count = 1;
initY += 130;
initY += 90;
// 换行
initX = 0;
initX = pageEdge + initX;
@ -1091,14 +1193,14 @@ public class ArisXmlImportRun {
}
shape.put("dataAttributes", dataAttributes);
}
int totalWidth = 240;// 每个节点总宽度空白+节点+空白
int totalWidth = 160;// 每个节点总宽度空白+节点+空白
int totalHeight = 200;// 每个节点总高度空白+节点+空白
int x = 0;
int y = 0;
int w = validateJson(shape.getJSONObject("props").getInteger("w"));
int h = validateJson(shape.getJSONObject("props").getInteger("h"));
int leftBlankWidth = (totalWidth - w) / 2;
int topBlankHeight = (totalHeight - h) / 2;
int leftBlankWidth = (totalWidth - w)/2;
int topBlankHeight = (totalHeight - h)/2;
x = initX + leftBlankWidth;
initX = x + w + leftBlankWidth;
y = initY + topBlankHeight;
@ -1136,7 +1238,7 @@ public class ArisXmlImportRun {
* @return
*/
private String createRoleModelAndElements(PALRepository coeProcessLevel, String parentId, String wsId, PALRepositoryModel palModel, ModelModel arisModel, Map<String, List<ObjOccModel>> modelObjOccMap, Map<String, ObjDefModel> objDefMap, Map<String, ObjOccModel> objOccMap, Map<String, List<CxnOccModel>> cxnOccMap, Map<String, Set<String>> objDefLinkerMap, Map<String, String> arisFunIdRelationPalRoleMap, Map<String, Map<String, JSONObject>> methodAttrsMap, Map<String, String> palRoleIdRelationNameMap) {
LogUtil.appendLog(Constant.LOG_START + "创建流程模型对应的角色模型", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_START + "创建"+ I18nRes.findValue(CoEConstant.APP_ID, Constant.PROCESS_EPC) + "对应的" + I18nRes.findValue(CoEConstant.APP_ID, Constant.ORG_ROLE), simpleLogFile, fullLogFile);
// 统计模型内的角色信息创建角色与形状的关联关系提前创建活动与角色的id关联关系建立角色的角色图角色图中处理岗位为文本属性内容
@ -1151,7 +1253,7 @@ public class ArisXmlImportRun {
}
}
if (roleObjOccModels.size() == 0) {
LogUtil.appendLog(Constant.LOG_WARNING + "Aris流程【" + arisModel.getName() + "无任何角色模型,忽略角色与岗位导入", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程[" + arisModel.getName() + "]无任何角色模型,忽略角色与岗位导入", simpleLogFile, fullLogFile, warnLogFile);
return null;
}
@ -1164,7 +1266,7 @@ public class ArisXmlImportRun {
List<CxnOccModel> list = cxnOccMap.get(roleOccModel.getId());
// list为null该角色在该模型中没有连接任何的活动忽略导入该角色
if (list == null) {
LogUtil.appendLog(Constant.LOG_WARNING + "Aris流程【" + arisModel.getName() + "】检测到角色" + objDefMap.get(roleOccModel.getDefId()).getName() + "尚未连接到任何活动上,该角色可能不与任何流程活动相关联", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程[" + arisModel.getName() + "]角色" + objDefMap.get(roleOccModel.getDefId()).getName() + "尚未连接到任何活动上,该角色可能不与任何流程活动相关联", simpleLogFile, fullLogFile, warnLogFile);
noneRelationRole.add(objDefMap.get(roleOccModel.getDefId()).getName());
continue;
}
@ -1175,7 +1277,7 @@ public class ArisXmlImportRun {
}
}
if (roleCxnOccModels.size() == 0) {
LogUtil.appendLog(Constant.LOG_WARNING + "Aris流程【" + arisModel.getName() + "】检测到无任何角色模型与流程活动进行连接,该流程与对应的角色图没有关联关系", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程[" + arisModel.getName() + "]无任何角色模型与流程活动进行连接,该流程与对应的角色图没有关联关系", simpleLogFile, fullLogFile, warnLogFile);
}
// 记录重复的角色根据名称进行记录
@ -1221,11 +1323,11 @@ public class ArisXmlImportRun {
ObjDefModel roleObjDefModel = objDefMap.get(roleOccModel.getDefId());
String linkedModelIds = roleObjDefModel.getLinkedModelIds();
if (UtilString.isEmpty(linkedModelIds)) {// 角色无关联角色图
LogUtil.appendLog(Constant.LOG_WARNING + "Aris流程【" + arisModel.getName() + "】检测到角色【" + roleObjDefModel.getName() + "角色无任何关联岗位,忽略该角色的岗位", simpleLogFile, fullLogFile, warnLogFile);
// LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程[" + arisModel.getName() + "]角色[" + roleObjDefModel.getName() + "]角色无任何关联岗位,忽略该角色的岗位", simpleLogFile, fullLogFile, warnLogFile);
} else {// 角色有关联角色图
List<ObjOccModel> relationPositonList = modelObjOccMap.get(linkedModelIds);// linkedModelIds按照单个值对待暂无发现多值
if (relationPositonList == null || relationPositonList.size() == 0) {// 角色有关联图但是关联的角色图查询不到
LogUtil.appendLog(Constant.LOG_WARNING + "Aris流程【" + arisModel.getName() + "】检测到角色【" + roleObjDefModel.getName() + "】角色存在关联的角色图【" + linkedModelIds + ",但无法查询对应角色图内容,忽略该角色的岗位", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程[" + arisModel.getName() + "]角色[" + roleObjDefModel.getName() + "]角色存在关联的角色图[" + linkedModelIds + "],但无法查询对应角色图内容,忽略该角色的岗位", simpleLogFile, fullLogFile, warnLogFile);
} else {
for (ObjOccModel objOccModel: relationPositonList) {
ObjDefModel positionDefModel = objDefMap.get(objOccModel.getDefId());
@ -1247,10 +1349,10 @@ public class ArisXmlImportRun {
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, UUIDGener.getUUID(), wsId, arisModel.getName(), "", orderIndex, parentId, "org", true, 1,
id, false, "org.role", "0", 1, null, null, uc.getUID(), uc.getUID(), nowTime, null, null, null, null,
id, false, "org.role", "0", 1, null, null, uc.getUID(), uc.getUID(), nowTime, null, palModel.getId(), null, null,
null, null, null, null, null, -1);
coeProcessLevel.insert(model);
LogUtil.appendLog(Constant.LOG_END + "创建与Aris流程同名的角色图【" + arisModel.getName() + "】【" + model.getId() + "", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "创建与ARIS流程同名的角色图[" + arisModel.getName() + "][" + model.getId() + "]", simpleLogFile, fullLogFile);
BaseModel baseModel = CoeDesignerAPIManager.getInstance().getDefinition(model.getId(), 0);
if (baseModel == null) {
baseModel = CoeDesignerUtil.createModel(model.getId(), 0);
@ -1281,14 +1383,15 @@ public class ArisXmlImportRun {
for (int i = 0; i < newShapes.size(); i++) {
JSONObject shapeObj = newShapes.getJSONObject(i);
elements.put(shapeObj.getString("id"), shapeObj);
LogUtil.appendLog(Constant.LOG_END + "创建角色图【" + arisModel.getName() + "】角色形状图标【" + shapeObj.getString("text") + "", simpleLogFile);
LogUtil.appendLog(Constant.LOG_END + "创建PAL角色图[" + arisModel.getName() + "]角色[" + shapeObj.getString("text") + "]", simpleLogFile, fullLogFile);
}
LogUtil.appendLog(Constant.LOG_END + "创建角色图【" + arisModel.getName() + "】角色形状图标【" + elements.size() + "", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "创建PAL角色图[" + arisModel.getName() + "]角色[" + elements.size() + "]", simpleLogFile, fullLogFile);
// 设置角色图形状默认属性配置
this.handleShapeDefaultAttr(wsId, palModel, elements, methodAttrsMap);
// 完善岗位属性
LogUtil.appendLog(Constant.LOG_START + "PAL角色图[" + arisModel.getName() + "]角色关联岗位内容完善", simpleLogFile, fullLogFile);
for (String key : elements.keySet()) {
JSONObject shape = elements.getJSONObject(key);
if ("linker".equals(shape.getString("name"))) {
@ -1313,28 +1416,28 @@ public class ArisXmlImportRun {
if (attrId.equals(attributesJsonArray.getJSONObject(i).getString("id"))) {
flag = true;
attributesJsonArray.getJSONObject(i).put("value", postTextVal);
LogUtil.appendLog(Constant.LOG_END + "设置角色图【" + arisModel.getName() + "】角色形状图标【" + shapeText + "】的岗位属性值为" + "" + postTextVal + "", fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL角色图[" + arisModel.getName() + "]角色[" + shapeText + "]的岗位属性值为" + "[" + postTextVal + "]", fullLogFile);
}
}
}
if (!flag) {
LogUtil.appendLog(Constant.LOG_WARNING + "角色图【" + arisModel.getName() + "】角色形状图标【" + shapeText + "没有岗位属性配置", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "PAL角色图[" + arisModel.getName() + "]角色[" + shapeText + "]没有岗位属性配置", simpleLogFile, fullLogFile, warnLogFile);
}
}
}
}
} else {
LogUtil.appendLog(Constant.LOG_WARNING + "角色图【" + arisModel.getName() + "】角色形状图标【" + shapeText + "】无岗位属性内容值", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_WARNING + "PAL角色图[" + arisModel.getName() + "]角色[" + shapeText + "]没有岗位相关内容", simpleLogFile, fullLogFile, warnLogFile);
}
}
LogUtil.appendLog(Constant.LOG_END + "角色图【" + arisModel.getName() + "】角色形状图标关联岗位内容", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_END + "PAL角色图[" + arisModel.getName() + "]角色关联岗位内容完善", simpleLogFile, fullLogFile);
definition.put("elements", elements);
// 设置画布大小
setDiagramHeightWidth(definition, elements);
baseModel.setDefinition(definition.toString());
// 保存文件
CoeDesignerAPIManager.getInstance().storeDefinition(baseModel);// dao操作
LogUtil.appendLog(Constant.LOG_END + "角色图【" + arisModel.getName() + "】新增保存", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog(Constant.LOG_END + "创建"+ I18nRes.findValue(CoEConstant.APP_ID, Constant.PROCESS_EPC) + "对应的" + I18nRes.findValue(CoEConstant.APP_ID, Constant.ORG_ROLE), simpleLogFile, fullLogFile);
return id;
}

View File

@ -3,17 +3,21 @@ package com.actionsoft.apps.coe.pal.datamigration.aris.web;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.datamigration.aris.constant.ArisConstant;
import com.actionsoft.apps.coe.pal.datamigration.aris.model.*;
import com.actionsoft.apps.coe.pal.datamigration.aris.util.ArisXmlUtil;
import com.actionsoft.apps.coe.pal.datamigration.aris.util.XMLUtil;
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
import com.actionsoft.apps.coe.pal.datamigration.log.cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.datamigration.log.model.LogModel;
import com.actionsoft.apps.coe.pal.datamigration.log.model.LogRealTimeCountModel;
import com.actionsoft.apps.coe.pal.datamigration.util.LogUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.ProcessUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.ShapeUtil;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodAttributeModel;
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.CoeDesignerShapeAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Model.LogRealTimeCountModel;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.commons.mvc.view.ActionWeb;
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
@ -22,15 +26,18 @@ import com.actionsoft.bpms.server.fs.DCContext;
import com.actionsoft.bpms.server.fs.dc.DCProfileManager;
import com.actionsoft.bpms.util.UUIDGener;
import com.actionsoft.bpms.util.UtilDate;
import com.actionsoft.bpms.util.UtilFile;
import com.actionsoft.bpms.util.UtilString;
import com.actionsoft.i18n.I18nRes;
import com.alibaba.fastjson.JSONObject;
import okhttp3.Response;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.*;
@ -39,9 +46,6 @@ public class ArisXmlImportWeb extends ActionWeb {
UserContext _uc;
public ArisXmlImportWeb() {
}
public ArisXmlImportWeb(UserContext uc) {
_uc = uc;
}
@ -63,7 +67,7 @@ public class ArisXmlImportWeb extends ActionWeb {
String fileValue = "arisXML-" + new SimpleDateFormat("yyyy-MM-dd-HHmmss").format(new Date()) + "-" + _uc.getUID();
// 创建dc目录
DCPluginProfile dcProfile = DCProfileManager.getDCProfile(Constant.APP_ID, ArisConstant.REPOSITORY_NAME);
DCContext dc = new DCContext(_uc, dcProfile, Constant.APP_ID, ArisConstant.LOG_GROUP_VALUE, fileValue);
DCContext dc = new DCContext(_uc, dcProfile, Constant.APP_ID, ArisConstant.GROUP_VALUE_LOG, fileValue);
String dirPath = dc.getPath();
File dir = new File(dirPath);
dir.mkdirs();
@ -136,86 +140,177 @@ public class ArisXmlImportWeb extends ActionWeb {
* @return
*/
public String dataMigrate(String wsId, String groupValue, String fileValue, String fileName) {
ResponseObject ro = ResponseObject.newOkResponse();
// 初始化一些参数
initParams();
// 读取dc
DCPluginProfile dcProfile = DCProfileManager.getDCProfile(Constant.APP_ID, "migration");// repositoryName要调整新的路径配合前端 todo
DCPluginProfile dcProfile = DCProfileManager.getDCProfile(Constant.APP_ID, ArisConstant.REPOSITORY_NAME);// repositoryName要调整新的路径配合前端 todo
DCContext dc = new DCContext(_uc, dcProfile, Constant.APP_ID, groupValue, fileValue, fileName);
this.fileName = fileName;
this.filePath = dc.getFilePath();
Timestamp startDate = new Timestamp(startTime);
// 创建日志信息db
createLogModel(logId, wsId, fileName, filePath, startDate);
ro.put("logId", logId);
ro.put("path", logPath);
ro.put("resultStatus", LogUtil.queryLog(logId).getResultStatus());
LogUtil.appendLog("注:该日志文件存储简要日志信息", simpleLogFile);
LogUtil.appendLog("注:该日志文件存储详细日志信息", fullLogFile);
LogUtil.appendLog("注:该日志文件记录警告、出错日志信息", warnLogFile);
LogUtil.appendLog("Aris XML流程导入 Begin " + UtilDate.datetimeFormat(startDate), simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("\n[信息]操作人:" + _uc.getUserName() + "<" + _uc.getUID() + ">", simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("[信息]操作时间:" + UtilDate.datetimeFormat(startDate), simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("[信息]ARIS流程文件" + fileName, simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("[信息]ARIS流程文件路径" + filePath, simpleLogFile, fullLogFile, warnLogFile);
LogUtil.appendLog("\nAris XML流程导入 Begin " + UtilDate.datetimeFormat(startDate), simpleLogFile, fullLogFile, warnLogFile);
String msg;
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][校验阶段]校验导入文件、属性配置等基础事项************", simpleLogFile, fullLogFile);
// 校验资产库是否存在可用
boolean isActive = PALRepositoryQueryAPIManager.getInstance().isActiveWorkSpace(wsId);
if (!isActive) {
msg = Constant.LOG_ERROR + "资产库不存在或已停用," + Constant.IMPORT_STOP_MSG;
updateErrLog(msg, msg);
return ResponseObject.newErrResponse("资产库不存在或已停用").toString();
ro.err("资产库不存在或已停用");
return ro.toString();
}
LogUtil.appendLog(Constant.LOG_SUCCESS + "校验资产库存在并可用", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "校验资产库存在并可用", simpleLogFile, fullLogFile);
// 校验文件/形状属性配置是否正常
ResponseObject checkRo = checkMethodConfig(wsId);
if (checkRo.isErr()) {
return checkRo.toString();
ro.err(checkRo.getMsg());
return ro.toString();
}
// 校验文件是否存在
File file = new File(dc.getFilePath());
if (!file.exists()) {
msg = Constant.LOG_ERROR + "上传文件不存在," + Constant.IMPORT_STOP_MSG;
updateErrLog(msg, msg);
return ResponseObject.newErrResponse("上传文件不存在").toString();
ro.err("上传文件不存在");
return ro.toString();
}
LogUtil.appendLog(Constant.LOG_SUCCESS + "校验上传文件是否存在", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "校验上传文件是否存在", simpleLogFile, fullLogFile);
if (!".xml".equals(fileName.substring(fileName.lastIndexOf(".")))) {
msg = Constant.LOG_ERROR + "上传文件名称格式不正确," + Constant.IMPORT_STOP_MSG;
updateErrLog(msg, msg);
return ResponseObject.newErrResponse("上传文件名称格式不正确请上传XML文件").toString();
ro.err("上传文件名称格式不正确请上传XML文件");
return ro.toString();
}
LogUtil.appendLog(Constant.LOG_SUCCESS + "校验上传文件是否为XML格式", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "校验上传文件是否为XML格式", simpleLogFile, fullLogFile);
// 校验xml文档是否能够正常解析
Document doc = analysisXMLFile(file.getPath(), true);
// String toFilePath = "/Users/sunlh/Documents/ideaData/actionsoft/aws6.4.1.1008.yili2/apps/com.actionsoft.apps.coe.pal.datamigration/testFile/targetFile/";
// XMLUtil.writeXml(d, toFilePath + fileName);
// XMLUtil.writeXml(doc, toFilePath + fileName);
// 解析xml文件
if (doc == null) {
msg = Constant.LOG_ERROR + "解析XML文件结构" + Constant.IMPORT_STOP_MSG;
updateErrLog(msg, msg);
return ResponseObject.newErrResponse("解析XML文件错误详情见日志").toString();
ro.err("解析XML文件错误详情见日志");
return ro.toString();
}
LogUtil.appendLog(Constant.LOG_SUCCESS + "解析XML文件结构", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "解析XML文件结构", simpleLogFile, fullLogFile);
ArisXmlHandleWeb handleWeb = new ArisXmlHandleWeb();
// 解析Aris流程内容
// 解析ARIS流程内容
try {
handleWeb.handleXmlDoc(doc);
} catch (Exception e) {
e.printStackTrace();
msg = Constant.LOG_ERROR + "解析XML文件内容异常异常信息" + e.getMessage() + "" + Constant.IMPORT_STOP_MSG;
updateErrLog(msg, msg);
ro.err("解析XML文件内容异常");
return ro.toString();
}
LogUtil.appendLog(Constant.LOG_SUCCESS + "解析XML文件内容", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "解析XML文件内容", simpleLogFile, fullLogFile);
// 统计epc流程图的个数用以进度展示
int totalEpcCount = countProcessMainInfo(handleWeb.modelMap);
if (totalEpcCount == 0) {
// 获取所有aris xml epc模型列表
List<ModelModel> arisEpcModelList = ArisXmlUtil.getArisEpcModelList(handleWeb.modelMap, true);
// 统计aris xml epc流程图的个数用以进度展示
int totalCount = arisEpcModelList.size();
if (totalCount == 0) {
msg = Constant.LOG_ERROR + "上传文件不包含任何" + I18nRes.findValue(CoEConstant.APP_ID, Constant.PROCESS_EPC) + "" + Constant.IMPORT_STOP_MSG;
updateErrLog(msg, msg);
return ResponseObject.newErrResponse("上传文件不包含任何" + I18nRes.findValue(CoEConstant.APP_ID, Constant.PROCESS_EPC)).toString();
ro.err("上传文件不包含任何" + I18nRes.findValue(CoEConstant.APP_ID, Constant.PROCESS_EPC));
return ro.toString();
}
// 统计Aris xml 路径是否有重复
Map<String, Set<String>> arisEpcPathMap = new HashMap<>();
for (ModelModel model : arisEpcModelList) {
if (!arisEpcPathMap.containsKey(model.getModelPath())) {
arisEpcPathMap.put(model.getModelPath(), new HashSet<>());
}
arisEpcPathMap.get(model.getModelPath()).add(model.getId());
}
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][校验ARIS EPC流程路径唯一性]Aris xml EPC流程所属目录唯一性************", simpleLogFile, fullLogFile);
boolean flag = false;
for (Map.Entry<String, Set<String>> entry : arisEpcPathMap.entrySet()) {
if (entry.getValue().size() > 1) {
Set<String> modelIds = entry.getValue();
for (String arisModelId : modelIds) {
ModelModel model = handleWeb.modelMap.get(arisModelId);
String name = model.getName();
String path = ArisConstant.ARIS_ROOT_PATH + model.getModelPath();
LogUtil.appendLog(Constant.LOG_ERROR + "ARIS XML中流程[" + name + "]所属目录重复,所属目录[" + path + "]", simpleLogFile, fullLogFile, warnLogFile);
}
flag = true;
}
}
if (flag) {
msg = "Aris xml文件中存在多个流程同属于一个架构路径详情查看日志";
updateErrLog(msg, msg);
ro.err(msg);
return ro.toString();
}
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][校验Aris EPC流程路径唯一性]", simpleLogFile, fullLogFile);
// 校验pal aris地址属性路径是否存在重复问题
// 获取所有PAL EPC的模型
Map<String, String> palArisPropValMap = ProcessUtil.getPalRepositoryArisPathMap(wsId);
Map<String, Set<String>> palEpcArisPathMap = new HashMap<>();
for (Map.Entry<String, String> entry : palArisPropValMap.entrySet()) {
if (!palEpcArisPathMap.containsKey(entry.getValue())) {
palEpcArisPathMap.put(entry.getValue(), new HashSet<>());
}
palEpcArisPathMap.get(entry.getValue()).add(entry.getKey());
}
LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][校验PAL EPC文件属性ARIS地址唯一性]PAL EPC流程文件属性ARIS地址唯一性************", simpleLogFile, fullLogFile);
flag = false;
for (Map.Entry<String, Set<String>> entry : palEpcArisPathMap.entrySet()) {
if (entry.getValue().size() > 1) {
Set<String> ids = entry.getValue();
for (String id : ids) {
PALRepositoryModel plModel = PALRepositoryCache.getCache().get(id);
String name = plModel.getName();
String path = ProcessUtil.getRepositoryPath(id);
LogUtil.appendLog(Constant.LOG_ERROR + "PAL中流程[" + name + "][V" + plModel.getVersion() + "]文件属性ARIS地址属性内容重复属性内容[" + path + "]", simpleLogFile, fullLogFile, warnLogFile);
}
flag = true;
}
}
if (flag) {
msg = "PAL 文件属性ARIS地址内容存在重复详情查看日志";
updateErrLog(msg, msg);
ro.err(msg);
return ro.toString();
}
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][校验PAL EPC文件属性ARIS地址唯一性]", simpleLogFile, fullLogFile);
// 存储缓存导入计数
LogRealTimeCountModel countModel = new LogRealTimeCountModel();
countModel.setTotalCount(totalEpcCount);
countModel.setTotalCount(totalCount);
countModel.setSuccessCount(0);
countModel.setArisBlankCount(0);
countModel.setPalExistsCount(0);
@ -223,14 +318,14 @@ public class ArisXmlImportWeb extends ActionWeb {
countModel.setMatchFieldCount(0);
LogRealTimeCountCache.getCache().put(logId, countModel, true);
LogUtil.appendLog(Constant.LOG_START + "导入" + I18nRes.findValue(CoEConstant.APP_ID, Constant.PROCESS_EPC + ",共【" + totalEpcCount + "】条流程"));
LogUtil.appendLog(Constant.LOG_END + "[执行阶段][校验阶段]", simpleLogFile, fullLogFile, simpleLogFile, fullLogFile);
LogUtil.appendLog("\n" + Constant.LOG_START + "预计导入[" + fileName + "]" + I18nRes.findValue(CoEConstant.APP_ID, Constant.PROCESS_EPC + ",共[" + totalCount + "]条流程"));
// 开始执行导入
new Thread(()->{new ArisXmlImportRun(_uc, wsId, logId, logPath, simpleLogFile, fullLogFile, warnLogFile, this.filePath, this.fileName, startTime).execute(handleWeb);}) .start();
ResponseObject ro = ResponseObject.newOkResponse();
ro.put("logId", logId);
ro.put("path", logPath);
ro.put("endLog", Constant.END_LOG);
ro.put("totalCount", totalCount);
ro.put("importingCount", LogRealTimeCountCache.getCache().get(logId).getImportingCount());
return ro.toString();
}
@ -326,9 +421,9 @@ public class ArisXmlImportWeb extends ActionWeb {
if (UtilString.isNotEmpty(shapeName)) {
JSONObject shape = ShapeUtil.getProcessShapeDefinitionByName(methodId, shapeName);
if (isEmptyJsonOject(shape)) {
String msg = Constant.LOG_ERROR + "模型" + methodName + "】中的形状【" + shapeName + "不存在," + Constant.IMPORT_STOP_MSG;
String msg = Constant.LOG_ERROR + "模型[" + methodName + "]中的形状[" + shapeName + "]不存在," + Constant.IMPORT_STOP_MSG;
updateErrLog(msg, msg);
return ResponseObject.newErrResponse("模型" + methodName + "】中的形状【" + shapeName + "不存在");
return ResponseObject.newErrResponse("模型[" + methodName + "]中的形状[" + shapeName + "]不存在");
}
String shapeText = shape.getString("text");
List<PALMethodAttributeModel> list = CoeDesignerShapeAPIManager.getInstance().getValidAndUseAttributeModels(wsId, methodId, shapeName, methodId);
@ -336,13 +431,19 @@ public class ArisXmlImportWeb extends ActionWeb {
for (PALMethodAttributeModel attrModel : list) {
attrMap.put(attrModel.getKey(), attrModel);
}
List<PALMethodAttributeModel> list2 = CoeDesignerShapeAPIManager.getInstance().getValidAttributeModels(wsId, methodId, shapeName, methodId);
Map<String, PALMethodAttributeModel> attrMap2 = new HashMap<>();
for (PALMethodAttributeModel attrModel : list2) {
attrMap2.put(attrModel.getKey(), attrModel);
}
for (String attrId : attrs) {
String text = attrMap2.containsKey(attrId) ? attrMap2.get(attrId).getNewTitle() : attrId;
if (!attrMap.containsKey(attrId)) {
String msg = Constant.LOG_ERROR + "模型【" + methodName + "】中的形状【" + shapeText + "】属性【" + attrId + "】不存在,请检查相应属性配置," + Constant.IMPORT_STOP_MSG;
String msg = Constant.LOG_ERROR + "[" + methodName + "]中的形状[" + shapeText + "]属性[" + text + "]不存在,请检查相应属性配置," + Constant.IMPORT_STOP_MSG;
updateErrLog(msg, msg);
return ResponseObject.newErrResponse("模型【" + methodName + "】中的形状【" + shapeText + "】属性【" + attrId + "】不存在");
return ResponseObject.newErrResponse("[" + methodName + "]中的形状[" + shapeText + "]属性[" + text + "]不存在");
}
LogUtil.appendLog(Constant.LOG_SUCCESS + "模型【" + methodName + "】中的形状【" + shapeText + "】属性【" + attrId + "", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "校验[" + methodName + "]中的形状[" + shapeText + "]属性[" + text + "]", simpleLogFile, fullLogFile);
}
} else {
// 文件属性校验
@ -351,13 +452,20 @@ public class ArisXmlImportWeb extends ActionWeb {
for (PALMethodAttributeModel attrModel : list) {
attrMap.put(attrModel.getKey(), attrModel);
}
List<PALMethodAttributeModel> list2 = PALRepositoryAPIManager.getInstance().getValidAttributeModels(wsId, methodId);
Map<String, PALMethodAttributeModel> attrMap2 = new HashMap<>();
for (PALMethodAttributeModel attrModel : list2) {
attrMap2.put(attrModel.getKey(), attrModel);
}
for (String attrId : attrs) {
String text = attrMap2.containsKey(attrId) ? attrMap2.get(attrId).getNewTitle() : attrId;
if (!attrMap.containsKey(attrId)) {
String msg = Constant.LOG_ERROR + "模型【" + methodName + "】的文件属性【" + attrId + "】不存在,请检查相应属性配置," + Constant.IMPORT_STOP_MSG;
String msg = Constant.LOG_ERROR + "[" + methodName + "]的文件属性[" + text + "]不存在,请检查相应属性配置," + Constant.IMPORT_STOP_MSG;
updateErrLog(msg, msg);
return ResponseObject.newErrResponse("模型【" + methodName + "】的文件属性【" + attrId + "】不存在");
return ResponseObject.newErrResponse("[" + methodName + "]的文件属性[" + text + "]不存在");
}
LogUtil.appendLog(Constant.LOG_SUCCESS + "模型【" + methodName + "】的文件属性【" + attrId + "", simpleLogFile, fullLogFile);
LogUtil.appendLog(Constant.LOG_END + "校验[" + methodName + "]的文件属性[" + text + "]", simpleLogFile, fullLogFile);
}
}
return ResponseObject.newOkResponse();
@ -372,4 +480,69 @@ public class ArisXmlImportWeb extends ActionWeb {
return o == null || o.isEmpty();
}
/**
* 查询导入流程日志
* @param logId
* @param path
* @param timer
* @return
*/
public String queryArisXmlImportLog(String logId, String path, String timer) {
String content = "";
if (new File(path).exists()) {
content = LogUtil.getLogContent(new File(path));
}
ResponseObject ro = ResponseObject.newOkResponse();
ro.put("content", content);
ro.put("timer", timer);
LogRealTimeCountModel countCache = LogRealTimeCountCache.getCache().get(logId);
int importingCount = 0;
int resultStatus = Constant.LOG_RESULT_StATUS_RUN;
if (countCache != null) {
importingCount = countCache.getImportingCount();
} else {
resultStatus = LogUtil.queryLog(logId).getResultStatus();
}
ro.put("resultStatus", resultStatus);
ro.put("importingCount", importingCount);
return ro.toString();
}
/**
* 下载日志
* @param logId
* @param path
* @return
*/
public String downloadArisXmlImportLog(String logId, String path) {
File file = new File(path);
if (!file.exists()) {
return ResponseObject.newErrResponse("日志文件不存在").toString();
}
LogModel model = LogUtil.queryLog(logId);
String fileName = model.getFileName();
// 创建dc目录
DCPluginProfile dcProfile = DCProfileManager.getDCProfile(Constant.APP_ID, ArisConstant.REPOSITORY_NAME);
DCContext dc = new DCContext(_uc, dcProfile, Constant.APP_ID, ArisConstant.GROUP_VALUE_DOWNLOAD, file.getParentFile().getName());
String dirPath = dc.getPath();
File dir = new File(dirPath);
if (!dir.exists()) {
dir.mkdirs();
}
String targetFileName = fileName.substring(0, fileName.lastIndexOf(".")) + "导入日志.zip";
File targetFile = new File(dir.getPath() + File.separator + targetFileName);
try {
UtilFile.zipCompress(file.getParentFile().getPath(), targetFile);
} catch (Exception e) {
e.printStackTrace();
return ResponseObject.newErrResponse("压缩日志文件失败,详细信息:" + e.getMessage()).toString();
}
DCContext dc2 = new DCContext(_uc, dcProfile, Constant.APP_ID, ArisConstant.GROUP_VALUE_DOWNLOAD, file.getParentFile().getName(), targetFileName);
String url = dc2.getDownloadURL();
ResponseObject ro = ResponseObject.newOkResponse();
ro.put("url", url + "&isInline=false");
return ro.toString();
}
}

View File

@ -56,19 +56,22 @@ public class Constant {
// public static final String METHOD_ARIS_URL = "ARISURL";
public static final String METHOD_ARIS_URL = "ARIS";
// 建模属性代码--IT系统别名
public static final String METHOD_OTHER_NAME = "otherName";
// 存放与流程同名的角色模型的文件夹名称
public static final String DEFAULT_FOLDER_NAME = "角色模型";
// 日志常量记录
public static final String LOG_SUCCESS = "【成功】";
public static final String LOG_WARNING = "【警告】";
public static final String LOG_ERROR = "【错误】";
public static final String LOG_SUCCESS = "[成功]";
public static final String LOG_WARNING = "[警告]";
public static final String LOG_ERROR = "[错误]";
// 日志导入开始节点
public static final String LOG_START = "【开始】";
public static final String LOG_START = "[开始]";
// 日志导入完成节点
public static final String LOG_END = "【完成】";
public static final String LOG_DESC = "【说明】";
public static final String LOG_END = "[完成]";
public static final String LOG_DESC = "[说明]";
// 日志表resultType字段常量code

View File

@ -1,27 +0,0 @@
package com.actionsoft.apps.coe.pal.datamigration.log.cache;
import com.actionsoft.apps.coe.pal.datamigration.log.model.LogRealTimeCountModel;
import com.actionsoft.apps.resource.plugin.profile.CachePluginProfile;
import com.actionsoft.bpms.commons.cache.Cache;
import com.actionsoft.bpms.commons.cache.CacheManager;
/**
* 存储导入数据
* @author sunlh
*
*/
public class LogRealTimeCountCache extends Cache<String, LogRealTimeCountModel>{
public LogRealTimeCountCache(CachePluginProfile configuration) {
super(configuration);
}
@Override
protected void load() {
}
public static LogRealTimeCountCache getCache() {
return CacheManager.getCache(LogRealTimeCountCache.class);
}
}

View File

@ -1,7 +1,6 @@
package com.actionsoft.apps.coe.pal.datamigration.plugin;
import com.actionsoft.apps.coe.pal.datamigration.aris.constant.ArisConstant;
import com.actionsoft.apps.coe.pal.datamigration.log.cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.datamigration.web.DataMigrationWeb;
import com.actionsoft.apps.coe.pal.pal.repository.upfile.CoeFileProcessor;
import com.actionsoft.apps.listener.PluginListener;
@ -23,9 +22,6 @@ public class Plugins implements PluginListener {
public List<AWSPluginProfile> register(AppContext context) {
List<AWSPluginProfile> list = new ArrayList<AWSPluginProfile>();
// 注册缓存
list.add(new CachePluginProfile(LogRealTimeCountCache.class));
list.add(new DCPluginProfile("migration", CoeFileProcessor.class.getName(), "存放数据迁移文件", false, false));
list.add(new DCPluginProfile(ArisConstant.REPOSITORY_NAME, CoeFileProcessor.class.getName(), "存在arisXML数据迁移日志", false, false));

View File

@ -53,16 +53,19 @@ public class LogUtil {
public static String getLogContent(File file) {
StringBuilder builder = new StringBuilder();
InputStreamReader reader = null;
BufferedReader br = null;
try {
builder.append("<p>");
reader = new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8);
br = new BufferedReader(reader);
String s;
while ((s = br.readLine()) != null) {
builder.append(s).append("\n");
// builder.append(s).append("\n");
builder.append(s).append("</p><p>");
}
builder.append("</p>");
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {

View File

@ -2,13 +2,17 @@ package com.actionsoft.apps.coe.pal.datamigration.util;
import com.actionsoft.apps.AppsConst;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
import com.actionsoft.apps.coe.pal.pal.method.PALMethodManager;
import com.actionsoft.apps.coe.pal.pal.method.cache.PALMethodCache;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodAttributeModel;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodModel;
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.lifecycle.api.AppsAPIManager;
import com.actionsoft.apps.resource.AppContext;
@ -19,6 +23,9 @@ import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
public class ProcessUtil {
@ -213,5 +220,37 @@ public class ProcessUtil {
}
return StringUtils.join(list, "\\");
}
/**
* 获取所有epc模型,key:epc-id,value:arisUrl
* @param wsId
* @return
*/
public static Map<String, String> getPalRepositoryArisPathMap(String wsId) {
Map<String, String> propValMap = new HashMap<>();
Iterator<PALRepositoryModel> iterator = PALRepositoryCache.getByWsId(wsId);
List<PALRepositoryModel> list = new ArrayList<>();
while (iterator.hasNext()) {
// 无多版本情况不考虑
PALRepositoryModel model = iterator.next();
if (Constant.PROCESS_EPC.equals(model.getMethodId())) {
list.add(model);
}
}
PALRepositoryPropertyDao dao = new PALRepositoryPropertyDao();
List<PALRepositoryPropertyModel> propertyModels = dao.queryByWsId(wsId);
propertyModels = propertyModels.stream().filter(item -> Constant.METHOD_ARIS_URL.equals(item.getPropertyId())).collect(Collectors.toList());
Map<String, String> map = new HashMap<>();
for (PALRepositoryPropertyModel prop : propertyModels) {
map.put(prop.getPlId(), StrUtil.removeAllBlack(prop.getPropertyValue()));// 去除空格
}
for (PALRepositoryModel model : list) {
if (map.containsKey(model.getId())) {
propValMap.put(model.getId(), map.get(model.getId()));
}
}
return propValMap;
}
}

View File

@ -0,0 +1,14 @@
package com.actionsoft.apps.coe.pal.datamigration.util;
public class StrUtil {
/**
* 去除字符串所有空格增加处理特殊空格ASCII码值为160
* @param str
* @return
*/
public static String removeAllBlack(String str) {
return str == null ? "" : str.replaceAll("\\u00A0+", "").replace(" ", "");
}
}

View File

@ -0,0 +1,237 @@
package com.actionsoft.apps.coe.pal.datamigration.util;
import com.actionsoft.apps.coe.pal.datamigration.aris.constant.ArisConstant;
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
import com.actionsoft.apps.coe.pal.datamigration.log.dao.LogDao;
import com.actionsoft.apps.coe.pal.datamigration.log.model.LogModel;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.server.fs.DCContext;
import com.actionsoft.bpms.server.fs.dc.DCProfileManager;
import com.actionsoft.bpms.util.UUIDGener;
import java.io.File;
import java.io.IOException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
public class WordLogUtil {
private UserContext uc;
private String logId;
private String logPath;
private File infoLogFile;
private File warnLogFile;
private File errorLogFile;
private File fullLogFile;
private String filePath;
private String fileName;
public WordLogUtil(UserContext _uc){
this.uc = _uc;
logId = UUIDGener.getUUID();// 记录缓存
String fileValue = "AttrtibuteImported-" + new SimpleDateFormat("yyyy-MM-dd HH-mm-ss").format(new Date()) + "--" + _uc.getUID();
// 创建dc目录
DCPluginProfile dcProfile = DCProfileManager.getDCProfile(Constant.APP_ID, Constant.UPFILE);
DCContext dc = new DCContext(_uc, dcProfile, Constant.APP_ID, "log", fileValue);
String dirPath = dc.getPath();
File file = new File(dirPath);
if (!file.exists()){
file.mkdirs();
}
try {
infoLogFile = new File(dirPath,"simpleImport.log");
if (!infoLogFile.exists()){
infoLogFile.createNewFile();
}
fullLogFile = new File(dirPath,"fullImport.log");
if (!fullLogFile.exists()){
fullLogFile.createNewFile();
}
warnLogFile = new File(dirPath,"warningImport.log" );
if (!warnLogFile.exists()){
warnLogFile.createNewFile();
}
errorLogFile = new File(dirPath,"errorImport.log");
if (!errorLogFile.exists()){
errorLogFile.createNewFile();
}
} catch (IOException e) {
e.printStackTrace();
}
logPath = fullLogFile.getPath();// 前端实时展示的日志
}
public void appendInfoLog(String content) {
LogUtil.appendLog(content,infoLogFile);
}
public void appendFullLog(String content) {
LogUtil.appendLog(content,fullLogFile);
}
public void appendErrorLog(String content) {
LogUtil.appendLog(content,errorLogFile);
}
public void appendWarnLog(String content) {
LogUtil.appendLog(content,warnLogFile);
}
public void appendAllAndInfoLog(String content) {
LogUtil.appendLog(content,fullLogFile,infoLogFile);
}
public void appendAllAndWarnLog(String content) {
LogUtil.appendLog(content,fullLogFile,warnLogFile);
}
public void appendAllAndErrorLog(String content) {
LogUtil.appendLog(content,fullLogFile,errorLogFile);
}
public void appendAllLog(String content) {
LogUtil.appendLog(content,infoLogFile,fullLogFile,warnLogFile,errorLogFile);
}
/**
* 记录一次批量上传行为
* @param id
* @param wsId 资产库id
* @param fileName 批量记录名称
* @param filePath 批量上传的dc地址
* @param createDate 创建时间
*/
public void createLogModel(String id, String wsId, String fileName, String filePath, Timestamp createDate) {
LogModel model = new LogModel();
model.setId(id);
model.setWsId(wsId);
model.setFileName(fileName);
model.setFilePath(filePath);
model.setLogPath(logPath);
model.setCreateUser(uc.getUID());
model.setCreateUserName(uc.getUserName());
model.setCreateDate(createDate);
model.setStartDate(createDate);
model.setResultStatus(Constant.LOG_RESULT_StATUS_RUN);
model.setMainInfo("导入进行中");
// 存储日志db
LogUtil.createLog(model);
}
/**
* 获取此次批量结果状态值
* @return
*/
public int getLogResultStatus(){
return LogUtil.queryLog(logId).getResultStatus();
}
public void updateErrLog(String logFileMsg, String logDbMsg) {
// 记录日志
this.appendAllAndErrorLog(logFileMsg);
// 日志表记录导入结果
LogUtil.updateLog(logId, new Timestamp(System.currentTimeMillis()), Constant.LOG_RESULT_StATUS_ERROR, logDbMsg);
// 清空缓存
// LogRealTimeCountCache.getCache().remove(logId);
}
/**
* 更新日志日志操作行为非具体日志信息
* @param id
* @param endDate 结束时间
* @param resultType 结果状态
* @param mainInfo 主要信息
* @return
*/
public int updateLog(Timestamp endDate, int resultType, String mainInfo) {
return new LogDao().update(logId, endDate, resultType, mainInfo);
}
public String takeTime(long startTime,long endTime) {
long time = endTime - startTime;
String timeMsg = "";
if (time > 1000 * 60) {
timeMsg = "[" + (time / 1000 / 60) + "]分钟";
} else if (time > 1000) {
timeMsg = "[" + (time / 1000) + "]秒";
} else {
timeMsg = "[" + time + "]毫秒";
}
return timeMsg;
}
public String getLogId() {
return logId;
}
public void setLogId(String logId) {
this.logId = logId;
}
public String getLogPath() {
return logPath;
}
public void setLogPath(String logPath) {
this.logPath = logPath;
}
public File getInfoLogFile() {
return infoLogFile;
}
public void setInfoLogFile(File infoLogFile) {
this.infoLogFile = infoLogFile;
}
public File getWarnLogFile() {
return warnLogFile;
}
public void setWarnLogFile(File warnLogFile) {
this.warnLogFile = warnLogFile;
}
public File getErrorLogFile() {
return errorLogFile;
}
public void setErrorLogFile(File errorLogFile) {
this.errorLogFile = errorLogFile;
}
public File getFullLogFile() {
return fullLogFile;
}
public void setFullLogFile(File fullLogFile) {
this.fullLogFile = fullLogFile;
}
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
}

View File

@ -12,6 +12,7 @@ import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.hwpf.usermodel.*;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.*;
@ -72,64 +73,56 @@ public class WordUtil {
public WordUtil() { }
public boolean analysisWordTable(String filePath){
try {
HWPFDocument doc = new HWPFDocument(new FileInputStream(filePath));
Range range = doc.getRange();
for (int i =0;i<range.numParagraphs();i++){
Paragraph paragraph = range.getParagraph(i);
String text = paragraph.text();
if (StringUtils.isEmpty(text)||"\r".equals(text)){
continue;
}
//获取文件编码
if (text.contains("文件编码") && fileFieldMap.get("文件编码") == null){
this.fileNo = this.getFileNo(text);
this.isOldVersion = this.isOldVersion(this.fileNo);
fileFieldMap.put("文件编码",new WordField<>(this.fileNo));
}
//获取文件名称
if (this.isTitle(paragraph)){
this.fileName += text.trim();
}
if (this.isOldVersion){
//旧版本文档
AnalysisStrategyContext strategyContext = new AnalysisStrategyContext();
if (this.isTitle(paragraph)){
//文件标题下解析后续table
AnalysisStrategy titleField = strategyContext.getStrategy("VerticalFeild");
Map<String, WordField<Object>> analysis = titleField.analysis(doc, i);
fileFieldMap.putAll(analysis);
}
WordAttribute wordAttribute = oldWordAttributeMap.get(text.trim());
if (null == wordAttribute){
continue;
}
AnalysisStrategy strategy = strategyContext.getStrategy(wordAttribute.getType());
Map<String, WordField<Object>> analysis = strategy.analysis(doc, i);
fileFieldMap.putAll(analysis);
}else {
WordAttribute wordAttribute = wordAttributeMap.get(text.trim());
if (null == wordAttribute){
continue;
}
AnalysisStrategy strategy = new AnalysisStrategyContext().getStrategy(wordAttribute.getType());
Map<String, WordField<Object>> analysis = strategy.analysis(doc,i);
fileFieldMap.putAll(analysis);
}
public void analysisWordTable(String filePath) throws IOException ,RuntimeException {
HWPFDocument doc = new HWPFDocument(new FileInputStream(filePath));
Range range = doc.getRange();
for (int i =0;i<range.numParagraphs();i++){
Paragraph paragraph = range.getParagraph(i);
String text = paragraph.text();
if (StringUtils.isEmpty(text)||"\r".equals(text)){
continue;
}
} catch (IOException e) {
e.printStackTrace();
return false;
}
//获取文件编码
if (text.contains("文件编码") && fileFieldMap.get("文件编码") == null){
this.fileNo = this.getFileNo(text);
this.isOldVersion = this.isOldVersion(this.fileNo);
fileFieldMap.put("文件编码",new WordField<>(this.fileNo));
}
return true;
//获取文件名称
if (this.isTitle(paragraph)){
this.fileName += text.trim();
}
if (this.isOldVersion){
//旧版本文档
AnalysisStrategyContext strategyContext = new AnalysisStrategyContext();
if (this.isTitle(paragraph)){
//文件标题下解析后续table
AnalysisStrategy titleField = strategyContext.getStrategy("VerticalFeild");
Map<String, WordField<Object>> analysis = titleField.analysis(doc, i);
fileFieldMap.putAll(analysis);
}
WordAttribute wordAttribute = oldWordAttributeMap.get(text.trim());
if (null == wordAttribute){
continue;
}
AnalysisStrategy strategy = strategyContext.getStrategy(wordAttribute.getType());
Map<String, WordField<Object>> analysis = strategy.analysis(doc, i);
fileFieldMap.putAll(analysis);
}else {
WordAttribute wordAttribute = wordAttributeMap.get(text.trim());
if (null == wordAttribute){
continue;
}
AnalysisStrategy strategy = new AnalysisStrategyContext().getStrategy(wordAttribute.getType());
Map<String, WordField<Object>> analysis = strategy.analysis(doc,i);
fileFieldMap.putAll(analysis);
}
}
}
private String getFileNo(String text){
@ -218,7 +211,7 @@ public class WordUtil {
List<String> list = new ArrayList<>(16);
int x = 0;
TableRow tr = tb.getRow(i);
String key = null;
String key = "";
//迭代列默认从0开始
for (int j = 0; j < tr.numCells(); j++) {
//取得单元格

View File

@ -607,4 +607,4 @@ public class HtmlToWord {
e.printStackTrace();
}
}
}
}

View File

@ -1,7 +1,9 @@
package com.actionsoft.apps.coe.pal.datamigration.util.htmltodocx;
import java.io.*;
import java.util.List;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* @author baizp
@ -10,17 +12,12 @@ import java.util.List;
*/
public class Test {
public static void main(String[] args) {
//富文本转制度
String content = "富文本的内容";
StringBuffer sbf = new StringBuffer();
sbf.append("<html><body>");
sbf.append(content);
sbf.append("</body></html");
String contents = txt2String(sbf.toString());
byte[] result = HtmlToWord.resolveHtml(contents);
String plRid = UUIDGener.getUUID();
InputStream sbs = new ByteArrayInputStream(result);
new CreateMaps().updateMaps(plRid, sbs, name);
String text = "";
outRichTextToDocx(text,
"/Users/jiuyabai/Desktop/yili项目/new.docx");
/*ObjectFactory wmlObjectFactory = new ObjectFactory();
PPr ppr = wmlObjectFactory.createPPr();
JcEnumeration jcEnumeration = JcEnumeration.CENTER;*/
}
public static void outRichTextToDocx(String contents ,String outFilePath) {
String content = txt2String(contents);

View File

@ -12,6 +12,7 @@ import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.server.fs.DCContext;
import com.actionsoft.bpms.server.fs.dc.DCProfileManager;
import com.actionsoft.bpms.util.DBSql;
import com.actionsoft.bpms.util.UUIDGener;
import com.actionsoft.sdk.local.SDK;
import com.alibaba.fastjson.JSON;
@ -19,14 +20,12 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.aspose.words.Document;
import com.aspose.words.SaveFormat;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.hwpf.usermodel.*;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.*;
import java.util.*;
/**
@ -34,9 +33,15 @@ import java.util.*;
* @Description:
* @date 2022/6/30 21:47
*/
@Slf4j
public class ReadTable {
//相关文件存文件名称
private String version = "";
private String fileName = "";
public static Map<String, WordAttribute> wordAttributeMap = new HashMap<>();
public static Map<String, String> nameToIdMap = new HashMap<>();
public static Map<String, String> idToNameMap = new HashMap<>();
//基础字段
public Map<String, String> fieldMap = new HashMap<>();
@ -59,6 +64,7 @@ public class ReadTable {
});
nameToId.forEach(wordAttribute -> {
nameToIdMap.put(wordAttribute.getTitle(), wordAttribute.getType());
idToNameMap.put(wordAttribute.getType(), wordAttribute.getTitle());
});
}
@ -96,56 +102,75 @@ public class ReadTable {
e.printStackTrace();
}
}
DCPluginProfile dcProfilepdfdoc = DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.datamigration", "migration");
//进行文件解析 写基本信息
DCContext dcContextpdfdoc = new DCContext(userContext, dcProfilepdfdoc, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, docname);
InputStream docfile = SDK.getDCAPI().read(dcContextpdfdoc);
//画一个图形 并返回图形ID
String shapId = createOneMap(wsId, docname.replace(".doc", ""), userContext, docfile);
if (shapId.isEmpty()) {
return;
}
String title = fileFieldMap.get("标题").getData().toString();
//解析文档附件
PALRepositoryModel palRepositoryModel = ReadWordUtil.getRepositoryByName(wsId, docxname.replace(".docx", ""));
PALRepositoryModel palRepositoryModel = ReadWordUtil.getRepositoryByName(wsId, title);
if (palRepositoryModel == null) {
return;
}
String id = palRepositoryModel.getId();
//进行文件解析 写基本信息
DCPluginProfile dcProfilepdfdoc = DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.datamigration", "migration");
DCContext dcContextpdfdoc = new DCContext(userContext, dcProfilepdfdoc, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, docname);
InputStream docfile = SDK.getDCAPI().read(dcContextpdfdoc);
//画一个图形 并返回图形ID
String shapId = createOneMap(wsId, docname.replace(".doc", ""), userContext, docfile);
writeAttrbute(id);
//将文件挂载到附件里面
DCContext dcContextorigin = new DCContext(userContext, dcProfilepdfdoc, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, fileName);
InputStream originfile = SDK.getDCAPI().read(dcContextorigin);
try {
new ReadWordUtil().writeFileTodisk(userContext, "", fileName, originfile, palRepositoryModel.getId(), "f");
} catch (FileNotFoundException e) {
e.printStackTrace();
}
//先把默认属性给他弄上~~~然后再赋值
/*BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(palRepositoryModel.getId(), 0);
if (defineModel == null) {
defineModel = CoeDesignerUtil.createModel(palRepositoryModel.getId(), 0);
defineModel.setCreateHistory(false);
}*/
/*String define = defineModel.getDefinition();
JSONObject definition = JSONObject.parseObject(define);
JSONObject elements = definition.getJSONObject("elements");
Map<String, Map<String, JSONObject>> methodAttrsMap = new HashMap<>();*/
//handleShapeDefaultAttr("", palRepositoryModel, elements, methodAttrsMap, docfile);
//writeAttrbute(userContext, docfile, docname.replace(".doc", ""), elements.getJSONObject(shapId));
//解析附件进行复制
DCContext dcContextpdf1 = new DCContext(userContext, dcProfilepdfdoc, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, docxname);
InputStream docxfile = SDK.getDCAPI().read(dcContextpdf1);
try {
new WordTableAttrFile().copyWord(userContext, shapId, docxfile, id, "评估表|评价表|表单$", "s");
new WordTableAttrFile().copyWord(userContext, shapId, docxfile, id, "评估表|评价表|表单|检查表$", "s");
} catch (Exception e) {
e.printStackTrace();
}
}
public JSONObject writeAttrbute(UserContext userContext, InputStream file, String name, JSONObject shapeze) {
boolean result = analysisWordTable(file);
JSONArray attribute = shapeze.getJSONArray("dataAttributes").getJSONObject(0).getJSONArray("attributesJsonArray");
if (result) {
//根据名称获取PAL制度模型
nameToIdMap.forEach((key, value) -> {
//根据key去更新
WordField tmpw = fileFieldMap.get(key);
if (tmpw != null) {
JSONObject tmp = new JSONObject();
tmp.put("ref", "");
tmp.put("icon", "../apps/com.actionsoft.apps.coe.pal/img/icon/shape_attribute.png");
tmp.put("readonly", false);
tmp.put("scope", "%,*");
tmp.put("name", key);
tmp.put("id", value);
tmp.put("type", "string");
tmp.put("value", tmpw.getData());
tmp.put("groupPath", "baseAttribute");
tmp.put("key", value);
attribute.add(tmp);
}
});
}
return shapeze;
/**
* 给表单文件属性赋值
*
* @param file
* @param plid
*/
public void writeAttrbute(String plid) {
//boolean result = analysisWordTable(file);
//根据名称获取PAL制度模型
String sql = "update APP_ACT_COE_PAL_PROP set PROPERTYVALUE='%s' where PROPERTYID='%s' AND PLID='%s'";
nameToIdMap.forEach((key, value) -> {
//根据key去更新
WordField tmp = fileFieldMap.get(key);
if (tmp != null) {
String sql1 = String.format(sql, tmp.getData().toString(), value, plid);
System.out.println("执行的sql有" + sql1);
DBSql.update(sql1);
}
});
}
/**
@ -156,7 +181,15 @@ public class ReadTable {
* @return
*/
public String createOneMap(String plId, String name, UserContext userContext, InputStream docfile) {
PALRepositoryModel palRepositoryModel = ReadWordUtil.getRepositoryByName(plId, name);
boolean result = analysisWordTable(docfile);
if (fileFieldMap.get("标题") == null) {
return "";
}
String title = fileFieldMap.get("标题").getData().toString();
PALRepositoryModel palRepositoryModel = ReadWordUtil.getRepositoryByName(plId, title);
if (palRepositoryModel == null) {
return "";
}
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(palRepositoryModel.getId(), 0);
if (defineModel == null) {
defineModel = CoeDesignerUtil.createModel(palRepositoryModel.getId(), 0);
@ -165,14 +198,13 @@ public class ReadTable {
String define = defineModel.getDefinition();
JSONObject definition = JSONObject.parseObject(define);
JSONObject elements = definition.getJSONObject("elements");
String shapeId = UUIDGener.getObjectId();
if (StringUtils.isNotEmpty(definition.getString("commonShapeConfig"))) {
definition.remove("commonShapeConfig");
}
//增加一个表单图形
JSONObject shapeze = ShapeUtil.getProcessShapeDefinitionByName("data.form", "form");
String shapeIdz = UUIDGener.getObjectId();
shapeze.put("text", name);//不生效
shapeze.put("text", title);//不生效
shapeze.put("level", 0);
JSONObject props1 = shapeze.getJSONObject("props");// 位置大小
shapeze.put("id", shapeIdz);
@ -181,8 +213,10 @@ public class ReadTable {
props1.put("w", 110);
props1.put("h", 50);
props1.put("zindex", 0);
writeAttrbute(userContext, docfile, name, shapeze);
elements.put(shapeIdz, shapeze);
Map<String, Map<String, JSONObject>> methodAttrsMap = new HashMap<>();
handleShapeDefaultAttr("", palRepositoryModel, elements, methodAttrsMap, docfile);
// 设置画布大小
defineModel.setDefinition(definition.toString());
// 保存文件
@ -197,22 +231,62 @@ public class ReadTable {
* @return
*/
public boolean analysisWordTable(InputStream file) {
fieldMap.clear();
fileFieldMap.clear();
boolean ischeck = false;
try {
HWPFDocument doc = new HWPFDocument(file);
//XWPFDocument doc = new XWPFDocument(file);
Range range = doc.getRange();
int titleover = 0;
for (int i = 0; i < range.numParagraphs(); i++) {
Paragraph nowPara = range.getParagraph(i);
String text = nowPara.text();
if (StringUtils.isEmpty(text)) {
continue;
}
/*WordAttribute wordAttribute = wordAttributeMap.get(text.trim());
if (nowPara.text().contains("文件编码")) {
ischeck = true;
}
if (ischeck) {
boolean isTitle = isTitle(nowPara);
if (isTitle && titleover < 2) {
String title = "";
if (fieldMap.get("标题") != null) {
title = fieldMap.get("标题").toString();
}
title = title + nowPara.text().replace("\r", "").replace("\b", "").replace("\t", "").replace("\f", "");
fieldMap.put("标题", title);
fileFieldMap.put("标题", new WordField<>(title));
titleover = 1;
log.info("识别的标题为:" + title);
continue;
}
}
if (titleover == 1) {
titleover = 2;
ischeck = false;
}
WordAttribute wordAttribute = wordAttributeMap.get(text.trim());
if (null == wordAttribute) {
//标题后续直接为table
if (nowPara.isInTable()) {
Table table = range.getTable(nowPara);
Map<String, List<String>> tabelDocText = this.getHorizontalTableMapText(table);
tabelDocText.keySet().forEach(key -> {
List<String> strings = tabelDocText.get(key);
if (!strings.isEmpty()) {
fieldMap.put(key.replace(" ", ""), strings.get(0));
fileFieldMap.put(key.replace(" ", ""), new WordField<>(strings.get(0)));
}
});
i += table.numParagraphs();
}
continue;
}*/
}
//基本信息
/*if (wordAttribute.getType().equals("DirectFeild")) {
if (wordAttribute.getType().equals("DirectFeild")) {
int index = i + 1 > range.numParagraphs() ? i : i + 1;
Paragraph paragraph = range.getParagraph(index);
if ("".equals(paragraph.text())) {
@ -224,21 +298,72 @@ public class ReadTable {
if ("".equals(paragraph.text())) {
break;
}
}*/
}
//标题后续直接为table
if (nowPara.isInTable()) {
Table table = range.getTable(nowPara);
if (paragraph.isInTable()) {
Table table = range.getTable(paragraph);
Map<String, List<String>> tabelDocText = this.getHorizontalTableMapText(table);
//在基本信息中特殊获取文件名称和版本号
if (text.trim().equals("基本信息")) {
tabelDocText.keySet().forEach(key -> {
if (key.replaceAll(" ", "").equals("版本")) {
List<String> strings = tabelDocText.get(key);
if (!strings.isEmpty()) {
version = strings.get(0);
}
}
if (key.equals("文件名称")) {
List<String> strings = tabelDocText.get(key);
if (!strings.isEmpty()) {
fileName = strings.get(0);
}
}
});
}
tabelDocText.keySet().forEach(key -> {
List<String> strings = tabelDocText.get(key);
if (!strings.isEmpty()) {
fieldMap.put(key.replace(" ",""), strings.get(0));
fileFieldMap.put(key.replace(" ",""), new WordField<>(strings.get(0)));
fieldMap.put(key, strings.get(0));
fileFieldMap.put(key, new WordField<>(strings.get(0)));
}
});
i += table.numParagraphs();
}
// continue;
continue;
}
//修订信息
if (wordAttribute.getType().equals("VerticalFeild")) {
int index = i + 1 > range.numParagraphs() ? i : i + 1;
Paragraph paragraph = range.getParagraph(index);
int level = paragraph.getIlvl();
if (paragraph.isInTable()) {
Table table = range.getTable(paragraph);
Map<String, List<String>> verticalTableText = this.getVerticalTableText(table);
if (text.trim().equals("修订记录")) {
List<String> strings = verticalTableText.get("版本");
int subIndex = 0;
for (int j = 0; j < strings.size(); j++) {
String s = strings.get(j);
if (s.equals(version)) {
subIndex = j;
}
}
for (String key : verticalTableText.keySet()) {
List<String> values = verticalTableText.get(key);
fieldMap.put(key, values.get(subIndex));
fileFieldMap.put(key, new WordField<>(values.get(subIndex)));
}
} else {
}
i += table.numParagraphs();
}
continue;
}
// continue;
//}
}
} catch (IOException e) {
@ -248,6 +373,39 @@ public class ReadTable {
return true;
}
/**
* 读取竖排的表格
*
* @param table
* @return
*/
private Map<String, List<String>> getVerticalTableText(Table table) {
Map<String, List<String>> result = new HashMap<>();
List<String> stringList = new ArrayList<>();
for (int i = 0; i < table.numRows(); i++) {
TableRow row = table.getRow(i);
for (int j = 0; j < row.numCells(); j++) {
TableCell cell = row.getCell(j);
String text = cell.text();
//去除text特殊符号
if (null != text && !"".equals(text)) {
text = text.replaceAll("\\p{C}", "");
}
if (i == 0) {
//首行为标题行
result.put(text, new ArrayList<>());
stringList.add(text);
} else {
result.get(stringList.get(j)).add(text);
}
}
}
return result;
}
/**
* 读取基本信息
*
@ -258,7 +416,6 @@ public class ReadTable {
Map<String, List<String>> result = new HashMap<>(16);
//迭代行默认从0开始,可以依据需要设置i的值,改变起始行数也可设置读取到那行只需修改循环的判断条件即可
for (int i = 0; i < tb.numRows(); i++) {
List<String> list = new ArrayList<>(16);
int x = 0;
TableRow tr = tb.getRow(i);
String key = null;
@ -267,7 +424,6 @@ public class ReadTable {
//取得单元格
TableCell td = tr.getCell(j);
StringBuffer sb = new StringBuffer();
String text = td.text();
//取得单元格的内容
for (int k = 0; k < td.numParagraphs(); k++) {
@ -279,17 +435,141 @@ public class ReadTable {
}
sb.append(s);
}
if (x == 0) {
key = sb.toString();
} else {
String value = sb.toString();
list.add(value == null || Objects.deepEquals(value, "") ? null : value.replace(",", ""));
key = sb.toString().replaceAll(" ", "");
//看看是否是键值
if (nameToIdMap.containsKey(key) && result.get(key) == null && j < (tr.numCells() - 1)) {
//取得单元格
j += 1;
TableCell tdtmp = tr.getCell(j);
StringBuffer sb1 = new StringBuffer();
List<String> list = new ArrayList<>(16);
//取得单元格的内容
for (int k = 0; k < tdtmp.numParagraphs(); k++) {
Paragraph paragraph = tdtmp.getParagraph(k);
String s = paragraph.text();
//去除后面的特殊符号
if (null != s && !"".equals(s)) {
s = s.substring(0, s.length() - 1);
}
sb1.append(s);
}
String tmpvalue = sb1.toString();
list.add(tmpvalue == null || Objects.deepEquals(tmpvalue, "") ? null : tmpvalue.replace(",", ""));
result.put(key, list);
}
x++;
}
result.put(key, list);
//result.put(key, list);
}
return result;
}
/**
* 自定义属性
*
* @param wsId
* @param palModel
* @param elements
* @param methodAttrsMap
*/
public void handleShapeDefaultAttr(String wsId, PALRepositoryModel palModel, JSONObject elements, Map<String, Map<String, JSONObject>> methodAttrsMap, InputStream file) {
for (String key : elements.keySet()) {
JSONObject shape = elements.getJSONObject(key);
if ("linker".equals(shape.getString("name"))) {
continue;
}
String shapeMehtodId = shape.getString("category").replace("_", ".");
String shapeName = shape.getString("name");
if (methodAttrsMap.containsKey(palModel.getMethodId()) && methodAttrsMap.containsKey(shapeName)) {
} else {
if (!methodAttrsMap.containsKey(palModel.getMethodId())) {
methodAttrsMap.put(palModel.getMethodId(), new HashMap<>());
}
JSONObject attrs = ShapeUtil.getProcessUseShapeMethodAttrByShapeName(palModel.getWsId(), shapeMehtodId, palModel.getMethodId(), shapeName);
if (attrs != null) {
methodAttrsMap.get(palModel.getMethodId()).put(shapeName, attrs);
}
}
JSONObject attrs = methodAttrsMap.get(palModel.getMethodId()).get(shapeName);// 最终属性内容
attrs = JSONObject.parseObject(attrs.toString());// 复制
JSONArray dataAttributes = shape.getJSONArray("dataAttributes");
if (!dataAttributes.isEmpty() && dataAttributes.size() > 0) {
for (Object attribute : dataAttributes) {
JSONObject obj = (JSONObject) attribute;
if (obj.containsKey("attributesJsonArray")) {
JSONArray attributesJsonArray = obj.getJSONArray("attributesJsonArray");
Set<String> attrIds = new HashSet<>();
for (int i = 0; i < attributesJsonArray.size(); i++) {
if (attributesJsonArray.getJSONObject(i).containsKey("id")) {
attrIds.add(attributesJsonArray.getJSONObject(i).getString("id"));
}
}
for (String attrId : attrs.keySet()) {
if (!attrIds.contains(attrId)) {
JSONObject eleAttrObj = getDefaultAttrObj(attrs.getJSONObject(attrId));
attributesJsonArray.add(eleAttrObj);
}
}
}
}
}
}
}
/**
* 获取默认属性内容
*
* @param attr
* @return
*/
public JSONObject getDefaultAttrObj(JSONObject attr) {
String ref = attr.getString("ref");
boolean readonly = attr.getBooleanValue("readonly");
String scope = attr.getString("scope");
String attrName = attr.getString("title");
String attrId = attr.getString("id");
String type = attr.getString("type");
String groupPath = attr.getString("groupPath");
String attrKey = attr.getString("key");
String attrValue = "";
JSONObject object2 = new JSONObject();
object2.put("ref", ref);
object2.put("readonly", readonly);
object2.put("scope", scope);
object2.put("name", attrName);
object2.put("id", attrId);
object2.put("type", type);
object2.put("groupPath", groupPath);
object2.put("key", attrKey);
object2.put("value", "");
return object2;
}
/**
* 判断是否为文档标题
* 标志黑体一号
*
* @param paragraph
* @return
*/
public boolean isTitle(Paragraph paragraph) {
int size = paragraph.numCharacterRuns();
String fontName = "";
int fontSize = 0;
boolean bold;
for (int j = 0; j < size; j++) {
CharacterRun characterRun = paragraph.getCharacterRun(j);
fontName = characterRun.getFontName();
if (fontName.contains("黑体")) {
//与文档fontsize标号2倍关系 黑体一号 等于 26号size
if (characterRun.isBold() && characterRun.getFontSize() == 52) {
return true;
}
if (characterRun.getFontSize() == 44) {
return true;
}
}
}
return false;
}
}

View File

@ -1,7 +1,22 @@
package com.actionsoft.apps.coe.pal.datamigration.util.readtable;
public class TableConstant {
public final static String WORDIMPORT = "[{\"title\":\"基本信息\",\"type\":\"DirectFeild\"}]";
public final static String WORDIMPORT = "[{\"title\":\"基本信息\",\"type\":\"DirectFeild\"},{\"title\":\"修订记录\",\"type\":\"VerticalFeild\"}]";
//public final static String NAMETOID = "[{\"title\":\"目的\",\"type\":\"goal\"},{\"title\":\"拟制/修订人\",\"type\":\"reviser\"},{\"title\":\"拟制/修订日期\",\"type\":\"reviseddate\"},{\"title\":\"审核人\",\"type\":\"auditor\"},{\"title\":\"复核人\",\"type\":\"reviewer\"},{\"title\":\"审批人\",\"type\":\"approver\"},{\"title\":\"术语\",\"type\":\"term\"},{\"title\":\"术语定义\",\"type\":\"definition\"},{\"title\":\"组织/角色名称\",\"type\":\"Character\"},{\"title\":\"组织/角色职责\",\"type\":\"responsibilities\"},{\"title\":\"相关文件\",\"type\":\"relevant\"},{\"title\":\"支持文件\",\"type\":\"support\"},{\"title\":\"相关知识\",\"type\":\"related\"},{\"title\":\"附则\",\"type\":\"supplementary\"}]";
public final static String NAMETOID = "[{\"title\":\"文件名称\",\"type\":\"Form_name\"},{\"title\":\"文件编码\",\"type\":\"form_number\"},{\"title\":\"版本\",\"type\":\"P_versions\"},{\"title\":\"生效日期\",\"type\":\"form_effective_date\"},{\"title\":\"适用范围\",\"type\":\"form_Scope_application\"}]";
public final static String NAMETOID = "[" +
"{\"title\":\"文件名称\",\"type\":\"Form_name\"}," +
"{\"title\":\"文件编码\",\"type\":\"form_number\"}," +
"{\"title\":\"版本\",\"type\":\"P_versions\"}," +
"{\"title\":\"生效日期\",\"type\":\"form_effective_date\"}," +
"{\"title\":\"适用范围\",\"type\":\"form_Scope_application\"}," +
"{\"title\":\"L1\",\"type\":\"Process_Architecture_L1\"}," +
"{\"title\":\"L2\",\"type\":\"Process_Architecture_L2\"}," +
"{\"title\":\"L3\",\"type\":\"Process_Architecture_L3\"}," +
"{\"title\":\"拟制/修订日期\",\"type\":\"Drafted_and_revised_date\"}," +
"{\"title\":\"拟制/修订人\",\"type\":\"Drafted_and_revised_by\"}," +
"{\"title\":\"审核人\",\"type\":\"auditor\"}," +
"{\"title\":\"复核人\",\"type\":\"reviewer\"}," +
"{\"title\":\"审批人\",\"type\":\"approver\"}," +
"{\"title\":\"审批人\",\"type\":\"approver\"}," +
"{\"title\":\"拟制/修订单位\",\"type\":\"Issuing_department\"}]";
}

View File

@ -6,7 +6,7 @@ package com.actionsoft.apps.coe.pal.datamigration.util.readtable;
* @date 2022/6/21 17:21
*/
import com.actionsoft.apps.coe.pal.datamigration.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.datamigration.util.readword.CustomXWPFDocument;
import com.actionsoft.apps.coe.pal.pal.repository.upfile.constant.CoeFileConstant;
import com.actionsoft.apps.coe.pal.pal.repository.upfile.dao.UpFileDao;
@ -69,7 +69,6 @@ public class WordTableAttrFile {
for (int i =0;i<elementsList.size();i++) {
IBodyElement bodyElement = elementsList.get(i);
BodyElementType elementType = bodyElement.getElementType();
System.out.println(elementType);
if (elementType == BodyElementType.PARAGRAPH) {
XWPFParagraph srcPr = (XWPFParagraph) bodyElement;
String tmptext = srcPr.getParagraphText();

View File

@ -4,10 +4,30 @@ public class Constant {
public final static String APP_ID = "com.actionsoft.apps.coe.pal.datamigration";
public final static String UPFILE = "migration";
public final static String WORDIMPORT = "[{\"title\":\"文控信息\",\"type\":\"DirectFeild\"},{\"title\":\"修订记录\",\"type\":\"VerticalFeild\"},{\"title\":\"术语\",\"type\":\"Table\"},{\"title\":\"组织/角色与职责\",\"type\":\"Table\"},{\"title\":\"相关文件\",\"type\":\"File\"},{\"title\":\"支持文件\",\"type\":\"File\"}]";
public final static String WORDIMPORT = "[{\"title\":\"基本信息\",\"type\":\"DirectFeild\"},{\"title\":\"文控信息\",\"type\":\"DirectFeild\"},{\"title\":\"修订记录\",\"type\":\"VerticalFeild\"},{\"title\":\"术语\",\"type\":\"Table\"},{\"title\":\"组织/角色与职责\",\"type\":\"Table\"},{\"title\":\"相关文件\",\"type\":\"File\"},{\"title\":\"支持文件\",\"type\":\"File\"}]";
//public final static String NAMETOID = "[{\"title\":\"目的\",\"type\":\"goal\"},{\"title\":\"拟制/修订人\",\"type\":\"reviser\"},{\"title\":\"拟制/修订日期\",\"type\":\"reviseddate\"},{\"title\":\"审核人\",\"type\":\"auditor\"},{\"title\":\"复核人\",\"type\":\"reviewer\"},{\"title\":\"审批人\",\"type\":\"approver\"},{\"title\":\"术语\",\"type\":\"term\"},{\"title\":\"术语定义\",\"type\":\"definition\"},{\"title\":\"组织/角色名称\",\"type\":\"Character\"},{\"title\":\"组织/角色职责\",\"type\":\"responsibilities\"},{\"title\":\"相关文件\",\"type\":\"relevant\"},{\"title\":\"支持文件\",\"type\":\"support\"},{\"title\":\"相关知识\",\"type\":\"related\"},{\"title\":\"附则\",\"type\":\"supplementary\"}]";
public final static String NAMETOID = "[{\"title\":\"目的\",\"type\":\"Purpose\"},{\"title\":\"拟制/修订人\",\"type\":\"Drafted_and_revised_by\"},{\"title\":\"拟制/修订日期\",\"type\":\"Drafted_and_revised_date\"},{\"title\":\"审核人\",\"type\":\"auditor\"},{\"title\":\"复核人\",\"type\":\"reviewer\"},{\"title\":\"审批人\",\"type\":\"approver\"},{\"title\":\"术语\",\"type\":\"term\"},{\"title\":\"组织/角色名称\",\"type\":\"Organization_role_name\"},{\"title\":\"组织/角色职责\",\"type\":\"Organization_and_role_responsibilities\"},{\"title\":\"相关文件\",\"type\":\"relevant_flies\"},{\"title\":\"支持文件\",\"type\":\"support_files\"},{\"title\":\"相关知识\",\"type\":\"relevant_flies\"},{\"title\":\"附则\",\"type\":\"T_supplementary_articles\"}]";
public final static String NAMETOID = "[{\"title\":\"目的\",\"type\":\"Purpose\"}," +
"{\"title\":\"拟制/修订人\",\"type\":\"Drafted_and_revised_by\"}," +
"{\"title\":\"拟制/修订日期\",\"type\":\"Drafted_and_revised_date\"}," +
"{\"title\":\"审核人\",\"type\":\"auditor\"}," +
"{\"title\":\"复核人\",\"type\":\"reviewer\"}," +
"{\"title\":\"审批人\",\"type\":\"approver\"}," +
"{\"title\":\"术语\",\"type\":\"term\"}," +
"{\"title\":\"组织/角色名称\",\"type\":\"Organizational_role\"}," +
"{\"title\":\"组织/角色与职责\",\"type\":\"Organization_and_role_responsibilities\"}," +
"{\"title\":\"相关文件\",\"type\":\"relevant_flies\"}," +
"{\"title\":\"支持文件\",\"type\":\"support_files\"}," +
"{\"title\":\"相关知识\",\"type\":\"relevant_flies\"}," +
"{\"title\":\"附则\",\"type\":\"T_supplementary_articles\"}," +
"{\"title\":\"L1\",\"type\":\"Process_Architecture_L1\"}," +
"{\"title\":\"L2\",\"type\":\"Process_Architecture_L2\"}," +
"{\"title\":\"L3\",\"type\":\"Process_Architecture_L3\"}," +
"{\"title\":\"文件编码\",\"type\":\"file_number\"}," +
"{\"title\":\"适用范围\",\"type\":\"application\"}," +
"{\"title\":\"版本\",\"type\":\"versions\"}," +
"{\"title\":\"生效日期\",\"type\":\"effective_date\"}," +
"{\"title\":\"修订内容及理由\",\"type\":\"Contents_and_reasons_for_revision\"}," +
"{\"title\":\"拟制/修订单位\",\"type\":\"Drafted_and_revised_Company\"}]";
// 构造连线时的几个固定参数
public final static double ANGLE_RIGHT = 0;
public final static double ANGLE_DOWN = 1.5707963267948968;

View File

@ -1,5 +1,7 @@
package com.actionsoft.apps.coe.pal.datamigration.util.readword;
import com.actionsoft.apps.coe.pal.datamigration.util.htmltodocx.HtmlToWord;
import com.actionsoft.apps.coe.pal.datamigration.util.readtable.WordTableAttrFile;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
@ -19,17 +21,18 @@ import com.actionsoft.bpms.util.DBSql;
import com.actionsoft.bpms.util.UUIDGener;
import com.actionsoft.sdk.local.SDK;
import com.alibaba.fastjson.JSONObject;
import com.aspose.words.Document;
import com.aspose.words.SaveFormat;
import lombok.SneakyThrows;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.xmlbeans.XmlException;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import java.io.InputStream;
import java.io.*;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.*;
public class CreateMaps implements IJob {
@ -159,12 +162,12 @@ public class CreateMaps implements IJob {
InputStream docfile = SDK.getDCAPI().read(dcContextpdf);
//InputStream docfile = new FileInputStream(new File("/Users/jiuyabai/Desktop/yili项目/制度样例1—伊利集团流程制度类文件管理规范(2).doc"));
ReadWordUtil tmp = new ReadWordUtil();
tmp.writeAttrbute(null,docfile, name, id);
tmp.writeAttrbute(null, docfile, name, id);
DCContext dcContextpdf1 = new DCContext(UserContext.fromUID("admin"), dcProfilepdf, "com.actionsoft.apps.coe.pal.datamigration", "yili", "SystemType1656565751273", "制度样例1—伊利集团流程制度类文件管理规范(2).docx");
InputStream docxfile = SDK.getDCAPI().read(dcContextpdf1);
//InputStream docxfile = new FileInputStream(new File("/Users/jiuyabai/Desktop/yili项目/制度样例1—伊利集团流程制度类文件管理规范(2).docx"));
new CreateMaps().updateMaps(id, docxfile, name);
new CreateMaps().updateMaps(null, id, docxfile, name);
}
/**
@ -216,7 +219,7 @@ public class CreateMaps implements IJob {
List<RowMap> orgdepartmentList = DBSql.getMaps("select * from ORGUSER ");
int zindex = 1;
elements = new WordUtilXWPF().rewritContent(elements, inputStream, "制度名称");
elements = new WordUtilXWPF().rewritContent(null, elements, inputStream, "制度名称", null, "", 1);
// 设置画布大小
setDiagramHeightWidth(definition, elements);
@ -225,8 +228,18 @@ public class CreateMaps implements IJob {
CoeDesignerAPIManager.getInstance().storeDefinition(defineModel);// dao操作
}
public void updateMaps(String id, InputStream file, String name) {
/**
* 解析word文件
*
* @param id
* @param file
* @param name
*/
public void updateMaps(UserContext userContext, String id, InputStream file, String name) {
PALRepositoryModel palRepositoryModel = ReadWordUtil.getRepositoryByName(id, name);
if(palRepositoryModel == null){
return;
}
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(palRepositoryModel.getId(), 0);
if (defineModel == null) {
defineModel = CoeDesignerUtil.createModel(palRepositoryModel.getId(), 0);
@ -239,11 +252,50 @@ public class CreateMaps implements IJob {
if (StringUtils.isNotEmpty(definition.getString("commonShapeConfig"))) {
definition.remove("commonShapeConfig");
}
List<RowMap> orgdepartmentList = DBSql.getMaps("select * from ORGUSER ");
int zindex = 1;
elements = new WordUtilXWPF().rewritContent(elements, file, name);
//找到第一个节点
JSONObject firstNode = new JSONObject();
for (Map.Entry<String, Object> entry : elements.entrySet()) {
String key = entry.getKey();
JSONObject value = (JSONObject) entry.getValue();
if ("regulation".equals(value.getString("name"))) {
firstNode = value;
}
}
elements = new WordUtilXWPF().rewritContent(userContext, elements, file, name, firstNode, palRepositoryModel.getId(), 1);
// 设置画布大小
setDiagramHeightWidth(definition, elements);
defineModel.setDefinition(definition.toString());
// 保存文件
CoeDesignerAPIManager.getInstance().storeDefinition(defineModel);// dao操作
}
/**
* 解析富文本代码
*
* @param plid
* @param content
* @param shapeId
*/
public void updateMapsByRichText(UserContext userContext, String plid, String content, String shapeId) {
byte[] result = HtmlToWord.resolveHtml(content);
InputStream sbs = new ByteArrayInputStream(result);
PALRepositoryModel palRepositoryModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(plid);
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(palRepositoryModel.getId(), 0);
if (defineModel == null) {
defineModel = CoeDesignerUtil.createModel(palRepositoryModel.getId(), 0);
defineModel.setCreateHistory(false);
}
String define = defineModel.getDefinition();
JSONObject definition = JSONObject.parseObject(define);
JSONObject elements = definition.getJSONObject("elements");
if (StringUtils.isNotEmpty(definition.getString("commonShapeConfig"))) {
definition.remove("commonShapeConfig");
}
int zindex = 1;
elements = new WordUtilXWPF().rewritContent(userContext, elements, sbs, "", elements.getJSONObject(shapeId), plid, 0);
// 设置画布大小
setDiagramHeightWidth(definition, elements);
@ -252,7 +304,6 @@ public class CreateMaps implements IJob {
CoeDesignerAPIManager.getInstance().storeDefinition(defineModel);// dao操作
}
/**
* 设置画布大小
*
@ -298,4 +349,4 @@ public class CreateMaps implements IJob {
}
}
}

View File

@ -0,0 +1,33 @@
package com.actionsoft.apps.coe.pal.datamigration.util.readword;
/**
* @author baizp
* @Description:
* @date 2022/7/7 10:44
*/
public class DocToHtml {
/**
* 将doc转html
* @param level
* @param text
* @return
*/
public static String getHtml(int level,String text){
if(level == 0){
return String.format("<p style=\"margin: 0 0 0 28px;font-size: 16px;white-space: normal;text-indent: 4px;line-height: 24px\">%s</p>",text);
}
if(level == 1){
return String.format("<h1 style=\"margin: 0px 0px 0px 38px; font-size: 16px; white-space: normal; line-height: 24px;\">%s</h1>",text);
}
if(level == 2){
return String.format("<h2 style=\"margin: 0px 0px 0px 47px; font-size: 16px; white-space: normal; line-height: 24px;\">%s</h2>",text);
}
if(level == 3){
return String.format("<h3 style=\"margin: 0px 0px 0px 57px;font-size: 16px; white-space: normal; line-height: 24px;\">%s</h3>",text);
}
if(level >= 4){
return String.format("<h4 style=\"margin: 0px 0px 0px 57px; font-size: 16px; white-space: normal; line-height: 24px;\">%s</h4>",text);
}
return "";
}
}

View File

@ -1,9 +1,13 @@
package com.actionsoft.apps.coe.pal.datamigration.util.readword;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.datamigration.model.po.WordAttribute;
import com.actionsoft.apps.coe.pal.datamigration.model.po.WordField;
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.upfile.constant.CoeFileConstant;
import com.actionsoft.apps.coe.pal.pal.repository.upfile.dao.UpFileDao;
import com.actionsoft.apps.coe.pal.pal.repository.upfile.model.UpfileModel;
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.server.UserContext;
@ -22,6 +26,7 @@ import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.hwpf.usermodel.*;
import java.io.*;
import java.sql.Timestamp;
import java.util.*;
import java.util.stream.Collectors;
@ -64,21 +69,25 @@ public class ReadWordUtil {
InputStream docfile = new FileInputStream(new File("/Users/jiuyabai/Desktop/yili项目/制度样例1—伊利集团流程制度类文件管理规范(2).doc"));
ReadWordUtil tmp = new ReadWordUtil();
boolean result = tmp.analysisWordTable(docfile);
tmp.writeAttrbute(null,docfile, name, id);
tmp.writeAttrbute(null, docfile, name, id);
InputStream docxfile = new FileInputStream(new File("/Users/jiuyabai/Desktop/yili项目/制度样例1—伊利集团流程制度类文件管理规范(2).docx"));
new CreateMaps().updateMaps(id, docxfile, name);
new CreateMaps().updateMaps(null, id, docxfile, name);
System.out.println(result);
}
public ReadWordUtil() {
}
public void writeAttrbute(UserContext userContext,InputStream file, String name, String wsdl) {
public void writeAttrbute(UserContext userContext, InputStream file, String name, String wsdl) {
boolean result = analysisWordTable(file);
if (result) {
if (fileFieldMap.get("标题") == null) {
return;
}
String title = fileFieldMap.get("标题").getData().toString();
//根据名称获取PAL制度模型
PALRepositoryModel palRepositoryModel = getRepositoryByName(wsdl, name);
PALRepositoryModel palRepositoryModel = getRepositoryByName(wsdl, title);
if (palRepositoryModel != null) {
String id = palRepositoryModel.getId();
String sql = "update APP_ACT_COE_PAL_PROP set PROPERTYVALUE='%s' where PROPERTYID='%s' AND PLID='%s'";
@ -90,32 +99,55 @@ public class ReadWordUtil {
if ("术语".equals(key)) {
List nowdata = (List) tmp.getData();
JSONObject jsonObject = new JSONObject();
jsonObject.put("name","术语");
jsonObject.put("name", "术语");
JSONArray jsonArray = new JSONArray();
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("name","名称");
jsonObject1.put("name", "名称");
jsonObject1.put("id", "table_head");
jsonObject1.put("desc","定义");
jsonObject1.put("desc", "定义");
jsonArray.add(jsonObject1);
//存表格 将名称过滤掉
nowdata.stream().filter(datatmp->{
return !"名称".equals(((List)datatmp).get(0));
}).forEach(datatmp->{
nowdata.stream().filter(datatmp -> {
return !"名称".equals(((List) datatmp).get(0));
}).forEach(datatmp -> {
JSONObject tmpjb = new JSONObject();
tmpjb.put("name",((List)datatmp).get(0));
tmpjb.put("name", ((List) datatmp).get(0));
tmpjb.put("id", UUIDGener.getUUID());
tmpjb.put("desc",((List)datatmp).get(1));
tmpjb.put("desc", ((List) datatmp).get(1));
//{"name":"术语","table":[{"name":"名称","id":"table_head","desc":"定义"},{"name":"流程责任人","id":"c0723266-bff1-410c-b49e-4332e58cc633","desc":"流程责任人是指对流程全生命周期管理负责的人,流程责任人拥有流程全生命周期管理的权力,同时承担相应的职责,是流程绩效的第一负责人。"},{"name":"业务归属","id":"2e3bbc32-1d3d-4f19-8b2e-75302bf2aed4","desc":"是指流程制度文件所属的流程架构位置以及文件适用范围。"}]}
jsonArray.add(tmpjb);
});
jsonObject.put("table",jsonArray);
new CoeProcessLevelWeb(userContext).moreAttrContentSave(id,"term",jsonObject.toJSONString());
jsonObject.put("table", jsonArray);
new CoeProcessLevelWeb(userContext).moreAttrContentSave(id, "term", jsonObject.toJSONString());
} else if ("组织/角色与职责".equals(key)) {
List nowdata = (List) tmp.getData();
JSONObject jsonObject = new JSONObject();
jsonObject.put("name", "组织角色");
JSONArray jsonArray = new JSONArray();
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("name", "组织");
jsonObject1.put("id", "table_head");
jsonObject1.put("desc", "职责");
jsonArray.add(jsonObject1);
//存表格 将名称过滤掉
nowdata.stream().filter(datatmp -> {
return !"组织/角色名称".equals(((List) datatmp).get(0));
}).forEach(datatmp -> {
JSONObject tmpjb = new JSONObject();
tmpjb.put("name", ((List) datatmp).get(0));
tmpjb.put("id", UUIDGener.getUUID());
tmpjb.put("desc", ((List) datatmp).get(1));
//{"name":"术语","table":[{"name":"名称","id":"table_head","desc":"定义"},{"name":"流程责任人","id":"c0723266-bff1-410c-b49e-4332e58cc633","desc":"流程责任人是指对流程全生命周期管理负责的人,流程责任人拥有流程全生命周期管理的权力,同时承担相应的职责,是流程绩效的第一负责人。"},{"name":"业务归属","id":"2e3bbc32-1d3d-4f19-8b2e-75302bf2aed4","desc":"是指流程制度文件所属的流程架构位置以及文件适用范围。"}]}
jsonArray.add(tmpjb);
});
jsonObject.put("table", jsonArray);
new CoeProcessLevelWeb(userContext).moreAttrContentSave(id, "Organizational_role", jsonObject.toJSONString());
} else if ("支持文件".equals(key) || "相关文件".equals(key)) {
//拼文件
List nowdata = (List) tmp.getData();
String alldata = nowdata.stream().collect(Collectors.joining(",")).toString();
String sql1 = String.format(sql, alldata, value, id);
System.out.println("执行的sql有" + sql1);
//System.out.println("执行的sql有" + sql1);
DBSql.update(sql1);
} else {
String sql1 = String.format(sql, tmp.getData().toString(), value, id);
@ -128,65 +160,109 @@ public class ReadWordUtil {
}
}
public void translateDocTDocx(UserContext userContext,String wsId,String groupValue,String fileValue,String fileName){
public void translateDocTDocx(UserContext userContext, String wsId, String groupValue, String fileValue, String fileName) {
DCPluginProfile dcProfilepdf = DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.datamigration", "migration");
DCContext dcContextpdf = new DCContext(userContext, dcProfilepdf, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, fileName);
//InputStream docfile = SDK.getDCAPI().read(dcContextpdf);
String filepath = dcContextpdf.getFilePath();
String fileNewPath = dcContextpdf.getFilePath();
String docname = fileName.replace(".docx",".doc");
String docname = fileName.replace(".docx", ".doc");
String docxname = fileName;
if(fileName.endsWith(".docx")){
docname = dcContextpdf.getFileName().replace(".docx",".doc");
boolean iscreatemap = true;
if (fileName.endsWith(".docx")) {
docname = dcContextpdf.getFileName().replace(".docx", ".doc");
docxname = dcContextpdf.getFileName();
fileNewPath = fileNewPath.replace(".docx",".doc");
try{
fileNewPath = fileNewPath.replace(".docx", ".doc");
try {
File out = new File(fileNewPath);
FileOutputStream outputStream = new FileOutputStream(out);
Document doc = new Document(filepath);
doc.save(outputStream, SaveFormat.DOC);
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}
}else{
docxname = dcContextpdf.getFileName().replace(".doc",".docx");
} else {
docxname = dcContextpdf.getFileName().replace(".doc", ".docx");
docname = dcContextpdf.getFileName();
fileNewPath = fileNewPath.replace(".doc",".docx");
try{
fileNewPath = fileNewPath.replace(".doc", ".docx");
try {
File out = new File(fileNewPath);
FileOutputStream outputStream = new FileOutputStream(out);
Document doc = new Document(filepath);
doc.save(outputStream, SaveFormat.DOCX);
}catch (Exception e){
} catch (Exception e) {
iscreatemap = false;
e.printStackTrace();
}
}
//进行文件解析
DCPluginProfile dcProfilepdfdoc = DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.datamigration", "migration");
//将文件挂载到附件里面
DCContext dcContextorigin = new DCContext(userContext, dcProfilepdfdoc, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, fileName);
InputStream originfile = SDK.getDCAPI().read(dcContextorigin);
//进行文件解析
DCContext dcContextpdfdoc = new DCContext(userContext, dcProfilepdfdoc, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, docname);
InputStream docfile = SDK.getDCAPI().read(dcContextpdfdoc);
ReadWordUtil tmp = new ReadWordUtil();
tmp.writeAttrbute(userContext,docfile, docname.replace(".doc",""), wsId);
DCContext dcContextpdf1 = new DCContext(userContext, dcProfilepdfdoc, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, docxname);
InputStream docxfile = SDK.getDCAPI().read(dcContextpdf1);
new CreateMaps().updateMaps(wsId, docxfile, docxname.replace(".docx",""));
//ReadWordUtil tmp = new ReadWordUtil();
writeAttrbute(userContext, docfile, fileName, wsId);
if (fileFieldMap.get("标题") == null) {
return;
}
String title = fileFieldMap.get("标题").getData().toString();
PALRepositoryModel palRepositoryModel = getRepositoryByName(wsId, title);
if (palRepositoryModel != null) {
try {
writeFileTodisk(userContext, "", fileName, originfile, palRepositoryModel.getId(), "f");
} catch (FileNotFoundException e) {
e.printStackTrace();
}
} else {
return;
}
//创建图形
if (iscreatemap) {
DCContext dcContextpdf1 = new DCContext(userContext, dcProfilepdfdoc, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, docxname);
InputStream docxfile = SDK.getDCAPI().read(dcContextpdf1);
new CreateMaps().updateMaps(userContext, wsId, docxfile, title);
}
}
public boolean analysisWordTable(InputStream file) {
fileFieldMap.clear();
fieldMap.clear();
try {
HWPFDocument doc = new HWPFDocument(file);
//XWPFDocument doc = new XWPFDocument(file);
Range range = doc.getRange();
boolean isDepart = false;
int titleover = 0;
for (int i = 0; i < range.numParagraphs(); i++) {
Paragraph nowPara = range.getParagraph(i);
String text = nowPara.text();
if (StringUtils.isEmpty(text)) {
continue;
}
String nowtext = nowPara.text().replace("\r", "");
if (nowtext.contains("内蒙古伊利集团部门文件")) {
isDepart = true;
}
boolean isTitle = isTitle(nowPara, isDepart);
if (isTitle && titleover < 2) {
String title = "";
if (fieldMap.get("标题") != null) {
title = fieldMap.get("标题").toString();
}
title = title + nowPara.text().replace("\r", "").replace("\b", "").replace("\t", "").replace("\f", "");
fieldMap.put("标题", title);
fileFieldMap.put("标题", new WordField<>(title));
titleover = 1;
continue;
}
if (titleover == 1) {
titleover = 2;
}
WordAttribute wordAttribute = wordAttributeMap.get(text.trim());
if ("目的".equals(text.trim())) {
int index = i + 1 > range.numParagraphs() ? i : i + 1;
@ -222,10 +298,10 @@ public class ReadWordUtil {
//标题后续直接为table
if (paragraph.isInTable()) {
Table table = range.getTable(paragraph);
Map<String, List<String>> tabelDocText = this.getHorizontalTableMapText(table);
Map<String, List<String>> tabelDocText = this.getHorizontalTableMapTextTwo(table);
//在基本信息中特殊获取文件名称和版本号
if (text.trim().equals("文控信息")) {
if (text.trim().equals("文控信息") || text.trim().equals("基本信息")) {
tabelDocText.keySet().forEach(key -> {
if (key.replaceAll(" ", "").equals("版本")) {
List<String> strings = tabelDocText.get(key);
@ -305,9 +381,17 @@ public class ReadWordUtil {
//取文件名名称即可
Table table = range.getTable(paragraph);
Map<String, List<String>> verticalTableText = this.getVerticalTableText(table);
List<String> strings = verticalTableText.get("文件");
fileMap.put(wordAttribute.getTitle(), strings);
fileFieldMap.put(wordAttribute.getTitle(), new WordField<>(strings));
List<String> strings = null;
if (verticalTableText.get("文件") != null) {
strings = verticalTableText.get("文件");
}
if (verticalTableText.get("文件名称") != null) {
strings = verticalTableText.get("文件名称");
}
if (strings != null) {
fileMap.put(wordAttribute.getTitle(), strings);
fileFieldMap.put(wordAttribute.getTitle(), new WordField<>(strings));
}
i += table.numParagraphs();
}
}
@ -361,6 +445,63 @@ public class ReadWordUtil {
return result;
}
/**
* 将所有的属性解析出来
*
* @param tb
* @return
*/
private Map<String, List<String>> getHorizontalTableMapTextTwo(Table tb) {
Map<String, List<String>> result = new HashMap<>(16);
//迭代行默认从0开始,可以依据需要设置i的值,改变起始行数也可设置读取到那行只需修改循环的判断条件即可
for (int i = 0; i < tb.numRows(); i++) {
int x = 0;
TableRow tr = tb.getRow(i);
String key = null;
//迭代列默认从0开始
for (int j = 0; j < tr.numCells(); j++) {
//取得单元格
TableCell td = tr.getCell(j);
StringBuffer sb = new StringBuffer();
//取得单元格的内容
for (int k = 0; k < td.numParagraphs(); k++) {
Paragraph paragraph = td.getParagraph(k);
String s = paragraph.text();
//去除后面的特殊符号
if (null != s && !"".equals(s)) {
s = s.substring(0, s.length() - 1);
}
sb.append(s);
}
key = sb.toString().replaceAll(" ", "");
//看看是否是键值
if (nameToIdMap.containsKey(key) && result.get(key) == null && j < (tr.numCells() - 1)) {
//取得单元格
j += 1;
TableCell tdtmp = tr.getCell(j);
StringBuffer sb1 = new StringBuffer();
List<String> list = new ArrayList<>(16);
//取得单元格的内容
for (int k = 0; k < tdtmp.numParagraphs(); k++) {
Paragraph paragraph = tdtmp.getParagraph(k);
String s = paragraph.text();
//去除后面的特殊符号
if (null != s && !"".equals(s)) {
s = s.substring(0, s.length() - 1);
}
sb1.append(s);
}
String tmpvalue = sb1.toString();
list.add(tmpvalue == null || Objects.deepEquals(tmpvalue, "") ? null : tmpvalue.replace(",", ""));
result.put(key, list);
}
}
//result.put(key, list);
}
return result;
}
private List<List<String>> getHorizontalTableText(Table table) {
List<List<String>> list = new ArrayList<>();
@ -411,6 +552,65 @@ public class ReadWordUtil {
return result;
}
/**
* 将文件挂载到附件
*
* @param me
* @param reid
* @param filename
* @param inputStream
* @param pl_uuid
* @param type
* @throws FileNotFoundException
*/
public void writeFileTodisk(UserContext me, String reid, String filename, InputStream inputStream, String pl_uuid, String type) throws FileNotFoundException {
//InputStream ins = new FileInputStream("");
DCPluginProfile fileProfile = DCProfileManager.getDCProfile(CoEConstant.APP_ID, CoeFileConstant.COE_UPFILE);
DCContext dcContextpdf = new DCContext(me, fileProfile, CoEConstant.APP_ID, "file", pl_uuid, filename);
SDK.getDCAPI().write(inputStream, dcContextpdf);
//创建数据库数据
UpfileModel model = new UpfileModel();
model.setPl_uuid(pl_uuid);
if ("f".equals(type)) {
model.setShape_uuid("");
model.setType("f");
} else {
model.setShape_uuid(reid);
model.setType("s");
}
model.setUuid(UUIDGener.getUUID());
model.setFileName(filename);
model.setDownload(1);
model.setCreateUser(me.getUID());
model.setCreateTime(new Timestamp(System.currentTimeMillis()));
new UpFileDao().create(model);
}
/**
* 判断是否为文档标题
* 标志黑体一号
*
* @param paragraph
* @param type 1:正常的制度文件 2: 部门文件
* @return
*/
public boolean isTitle(Paragraph paragraph, boolean type) {
int size = paragraph.numCharacterRuns();
String fontName = "";
for (int j = 0; j < size; j++) {
CharacterRun characterRun = paragraph.getCharacterRun(j);
fontName = characterRun.getFontName();
if (fontName.contains("黑体") && !type) {
//与文档fontsize标号2倍关系 黑体一号 等于 26号size
return characterRun.isBold() && characterRun.getFontSize() == 52;
}
if (fontName.contains("宋体") && type) {
return characterRun.isBold() && (characterRun.getFontSize() == 21 || characterRun.getFontSize() == 36);
}
}
return false;
}
/**
* 根据名字寻找palmode
*

View File

@ -4,14 +4,23 @@ import cn.jpush.api.utils.StringUtils;
import com.actionsoft.apps.coe.pal.datamigration.aris.mapping.ModelMappingAPIManager;
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
import com.actionsoft.apps.coe.pal.datamigration.util.ShapeUtil;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.server.fs.DCContext;
import com.actionsoft.bpms.server.fs.dc.DCProfileManager;
import com.actionsoft.bpms.util.UUIDGener;
import com.actionsoft.sdk.local.SDK;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.poi.hwpf.usermodel.Paragraph;
import org.apache.poi.xwpf.usermodel.*;
import java.io.*;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
@ -38,6 +47,7 @@ public class WordUtilXWPF {
private static final String regexClearBeginBlank = "^" + splitter + "*|" + splitter + "*$";
public static void main(String[] args) {
JSONObject elements = null;
JSONObject shape = null;
@ -70,7 +80,7 @@ public class WordUtilXWPF {
if (element instanceof XWPFParagraph) {
// 获取段落元素
XWPFParagraph paragraph = (XWPFParagraph) element;
Paragraph paragraph1 = (Paragraph)element;
Paragraph paragraph1 = (Paragraph) element;
String text = paragraph.getText();
String style = paragraph.getStyle();//标题级别
if (org.apache.commons.lang3.StringUtils.isNotEmpty(text)) {//文字
@ -98,32 +108,48 @@ public class WordUtilXWPF {
}
/**
* 重写解析代码
*
* @param userContext
* @param elements
* @param inputStream
* @param name
* @param shapefirst
* @param plid 模型ID
* @param type 是导入还是富文本 1是导入 0是富文本
* @return
*/
public JSONObject rewritContent(JSONObject elements,InputStream inputStream,String name) {
public JSONObject rewritContent(UserContext userContext, JSONObject elements, InputStream inputStream, String name, JSONObject shapefirst, String plid, int type) {
//File file = null;
List<String> failTitleList = new ArrayList<>();
StringBuilder richSbuild = new StringBuilder();
//String filePath = "/Users/jiuyabai/Desktop/yili项目/制度样例1—伊利集团流程制度类文件管理规范1.docx";
try {
//file = new File(filePath);
elements.clear();
XWPFDocument doc = new XWPFDocument(inputStream);
JSONObject shapeze = ShapeUtil.getProcessShapeDefinitionByName("control.policy", "regulation");
String shapeIdz = UUIDGener.getObjectId();
shapeze.put("text", name);//不生效
shapeze.put("level", 0);
JSONObject props1 = shapeze.getJSONObject("props");// 位置大小
shapeze.put("id", shapeIdz);
props1.put("x", 100);
props1.put("y", 277);
props1.put("w", 110);
props1.put("h", 50);
props1.put("zindex", 0);
shapeze.put("next", true);
elements.put(shapeIdz, shapeze);
shapeze.put("p", 0);
JSONArray onlinedata = new JSONArray();
if (shapefirst == null || shapefirst.size() == 0) {
JSONObject shapeze = ShapeUtil.getProcessShapeDefinitionByName("control.policy", "regulation");
String shapeIdz = UUIDGener.getObjectId();
shapeze.put("text", name);//不生效
shapeze.put("level", 0);
JSONObject props1 = shapeze.getJSONObject("props");// 位置大小
shapeze.put("id", shapeIdz);
props1.put("x", 100);
props1.put("y", 277);
props1.put("w", 110);
props1.put("h", 50);
props1.put("zindex", 0);
shapeze.put("next", true);
elements.put(shapeIdz, shapeze);
shapeze.put("p", 0);
onlinedata.add(shapeze);
} else {
elements.put(shapefirst.getString("id"), shapefirst);
shapefirst.put("next", true);
shapefirst.put("p", 0);
onlinedata.add(shapefirst);
}
//获取段落
List<XWPFParagraph> paras = doc.getParagraphs();
//级别依次
@ -142,8 +168,6 @@ public class WordUtilXWPF {
StringBuilder strb = new StringBuilder();
//记录这条线上的所有节点 顺序就是层级
//List<JSONObject> onlinedata = new ArrayList<JSONObject>();
JSONArray onlinedata = new JSONArray();
onlinedata.add(shapeze);
boolean lastislast = false;
XWPFDocument newfile = new XWPFDocument();
boolean isend = false;
@ -151,21 +175,25 @@ public class WordUtilXWPF {
for (XWPFParagraph para : paras) {
BigInteger numlevel = para.getNumIlvl();
countall += 1;
if("内容".equals(para.getParagraphText()) && numlevel == null){
//处理富文本的情况
if (shapefirst != null && type == 0) {
isstart = false;
}
if ("内容".equals(para.getParagraphText()) && numlevel == null && isstart) {
isstart = false;
continue;
}
if(isstart){
if (isstart) {
continue;
}
if (!para.getParagraphText().isEmpty()) {
if(para.getParagraphText().matches("附件\\d{1,}")){
if (para.getParagraphText().matches("附件\\d{1,}")) {
isend = true;
}
XWPFParagraph tmpp = newfile.createParagraph();
WordCreatFile.copyAllRunsToAnotherParagraph(para,tmpp);
WordCreatFile.copyAllRunsToAnotherParagraph(para, tmpp);
}
if(isend){
if (isend) {
continue;
}
hasnext = false;
@ -182,7 +210,7 @@ public class WordUtilXWPF {
int nowlevel = numlevel.intValue();
//如果换层级了 就清空后面的数据
if ((nowlevel < lastindex || lastindex == 0) && onlinedata.size() >= (nowlevel + 1)) {
// System.out.println("进行数据清理");
// System.out.println("进行数据清理");
JSONArray tmp = new JSONArray();
for (int i = 0; i <= nowlevel; i++) {
tmp.add(onlinedata.getJSONObject(i));
@ -226,7 +254,7 @@ public class WordUtilXWPF {
isfirst = false;
//如果是父节点新增则要父节点的节点
JSONObject tmpshap = onlinedata.getJSONObject(lastindex);
// System.out.println("======获取上一节点位置为:" + lastindex + " ====节点内容为:" + tmpshap.getString("text"));
// System.out.println("======获取上一节点位置为:" + lastindex + " ====节点内容为:" + tmpshap.getString("text"));
int len = para.getParagraphText().length() / 8 - 2;
/**
* 计算y
@ -235,12 +263,14 @@ public class WordUtilXWPF {
y += 1;
}
shap = getSharp(x, y, countall, len, tmpshap,para.getParagraphText());
shap = getSharp(x, y, countall, len, tmpshap, para.getParagraphText());
shap.put("id", shapeId1);
shap.put("text", getShowText(para.getParagraphText()));
shap.put("level", nowlevel);
shap.put("p", pnode);
elements.put(shapeId1, shap);
//拼接富文本标签
richSbuild.append(DocToHtml.getHtml(nowlevel, para.getParagraphText()));
JSONObject linkshap = onlinedata.getJSONObject(pnode);
linkshap.put("next", true);
onlinedata.set(pnode, linkshap);
@ -250,7 +280,7 @@ public class WordUtilXWPF {
} else {
//内容
if (StringUtils.isNotEmpty(para.getParagraphText())) {
if(para.getParagraphText().contains("表单/模板适用范围")){
if (para.getParagraphText().contains("表单/模板适用范围")) {
System.out.println("断电测试11111");
}
//countall += 1;
@ -279,11 +309,12 @@ public class WordUtilXWPF {
} else {
islast = true;
}
if(paratmp.getParagraphText().matches("附件\\d{1,}")){
if (paratmp.getParagraphText().matches("附件\\d{1,}")) {
islast = true;
}
if("相关文件".equals(para.getParagraphText()) && numlevel == null){
if ("相关文件".equals(para.getParagraphText()) && numlevel == null) {
islast = true;
isend = true;
}
break;
}
@ -293,6 +324,8 @@ public class WordUtilXWPF {
if (islast) {
strb.append(para.getParagraphText());
//拼接富文本标签
richSbuild.append(DocToHtml.getHtml(0, para.getParagraphText()));
}
if (strb.length() > 0 && islast) {
String shapeId1 = UUIDGener.getObjectId();
@ -312,7 +345,7 @@ public class WordUtilXWPF {
x = 1;
JSONObject tmpshap = onlinedata.getJSONObject(lastindex);
//根据上一个位置计算当前位置
shap = getSharp(x, y, countall, len, tmpshap,strb.toString());
shap = getSharp(x, y, countall, len, tmpshap, strb.toString());
shap.put("id", shapeId1);
shap.put("text", getShowText(strb.toString()));
//shap.put("p", pnode);
@ -326,13 +359,19 @@ public class WordUtilXWPF {
strb = new StringBuilder();
} else {
strb.append(para.getParagraphText());
//拼接富文本标签
richSbuild.append(DocToHtml.getHtml(0, para.getParagraphText()));
}
lastislast = true;
lastindex = 0;
}
}
}
new WordCreatFile().createFile(newfile);
//将doc保存为富文本
if (type == 1) {
saveRichText(userContext, richSbuild, plid, shapefirst.getString("id"));
}
//new WordCreatFile().createFile(newfile);
} catch (Exception e) {
e.printStackTrace();
} finally {
@ -341,9 +380,18 @@ public class WordUtilXWPF {
//file.delete();
}*/
}
return elements;
}
public void saveRichText(UserContext userContext, StringBuilder content, String pluuid, String shapid) {
//先保存 将富文本存为附件
DCPluginProfile dcProfilepdf = DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.datamigration", "migration");
DCContext dcContextpdf = new DCContext(userContext, dcProfilepdf, "com.actionsoft.apps.coe.pal.datamigration", pluuid, shapid, "richText.text");
InputStream sbs = new ByteArrayInputStream(content.toString().getBytes(StandardCharsets.UTF_8));
SDK.getDCAPI().write(sbs, dcContextpdf);
}
/**
* 处理超长的字符
*
@ -419,7 +467,7 @@ public class WordUtilXWPF {
countall += 1;
lastindex = 0;
int len = para.getParagraphText().length() / 8 - 2;
shap = getSharp(x, y, countall, len, null,"");
shap = getSharp(x, y, countall, len, null, "");
shap.put("id", shapeId1);
shap.put("text", para.getParagraphText());
}
@ -445,7 +493,7 @@ public class WordUtilXWPF {
}
lastindex = 1;
int len = para.getParagraphText().length() / 8 - 2;
shap = getSharp(x, y, countall, len, null,"");
shap = getSharp(x, y, countall, len, null, "");
shap.put("id", shapeId1);
shap.put("text", para.getParagraphText());
leoj = shap;
@ -469,7 +517,7 @@ public class WordUtilXWPF {
}
lastindex = 2;
int len = para.getParagraphText().length() / 8 - 2;
shap = getSharp(x, y, countall, len, null,"");
shap = getSharp(x, y, countall, len, null, "");
shap.put("id", shapeId1);
shap.put("text", para.getParagraphText());
letj = shap;
@ -497,7 +545,7 @@ public class WordUtilXWPF {
tmpshap = leoj;
}
int len = para.getParagraphText().length() / 8 - 2;
shap = getSharp(x, y, countall, len, null,"");
shap = getSharp(x, y, countall, len, null, "");
shap.put("id", shapeId1);
shap.put("text", para.getParagraphText());
craetline(elements, tmpshap, shap, countall);
@ -532,8 +580,6 @@ public class WordUtilXWPF {
/**
* 连线处理
*
* @param x
* @param y
* @param zindex
* @return
*/

View File

@ -9,9 +9,9 @@ import com.actionsoft.apps.coe.pal.datamigration.aris.web.ArisXmlImportWeb;
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
import com.actionsoft.apps.coe.pal.datamigration.model.po.AwsOrgInfo;
import com.actionsoft.apps.coe.pal.datamigration.model.po.WordField;
import com.actionsoft.apps.coe.pal.datamigration.util.ExcelUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.ShapeUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.WordUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.*;
import com.actionsoft.apps.coe.pal.datamigration.util.readword.CreateMaps;
import com.actionsoft.apps.coe.pal.datamigration.util.readword.ReadWordUtil;
import com.actionsoft.apps.coe.pal.log.CoEOpLogAPI;
import com.actionsoft.apps.coe.pal.log.CoEOpLogConst;
import com.actionsoft.apps.coe.pal.pal.method.cache.PALMethodCache;
@ -36,6 +36,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeRepositoryImportUtil;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.commons.htmlframework.HtmlPageTemplate;
import com.actionsoft.bpms.commons.mvc.view.ActionWeb;
@ -61,7 +62,11 @@ import org.apache.commons.lang.StringUtils;
import org.dom4j.Document;
import org.dom4j.Entity;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
@ -121,185 +126,79 @@ public class DataMigrationWeb extends ActionWeb {
* @param fileName
* @return
*/
public String processAttributeImport(String wsId, String groupValue, String fileValue, String fileName) {
public String processAttributeImport(String wsId, String groupValue, String fileValue) {
ResponseObject ro = ResponseObject.newOkResponse();
//构建DCContext 获取上传文件
DCContext fileDcContext = this.getFileDcContext(groupValue, fileValue, fileName);
DCContext fileDcContext = this.getFileDcContext(groupValue, fileValue);
if (null == fileDcContext) {
return ResponseObject.newErrResponse("文件参数异常").toString();
}
//批量解析文档
File dirFile = new File(fileDcContext.getPath());
File[] fileArr = dirFile.listFiles();
//解析Word文档
WordUtil wordUtil = new WordUtil();
boolean analysisFlag = wordUtil.analysisWordTable(fileDcContext.getFilePath());
// boolean analysisFlag = wordUtil.analysisWordTable("/Users/actionsoft/Documents/IdeaWorkSpace/demo/src/main/resources/伊利集团流程制度类文件发布流程vf.doc");
if (!analysisFlag) {
return ResponseObject.newErrResponse("文件解析异常").toString();
//日志记录名称搭建
String fileName = "";
for (int i = 0; i < fileArr.length; i++) {
File file = fileArr[i];
fileName = (fileName + ","+ file.getName()).length() < 90 ? StringUtils.isEmpty(fileName) ? fileName + file.getName() : fileName + ","+ file.getName() : fileName;
if (i>=2){
fileName += "";
break;
}
}
//获取解析后的文件名称同名策略匹配pal寻找对应文件
String repositoryName = wordUtil.getFileName();
PALRepositoryModel importModel = this.getRepositoryByName(wsId, repositoryName);
if (null == importModel) {
return ResponseObject.newErrResponse("匹配pal文件异常找不到同名文件").toString();
Timestamp startTime = new Timestamp(System.currentTimeMillis());
WordLogUtil wordLogUtil = new WordLogUtil(_uc);
//新建数据库记录
wordLogUtil.createLogModel(wordLogUtil.getLogId(),wsId,fileName,fileDcContext.getPath(),startTime);
//初始化日志
wordLogUtil.appendInfoLog("注:该日志文件存储简要日志信息");
wordLogUtil.appendFullLog("注:该日志文件存储详细日志信息");
wordLogUtil.appendErrorLog("注:该日志文件记录错误日志信息");
wordLogUtil.appendWarnLog("注:该日志文件记录警告日志信息");
wordLogUtil.appendAllLog("\n[信息]操作人:" + _uc.getUserName() + "<" + _uc.getUID() + ">");
wordLogUtil.appendAllLog("[信息]操作时间:" + UtilDate.datetimeFormat(startTime));
// 校验资产库是否存在可用
boolean isActive = PALRepositoryQueryAPIManager.getInstance().isActiveWorkSpace(wsId);
if (!isActive) {
String msg = Constant.LOG_ERROR + "资产库不存在或已停用," + Constant.IMPORT_STOP_MSG;
wordLogUtil.updateErrLog(msg, msg);
return ResponseObject.newErrResponse("资产库不存在或已停用").toString();
}
Map<String, WordField<Object>> fileFieldMap = wordUtil.getFileFieldMap();
//获取导入文件对应的关联文件属性list
PALRepositoryPropertyDao propDao = new PALRepositoryPropertyDao();
DesignerShapeRelationDao relationDao = new DesignerShapeRelationDao();
List<PALRepositoryPropertyModel> importPropertyList = propDao.getPropertysByPlid(importModel.getId(), "");
for (PALRepositoryPropertyModel importProperty : importPropertyList) {
WordField<Object> wordField = fileFieldMap.get(importProperty.getPropertyName());
//旧版本的映射字段支持
if (null == wordField && wordUtil.getIsOldVersion()) {
Map<String, String> oldWordMapping = wordUtil.getOldWordMapping();
for (String s : oldWordMapping.keySet()) {
if (s.equals(importProperty.getPropertyName())) {
String s1 = oldWordMapping.get(s);
wordField = fileFieldMap.get(s1);
}
new Thread(()->{
int success = 0;
int error = 0;
for (File file : fileArr) {
wordLogUtil.appendAllLog("\n[信息]流程属性Word文件" + file.getName());
wordLogUtil.appendAllLog("[信息]流程属性Word文件路径"+ file.getPath());
wordLogUtil.appendAllLog("-----------流程属性Word文件 Begin " + UtilDate.datetimeFormat(startTime));
ResponseObject res = new DataMigrationWeb().analysisWord(wsId, file.getPath(), wordLogUtil);
if (res.isErr()){
error++;
wordLogUtil.appendAllAndErrorLog(Constant.LOG_ERROR + "word文件--"+file.getName()+" 解析异常:"+res.getMsg()+" ,中断解析\n");
}
// wordField = fileFieldMap.get(oldWordMapping.get(importProperty.getPropertyName()));
}
if (null == wordField) {
continue;
}
//使用缓存获取具体建模属性
PALRepositoryAttributeModel repositoryAttrModel = PALRepositoryAttributeCache.getAttributeByMethodIdAndAttrId(wsId, importModel.getMethodId(), importProperty.getPropertyId());
if (null == repositoryAttrModel) {
continue;
}
if ("table".equals(repositoryAttrModel.getType())) {
//将解析的列表数据转化为数据存储json
JSONObject object = new JSONObject();
object.put("name", importProperty.getPropertyName());
JSONArray array = new JSONArray();
List<List<String>> tableFields = (List<List<String>>) wordField.getData();
if (!tableFields.isEmpty()) {
for (List<String> value : tableFields) {
if (!value.isEmpty() && value.size() > 1) {
JSONObject obj = new JSONObject();
obj.put("id", UUIDGener.getUUID());
obj.put("name", value.get(0));
obj.put("desc", value.get(1));
array.add(obj);
}
}
}
if (array.size() > 0) {
//特殊处理表头
PALMethodAttributeModel attributeModel = null;
List<PALMethodAttributeModel> attributes = PALMethodCache.getPALMethodModelById(importModel.getMethodId()).getAttributes();
for (PALMethodAttributeModel attribute : attributes) {
if (attribute.getType().equals(importProperty.getPropertyId())){
attributeModel = attribute;
}
}
if (null == attributeModel || StringUtils.isEmpty(attributeModel.getRef())){
array.getJSONObject(0).put("id", "table_head");
}else{
JSONObject attrRef = JSON.parseObject(attributeModel.getRef());
array.getJSONObject(0).put("id", "table_head");
array.getJSONObject(0).put("id", attrRef.get("firstColumn"));
array.getJSONObject(0).put("id", attrRef.get("secondColumn"));
}
}
object.put("table", array);
//更新数据库值
importProperty.setPropertyValue(object.toJSONString());
propDao.update(importProperty);
} else if ("awsorg".equals(repositoryAttrModel.getType())) {
//aws组织架构解析多组结构解析
String orgName = (String) wordField.getData();
List<AwsOrgInfo> awsOrgInfos = this.getOrgByName(orgName);
if (!awsOrgInfos.isEmpty()) {
//先更新property数据 [{"name":"部门3","id":"fdea04c8-502f-4367-82b7-a5ebe0ce5f67","type":"department"}]
importProperty.setPropertyValue(JSON.toJSONString(awsOrgInfos));
propDao.update(importProperty);
//先删除property关联关系然后新增关系
relationDao.deleteByAttrId(importModel.getId(), "", importProperty.getPropertyId());
for (AwsOrgInfo awsOrgInfo : awsOrgInfos) {
DesignerShapeRelationModel model = new DesignerShapeRelationModel();
model.setFileId(importModel.getId());
model.setShapeId("");
model.setShapeText("");
model.setAttrId(importProperty.getPropertyId());
model.setRelationFileId("00000000-0000-0000-0000-000000000000");
model.setRelationShapeId("00000000-0000-0000-0000-000000000000");
model.setRelationShapeText(JSON.toJSONString(awsOrgInfo));
relationDao.insert(model);
}
}
} else if ("relation".equals(repositoryAttrModel.getType())) {
//关联文件
List<PALRepositoryModel> fileList = new ArrayList<>();
List<String> relations = (List<String>) wordField.getData();
for (String relation : relations) {
PALRepositoryModel repository = this.getRepositoryByName(wsId, this.trimFileName(relation));
if (repository != null) {
fileList.add(repository);
}
}
//更新property数据
String relationFileIds = "";
for (PALRepositoryModel model : fileList) {
relationFileIds += model.getId() + ",";
}
if (relationFileIds.length() > 1) {
relationFileIds = relationFileIds.substring(0, relationFileIds.length() - 1);
}
JSONObject propertyJson = JSON.parseObject(importProperty.getPropertyValue());
propertyJson.put("relationFileId", relationFileIds);
importProperty.setPropertyValue(propertyJson.toJSONString());
propDao.update(importProperty);
//先删除property关联关系然后新增关系
if (!fileList.isEmpty()) {
relationDao.deleteByAttrId(importModel.getId(), "", importProperty.getPropertyId());
for (PALRepositoryModel repositoryModel : fileList) {
DesignerShapeRelationModel relationModel = new DesignerShapeRelationModel();
relationModel.setFileId(importModel.getId());
relationModel.setShapeId("");
relationModel.setShapeText("");
relationModel.setAttrId(importProperty.getPropertyId());
relationModel.setRelationFileId(repositoryModel.getVersionId());
relationModel.setRelationShapeId("");
relationModel.setRelationShapeText(repositoryModel.getName());
relationDao.insert(relationModel);
}
}
} else if ("select".equals(repositoryAttrModel.getType()) || "select_m".equals(repositoryAttrModel.getType())) {
} else if ("boolean".equals(repositoryAttrModel.getType())) {
} else if ("DateTimePicker".equals(repositoryAttrModel.getType())) {
String time = (String) wordField.getData();
try {
Date formatTime = new SimpleDateFormat("yyyy年MM月dd日").parse(time);
time = UtilDate.datetimeFormat(formatTime);
} catch (ParseException e) {
e.printStackTrace();
}
//更新数据库值
importProperty.setPropertyValue(time);
propDao.update(importProperty);
} else {
if (wordField.getData() instanceof String) {
//直接获取Word解析字符内容
String value = (String) wordField.getData();
//更新数据库值
importProperty.setPropertyValue(value);
propDao.update(importProperty);
if (res.isOk()){
success++;
wordLogUtil.appendAllAndInfoLog(Constant.LOG_END+ "word文件--"+file.getName()+" :"+res.getMsg()+"\n");
}
}
}
Timestamp endTime = new Timestamp(System.currentTimeMillis());
if (success > 0){
String resultMsg = "批量导入成功:总耗时" + wordLogUtil.takeTime(startTime.getTime(),endTime.getTime()) + ",总计文档["+fileArr.length+"]条,导入成功[" + success + "]条,导入失败[" + error + "]条";
wordLogUtil.updateLog(new Timestamp(System.currentTimeMillis()), Constant.LOG_RESULT_StATUS_SUCCESS, resultMsg);
wordLogUtil.appendAllAndInfoLog(resultMsg);
}else {
String resultMsg = "批量导入失败:总耗时" + wordLogUtil.takeTime(startTime.getTime(),endTime.getTime()) + ",总计文档["+fileArr.length+"]条,导入成功[" + success + "]条,导入失败[" + error + "]条";
wordLogUtil.updateLog(new Timestamp(System.currentTimeMillis()), Constant.LOG_RESULT_StATUS_ERROR, resultMsg);
wordLogUtil.appendAllAndInfoLog(resultMsg);
}
}).start();
return ro.toString();
}
@ -373,7 +272,7 @@ public class DataMigrationWeb extends ActionWeb {
shape.put("text", shapeName);
//图形的数据属性配置
List<PALMethodAttributeModel> attributeModels = PALRepositoryAPIManager.getInstance().getValidAttributeModels(wsId, importModel.getMethodId());
List<PALMethodAttributeModel> attributeModels = CoeDesignerShapeAPIManager.getInstance().getAllValidShapeAttributeModels(wsId, importModel.getMethodId());
for (PALMethodAttributeModel attributeModel : attributeModels) {
Integer propertyIndex = titleMap.get(attributeModel.getTitle());
@ -529,6 +428,270 @@ public class DataMigrationWeb extends ActionWeb {
return index == null ? 0 : index;
}
private ResponseObject analysisWord(String wsId,String filePath,WordLogUtil logUtil){
//解析Word文档
WordUtil wordUtil = new WordUtil();
try {
wordUtil.analysisWordTable(filePath);
} catch (IOException e) {
return ResponseObject.newErrResponse("word 文件解析异常: "+e.getMessage());
} catch (RuntimeException e){
return ResponseObject.newErrResponse("word 文件解析异常: "+e.getMessage());
}
//获取解析后的文件名称同名策略匹配pal寻找对应文件
String repositoryName = wordUtil.getFileName();
PALRepositoryModel importModel = this.getRepositoryByName(wsId, repositoryName);
if (null == importModel) {
return ResponseObject.newErrResponse("匹配pal文件异常找不到同名文件");
}
Map<String, WordField<Object>> fileFieldMap = wordUtil.getFileFieldMap();
//获取导入文件对应的关联文件属性list
PALRepositoryPropertyDao propDao = new PALRepositoryPropertyDao();
DesignerShapeRelationDao relationDao = new DesignerShapeRelationDao();
List<PALRepositoryPropertyModel> importPropertyList = propDao.getPropertysByPlid(importModel.getId(), "");
if (importPropertyList.isEmpty()){
return ResponseObject.newErrResponse("流程文件属性配置异常,没有获取到文件属性");
}
for (PALRepositoryPropertyModel importProperty : importPropertyList) {
String title = this.getAttributeTitle(importModel.getWsId(), importModel.getMethodId(), importProperty.getPropertyId());
WordField<Object> wordField = fileFieldMap.get(title);
//旧版本的映射字段支持
if (null == wordField && wordUtil.getIsOldVersion()) {
Map<String, String> oldWordMapping = wordUtil.getOldWordMapping();
for (String s : oldWordMapping.keySet()) {
if (s.equals(title)) {
String s1 = oldWordMapping.get(s);
wordField = fileFieldMap.get(s1);
}
}
}
if (null == wordField) {
continue;
}
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 获取Word解析数据成功["+importProperty.getPropertyName()+"]");
//使用缓存获取具体建模属性
PALRepositoryAttributeModel repositoryAttrModel = PALRepositoryAttributeCache.getAttributeByMethodIdAndAttrId(wsId, importModel.getMethodId(), importProperty.getPropertyId());
if (null == repositoryAttrModel) {
logUtil.appendAllAndErrorLog(Constant.LOG_ERROR+" 获取建模属性失败:["+importProperty.getPropertyName()+"]");
continue;
}
if ("table".equals(repositoryAttrModel.getType())) {
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"]类型为:表格");
//将解析的列表数据转化为数据存储json
JSONObject object = new JSONObject();
object.put("name", importProperty.getPropertyName());
JSONArray array = new JSONArray();
List<List<String>> tableFields = (List<List<String>>) wordField.getData();
if (!tableFields.isEmpty()) {
for (List<String> value : tableFields) {
if (!value.isEmpty() && value.size() > 1) {
JSONObject obj = new JSONObject();
obj.put("id", UUIDGener.getUUID());
obj.put("name", value.get(0));
obj.put("desc", value.get(1));
array.add(obj);
}
}
}else {
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 获取["+importProperty.getPropertyName()+"] word 解析数据为 空");
}
if (array.size() > 0) {
//特殊处理表头
PALMethodAttributeModel attributeModel = null;
List<PALMethodAttributeModel> attributes = PALMethodCache.getPALMethodModelById(importModel.getMethodId()).getAttributes();
for (PALMethodAttributeModel attribute : attributes) {
if (attribute.getType().equals(importProperty.getPropertyId())){
attributeModel = attribute;
}
}
if (null == attributeModel || StringUtils.isEmpty(attributeModel.getRef())){
array.getJSONObject(0).put("id", "table_head");
}else{
JSONObject attrRef = JSON.parseObject(attributeModel.getRef());
array.getJSONObject(0).put("id", "table_head");
array.getJSONObject(0).put("id", attrRef.get("firstColumn"));
array.getJSONObject(0).put("id", attrRef.get("secondColumn"));
}
}
object.put("table", array);
//更新数据库值
importProperty.setPropertyValue(object.toJSONString());
int update = propDao.update(importProperty);
if (update>0){
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"] 保存属性值成功");
}else {
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 文件属性["+importProperty.getPropertyName()+"] 保存属性值失败");
}
} else if ("awsorg".equals(repositoryAttrModel.getType())) {
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"]类型为BPM组织架构");
//aws组织架构解析多组结构解析
String orgName = (String) wordField.getData();
List<AwsOrgInfo> awsOrgInfos = this.getOrgByName(orgName);
if (!awsOrgInfos.isEmpty()) {
//先更新property数据 [{"name":"部门3","id":"fdea04c8-502f-4367-82b7-a5ebe0ce5f67","type":"department"}]
importProperty.setPropertyValue(JSON.toJSONString(awsOrgInfos));
int update = propDao.update(importProperty);
if (update>0){
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"] 保存属性值成功");
}else {
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 文件属性["+importProperty.getPropertyName()+"] 保存属性值失败");
}
//先删除property关联关系然后新增关系
relationDao.deleteByAttrId(importModel.getId(), "", importProperty.getPropertyId());
int insert = 0;
for (AwsOrgInfo awsOrgInfo : awsOrgInfos) {
DesignerShapeRelationModel model = new DesignerShapeRelationModel();
model.setFileId(importModel.getId());
model.setShapeId("");
model.setShapeText("");
model.setAttrId(importProperty.getPropertyId());
model.setRelationFileId("00000000-0000-0000-0000-000000000000");
model.setRelationShapeId("00000000-0000-0000-0000-000000000000");
model.setRelationShapeText(JSON.toJSONString(awsOrgInfo));
insert += relationDao.insert(model);
}
if (insert == awsOrgInfos.size()){
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"] 保存关联关系成功");
}else {
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 文件属性["+importProperty.getPropertyName()+"] 保存关联关系失败");
}
}else {
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 获取["+importProperty.getPropertyName()+"] BPM组织架构为 空");
}
} else if ("relation".equals(repositoryAttrModel.getType())) {
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"]类型为pal模型关联");
//关联文件
List<PALRepositoryModel> fileList = new ArrayList<>();
List<String> relations = (List<String>) wordField.getData();
if (relations.isEmpty()){
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 获取["+importProperty.getPropertyName()+"] pal模型关联数据为 空");
}
for (String relation : relations) {
PALRepositoryModel repository = this.getRepositoryByName(wsId, this.trimFileName(relation));
if (repository != null) {
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"] 获取关联pal模型<"+this.trimFileName(relation)+"> 成功");
fileList.add(repository);
}else {
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 文件属性["+importProperty.getPropertyName()+"] 获取关联pal模型<"+this.trimFileName(relation)+"> 失败");
}
}
//更新property数据
String relationFileIds = "";
for (PALRepositoryModel model : fileList) {
relationFileIds += model.getId() + ",";
}
if (relationFileIds.length() > 1) {
relationFileIds = relationFileIds.substring(0, relationFileIds.length() - 1);
}
JSONObject propertyJson = JSON.parseObject(importProperty.getPropertyValue());
propertyJson.put("relationFileId", relationFileIds);
importProperty.setPropertyValue(propertyJson.toJSONString());
int update = propDao.update(importProperty);
if (update>0){
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"] 保存属性值成功");
}else {
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 文件属性["+importProperty.getPropertyName()+"] 保存属性值失败");
}
//先删除property关联关系然后新增关系
if (!fileList.isEmpty()) {
int insert = 0;
relationDao.deleteByAttrId(importModel.getId(), "", importProperty.getPropertyId());
for (PALRepositoryModel repositoryModel : fileList) {
DesignerShapeRelationModel relationModel = new DesignerShapeRelationModel();
relationModel.setFileId(importModel.getId());
relationModel.setShapeId("");
relationModel.setShapeText("");
relationModel.setAttrId(importProperty.getPropertyId());
relationModel.setRelationFileId(repositoryModel.getVersionId());
relationModel.setRelationShapeId("");
relationModel.setRelationShapeText(repositoryModel.getName());
insert += relationDao.insert(relationModel);
}
if (insert == fileList.size()){
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"] 保存关联关系成功");
}else {
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 文件属性["+importProperty.getPropertyName()+"] 保存关联关系失败");
}
}
} else if ("select".equals(repositoryAttrModel.getType()) || "select_m".equals(repositoryAttrModel.getType())) {
} else if ("boolean".equals(repositoryAttrModel.getType())) {
} else if ("DateTimePicker".equals(repositoryAttrModel.getType())) {
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"]类型为:时间选择器");
String time = (String) wordField.getData();
if (StringUtils.isEmpty(time)){
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 获取["+importProperty.getPropertyName()+"] word 解析时间字符为 空");
}
try {
Date formatTime = new SimpleDateFormat("yyyy年MM月dd日").parse(time);
time = UtilDate.datetimeFormat(formatTime);
} catch (ParseException e) {
e.printStackTrace();
}
//更新数据库值
importProperty.setPropertyValue(time);
int update = propDao.update(importProperty);
if (update>0){
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"] 保存属性值成功");
}else {
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 文件属性["+importProperty.getPropertyName()+"] 保存属性值失败");
}
} else {
if (wordField.getData() instanceof String) {
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"]类型为:字符");
//直接获取Word解析字符内容
String value = (String) wordField.getData();
if (StringUtils.isEmpty(value)){
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 获取["+importProperty.getPropertyName()+"] word 解析字符为 空");
}
//更新数据库值
importProperty.setPropertyValue(value);
int update = propDao.update(importProperty);
if (update>0){
logUtil.appendAllAndInfoLog(Constant.LOG_DESC+" 文件属性["+importProperty.getPropertyName()+"] 保存属性值成功");
}else {
logUtil.appendAllAndWarnLog(Constant.LOG_WARNING+" 文件属性["+importProperty.getPropertyName()+"] 保存属性值失败");
}
}
}
}
return ResponseObject.newOkResponse("导入成功");
}
private String getAttributeTitle(String wsId,String methodId,String propertyId){
String title = "";
// 获取所有文件属性
List<PALMethodAttributeModel> methodAttrModels = PALRepositoryAPIManager.getInstance().getValidAttributeModels(wsId, methodId);
for (PALMethodAttributeModel r : methodAttrModels) {
if (r.getKey().equals(propertyId)){
title = r.getNewTitle();
break;
}
}
return title;
}
private DCContext getFileDcContext(String groupValue, String fileValue) {
DCContext context = null;
DCPluginProfile dcProfile = DCProfileManager.getDCProfile(Constant.APP_ID, Constant.UPFILE);
if (null != dcProfile) {
context = new DCContext(super.getContext(), dcProfile, Constant.APP_ID, groupValue, fileValue);
}
return context;
}
private DCContext getFileDcContext(String groupValue, String fileValue, String fileName) {
DCContext context = null;
@ -624,4 +787,88 @@ public class DataMigrationWeb extends ActionWeb {
public String dataMigrate(String wsId, String groupValue, String fileValue, String fileName) {
return new ArisXmlImportWeb(_uc).dataMigrate(wsId, groupValue, fileValue, fileName);
}
/**
* by bzp 保存富文本内容并解析
*
* @param userContext
* @param content
* @return
*/
public ResponseObject saveRichText(UserContext userContext, String content, String pluuid, String shapid) {
//先保存 将富文本存为附件
DCPluginProfile dcProfilepdf = DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.datamigration", "migration");
DCContext dcContextpdf = new DCContext(userContext, dcProfilepdf, "com.actionsoft.apps.coe.pal.datamigration", pluuid, shapid, "richText.text");
InputStream sbs = new ByteArrayInputStream(content.getBytes(StandardCharsets.UTF_8));
SDK.getDCAPI().write(sbs, dcContextpdf);
//调用解析代码 生产制度图
new CreateMaps().updateMapsByRichText(userContext, pluuid, content, shapid);
return ResponseObject.newOkResponse();
}
/**
* by bzp
* 富文本加载时读取富文本内容
* @param userContext
* @param pluuid
* @param shapid
* @return
* @throws IOException
*/
public String getRichText(UserContext userContext, String pluuid, String shapid) {
DCPluginProfile dcProfilepdf = DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.datamigration", "migration");
DCContext dcContextpdf = new DCContext(userContext, dcProfilepdf, "com.actionsoft.apps.coe.pal.datamigration", pluuid, shapid, "richText.text");
InputStream docfile = SDK.getDCAPI().read(dcContextpdf);
//转为字符串
String s = "";
try{
if(docfile != null){
int tmpn = docfile.available();
byte[] tmpbyte = new byte[tmpn];
docfile.read(tmpbyte);
s = new String(tmpbyte, StandardCharsets.UTF_8);
}
}catch (Exception e){
e.printStackTrace();
}
Map<String, Object> macroLibraries = new HashMap<String, Object>();
macroLibraries.put("ruuid", pluuid);
macroLibraries.put("sid", userContext.getSessionId());
macroLibraries.put("shapid",shapid);
macroLibraries.put("content",s);
return HtmlPageTemplate.merge("com.actionsoft.apps.coe.pal.datamigration", "pal.pl.richtext.htm", macroLibraries);
}
/**
* by bzp
* 制度表单等工具栏中上传附件保存并生成相应活动节点
* @param uuid
* @param fileNames
* @param type
* @return
*/
public String savePolicyUpfile(UserContext me,String appId, String repositoryName, String groupValue, String uuid, String fileNames, String type) {
ResponseObject ro = ResponseObject.newOkResponse();
PALRepositoryModel plModel = PALRepositoryCache.getCache().get(uuid);
if (plModel == null) {
return ResponseObject.newErrResponse("找不到该流程").toString();
}
CoeRepositoryImportUtil util = new CoeRepositoryImportUtil();
try {
// 复制临时目录到附件目录
DCPluginProfile sourceDcProfile = DCProfileManager.getDCProfile(CoEConstant.APP_ID, "tmp");
DCContext sourceDcContext = new DCContext(super.getContext(), sourceDcProfile, CoEConstant.APP_ID, "policyFile", uuid, fileNames);
InputStream in = SDK.getDCAPI().read(sourceDcContext);
/*new ReadWordUtil().translateDocTDocx(me,wsId,groupValue,fileValue,fileName);
if (result) {
//删除上传的临时文件目录
sourceDcContext.delete();
}*/
} catch (Exception e) {
e.printStackTrace();
}
ro.put("name", plModel.getName());
return ro.toString();
}
}

View File

@ -22,8 +22,8 @@
const production = true;
const devUserInfo = {};
</script>
<script type="module" crossorigin src="../apps/com.actionsoft.apps.coe.pal.datamigration/main/js/entry-index-f11ffa5c.js"></script>
<link rel="stylesheet" href="../apps/com.actionsoft.apps.coe.pal.datamigration/main/assets/asset-style-6cf72a9c.css">
<script type="module" crossorigin src="../apps/com.actionsoft.apps.coe.pal.datamigration/main/js/entry-index-a4c2dce7.js"></script>
<link rel="stylesheet" href="../apps/com.actionsoft.apps.coe.pal.datamigration/main/assets/asset-style-76c60471.css">
</head>
<body style="margin:0;">
<div id="app"></div>

View File

@ -0,0 +1,43 @@
<!Doctype html>
<html style="background:none;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>富文本制度录入</title>
<!--coe css -->
<link href="../commons/css/awsui.css" rel="stylesheet">
<!--<link rel="stylesheet" type="text/css" href="../<I18N#COEPATH>/css/public.css">-->
<script type="text/javascript" src="../commons/js/jquery/scripts/jquery.js"></script>
<script type="text/javascript" src="../commons/js/awsui.js"></script>
<script type="text/javascript" src="../commons/js/jquery/scripts/ui/aws.util.js"></script>
<script src="../commons/plug-in/ueditor/ueditor.config.js"></script>
<script src="../commons/plug-in/ueditor/ueditor.all.js"></script>
<style>
</style>
<script>
var sid = "<#sid>";
var ruuid = "<#ruuid>";
var shapid = "<#shapid>";
var content = '<#content>';
$(document).ready(function(){
var ue= UE.getEditor('container');
ue.ready(function() {
ue.setContent(content);
});
});
function save(){
var html = "";
var ue= UE.getEditor('container');
ue.ready(function() {
html = ue.getContent();
});
return html;
}
</script>
</head>
<body style="overflow-x:hidden;background:none;">
<div id="container"></div>
</body>
</html>

View File

@ -10,7 +10,7 @@
<param name="wsId"/>
<param name="groupValue"/>
<param name="fileValue"/>
<param name="fileName"/>
<!-- <param name="fileName"/>-->
</cmd-bean>
<cmd-bean name="com.actionsoft.apps.coe.pal.datamigration_IT_attribute_import">
<param name="wsId"/>
@ -18,7 +18,7 @@
<param name="fileValue"/>
<param name="fileName"/>
</cmd-bean>
<!--by bzp-->
<!--by bzp 制度解析-->
<cmd-bean name="com.actionsoft.apps.coe.pal.systemImport_process_attribute_import">
<param name="wsId"/>
<param name="groupValue"/>
@ -32,4 +32,31 @@
<param name="fileValue"/>
<param name="fileName"/>
</cmd-bean>
<!--by bzp 表单解析-->
<cmd-bean name="com.actionsoft.apps.coe.pal.formImport_process_attribute_import">
<param name="wsId"/>
<param name="groupValue"/>
<param name="fileValue"/>
<param name="fileName"/>
</cmd-bean>
<!--by bzp 保存富文本-->
<cmd-bean name="com.actionsoft.apps.coe.pal.saveRichtext">
<param name="content"/>
<param name="pluuid"/>
<param name="shapId"/>
</cmd-bean>
<!--by bzp 获取富文本-->
<cmd-bean name="com.actionsoft.apps.coe.pal.getRichtext">
<param name="pluuid"/>
<param name="shapId"/>
</cmd-bean>
<!--by bzp 导入制度-->
<cmd-bean name="com.actionsoft.apps.coe.pal_processlevel_shape_upfile_save">
<param name="appId"/>
<param name="repositoryName"/>
<param name="groupValue"/>
<param name="ruuid"/>
<param name="fileNames"/>
<param name="type"/>
</cmd-bean>
</aws-actions>

View File

@ -3,7 +3,7 @@
<app xmlns="http://www.actionsoft.com.cn/app">
<name>流程手册</name>
<version>1.0</version>
<buildNo>28</buildNo>
<buildNo>29</buildNo>
<developer id="776cca9a287c8b4d63b9cad216aa3859" tablePrefix="ACT" url="http://www.actionsoft.com.cn">北京炎黄盈动科技发展有限责任公司</developer>
<productId>6636fc53728276eb3baca55938356b74</productId>
<categoryVisible>false</categoryVisible>
@ -34,8 +34,8 @@
<uninstallListener/>
<reloadable>true</reloadable>
<requires>
<require appId="com.actionsoft.apps.coe.pal" notActiveHandler="warning" res="false"/>
<require appId="com.actionsoft.apps.addons.onlinedoc" notActiveHandler="none" res="false"/>
<require appId="com.actionsoft.apps.coe.pal" notActiveHandler="warning" res="false"/>
<require appId="com.actionsoft.apps.addons.onlinedoc" notActiveHandler="none" res="false"/>
</requires>
<properties>
<property action="edit" group="参数" name="DEFAULT_REPORT_PR" title="默认使用手册模板" type="combox" isSystem="false" desc="流程建模或流程发布时生成流程手册的模板选择" ref="步骤横表:cross|步骤竖表:vertical|项目定制:project">cross</property>

View File

@ -15,6 +15,8 @@ import com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil;
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.realtime.model.ListenEvent;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel;
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
@ -40,11 +42,13 @@ import com.alibaba.fastjson.JSONObject;
import static com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil.specialCharTransfer;
import static com.actionsoft.apps.coe.pal.pal.repository.constant.CoeProcessLevelConstant.LINK_PREFIX;
import static com.alibaba.druid.util.FnvHash.Constants.NVARCHAR2;
/**
* 生成流程手册-步骤横表横表的入口
*
*
* @author zhangming
*/
public class Report1Gener {
@ -58,12 +62,12 @@ public class Report1Gener {
/**
* 生成文件
*
*
* @param model OutputTaskModel对象
* @param wizardJsonData 向导收集的Json参数targetFilesrelationFilesoptions...
* @param dcContext 要生成报告的DC目录对象已准备好
* @return 将文件生成到output目录下返回状态
*
*
* @see PlatformAPIImpl#getDefaultLanguage()
* @see PlatformAPIImpl#getlanguages()
*/
@ -84,8 +88,9 @@ public class Report1Gener {
// ----预处理校验----
OutputAppProfile appModel = OutputAppManager.getProfile(model.getProfileId());
String tempPath = appModel.getAppContext().getPath();
String tempName = "步骤横表-流程手册2.xml";
log.info("begin...");
//String tempName = "步骤横表-流程手册.xml";
String tempName = "步骤横表-流程手册2.xml";
log.info("begin...");
log.info("-------------------");
// ----文件处理-----
genarateWord(tempPath, tempName, dcContext.getPath(), jsonObj);
@ -106,7 +111,7 @@ public class Report1Gener {
*/
private void genarateWord(String tempPath, String tempName, String docPath, JSONObject wizardJsonData) {
String[] repositoryIds = wizardJsonData.getString("targetFileId").split(",");
String reportName = wizardJsonData.getString("reportNameIsItName"); //页面上设计的文件命名规则
Map<String, Integer> indexMap = new HashMap<String, Integer>();
for (String repositoryId : repositoryIds) {
@ -140,7 +145,7 @@ public class Report1Gener {
String reportNameValue = reportName;
if (reportNameLabels.size() > 0) {
reportNameValue = OutputExcelUtil.label2value(model, extendAttr, null, reportName);
}
reportNameValue = reportNameValue.replaceAll(OutputExcelUtil.FILENAMEREGX, "");
if (reportNameValue.length() > 255) {
@ -163,13 +168,12 @@ public class Report1Gener {
}
JSONObject dataMap = getData(repositoryId, wizardJsonData, docPath, fileName);
if (dataMap != null) {
System.out.println("dataMap字段数为======"+dataMap.size());
OutputWordUtil.createDoc2(dataMap, tempPath, tempName, docName);
}
}
}
}
/**
* 获取文档数据
* @param repositoryId
@ -178,36 +182,87 @@ public class Report1Gener {
*/
private JSONObject getData(String repositoryId, JSONObject wizardJsonData, String docPath, String fileName) {
JSONObject dataMap = new JSONObject();
dataMap.put("organizationType", "涉及部门及岗位\\角色");
boolean raciRelationType = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal.output.pr", "DETY_POSITION_ROLE_RELATION_TYPE", false);
// 记录关联属性的流程节点防止多次查询重复文件信息耗费时间
// 记录关联属性的流程节点防止多次查询重复文件信息耗费时间
Set<String> relationFileIds = new HashSet<>();
Map<String, Map<String, Object>> relationFileMap = new HashMap<>();
PrReportComment prReportComment = new PrReportComment();
PALRepositoryModel repositoryModel = PALRepositoryQueryAPIManager.getInstance().queryPalRepositoryModelByPalId(repositoryId);
//流程绩效
List<DesignerShapeRelationModel> metrics = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "Process_performance_metrics");
if (metrics.size() == 0) {
dataMap.put("pl_Name_process_performance_indicator", "");
dataMap.put("pl_set_the_purpose", "");
dataMap.put("pl_Index_definition", "");
dataMap.put("pl_computational_formula", "");
dataMap.put("pl_data_sources", "");
dataMap.put("pl_unit_measurement", "");
dataMap.put("pl_statistical_period", "");
dataMap.put("pl_explain", "");
}else {
for (DesignerShapeRelationModel relation : metrics) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
String relationShapeId = relation.getRelationShapeId();//实例ID
//System.out.println(relationFileId + "/" + relationShapeId);//输出响应ID
List<Map<String, Object>> relations = CoeDesignerUtil.getShapeMessageJson4(relationFileId); //流程文件内容
for (Map<String, Object> entry : relations) {
Object attributes = entry.get("attributes");
String resultJson = attributes.toString();
JSONArray object= JSONArray.parseArray(resultJson);
for(int i=0; i<object.size(); i++) {
String key = object.getJSONObject(i).getString("key");
//if (key.equals("explain") || key.equals("statistical_period") || key.equals("unit_measurement") || key.equals("data_sources") || key.equals("computational_formula") || key.equals("Index_definition") || key.equals("objective") || key.equals("Name_process_performance_indicator")) {
if (key.equals("Name_process_performance_indicator")){//指标名称 Name_process_performance_indicator
String value = object.getJSONObject(i).getString("value");
dataMap.put("pl_Name_process_performance_indicator", value);
}else if (key.equals("set_the_purpose")){//设置目的 set_the_purpose
String value = object.getJSONObject(i).getString("value");
dataMap.put("pl_set_the_purpose", value);
}else if (key.equals("Index_definition")){//指标定义 Index_definition
String value = object.getJSONObject(i).getString("value");
dataMap.put("pl_Index_definition", value);
}else if (key.equals("computational_formula")){//计算公式 computational_formula
String value = object.getJSONObject(i).getString("value");
dataMap.put("pl_computational_formula", value);
}else if (key.equals("data_sources")){//数据来源 data_sources
String value = object.getJSONObject(i).getString("value");
dataMap.put("pl_data_sources", value);
}else if (key.equals("unit_measurement")){//计量单位 unit_measurement
String value = object.getJSONObject(i).getString("value");
dataMap.put("pl_unit_measurement", value);
}else if (key.equals("statistical_period")){//统计周期 statistical_period
String value = object.getJSONObject(i).getString("value");
dataMap.put("pl_statistical_period", value);
}else if (key.equals("explain")){// explain
String value = object.getJSONObject(i).getString("value");
dataMap.put("pl_explain", value);
}
}
}
}
}
dataMap.put("organizationType", "涉及部门及岗位\\角色");
if (repositoryModel == null) {
return null;
}
prReportComment.getCommentContent(dataMap, repositoryModel);//获取一些公共的数据(手册首页的手册岗位名称部门时间等)
JSONArray repositoryShapeTable = new JSONArray();//流程步骤Table
JSONArray fileTable = new JSONArray(); //流程附件Table
JSONArray dangerTable = new JSONArray(); //风险Table
JSONArray regulateTable = new JSONArray(); //控制Table
JSONArray KPITable = new JSONArray(); //相关绩效考核Table
Set<String> dangerSet = new HashSet<String>();// 风险
Set<String> regulateSet = new HashSet<String>();// 控制
Set<String> KPISet = new HashSet<String>();// kpi
System.out.println("id======================="+repositoryId);
List<Map<String, Object>> repositoryFileElements = CoeDesignerUtil.getShapeMessageJson4(repositoryId); //流程文件内容
if (wizardJsonData.getBoolean("orderNuberFirst")) { // 根据页面选择进行排序
OutputWordUtil.orderByNumber(repositoryFileElements);
}
// 流程附件列表
UpFileDao upFileDao = new UpFileDao();
StringBuffer sqlWhere = new StringBuffer();
@ -248,7 +303,7 @@ public class Report1Gener {
_tr.put(OutputWordUtil.SERIAL_NUMBER, shape.get("number"));
}*/
/**序号改为流程编号**/
// 节点的附件处理
JSONArray shapeFileTable = new JSONArray(); //流程节点附件Table
if (search != null && search.size() > 0) {
@ -356,9 +411,141 @@ public class Report1Gener {
index++;
}
}
JSONArray termTable = new JSONArray(); //术语定义Table
// 属性特征 属性代码KEY
PALRepositoryPropertyModel term = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(),"term");
if (term != null) {
String termVal = term.getPropertyValue();
JSONObject termObj = JSONObject.parseObject(termVal);
if (termObj != null && !termObj.isEmpty()) {
JSONArray tableArr = termObj.getJSONArray("table");
if (tableArr != null && !tableArr.isEmpty()) {
for (Object obj : tableArr) {
JSONObject obj2 = (JSONObject) obj;
if (!"table_head".equals(obj2.getString("id"))) {
String name = obj2.getString("name");
String desc = obj2.getString("desc");
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", desc);
termTable.add(tmp);
}
}
}
}
}
JSONArray organizationTable = new JSONArray(); //组织职责Table
// 属性特征 属性代码KEY
PALRepositoryPropertyModel Organizational = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(),"Organizational_role");
if (Organizational != null){
String OrganizationalVal = Organizational.getPropertyValue();
JSONObject OrganizationalObj = JSONObject.parseObject(OrganizationalVal);
if (OrganizationalObj != null && !OrganizationalObj.isEmpty()) {
JSONArray tableArr = OrganizationalObj.getJSONArray("table");
if (tableArr != null && !tableArr.isEmpty()) {
for (Object obj : tableArr) {
JSONObject obj2 = (JSONObject) obj;
if (!"table_head".equals(obj2.getString("id"))) {
String name = obj2.getString("name");
String desc = obj2.getString("desc");
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", desc);
organizationTable.add(tmp);
}
}
}
}
}
//支持文件
JSONArray supportfiles = new JSONArray(); //组织职责Table
List<DesignerShapeRelationModel> relationList = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "support_files");
int index = 0;
for (DesignerShapeRelationModel relation : relationList) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId);
if (model != null) {
index++;
String name = model.getName();
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", index);
supportfiles.add(tmp);
}
}
//相关文件 R_relevant_flies
JSONArray relevant_flies = new JSONArray(); //组织职责Table
List<DesignerShapeRelationModel> relationList2 = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "R_relevant_flies");
int count = 0;
for (DesignerShapeRelationModel relation : relationList2) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId);
if (model != null) {
count++;
String name = model.getName();
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", count);
relevant_flies.add(tmp);
}
}
//System.out.println(relations+"==========relations");
/*if (wizardJsonData.getBoolean("orderNuberFirst")) { // 根据页面选择进行排序
OutputWordUtil.orderByNumber(relations);
}*/
// 2张表
// 文件属性内容文本内容
// 文件属性内容关联表
// 根据绩效所属模型查询绩效形状的详细信息
// 流程文件属性术语与定义表格类型
// 流程文件属性绩效形状的信息
// 流程文件属性相关文件和支持文件
//术语
dataMap.put("term_table", termTable);//table4
dataMap.put("term_table_count", termTable.size());//table4
//组织和职责
dataMap.put("organization_table", organizationTable);//table5
dataMap.put("organization_table_count",organizationTable.size());//table5
//支持文件
dataMap.put("supports_table", supportfiles);//table6
dataMap.put("supports_table_count", supportfiles.size());//table6
//相关文件
dataMap.put("relevant_table", relevant_flies);//table7
dataMap.put("relevant_table_count", relevant_flies.size());//table7
//流程绩效
//dataMap.put("Process_performance_metrics_table",process_performance_metrics);//table8
dataMap.put("metrics_count", metrics.size());//
dataMap.put(OutputWordUtil.TABLE_REPOSITORY_SHAPE, repositoryShapeTable);
dataMap.put("TABLE_REPOSITORY_SHAPE_COUNT", repositoryShapeTable.size());
dataMap.put("file_table", fileTable);
dataMap.put("file_table_count", fileTable.size());
dataMap.put(OutputWordUtil.TABLE_DANGER, dangerTable);
dataMap.put(OutputWordUtil.TABLE_REGULATE, regulateTable);
dataMap.put(OutputWordUtil.TABLE_KPI, KPITable);

View File

@ -76,11 +76,27 @@ public class PrReportComment {
dataMap.put(OutputWordUtil.PL_VERSION, "V" + repositoryModel.getVersion()+ ".0 " + date); // 版本
OutputWordUtil.setRepositoryDefaultValue2(TARGET_METHOD_SCOPE, dataMap);// 设置属性默认值空字符串
//System.out.println("表单数据内容获取==================");
JSONArray propertyArr = CoeProcessLevelUtil.getProcessLevelPropertyArr(repositoryModel.getId());
for (int i = 0; i < propertyArr.size(); i++) {
JSONObject propertyObj = propertyArr.getJSONObject(i);
dataMap.put("pl_" + propertyObj.getString("key"), OutputWordUtil.specialCharTransfer(propertyObj.getString("value")));
if (propertyObj.getString("key").equals("goal")) {
if (propertyObj.getString("value").equals("")) {
dataMap.put("pl_" + propertyObj.getString("key"), "");
}else{
dataMap.put("pl_" + propertyObj.getString("key"), OutputWordUtil.specialCharTransfer(propertyObj.getString("value")));
}
}
if(propertyObj.getString("key").equals("T_supplementary_articles")) {
if (propertyObj.getString("value").equals("")) {
dataMap.put("pl_" + propertyObj.getString("key"), "");
}else{
dataMap.put("pl_" + propertyObj.getString("key"), OutputWordUtil.specialCharTransfer(propertyObj.getString("value")));
}
}else{
dataMap.put("pl_" + propertyObj.getString("key"), OutputWordUtil.specialCharTransfer(propertyObj.getString("value")));
}
}
// 责任人责任部门单独处理兼容流程手册中直接使用pl_key进行定义
boolean dutyRelationType = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal.output.pr", "DUTY_DEPARTMENT_PERSON_RELATION_TYPE", false);

File diff suppressed because it is too large Load Diff

View File

@ -4072,7 +4072,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_duty_r}</w:t>
<w:t>table1.shape_duty_r</w:t>
</w:r>
</w:p>
<w:p wsp:rsidR="00E54D8E" wsp:rsidRDefault="00E54D8E">
@ -4094,7 +4094,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_approval_a}</w:t>
<w:t>table1.shape_approval_a</w:t>
</w:r>
</w:p>
<w:p wsp:rsidR="00E54D8E" wsp:rsidRDefault="00E54D8E">
@ -4116,7 +4116,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_counselor_c}</w:t>
<w:t>table1.shape_counselor_c</w:t>
</w:r>
</w:p>
<w:p wsp:rsidR="00E54D8E" wsp:rsidRDefault="00E54D8E">
@ -4138,7 +4138,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_notify_i}</w:t>
<w:t>table1.shape_notify_i</w:t>
</w:r>
</w:p>
</w:tc>
@ -4178,7 +4178,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_desc}</w:t>
<w:t>table1.shape_desc</w:t>
</w:r>
</w:p>
</w:tc>
@ -4212,7 +4212,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_institution}</w:t>
<w:t>table1.shape_institution</w:t>
</w:r>
</w:p>
</w:tc>
@ -4246,7 +4246,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_danger}</w:t>
<w:t>table1.shape_danger</w:t>
</w:r>
</w:p>
</w:tc>
@ -4280,7 +4280,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_kpi}</w:t>
<w:t>table1.shape_kpi</w:t>
</w:r>
</w:p>
</w:tc>
@ -4314,7 +4314,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_form}</w:t>
<w:t>table1.shape_form</w:t>
</w:r>
</w:p>
</w:tc>
@ -4348,7 +4348,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_handle_time}</w:t>
<w:t>table1.shape_handle_time</w:t>
</w:r>
</w:p>
</w:tc>
@ -4382,7 +4382,7 @@
<w:sz w:val="22"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>${table1.shape_itsystem}</w:t>
<w:t>table1.shape_itsystem</w:t>
</w:r>
</w:p>
</w:tc>

View File

@ -3,7 +3,7 @@
<app xmlns="http://www.actionsoft.com.cn/app">
<name>流程发布</name>
<version>1.0</version>
<buildNo>49</buildNo>
<buildNo>61</buildNo>
<developer id="776cca9a287c8b4d63b9cad216aa3859" tablePrefix="ACT" url="http://www.actionsoft.com.cn">北京炎黄盈动科技发展有限责任公司</developer>
<productId>2d48c93d3dc26d493c6735c962fc9df6</productId>
<categoryVisible>true</categoryVisible>
@ -19,7 +19,7 @@
- 内置可配置的发布批准流程
]]></details>
<installDate>2022-06-07 20:25:12</installDate>
<installDate>2022-07-27 12:56:55</installDate>
<installListener/>
<pluginListener>com.actionsoft.apps.coe.pal.publisher.Plugins</pluginListener>
<startListener>com.actionsoft.apps.coe.pal.publisher.event.AppStartListener</startListener>
@ -30,7 +30,8 @@
<requires>
<require appId="com.actionsoft.apps.coe.pal.cooperation" notActiveHandler="none" res="false"/>
<require appId="com.actionsoft.apps.addons.xpages" notActiveHandler="none" res="false"/>
<require appId="com.actionsoft.apps.notification" notActiveHandler="none" res="false"/>
<require appId="com.actionsoft.apps.notification" notActiveHandler="none" res="false"/>
<require appId="com.actionsoft.apps.dict" notActiveHandler="warning" res="false"/>
</requires>
<depend versions="6.3,6.4,6.5" env="6.3.3">com.actionsoft.apps.coe.pal</depend>
<properties>
@ -43,7 +44,7 @@
<property action="edit" group="门户集成" name="isIntegrationAWSUser" title="是否整合AWS用户" type="combox" isSystem="false" desc="如果不整合AWS用户需设置guest账户参考相关文档完成身份集成" ref="true|false">true</property>
<property action="edit" group="门户配置" name="isViewAttribute" title="允许查看属性" type="combox" isSystem="false" desc="" ref="true|false">true</property>
<property action="edit" group="门户集成" name="guest" title="访客账户" type="input" isSystem="false" desc="如果门户未整合AWS用户此处配置来自外部系统访问门户的统一访客账户">guest_test</property>
<property action="disabled" group="流程发布" name="publishProcessId" title="批量发布流程ID" type="input" isSystem="false" desc="AWS BPMS平台建模的流程版本Id完成流程发布的批准过程" ref="">obj_d2b56ab6bd96477b9b14fc355f3c5ee9</property>
<property action="edit" group="流程发布" name="publishProcessId" title="批量发布流程ID" type="input" isSystem="false" desc="AWS BPMS平台建模的流程版本Id完成流程发布的批准过程" ref="">obj_fb1c7a54b98b412187388c8bab407362</property>
<property action="edit" group="门户配置" name="portalVersion" title="PAL门户版本" type="combox" isSystem="false" desc="PAL门户的版本版本2在版本1的基础上增加了标准化体系和待办任务。&lt;br&gt;版本3为新版门户依赖于xpages应用" ref="版本1:v1|版本2:v2|版本3:v3">v3</property>
<property action="edit" group="门户配置" name="processRootId" title="流程根节点对应流程ID" type="input" isSystem="false" desc="在流程查询页面,点击“流程”节点时,显示的流程" ref="">673944b4-14b6-4278-9e90-b8eb95a0785b</property>
<property action="edit" group="流程发布" name="selectionmode" title="流程发布方式" type="combox" isSystem="false" desc="单个发布:发布/ 变更/停用文件时支持单个文件进行操作&lt;br&gt;批量发布:发布/ 变更/停用文件时支持批量文件进行操作&lt;br&gt;批量发布+级联:发布/ 变更/停用文件时支持批量文件进行操作,选择文件时支持流程树级联选择" ref="单个发布:radio|批量发布:check|批量发布+级联:checkInherit">checkInherit</property>
@ -54,5 +55,12 @@
</properties>
<modelAdministrator/>
<icon code="&amp;#xe880;" color="#4E7FF9"/>
<releaseDate>2022-06-07</releaseDate>
<releaseDate>2022-07-27</releaseDate>
<deployment>
<system id="obj_00093403df6a17ed729913d64f48f930" icon16="../commons/img/home_16.png" icon64="../commons/img/home_64.png" icon96="../commons/img/home_96.png" notifier="" name="%u529E%u516C" target="leftFrame" url="/" deployUrlType="2" source="0" appId="com.actionsoft.apps.coe.pal.publisher">
<directory id="obj_15779670952d4c20aeca29a601ae6caa" icon16="" icon64="" icon96="" notifier="" name="%u53D1%u5E03%u6D41%u7A0B" target="mainFrame" url="/" deployUrlType="2" source="0" orderIndex="6" appId="com.actionsoft.apps.coe.pal.publisher">
<function id="obj_bd626c7b6027401991576ddae669a793" icon16="../apps/com.actionsoft.apps.coe.pal.publisher/img/icon16.png" icon64="../apps/com.actionsoft.apps.coe.pal.publisher/img/icon64.png" icon96="../apps/com.actionsoft.apps.coe.pal.publisher/img/icon96.png" notifier="" name="%u6D41%u7A0B%u53D1%u5E03%u65B0%u6D41%u7A0B" target="mainFrame" url="./w?sid=@sid&amp;cmd=CLIENT_BPM_WORKLIST_MAIN&amp;processGroupId=obj_893ec85d8219468bb6df6a19fab4f7c9&amp;boxTitle=" deployUrlType="2" source="0" orderIndex="1" appId="com.actionsoft.apps.coe.pal.publisher"/>
</directory>
</system>
</deployment>
</app>

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<boModel>
<id>2f326953-089a-49f6-bb55-d46d287b5792</id>
<createUser>admin</createUser>
<createTime>2022-07-08 15:54:34</createTime>
<updateUser>admin</updateUser>
<updateTime>2022-07-08 15:54:56</updateTime>
<signature>tGOmxiTgjT/77UoYpSlq8Vc+hHPRoJWHdZexXc7zEpYuMNdhvSICeJnlc/RzRHGroPgaKWyS8gZtjLiYx8NwH4nz83hk0cEDfX8X3+jXcueA65tVd4g2xemCyqZ+BTec</signature>
<managed>false</managed>
<title>区域信息</title>
<name>BO_ACT_REGION_INFO</name>
<collection>false</collection>
<system>false</system>
<deleted>false</deleted>
<categoryName>资产库周期管理</categoryName>
<administrator>admin</administrator>
<entityType>TABLE</entityType>
<viewType></viewType>
<viewSql></viewSql>
<securityLevel>0</securityLevel>
<target>_local</target>
<itemProps></itemProps>
<boItems>
<boItem>
<id>6ca2d55f-af07-4ea3-8304-ca4d289540c7</id>
<name>REGIONNAME</name>
<title>区域名称</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Text</componentId>
<componentSetting>{"search":"0"}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>0ac494a9-f54f-4d83-b722-85309de35275</id>
<name>REGIONCODE</name>
<title>区域编码</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Text</componentId>
<componentSetting>{"search":"0"}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
</boItems>
<boIndexs>
<boIndex>
<id>8048b6cb-6c30-43ab-91c4-e3c59fe2d6a6</id>
<name>AWS_IN_7AC529D7A196</name>
<type>INDEX</type>
<boItems>BINDID</boItems>
</boIndex>
</boIndexs>
<boRelations/>
<hashFields></hashFields>
</boModel>

View File

@ -0,0 +1,841 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<boModel>
<id>5e321e6b-4b05-4b55-8aec-2bdbf7f9a499</id>
<createUser>admin</createUser>
<createTime>2022-06-28 20:04:46</createTime>
<updateUser>admin</updateUser>
<updateTime>2022-06-29 01:49:55</updateTime>
<signature>tGOmxiTgjT/77UoYpSlq8Vc+hHPRoJWHdZexXc7zEpYuMNdhvSICeJnlc/RzRHGrQUrBalciPSuLiKMvki89BglYPuKpWBwu+PWUm0IO64sRlhhmA2TsgYzCj8DTKXy5</signature>
<managed>false</managed>
<title>个人信息表</title>
<name>BO_ACT_SYSTEM_TO_RELEASE</name>
<collection>false</collection>
<system>false</system>
<deleted>false</deleted>
<categoryName>资产库周期管理</categoryName>
<administrator>admin</administrator>
<entityType>TABLE</entityType>
<viewType></viewType>
<viewSql></viewSql>
<securityLevel>0</securityLevel>
<target>_local</target>
<itemProps></itemProps>
<boItems>
<boItem>
<id>d8468490-989a-455f-917d-c5f953783696</id>
<name>PUBLISH_TYPE</name>
<title>发布类型</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"流程文件|制度规范|操作指导|表单/模板","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>172bad84-77dc-45bb-a2db-dc7134f27d3a</id>
<name>CHANGE_THE_TYPE</name>
<title>变更类型</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"发布|废止","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>a9878d01-f454-4c47-a75c-efe40079770e</id>
<name>LEVEL_1_PROCESS_NAME</name>
<title>一级流程名称</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"名称一|名称二|名称三","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>64b04916-787a-466a-b4c4-2eb69556b9a3</id>
<name>LEVEL_2_PROCESS_NAME</name>
<title>二级流程名称</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"名称一|名称二|名称三","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>5ebb7157-6278-47cc-ad71-d8f374f98bd4</id>
<name>LEVEL_3_PROCESS_NAME</name>
<title>三级流程名称</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"名称一|名称二|名称三","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>800a3874-bb33-4e13-b1d1-5af0bbdfc801</id>
<name>ADAPT_NAME_THE_COMPANY</name>
<title>适应单位名称</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue>集团</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"集团|单位一|单位二","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>5ff3f219-67e4-44fc-a869-ceb2cfb38847</id>
<name>ADAPT_REGION_NAME</name>
<title>适应区域名称</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue>全部</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"区域一|区域二|区域三","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"全部|区域二|区域三","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>41c6d108-7873-4d95-9583-0c5ad4296e3e</id>
<name>APPLICABLE_PRODUCT</name>
<title>适用产品/场景名称</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue>全部</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"全部|产品二|产品三","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>4ea6476f-809f-468d-b129-fb36cb1eadf4</id>
<name>RELEASE_THE_TITLE</name>
<title>发布标题</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Text</componentId>
<componentSetting>{"search":"0"}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>0250e9ee-1504-4582-aac6-25700ff3f3c8</id>
<name>INITIATOR</name>
<title>发起人</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue>@userName()</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Text</componentId>
<componentSetting>{"search":"0","placeholder":"","dataType":"localJDBC","data":{"sql":""},"isClearAllText":true,"barCode":false,"boUrlFormData":{"hrefSelVal":"nothing"},"extendType":"text","scanCodeAutoSubmit":false}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>false</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>d9409667-325c-47c2-80d6-7e89b919496a</id>
<name>CONTACT_WAY</name>
<title>联系方式</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue>13562425632</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Number</componentId>
<componentSetting>{"isShowZero":"1","placeholder":"","isClearAll":true,"autoZero":false,"scientificCounting":false}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>false</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>ad054977-fbc2-42f5-b16b-2ee4442a51de</id>
<name>TIME_OF_APPLICATION</name>
<title>申请时间</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue>@date()</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Date</componentId>
<componentSetting>{"placeholder":"","minDate":"","maxDate":"","showtype":"singleCalendar","advSetting":"","showDayOfWeek":"false","dwfmt":"(EE)"}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>922ff652-5da2-4f93-919b-c54fd4dae085</id>
<name>IS_THE_UNIT</name>
<title>拟稿单位</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue>@departmentName()</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Address</componentId>
<componentSetting>{"placeholder":"","addressType":"dept","isLiveSearch":true,"addressSetting":{"delimiter":",","choiceType":"single","leafType":"dept"},"range":"all","isFullDeptPath":false,"deptSourceField":"DEPTNAME","deptTargetField":"IS_THE_UNIT"}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode>readonly</componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>29942e71-e472-4cc2-aa0e-74f6c02e806e</id>
<name>RELEASE_INSTRUCTIONS</name>
<title>制度/流程发布说明</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Text</componentId>
<componentSetting>{"search":"0","placeholder":"","dataType":"localJDBC","data":{"sql":""},"isClearAllText":true,"barCode":false,"boUrlFormData":{"hrefSelVal":"nothing"},"extendType":"text","scanCodeAutoSubmit":false}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>ea05290b-d25c-4dad-a941-29ac4152bf98</id>
<name>ACCESSORY</name>
<title>附件</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.File</componentId>
<componentSetting>{"isEncrypt":true,"manualSort":false,"fileCount":"0","fileClassificationList":"","fileWatermark":"","fileWatermarkFont":"","fileWatermarkFontColor":"","sortField":"CREATEDATE","sortType":"asc","compressFlag":"","waterMarkFlag":"","waterMarkPosition":"","waterMarkFontColor":"","waterMarkFontSize":30,"fileMaxSize":"","uploadField":"上传人|CREATEUSER||false,上传时间|CREATEDATE||false,大小|FILESIZE||false,授权|AUTHORIZATION||false,预览|PREVIEW||false","anyFile":true,"uiSetting":{"anyFileExtList":""},"canPreviewOfficeFlag":"0"}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>88f43b66-de94-4ebc-bcaf-6299a0b9bd74</id>
<name>DEPARTMENT_PROOFREADER</name>
<title>部门内部校对人</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Address</componentId>
<componentSetting>{"placeholder":"","addressType":"user","isLiveSearch":true,"isAdvMode":false,"addressSetting":{"isMapFormat":false,"delimiter":" ","choiceType":"single"},"deptSourceField":"","deptTargetField":""}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode>readonly</componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>64c1af0a-5bde-4d73-a558-efa7cf71c846</id>
<name>INTERNAL_AUDITOR</name>
<title>内部审核人</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Address</componentId>
<componentSetting>{"placeholder":"","addressType":"user","isLiveSearch":true,"isAdvMode":false,"addressSetting":{"isMapFormat":false,"delimiter":" ","choiceType":"single"},"deptSourceField":"","deptTargetField":""}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode>readonly</componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>9c42ce6e-3f61-409d-bef3-c17a4d7f8ce9</id>
<name>PROFESSIONAL_REVIEW_REQUIRED</name>
<title>是否需要专业评审</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue>1</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"0:是|1:否","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>3e9aed86-a31b-445d-9553-b83fe7d814fe</id>
<name>JOINT_TRIAL_REQUIRED</name>
<title>是否需要会审</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue>1</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"0:是|1:否","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>aab8ef1e-3e76-461b-a353-b0e39a9eead7</id>
<name>PERSON_THREE_LEVEL_PROCESS</name>
<title>三级流程责任人</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Address</componentId>
<componentSetting>{"placeholder":"","addressType":"user","isLiveSearch":true,"isAdvMode":false,"addressSetting":{"isMapFormat":false,"delimiter":" ","choiceType":"single"},"deptSourceField":"","deptTargetField":""}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode>readonly</componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>a2bb76c0-19c1-4503-9e57-49cbb510273e</id>
<name>LEVEL_AUDIT_REQUIRED</name>
<title>是否需要三级审核</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue>1</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"0:是|1:否","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>e2b6a5f9-5311-476c-a3c4-383d121165d0</id>
<name>PROCESS_RESPONSIBLE_PERSON</name>
<title>二级流程责任人</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Address</componentId>
<componentSetting>{"placeholder":"","addressType":"user","isLiveSearch":true,"isAdvMode":false,"addressSetting":{"isMapFormat":false,"delimiter":" ","choiceType":"single"},"deptSourceField":"","deptTargetField":""}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode>readonly</componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>22a778dd-f8cc-4ca3-a43e-6fe2fae0fb02</id>
<name>SECONDARY_AUDIT_REQUIRED</name>
<title>是否需要二级审核</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue>1</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"0:是|1:否","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>e47ce54e-9db1-4fa8-b414-033f23e85f31</id>
<name>RESPONSIBLE_PERSON1</name>
<title>一级流程责任人</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Address</componentId>
<componentSetting>{"placeholder":"","addressType":"user","isLiveSearch":true,"isAdvMode":false,"addressSetting":{"isMapFormat":false,"delimiter":" ","choiceType":"single"},"deptSourceField":"","deptTargetField":""}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode>readonly</componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>c652271e-f9c4-4f59-893b-8e5b5d2cc4cf</id>
<name>LEVEL_1_AUDIT_REQUIRED</name>
<title>是否需要一级审核</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue>1</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.ComboBox</componentId>
<componentSetting>{"placeholder":"","boItemId":"5e321e6b-4b05-4b55-8aec-2bdbf7f9a499","isAdvance":false,"dataType":"sampleText","data":"0:是|1:否","mode":"common","exportDataValidity":true,"setunival":true,"boUrlFormData":{"hrefSelVal":"nothing"}}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode>onclick='checktype()' </componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>351776d3-70c4-4085-8d89-a230070064d4</id>
<name>SEND_SCOPE</name>
<title>发送范围</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Text</componentId>
<componentSetting>{"search":"0","placeholder":"","dataType":"localJDBC","data":{"sql":""},"isClearAllText":true,"barCode":false,"boUrlFormData":{"hrefSelVal":"nothing"},"extendType":"text","scanCodeAutoSubmit":false}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>72ca36ab-71d4-434a-a0de-b133750d9dfa</id>
<name>SYSTEM</name>
<title>流程/制度名称</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Text</componentId>
<componentSetting>{"search":"0"}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>3d823af8-0941-4be7-9841-88b801a4e4a3</id>
<name>NUMBER</name>
<title>流程/制度编号</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Text</componentId>
<componentSetting>{"search":"0"}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>e1b3c37d-5e35-4f31-aa85-a8a11a34048f</id>
<name>TEXT</name>
<title>正文</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.HTMLEditor</componentId>
<componentSetting>{"htmlHeight":"","htmlWidth":"","isAdvance":false,"isPasteplain":true,"waterMarkFlag":"","compressFlag":"","isSupportUpFile":true,"isSupportUpImg":true,"isWaterMark":true,"isCompress":true}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>8f9f40ad-7790-45c8-b45b-f9f2b02ed0e2</id>
<name>PROOFREADER</name>
<title>校对人</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>false</nullable>
<defaultValue>@userName()</defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Address</componentId>
<componentSetting>{"placeholder":"","addressType":"user","isLiveSearch":true,"isAdvMode":false,"addressSetting":{"isMapFormat":false,"delimiter":" ","choiceType":"single"},"deptSourceField":"","deptTargetField":""}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode>readonly</componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
<boItem>
<id>839140c2-296f-4d61-b06f-b67e5dfb742f</id>
<name>DEPARTMENT_CAME</name>
<title>会审部门</title>
<columnType>TEXT</columnType>
<length>128</length>
<nullable>true</nullable>
<defaultValue></defaultValue>
<columnWidth>100</columnWidth>
<componentId>AWSUI.Address</componentId>
<componentSetting>{"placeholder":"","addressType":"dept","isLiveSearch":true,"addressSetting":{"delimiter":",","choiceType":"multiple","leafType":"dept"},"range":"all","isFullDeptPath":false,"deptSourceField":"DEPTNAME","deptTargetField":"DEPARTMENT_CAME"}</componentSetting>
<display>true</display>
<deleted>false</deleted>
<modify>true</modify>
<componentExtendCode></componentExtendCode>
<persistenceType>ENTITY</persistenceType>
<validateType></validateType>
<validateRule></validateRule>
<validateTip></validateTip>
<validateErr>0</validateErr>
<tooltip></tooltip>
<copy>false</copy>
<displayRule></displayRule>
<calcFormula></calcFormula>
<propsVal>{}</propsVal>
</boItem>
</boItems>
<boIndexs>
<boIndex>
<id>4c7b43eb-be74-426c-a3ea-833b82ef3181</id>
<name>AWS_IN_7A7B032CF648</name>
<type>INDEX</type>
<boItems>BINDID</boItems>
</boIndex>
</boIndexs>
<boRelations/>
<hashFields></hashFields>
</boModel>

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